/* Catalog page — built on top of the shared .mg-car-card component (models.css) */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mg-catalog {
    --mg-field-h: 52px;
    --mg-field-bg: #171717;
    --mg-field-border: #292929;
    --mg-panel-bg: #202020;
    padding: clamp(1.25rem, 4vw, 2.5rem) 0 4rem;
}

/* Breadcrumbs */
.mg-catalog__breadcrumbs {
    margin-bottom: clamp(1rem, 3vw, 1.75rem);
}

.mg-catalog__breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.55);
}

.mg-catalog__breadcrumbs li {
    display: inline-flex;
    align-items: center;
}

.mg-catalog__breadcrumbs li + li::before {
    content: '/';
    margin-right: 0.4rem;
    color: rgba(255, 255, 255, 0.3);
}

.mg-catalog__breadcrumbs a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.mg-catalog__breadcrumbs a:hover {
    color: var(--mg-accent);
}

.mg-catalog__breadcrumbs [aria-current='page'] {
    color: #fff;
}

/* Head: title + search */
.mg-catalog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.mg-catalog__title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    white-space: nowrap;
}

.mg-catalog__search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    width: 100%;
    max-width: 620px;
    min-width: 0;
    height: 56px;
    padding: 0 0.45rem 0 2.9rem;
    border-radius: 65px;
    background: var(--mg-panel-bg);
}

.mg-catalog__search-icon {
    position: absolute;
    top: 50%;
    left: 1.05rem;
    width: 22px;
    height: 22px;
    color: rgba(255, 255, 255, 0.55);
    transform: translateY(-50%);
    pointer-events: none;
}

.mg-catalog__search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
}

.mg-catalog__search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.mg-catalog__search-input:focus {
    outline: none;
}

.mg-catalog__flags {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    padding-left: 0.25rem;
}

.mg-catalog__flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mg-catalog__flag img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    pointer-events: none;
}

.mg-catalog__flag:hover {
    opacity: 0.85;
}

.mg-catalog__flag.is-active,
.mg-catalog__flag[aria-pressed='true'] {
    opacity: 1;
    border-color: var(--mg-accent);
    transform: scale(1.06);
}

a.mg-catalog__flag {
    text-decoration: none;
    color: inherit;
}

.mg-catalog__flag:focus-visible {
    outline: 2px solid rgba(199, 169, 67, 0.65);
    outline-offset: 2px;
}

.mg-catalog__brands {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: 0 0 1.5rem;
}

.mg-catalog__brands a {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.875rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(199, 169, 67, 0.35);
}

.mg-catalog__brands a:hover {
    color: var(--mg-accent);
}

/* Filter panel */
.mg-filter {
    margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
    padding: clamp(1rem, 2.5vw, 1.75rem);
    border-radius: 30px;
    background: var(--mg-panel-bg);
}

.mg-filter__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.mg-filter__field {
    position: relative;
    min-height: var(--mg-field-h);
}

/* Selects */
.mg-filter__select {
    width: 100%;
    height: var(--mg-field-h);
    padding: 0 2.6rem 0 1.1rem;
    border: 1px solid var(--mg-field-border);
    border-radius: 65px;
    background: var(--mg-field-bg);
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    text-overflow: ellipsis;
}

.mg-filter__select:focus-visible {
    outline: none;
    border-color: rgba(199, 169, 67, 0.65);
}

.mg-filter__field--select.is-disabled {
    opacity: 0.45;
}

.mg-filter__chevron {
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.55);
    transform: translateY(-50%);
    pointer-events: none;
}

/* Range pairs (от / до) */
.mg-filter__range {
    display: flex;
    align-items: stretch;
}

.mg-filter__range-part {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    padding: 0 0.85rem;
    border: 1px solid var(--mg-field-border);
    background: var(--mg-field-bg);
    cursor: text;
}

.mg-filter__range-part:first-child {
    border-radius: 65px 0 0 65px;
    border-right: 0;
}

.mg-filter__range-part:last-child {
    border-radius: 0 65px 65px 0;
}

.mg-filter__range-cap {
    flex-shrink: 0;
    color: #fff;
    font-size: 0.8125rem;
    line-height: 1.1;
    white-space: nowrap;
}

.mg-filter__range-input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font: inherit;
    font-size: 0.875rem;
    text-align: right;
}

.mg-filter__range-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.mg-filter__range-input:focus {
    outline: none;
}

.mg-filter__range-input::-webkit-outer-spin-button,
.mg-filter__range-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mg-filter__range-input[type='number'] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Actions */
.mg-filter__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
}

.mg-filter__submit {
    min-height: var(--mg-field-h);
    padding: 0 1.85rem;
    border: 0;
    border-radius: 65px;
    background: #fff;
    color: #000;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mg-filter__submit:hover {
    background: var(--mg-accent);
    color: #171717;
}

.mg-filter__submit:active {
    transform: scale(0.98);
}

.mg-filter__reset {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: var(--mg-field-h);
    padding: 0 0.5rem;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mg-filter__reset svg {
    width: 18px;
    height: 18px;
}

.mg-filter__reset:hover {
    color: var(--mg-accent);
}

/* Category badge on card media */
.mg-car-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    padding: 0.3rem 0.7rem;
    border-radius: 65px;
    background: rgba(23, 23, 23, 0.92);
    color: var(--mg-accent);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}

.mg-car-card.is-paged-out {
    display: none !important;
}

/* Empty state */
.mg-catalog__empty {
    margin: 2.5rem 0 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.mg-catalog__empty a {
    color: var(--mg-accent);
    text-decoration: underline;
}

/* Pagination */
.mg-catalog__pagination {
    display: none;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: clamp(2rem, 4vw, 3rem);
}

.mg-catalog__pagination:not([hidden]) {
    display: flex;
}

.mg-catalog__pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.mg-catalog__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background: var(--mg-panel-bg);
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mg-catalog__page:hover {
    background: rgba(199, 169, 67, 0.3);
}

.mg-catalog__page.is-active {
    background: var(--mg-accent);
    color: #171717;
    font-weight: 700;
}

.mg-catalog__page--arrow svg {
    width: 20px;
    height: 20px;
}

.mg-catalog__page[disabled] {
    opacity: 0.4;
    cursor: default;
}

.mg-catalog__page[disabled]:hover {
    background: var(--mg-panel-bg);
}

/* Responsive */
@media (max-width: 1199px) {
    .mg-filter__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .mg-catalog__head {
        flex-direction: column;
        align-items: stretch;
    }

    .mg-catalog__title {
        white-space: normal;
    }

    .mg-catalog__search {
        flex: 0 0 auto;
        max-width: none;
    }

    .mg-filter__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .mg-filter__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .mg-filter__actions {
        justify-content: stretch;
    }

    .mg-filter__submit {
        flex: 1 1 100%;
        order: 2;
    }

    .mg-filter__reset {
        order: 1;
        justify-content: center;
        width: 100%;
    }
}

/* Страница автомобиля */
.mg-catalog-show {
    padding: clamp(1.25rem, 3vw, 2rem) 0 0;
}

.mg-catalog-show__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.55);
}

.mg-catalog-show__breadcrumb a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s ease;
}

.mg-catalog-show__breadcrumb a:hover {
    color: var(--mg-accent);
}

.mg-catalog-show__title {
    margin: 0 0 clamp(1.25rem, 2.5vw, 1.75rem);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}

.mg-catalog-show__card {
    display: grid;
    grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: start;
    padding: clamp(1.25rem, 2.5vw, 1.875rem);
    border-radius: clamp(20px, 2.5vw, 30px);
    background: #202020;
}

.mg-catalog-show__specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}

.mg-catalog-show__spec {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 65px;
    background: #171717;
}

.mg-catalog-show__spec-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    line-height: 1.2;
}

.mg-catalog-show__spec-value {
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: right;
}

.mg-catalog-show__spec-value.is-success {
    color: #4ec743;
}

.mg-catalog-show__description {
    margin: 0 0 clamp(1.5rem, 3vw, 2rem);
    max-width: 580px;
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
}

.mg-catalog-show__buy {
    display: grid;
    gap: clamp(1rem, 2.5vw, 1.75rem);
}

.mg-catalog-show__price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.mg-catalog-show__prices {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem 0.875rem;
}

.mg-catalog-show__price {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1;
    color: var(--mg-accent);
}

.mg-catalog-show__price-byn {
    margin: -0.25rem 0 0;
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-weight: 700;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.78);
}

.mg-catalog-show__price-old {
    margin: 0;
    font-size: clamp(1.25rem, 2.5vw, 1.875rem);
    font-weight: 700;
    color: #fff;
    text-decoration: line-through;
    opacity: 0.85;
}

.mg-catalog-show__why {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    max-width: 300px;
    margin: 0;
    padding: 0.5rem 1.25rem 0.5rem 0.625rem;
    border: 1px solid var(--mg-accent);
    border-radius: 65px;
    background: rgba(199, 169, 67, 0.2);
    font-size: 0.8125rem;
    line-height: 1.25;
    color: #fff;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.mg-catalog-show__why:hover {
    opacity: 0.9;
}

.mg-catalog-show__why:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.mg-catalog-show__why-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--mg-accent);
    color: #171717;
    font-size: 1.125rem;
    font-weight: 800;
}

.mg-catalog-show__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.mg-catalog-show__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 230px;
    min-height: 50px;
    padding: 0 1.75rem;
    border: 0;
    border-radius: 65px;
    background: var(--mg-accent);
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.mg-catalog-show__cta:hover {
    opacity: 0.9;
    color: #fff;
}

.mg-catalog-show__online {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0;
    font-size: 0.875rem;
    color: #fff;
}

.mg-catalog-show__online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ec743;
    box-shadow: 0 0 0 5px rgba(78, 199, 67, 0.2);
}

.mg-catalog-show__modal[hidden] {
    display: none;
}

.mg-catalog-show__modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.mg-catalog-show__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.mg-catalog-show__modal-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    padding: 1.5rem;
    border-radius: 18px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.mg-catalog-show__modal-close {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.mg-catalog-show__modal-title {
    margin: 0 2rem 0.875rem 0;
    font-size: 1.25rem;
    line-height: 1.25;
}

.mg-catalog-show__modal-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
}

.mg-catalog-show__modal-list {
    margin: 0.875rem 0;
    padding-left: 1.125rem;
    display: grid;
    gap: 0.375rem;
    color: rgba(255, 255, 255, 0.95);
}

.mg-catalog-show__modal-dialog--order {
    width: min(480px, 100%);
}

.mg-catalog-show__modal-text--car {
    margin: 0 0 1.25rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.72);
}

.mg-catalog-order-form {
    display: grid;
    gap: 0.75rem;
}

.mg-catalog-order-form__field input {
    width: 100%;
    height: 52px;
    padding: 0 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 65px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
}

.mg-catalog-order-form__field input::placeholder {
    color: rgba(255, 255, 255, 0.58);
}

.mg-catalog-order-form__field input:focus {
    outline: none;
    border-color: var(--mg-accent);
}

.mg-catalog-order-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin-top: 0.25rem;
    padding: 0 1.5rem;
    border: 0;
    border-radius: 65px;
    background: var(--mg-accent);
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.mg-catalog-order-form__submit:hover {
    opacity: 0.92;
}

.mg-catalog-order-form__errors {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(169, 68, 68, 0.18);
    color: #ffcaca;
    font-size: 0.875rem;
    list-style: none;
}

.mg-form-sent--modal {
    margin: 0;
}

.mg-catalog-show__gallery {
    position: relative;
}

.mg-catalog-show__gallery-frame {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #121212;
    aspect-ratio: 472 / 421;
    cursor: zoom-in;
    touch-action: pan-y pinch-zoom;
}

.mg-catalog-show__gallery-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mg-catalog-show__gallery-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.mg-catalog-show__gallery-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}

.mg-catalog-show__gallery-slide picture img,
.mg-catalog-show__gallery-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.mg-catalog-show__gallery-zoom {
    position: absolute;
    right: 0.875rem;
    bottom: 0.875rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    pointer-events: none;
}

.mg-catalog-show__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 320px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.875rem;
}

.mg-catalog-show__gallery-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 2vw, 1.75rem);
    margin-top: 1rem;
}

.mg-catalog-show__gallery-track {
    display: grid;
    gap: 0.625rem;
    flex: 1 1 auto;
    min-width: 0;
}

.mg-catalog-show__gallery-counter {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 400;
    color: #fff;
}

.mg-catalog-show__gallery-progress {
    position: relative;
    height: 3px;
    border-radius: 65px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.mg-catalog-show__gallery-progress-bar {
    display: block;
    height: 100%;
    min-width: 12%;
    border-radius: 65px;
    background: #fff;
    transition: width 0.3s ease;
}

.mg-catalog-show__gallery-nav {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}

.mg-catalog-show__gallery-btn {
    display: inline-flex;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mg-catalog-show__gallery-btn img {
    display: block;
    width: 50px;
    height: 50px;
}

.mg-catalog-show__gallery-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.mg-catalog-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 2.5rem);
}

.mg-catalog-lightbox[hidden] {
    display: none;
}

.mg-catalog-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
}

.mg-catalog-lightbox__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    width: min(1120px, 100%);
    max-height: calc(100vh - 2rem);
}

.mg-catalog-lightbox__close {
    position: absolute;
    top: -0.25rem;
    right: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mg-catalog-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mg-catalog-lightbox__stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: 100%;
    height: min(calc(100vh - 11rem), 820px);
    min-height: min(52vh, 480px);
    padding: clamp(0.75rem, 2vw, 1.25rem);
    border-radius: 20px;
    background: #121212;
    touch-action: pan-y pinch-zoom;
    box-sizing: border-box;
}

.mg-catalog-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    user-select: none;
    -webkit-user-drag: none;
}

.mg-catalog-lightbox__footer {
    width: 100%;
    margin-top: 0;
}

.mg-catalog-show__details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem) 11px;
    margin-top: clamp(2rem, 4vw, 3rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
}

.mg-catalog-show__detail {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mg-catalog-show__detail-title {
    margin: 0 0 30px;
    min-height: 2.46em;
    font-size: clamp(1.5rem, 2.5vw, 1.875rem);
    font-weight: 800;
    line-height: 1.23;
    color: #fff;
}

.mg-catalog-show__detail-list {
    display: grid;
    align-content: start;
    gap: 9px;
    margin: 0;
    padding: 21px 24px;
    border-radius: 15px;
    background: #202020;
}

.mg-catalog-show__detail-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: 17px;
    font-size: 0.875rem;
    line-height: 1.21;
}

.mg-catalog-show__detail-row dt {
    margin: 0;
    color: #fff;
    font-weight: 400;
}

.mg-catalog-show__detail-row dd {
    margin: 0;
    color: #fff;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.mg-catalog-show__similar {
    padding: 0 0 clamp(2rem, 4vw, 3rem);
}

.mg-catalog-show__similar-title {
    margin: 0 0 1.5rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}

.mg-catalog-show__similar-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.875rem;
}

.mg-catalog-show__similar-grid .mg-car-card {
    flex: 1 1 270px;
    max-width: calc(25% - 1.41rem);
}

.mg-catalog-lead {
    padding: 0 0 clamp(2.5rem, 5vw, 4rem);
}

.mg-catalog-lead__card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(1.25rem, 2.5vw, 2rem);
    align-items: center;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: 24px;
    background: var(--mg-accent);
    color: #fff;
}

.mg-catalog-lead__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
}

.mg-catalog-lead__text {
    margin: 0;
    max-width: 38rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
}

.mg-catalog-lead__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.mg-catalog-lead__field input {
    width: 100%;
    height: 52px;
    padding: 0 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 65px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
}

.mg-catalog-lead__field input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.mg-catalog-lead__field input:focus {
    outline: none;
    border-color: #fff;
}

.mg-catalog-lead__submit {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    min-height: 52px;
    padding: 0 1.5rem;
    border: 0;
    border-radius: 65px;
    background: #fff;
    color: #171717;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.mg-catalog-lead__submit:hover {
    opacity: 0.92;
}

@media (max-width: 991px) {
    .mg-catalog-show__card {
        grid-template-columns: 1fr;
    }

    .mg-catalog-show__gallery {
        order: -1;
    }

    .mg-catalog-show__details {
        grid-template-columns: 1fr;
        gap: clamp(1.5rem, 3vw, 2.5rem);
    }

    .mg-catalog-show__detail-title {
        min-height: 0;
    }

    .mg-catalog-show__similar-grid .mg-car-card {
        max-width: calc(50% - 0.94rem);
    }

    .mg-catalog-lead__card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 639px) {
    .mg-catalog-show__specs {
        grid-template-columns: 1fr;
    }

    .mg-catalog-show__cta {
        width: 100%;
    }

    .mg-catalog-show__similar-grid .mg-car-card {
        max-width: 100%;
    }

    .mg-catalog-lead__form {
        grid-template-columns: 1fr;
    }
}
