.autodoms {
    --autodoms-text: #4d4d4d;
    --autodoms-muted: #6c856d;
    --autodoms-green: #6c846d;
    --autodoms-line: #464646;

    --autodoms-font-display: "MakiSans", "Maki Sans", "Roboto", sans-serif;
    --autodoms-font-ui: "Roboto", sans-serif;

    --autodoms-h1-size: 48px;
    --autodoms-h1-lh: 56px;
    --autodoms-h1-ls: 0.02em;
    --autodoms-h1-weight: 500;

    --autodoms-h3-size: 24px;
    --autodoms-h3-ls: 0.04em;
    --autodoms-h3-weight: 600;

    --autodoms-body-size: 16px;
    --autodoms-body-ls: 0.02em;
    --autodoms-body-weight: 600;

    --autodoms-intro-max: 941px;
    --autodoms-line-w: 717.49px;
    --autodoms-lead-max: 625px;

    --autodoms-card-w: min(520px, 42vw);

    --autodoms-stage-max: 100%;
    --autodoms-gap: clamp(8px, 1.2vw, 20px);
    --autodoms-cols-4: minmax(0, 1.1fr) minmax(0, 1.15fr) minmax(0, 2.55fr) minmax(0, 1.15fr);
    --autodoms-cols-3: minmax(0, 1.2fr) minmax(0, 2.75fr) minmax(0, 1.2fr);
    --autodoms-stage-h: clamp(320px, 34vmin, 520px);
    --autodoms-arrow-page-inset: 0px;
    --autodoms-arrow-btn: 40px;

    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 2rem var(--layout-padding, var(--base-padding, 48px)) clamp(80px, 10vw, 160px);
    color: var(--autodoms-text);
    outline: none;

    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.autodoms *,
.autodoms *::before,
.autodoms *::after {
    box-sizing: border-box;
}

/* У `.autodoms` задан собственный `display: flex`, который перебивает
   низкоприоритетный UA-стиль `display: none` атрибута `[hidden]` — без этого
   правила секция, скрытая шаблоном (design.md, решение 3), была бы видна. */
.autodoms[hidden] {
    display: none;
}

.autodoms__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, var(--autodoms-card-w));
    gap: clamp(1.25rem, 2.5vw, 2rem);
    align-items: start;
    margin-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
}

.autodoms__intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    max-width: var(--autodoms-intro-max);
    text-align: left;
}

.autodoms__title {
    max-width: 100%;
    font-family: "Maki-Sans", "Arial", sans-serif;
    font-size: 48px;
    line-height: normal;
    letter-spacing: 2px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--autodoms-text);
}

.autodoms__title-line {
    width: min(100%, var(--autodoms-line-w));
    height: 5px;
    margin: 0 0 16px;
    display: block;
    object-fit: contain;
}

.autodoms__lead {
    margin: 0;
    max-width: var(--autodoms-lead-max);
    font-family: "Roboto", sans-serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 28px;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--autodoms-text);
    text-align: left;
}

.autodoms__tabs {
    display: none;
}

.autodoms__tab {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0 0 6px;
    margin: 0;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--autodoms-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.autodoms__tab.is-active {
    color: var(--autodoms-text);
    border-bottom-color: var(--autodoms-green);
}

.autodoms__info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    justify-self: end;
    align-self: start;
    width: 100%;
    max-width: var(--autodoms-card-w);
    min-width: 0;
}

.autodoms__info-inner {
    width: 100%;
    max-width: var(--autodoms-card-w);
    margin-left: auto;
    min-height: 0;
    height: auto;
    padding: clamp(20px, 2vw, 28px) clamp(24px, 3vw, 40px);
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.autodoms__info-title {
    margin: 0;
    width: 100%;
    max-width: 528px;
    margin-left: auto;
    font-family: var(--autodoms-font-ui);
    font-size: var(--autodoms-h3-size);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: var(--autodoms-h3-ls);
    text-transform: uppercase;
    text-align: right;
    color: var(--autodoms-text);
}

.autodoms__info-text {
    margin: 25px 0 0;
    width: 100%;
    max-width: 528px;
    margin-left: auto;
    font-family: var(--autodoms-font-ui);
    font-size: var(--autodoms-body-size);
    font-weight: var(--autodoms-body-weight);
    line-height: 1.45;
    letter-spacing: var(--autodoms-body-ls);
    text-transform: uppercase;
    text-align: right;
    color: var(--autodoms-muted);
}

.autodoms__slider {
    position: relative;
    z-index: 0;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
    padding: 0;
    box-sizing: border-box;
}

.autodoms__carousel {
    width: 100%;
    box-sizing: border-box;
    padding-left: calc(var(--autodoms-arrow-btn) + clamp(8px, 1.5vw, 16px));
    padding-right: calc(var(--autodoms-arrow-btn) + clamp(12px, 2.2vw, 24px));
}

.autodoms__stage-wrap {
    position: relative;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: clamp(1rem, 2.5vw, 1.75rem);
    min-height: calc(var(--autodoms-stage-h) + 28px);
    touch-action: pan-y;
}

.autodoms__arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--autodoms-arrow-btn);
    height: var(--autodoms-arrow-btn);
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    transform: translateY(-50%);
    opacity: 0.72;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.autodoms__arrow--prev {
    left: var(--autodoms-arrow-page-inset);
}

.autodoms__arrow--next {
    right: var(--autodoms-arrow-page-inset);
}

.autodoms__arrow:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.04);
}

.autodoms__arrow:focus-visible {
    outline: 2px solid var(--autodoms-green);
    outline-offset: 3px;
}

.autodoms__arrow img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.autodoms__stage {
    display: grid;
    grid-template-columns: var(--autodoms-cols-4);
    align-items: end;
    justify-items: center;
    column-gap: var(--autodoms-gap);
    row-gap: 0;
    width: 100%;
    max-width: var(--autodoms-stage-max);
    margin-inline: auto;
}

/* Слайд без сопоставленных презентационных материалов (rental-promo-blocks/spec.md,
   «Незнакомый класс отображается корректно») — нейтральная заливка вместо
   фото другого класса и вместо битой картинки. */
.autodoms__figure--placeholder {
    position: relative;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(108, 132, 109, 0.14), rgba(108, 132, 109, 0.05));
}

.autodoms__figure--placeholder .autodoms__img {
    visibility: hidden;
}

/* Элементы, ведущие в каталог по клику/Enter на текущий слайд (autodoms.js, makeSlideOpener). */
.autodoms__opener {
    cursor: pointer;
}

.autodoms__opener:focus-visible {
    outline: 2px solid var(--autodoms-green);
    outline-offset: 3px;
}

.autodoms__figure--thumb {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 0;
    min-width: 0;
    align-self: end;
}

.autodoms__figure--thumb .autodoms__img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    object-fit: contain;
    object-position: 50% 100%;
    user-select: none;
    pointer-events: none;
}

.autodoms__figure--hero {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
    z-index: 2;
    margin: 0;
    min-width: 0;
    align-self: end;
}

.autodoms__hero-column {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.autodoms__hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    aspect-ratio: 714 / 554;
    width: 100%;
    height: var(--autodoms-stage-h);
    max-height: var(--autodoms-stage-h);
}

.autodoms__figure--hero .autodoms__img {
    display: block;
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    object-fit: contain;
    object-position: 50% 100%;
    user-select: none;
    pointer-events: none;
}

.autodoms__figure--hero .autodoms__dots {
    position: absolute;
    left: 50%;
    top: 100%;
    margin-top: 10px;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    padding: 0;
    width: max-content;
    max-width: calc(100% + 2px);
    flex-wrap: wrap;
}

.autodoms__bottom {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: 0.25rem;
    width: 100%;
}

.autodoms__dot {
    flex-shrink: 0;
    width: 10.73px;
    height: 10.73px;
    padding: 0;
    border-radius: 50%;
    border: 0.72px solid var(--autodoms-line);
    background: transparent;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease;
}

.autodoms__dot.is-active {
    background: var(--autodoms-line);
    border-color: var(--autodoms-line);
}

.autodoms__dot:focus-visible {
    outline: 2px solid var(--autodoms-green);
    outline-offset: 2px;
}

.autodoms__cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 330px;
    max-width: 100%;
    height: 48px;
    padding: 16px 28px;
    border-radius: 10px;
    border: 1px solid var(--autodoms-green);
    background: var(--autodoms-green);
    color: #fff;
    font-family: var(--autodoms-font-ui);
    font-size: var(--autodoms-body-size);
    font-weight: var(--autodoms-body-weight);
    letter-spacing: var(--autodoms-body-ls);
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1;
    box-sizing: border-box;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.autodoms__cta:hover {
    background: #5a735b;
    border-color: #5a735b;
    color: #fff;
    transform: translateY(-1px);
}

.autodoms__cta:focus-visible {
    outline: 2px solid var(--autodoms-line);
    outline-offset: 3px;
}

@media (min-width: 1441px) {
    .autodoms {
        --autodoms-card-w: 640px;
        --autodoms-stage-h: clamp(360px, 38vmin, 580px);
    }

    .autodoms__info-inner {
        padding: 24px 48px 24px 72px;
    }
}

@media (max-width: 1440px) and (min-width: 1281px) {
    .autodoms {
        --autodoms-card-w: min(480px, 38vw);
        --autodoms-stage-h: clamp(300px, 32vmin, 460px);
    }

    .autodoms__title {
        font-size: 42px;
    }

    .autodoms__lead {
        font-size: 20px;
        line-height: 26px;
    }

    .autodoms__info-title {
        font-size: 22px;
    }

    .autodoms__info-text {
        margin-top: 16px;
        font-size: 15px;
    }
}

/* Две колонки уже тесно — стакаем, чтобы карточка не наезжала на заголовок */
@media (max-width: 1280px) and (min-width: 761px) {
    .autodoms {
        --autodoms-card-w: 100%;
        --autodoms-stage-h: clamp(280px, 34vmin, 420px);
        padding-bottom: clamp(64px, 8vw, 120px);
        gap: 1rem;
    }

    .autodoms__grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-bottom: 0.75rem;
        align-items: stretch;
    }

    .autodoms__intro {
        max-width: none;
    }

    .autodoms__title {
        font-size: 40px;
    }

    .autodoms__lead {
        max-width: 640px;
        font-size: 20px;
        line-height: 26px;
    }

    .autodoms__info {
        justify-self: stretch;
        max-width: none;
        width: 100%;
    }

    .autodoms__info-inner {
        margin-left: 0;
        max-width: none;
        padding: 22px 28px;
    }

    .autodoms__info-title,
    .autodoms__info-text {
        text-align: left;
        margin-left: 0;
        max-width: none;
    }

    .autodoms__info-text {
        margin-top: 14px;
    }

    .autodoms__stage {
        grid-template-columns: var(--autodoms-cols-3);
    }

    .autodoms__figure[data-autodoms-slot="0"] {
        display: none;
    }

    .autodoms__slider {
        margin-bottom: 1rem;
    }
}

@media (max-width: 960px) and (min-width: 761px) {
    .autodoms {
        --autodoms-stage-h: clamp(260px, 36vmin, 380px);
        padding: 1.75rem var(--layout-padding, var(--base-padding)) 3rem;
    }

    .autodoms__title {
        font-size: 36px;
    }

    .autodoms__lead {
        font-size: 18px;
        line-height: 24px;
    }

    .autodoms__bottom {
        justify-content: center;
    }

    .autodoms__cta {
        width: 100%;
        max-width: 330px;
    }
}

@media (max-width: 760px) {
    .autodoms {
        --autodoms-stage-h: clamp(280px, 48vw, 420px);
        --autodoms-arrow-btn: 36px;
        padding: 1.5rem var(--layout-padding, var(--base-padding)) 2.5rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .autodoms__grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-bottom: 1rem;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .autodoms__intro,
    .autodoms__info,
    .autodoms__slider {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .autodoms .autodoms__figure.autodoms__figure--thumb {
        display: none !important;
    }

    .autodoms .autodoms__stage {
        grid-template-columns: 1fr;
        max-width: 100%;
        width: 100%;
        column-gap: 0;
    }

    .autodoms .autodoms__hero-inner {
        max-height: none;
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
    }

    .autodoms__carousel {
        width: 100%;
        max-width: 100%;
        padding-left: calc(var(--autodoms-arrow-btn) + 8px);
        padding-right: calc(var(--autodoms-arrow-btn) + 8px);
    }

    .autodoms__info-inner {
        padding: 20px;
        border-radius: 16px;
        margin-left: 0;
        max-width: 100%;
    }

    .autodoms__info-title,
    .autodoms__info-text {
        text-align: left;
        margin-left: 0;
        max-width: 100%;
    }

    .autodoms__title {
        font-size: 32px;
        max-width: 100%;
    }

    .autodoms__title-line {
        width: 100%;
        max-width: 100%;
    }

    .autodoms__lead {
        display: none;
    }

    .autodoms__tabs {
        display: flex;
        flex-wrap: nowrap;
        gap: 16px;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-top: 4px;
    }

    .autodoms__tabs::-webkit-scrollbar {
        display: none;
    }

    .autodoms__tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .autodoms__info-title {
        display: none;
    }

    .autodoms__info-text {
        margin-top: 0;
    }

    .autodoms__bottom {
        justify-content: stretch;
        width: 100%;
    }

    .autodoms__cta {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 560px) {
    .autodoms {
        gap: 1rem;
        padding: 1.25rem var(--layout-padding, var(--base-padding)) 2rem;
    }

    .autodoms__title {
        font-size: 28px;
    }

    .autodoms__info-title {
        font-size: 20px;
    }

    .autodoms__info-inner {
        padding: 16px;
    }

    .autodoms__carousel {
        padding-left: calc(var(--autodoms-arrow-btn) + 4px);
        padding-right: calc(var(--autodoms-arrow-btn) + 4px);
    }
}

@media (max-width: 460px) {
    .autodoms {
        padding: 1rem var(--layout-padding, var(--base-padding)) 1.75rem;
    }

    .autodoms__title {
        font-size: 24px;
    }

    .autodoms__info-text {
        margin-top: 16px;
        font-size: 14px;
    }
}

@media (max-width: 385px) {
    .autodoms {
        --autodoms-arrow-btn: 32px;
        padding: 0.75rem var(--layout-padding, var(--base-padding)) 1.5rem;
    }

    .autodoms__arrow {
        width: var(--autodoms-arrow-btn);
        height: var(--autodoms-arrow-btn);
    }

    .autodoms__arrow img {
        width: 16px;
        height: 16px;
    }
}
