/* Shared components for the product landing pages. Keep this file loaded last. */

/* Remove the browser's native disclosure triangle from every new landing FAQ. */
:is(
    .klassicheskie-faq__list,
    .rimskie-faq__list,
    .zhalyuzi-faq__list,
    .markizy-info__list
) summary {
    display: block;
    list-style: none;
}

:is(
    .klassicheskie-faq__list,
    .rimskie-faq__list,
    .zhalyuzi-faq__list,
    .markizy-info__list
) summary::marker {
    content: "";
    font-size: 0;
}

:is(
    .klassicheskie-faq__list,
    .rimskie-faq__list,
    .zhalyuzi-faq__list,
    .markizy-info__list
) summary::-webkit-details-marker {
    display: none;
}

/* Production block: one rhythm and one image ratio on every new landing. */
.page-markizy .markizy-production,
.page-rimskie-shtory .rimskie-production,
.page-zhalyuzi .zhalyuzi-production,
.page-klassicheskie-shtory .klassicheskie-production {
    padding-top: clamp(68px, 6vw, 84px);
    padding-bottom: clamp(68px, 6vw, 84px);
}

.page-markizy .markizy-production__grid,
.page-rimskie-shtory .rimskie-production__grid,
.page-zhalyuzi .zhalyuzi-production__grid,
.page-klassicheskie-shtory .klassicheskie-production__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: clamp(32px, 4vw, 64px);
}

.page-markizy .markizy-production h2,
.page-rimskie-shtory .rimskie-production h2,
.page-zhalyuzi .zhalyuzi-production h2,
.page-klassicheskie-shtory .klassicheskie-production h2 {
    font-size: clamp(38px, 4vw, 56px);
    line-height: 1.12;
    letter-spacing: -.025em;
}

.page-markizy .markizy-production__media,
.page-rimskie-shtory .rimskie-production__visual,
.page-zhalyuzi .zhalyuzi-production__visual,
.page-klassicheskie-shtory .klassicheskie-production__visual {
    width: 100%;
    max-width: 632px;
    aspect-ratio: 4 / 3;
    justify-self: end;
    overflow: hidden;
    border-radius: 24px;
}

.page-markizy .markizy-production__media img,
.page-rimskie-shtory .rimskie-production__visual img,
.page-zhalyuzi .zhalyuzi-production__visual img,
.page-klassicheskie-shtory .klassicheskie-production__visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-markizy .markizy-production__grid > div:first-child,
.page-rimskie-shtory .rimskie-production__copy,
.page-zhalyuzi .zhalyuzi-production__copy,
.page-klassicheskie-shtory .klassicheskie-production__copy {
    width: 100%;
    max-width: 620px;
}

/* Use the same clean production image as on the Markizy landing. */
.page-rimskie-shtory .rimskie-production__caption,
.page-zhalyuzi .zhalyuzi-production__caption,
.page-klassicheskie-shtory .klassicheskie-production__caption {
    display: none;
}

/* The directory is one partial; the current landing must read as a state. */
.landing-directory__grid {
    align-items: stretch;
}

.landing-directory__card {
    height: 100%;
}

.landing-directory__card.is-current {
    box-shadow: inset 0 0 0 2px #efbd83, 0 14px 38px rgba(40, 38, 36, .16);
}

.landing-directory__card.is-current .landing-directory__action {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(239, 189, 131, .13);
}

@media (max-width: 900px) {
    .page-markizy .markizy-production,
    .page-rimskie-shtory .rimskie-production,
    .page-zhalyuzi .zhalyuzi-production,
    .page-klassicheskie-shtory .klassicheskie-production {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .page-markizy .markizy-production__grid,
    .page-rimskie-shtory .rimskie-production__grid,
    .page-zhalyuzi .zhalyuzi-production__grid,
    .page-klassicheskie-shtory .klassicheskie-production__grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .page-markizy .markizy-production__media,
    .page-rimskie-shtory .rimskie-production__visual,
    .page-zhalyuzi .zhalyuzi-production__visual,
    .page-klassicheskie-shtory .klassicheskie-production__visual {
        max-width: none;
        justify-self: stretch;
    }
}

@media (max-width: 600px) {
    .page-markizy .markizy-production,
    .page-rimskie-shtory .rimskie-production,
    .page-zhalyuzi .zhalyuzi-production,
    .page-klassicheskie-shtory .klassicheskie-production {
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .page-markizy .markizy-production h2,
    .page-rimskie-shtory .rimskie-production h2,
    .page-zhalyuzi .zhalyuzi-production h2,
    .page-klassicheskie-shtory .klassicheskie-production h2 {
        font-size: 36px;
    }
}

/* Shared comparison block: tactile cards instead of flat text panels. */
:is(
    .page-klassicheskie-shtory .klassicheskie-comparison,
    .page-rimskie-shtory .rimskie-comparison,
    .page-zhalyuzi .zhalyuzi-comparison
) {
    position: relative;
    overflow: hidden;
    background: #f4f1ed;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison,
    .page-rimskie-shtory .rimskie-comparison,
    .page-zhalyuzi .zhalyuzi-comparison
) :is(.klassicheskie-heading, .rimskie-heading, .zhalyuzi-heading) {
    max-width: 900px;
    margin-bottom: 36px;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__grid,
    .page-rimskie-shtory .rimskie-comparison__grid,
    .page-zhalyuzi .zhalyuzi-comparison__grid
) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: stretch;
    gap: 18px;
    margin-bottom: 34px;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__card,
    .page-rimskie-shtory .rimskie-comparison__card,
    .page-zhalyuzi .zhalyuzi-comparison__card
) {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 34px;
    border: 0;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(62, 48, 35, .08);
    transition: transform .25s ease, box-shadow .25s ease;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__card--accent,
    .page-rimskie-shtory .rimskie-comparison__card--accent,
    .page-zhalyuzi .zhalyuzi-comparison__card--accent
) {
    background: #eadcca;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__card:nth-child(3n),
    .page-rimskie-shtory .rimskie-comparison__card:nth-child(3n),
    .page-zhalyuzi .zhalyuzi-comparison__card:nth-child(3n),
    .page-klassicheskie-shtory .klassicheskie-comparison__card:nth-child(2):last-child,
    .page-rimskie-shtory .rimskie-comparison__card:nth-child(2):last-child,
    .page-zhalyuzi .zhalyuzi-comparison__card:nth-child(2):last-child
) {
    background: #35312e;
    color: #fff;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__number,
    .page-rimskie-shtory .rimskie-comparison__number,
    .page-zhalyuzi .zhalyuzi-comparison__number
) {
    display: none;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__card,
    .page-rimskie-shtory .rimskie-comparison__card,
    .page-zhalyuzi .zhalyuzi-comparison__card
) h3 {
    position: relative;
    z-index: 1;
    max-width: none;
    margin: 0 0 28px;
    color: #242220;
    font-size: clamp(26px, 2.2vw, 32px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.015em;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__card,
    .page-rimskie-shtory .rimskie-comparison__card,
    .page-zhalyuzi .zhalyuzi-comparison__card
) dl {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    margin: 0;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__card,
    .page-rimskie-shtory .rimskie-comparison__card,
    .page-zhalyuzi .zhalyuzi-comparison__card
) dl > div {
    padding: 16px 18px;
    border-radius: 18px;
    background: #f5f1ec;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__card--accent,
    .page-rimskie-shtory .rimskie-comparison__card--accent,
    .page-zhalyuzi .zhalyuzi-comparison__card--accent
) dl > div {
    background: rgba(255, 255, 255, .56);
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__card,
    .page-rimskie-shtory .rimskie-comparison__card,
    .page-zhalyuzi .zhalyuzi-comparison__card
) dt {
    margin: 0 0 6px;
    color: #a36936;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__card,
    .page-rimskie-shtory .rimskie-comparison__card,
    .page-zhalyuzi .zhalyuzi-comparison__card
) dd {
    margin: 0;
    color: #514b46;
    font-size: 15px;
    line-height: 1.5;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__card:nth-child(3n),
    .page-rimskie-shtory .rimskie-comparison__card:nth-child(3n),
    .page-zhalyuzi .zhalyuzi-comparison__card:nth-child(3n),
    .page-klassicheskie-shtory .klassicheskie-comparison__card:nth-child(2):last-child,
    .page-rimskie-shtory .rimskie-comparison__card:nth-child(2):last-child,
    .page-zhalyuzi .zhalyuzi-comparison__card:nth-child(2):last-child
) h3 {
    color: #fff;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__card:nth-child(3n),
    .page-rimskie-shtory .rimskie-comparison__card:nth-child(3n),
    .page-zhalyuzi .zhalyuzi-comparison__card:nth-child(3n),
    .page-klassicheskie-shtory .klassicheskie-comparison__card:nth-child(2):last-child,
    .page-rimskie-shtory .rimskie-comparison__card:nth-child(2):last-child,
    .page-zhalyuzi .zhalyuzi-comparison__card:nth-child(2):last-child
) dl > div {
    background: rgba(255, 255, 255, .08);
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__card:nth-child(3n),
    .page-rimskie-shtory .rimskie-comparison__card:nth-child(3n),
    .page-zhalyuzi .zhalyuzi-comparison__card:nth-child(3n),
    .page-klassicheskie-shtory .klassicheskie-comparison__card:nth-child(2):last-child,
    .page-rimskie-shtory .rimskie-comparison__card:nth-child(2):last-child,
    .page-zhalyuzi .zhalyuzi-comparison__card:nth-child(2):last-child
) dt {
    color: #efbd83;
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison__card:nth-child(3n),
    .page-rimskie-shtory .rimskie-comparison__card:nth-child(3n),
    .page-zhalyuzi .zhalyuzi-comparison__card:nth-child(3n),
    .page-klassicheskie-shtory .klassicheskie-comparison__card:nth-child(2):last-child,
    .page-rimskie-shtory .rimskie-comparison__card:nth-child(2):last-child,
    .page-zhalyuzi .zhalyuzi-comparison__card:nth-child(2):last-child
) dd {
    color: rgba(255, 255, 255, .82);
}

:is(
    .page-klassicheskie-shtory .klassicheskie-comparison,
    .page-rimskie-shtory .rimskie-comparison,
    .page-zhalyuzi .zhalyuzi-comparison
) > .container > .btn-dark {
    min-width: 230px;
    border-radius: 16px;
}

@media (hover: hover) {
    :is(
        .page-klassicheskie-shtory .klassicheskie-comparison__card,
        .page-rimskie-shtory .rimskie-comparison__card,
        .page-zhalyuzi .zhalyuzi-comparison__card
    ):hover {
        transform: translateY(-4px);
        box-shadow: 0 24px 58px rgba(62, 48, 35, .13);
    }
}

@media (max-width: 700px) {
    :is(
        .page-klassicheskie-shtory .klassicheskie-comparison__grid,
        .page-rimskie-shtory .rimskie-comparison__grid,
        .page-zhalyuzi .zhalyuzi-comparison__grid
    ) {
        grid-template-columns: 1fr;
    }

    :is(
        .page-klassicheskie-shtory .klassicheskie-comparison__card,
        .page-rimskie-shtory .rimskie-comparison__card,
        .page-zhalyuzi .zhalyuzi-comparison__card
    ) {
        padding: 26px;
        border-radius: 24px;
    }

    :is(
        .page-klassicheskie-shtory .klassicheskie-comparison__card,
        .page-rimskie-shtory .rimskie-comparison__card,
        .page-zhalyuzi .zhalyuzi-comparison__card
    ) h3 {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    :is(
        .page-klassicheskie-shtory .klassicheskie-comparison__card,
        .page-rimskie-shtory .rimskie-comparison__card,
        .page-zhalyuzi .zhalyuzi-comparison__card
    ) {
        transition: none;
    }
}

/* Единая ссылка из продуктовых посадочных в соответствующий раздел каталога */
.landing-catalog-cta {
    padding: 0 0 40px;
}

.landing-catalog-cta__inner {
    display: flex;
    justify-content: center;
}

.landing-catalog-cta__link {
    width: min(100%, 430px);
    min-height: 68px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 28px;
    border-radius: 18px;
    color: #fff;
    background: #262320;
    box-shadow: 0 18px 40px rgba(38, 35, 32, .12);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}

@media (hover: hover) {
    .landing-catalog-cta__link:hover {
        color: #fff;
        background: #b2773e;
        box-shadow: 0 22px 46px rgba(96, 65, 37, .18);
        transform: translateY(-2px);
    }
}

@media (max-width: 700px) {
    .landing-catalog-cta {
        padding-bottom: 32px;
    }

    .landing-catalog-cta__link {
        min-height: 60px;
        border-radius: 16px;
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-catalog-cta__link {
        transition: none;
    }
}
