/* Kotanyi 145 Years - Reset & Variables */
:root {
    --color-primary: #c41e3a;
    --color-primary-dark: #9a1830;
    --color-secondary: #2d5a27;
    --color-gold: #c9a227;
    --color-cream: #ffffff;
    --color-dark: #2c2c2c;
    --color-text: #333;
    --color-text-light: #666;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, sans-serif;
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 20px rgba(0,0,0,0.1);

    /* Responsive layout tokens (target widths: 320/375/425/768/1024/1440/2560) */
    --container-max: 1400px;
    --page-pad: 1.25rem;
    --page-pad-lg: 2rem;
    --tap-min: 44px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Touch-friendly tap targets on mobile */
@media (max-width: 1024px) {
    .nav-item > a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    background: #fff;
}

/* Common container padding driven by tokens */
.header-top,
.header-inner {
    padding-left: max(var(--page-pad-lg), env(safe-area-inset-left, 0px));
    padding-right: max(var(--page-pad-lg), env(safe-area-inset-right, 0px));
}

@media (max-width: 1024px) {
    :root {
        --page-pad-lg: 1.25rem;
    }
}

@media (max-width: 768px) {
    :root {
        --page-pad-lg: 1rem;
    }
}

@media (max-width: 425px) {
    :root {
        --page-pad-lg: 0.9rem;
    }
}

@media (max-width: 375px) {
    :root {
        --page-pad-lg: 0.85rem;
    }
}

@media (max-width: 320px) {
    :root {
        --page-pad-lg: 0.75rem;
    }
}

@media (min-width: 1440px) {
    :root {
        --container-max: 1500px;
        --page-pad-lg: 2.25rem;
        --ui-scale: 1.08;
    }

    /* Header: make it feel less tiny on large screens */
    .header-top {
        --header-height: 90px;
        --header-mark-size: var(--header-height);
    }

    .header-top .nav-list--header-main .nav-item > a {
        font-size: clamp(1.08rem, 0.95rem + 0.35vw, 1.24rem);
    }

    .header-top .header-contacts-phone {
        font-size: 1.06rem;
    }

    .header-top .header-contacts-email {
        font-size: 0.92rem;
    }

    /* Home hero overlay: scale text + logos up */
    body.page-home .home-hero.home-hero--fullwidth .home-hero-overlay {
        width: calc(min(920px, 66vw) - 40px);
        right: calc(clamp(3.25rem, 14vw, 9.5rem) + 130px);
    }

    .home-hero-overlay__inner {
        max-width: 700px;
    }

    .home-hero-overlay__title-main {
        font-size: clamp(2.35rem, 3.2vw, 3.4rem);
    }

    .home-hero-overlay__title-sub {
        font-size: clamp(2.15rem, 2.95vw, 3.15rem);
    }

    .home-hero-overlay__lead {
        font-size: clamp(1.25rem, 1.65vw, 1.8rem);
    }

    .home-hero-overlay__logo {
        height: clamp(56px, 3.6vw, 92px);
    }

    .home-hero-overlay__logo--milford {
        height: clamp(50px, 3.2vw, 82px);
    }
}

@media (min-width: 2560px) {
    :root {
        --container-max: 1760px;
        --page-pad-lg: 2.75rem;
        --ui-scale: 1.18;
    }

    /* Header: larger tap targets & typography for 4K */
    .header-top {
        --header-height: 102px;
        --header-mark-size: var(--header-height);
        padding-top: 1.15rem;
        padding-bottom: 1.05rem;
    }

    .header-top .nav-list--header-main .nav-item > a {
        font-size: 1.3rem;
    }

    .header-top .lang-switch-btn {
        font-size: 0.82rem;
        padding: 0.42rem 0.62rem;
    }

    .header-top .header-contacts-phone {
        font-size: 1.14rem;
    }

    .header-top .header-contacts-email {
        font-size: 1rem;
    }

    /* Home hero overlay: noticeably bigger on 4K */
    body.page-home .home-hero.home-hero--fullwidth .home-hero-overlay {
        width: calc(min(1080px, 60vw) - 40px);
        right: calc(clamp(3.25rem, 12vw, 10.5rem) + 105px);
    }

    .home-hero-overlay__inner {
        max-width: 820px;
    }

    .home-hero-overlay__title-main {
        font-size: 3.85rem;
    }

    .home-hero-overlay__title-sub {
        font-size: 3.55rem;
    }

    .home-hero-overlay__lead {
        font-size: 2.05rem;
    }

    .home-hero-overlay__logo {
        height: 110px;
    }

    .home-hero-overlay__logo--milford {
        height: 98px;
    }
}

body[data-page="about"],
body[data-page="gde_kupit"],
body[data-page="horeca"],
body[data-page="product"],
body[data-page="brand_catalog"] {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition), opacity var(--transition);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding-top: env(safe-area-inset-top, 0px);
    background: #fff;
    backdrop-filter: none;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    transition: transform var(--transition), background var(--transition);
}

.header.hidden {
    transform: translateY(-100%);
}

.header--transparent {
    background: #fff;
    backdrop-filter: none;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header--transparent .nav-item > a,
.header--transparent .header-brand {
    color: var(--color-dark);
}

.header--transparent .menu-toggle .menu-line {
    background: var(--color-dark);
}

.header--transparent.header--solid {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header--transparent.header--solid .nav-item > a,
.header--transparent.header--solid .header-brand {
    color: var(--color-dark);
}

.header--transparent.header--solid .menu-toggle .menu-line {
    background: var(--color-dark);
}

.header-inner,
.header-top {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-top {
    width: 100%;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.65rem, 1.8vw, 1.5rem);
    flex-wrap: nowrap;
    /* Fixed header height so the logo can fill it vertically */
    --header-height: 78px;
    /* Backward compatibility for any legacy header sizing */
    --header-mark-size: var(--header-height);
    box-sizing: border-box;
}

/* Closed header: lock height so <img> can be 100% tall.
   Keep .header.nav-open layout unaffected (mobile fullscreen menu). */
.header:not(.nav-open) .header-top {
    height: var(--header-height);
    padding-top: 0;
    padding-bottom: 0;
}

@media (min-width: 1025px) {
    .header-top {
        padding-top: 0.85rem;
        padding-bottom: 0.75rem;
        padding-inline: max(0.55rem, env(safe-area-inset-left, 0px)) max(0.55rem, env(safe-area-inset-right, 0px));
    }

    .header-brand {
        margin-left: clamp(0.55rem, 2.2vw, 2rem);
    }

    .header-right {
        margin-inline-end: clamp(1.1rem, 3vw, 2.65rem);
    }

    .header-top .nav-list--header-main .nav-item > a {
        font-size: clamp(1.04rem, 1rem + 0.4vw, 1.16rem);
    }

    .header-top .lang-switch-btn {
        font-size: 0.72rem;
        padding: 0.34rem 0.52rem;
    }

    .header-top .header-contacts-phone {
        font-size: 1rem;
    }

    .header-top .header-contacts-email {
        font-size: 0.84rem;
    }
}

.nav--main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
}

.nav-list--header-main {
    gap: clamp(0.75rem, 1.05vw, 1.2rem);
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.header-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
    margin-right: 0;
    margin-left: clamp(0.45rem, 2vw, 1.75rem);
    text-decoration: none;
    color: inherit;
    align-self: stretch;
}

.header-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    box-sizing: border-box;
    height: var(--header-mark-size);
    min-height: var(--header-mark-size);
    max-height: var(--header-mark-size);
    padding-block: 0;
    line-height: 1;
    font-family: var(--font-body);
    font-weight: 800;
    /* Две строки по верху/низу блока = высота марки */
    font-size: clamp(0.82rem, calc((var(--header-mark-size) - 2px) / 2.05), 1.38rem);
    letter-spacing: 0.055em;
    text-transform: uppercase;
    color: inherit;
}

.header-brand-text__line {
    display: block;
    line-height: 1;
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    /* Same rhythm as .header-actions (lang ↔ instagram ↔ …) */
    gap: 0.65rem;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    padding-inline-start: 0;
    box-sizing: border-box;
    /* Сдвиг всего правого блока (меню + язык + контакты) влево от края окна */
    margin-inline-end: clamp(0.35rem, 1.4vw, 1.1rem);
}

.header-contacts {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: center;
    gap: 0.12rem;
    line-height: 1.25;
    text-align: right;
    flex-shrink: 0;
}

/* Cloned contacts for mobile menu (injected by script.js).
   Must stay hidden on desktop to avoid duplication in the top bar. */
.nav-mobile-contacts {
    display: none;
}

.header-contacts-phone,
.header-contacts-email {
    font-family: var(--font-body);
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.header-contacts-phone {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.header-contacts-email {
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
}

/* Header is now always solid (no transparent variant). Keep markup class
   compatibility but render it like the solid header everywhere. */
.header--transparent .header-contacts-phone,
.header--transparent .header-contacts-email {
    color: var(--color-dark);
    text-shadow: none;
}

.header--transparent .header-contacts-email {
    color: var(--color-text-light);
}

.header--transparent.header--solid .header-contacts-phone,
.header--transparent.header--solid .header-contacts-email {
    color: var(--color-dark);
    text-shadow: none;
}

.header--transparent.header--solid .header-contacts-email {
    color: var(--color-text-light);
}

.header.nav-open .header-contacts-phone,
.header.nav-open .header-contacts-email {
    color: var(--color-dark);
    text-shadow: none;
}

.header.nav-open .header-contacts-email {
    color: var(--color-text-light);
}

.header-contacts-phone:hover,
.header-contacts-email:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.header-instagram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    color: var(--color-dark);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: background var(--transition), transform var(--transition), color var(--transition), border-color var(--transition);
    flex: 0 0 auto;
}

.header-instagram svg {
    width: 19px;
    height: 19px;
}

.header-instagram:hover {
    background: rgba(196, 30, 58, 0.08);
    border-color: rgba(196, 30, 58, 0.25);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.header-instagram:active {
    transform: translateY(0);
}

.header-instagram:focus-visible {
    outline: 2px solid rgba(45, 106, 79, 0.45);
    outline-offset: 3px;
}

.header-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    color: var(--color-dark);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), color var(--transition), border-color var(--transition);
    flex: 0 0 auto;
}

.header-search:hover {
    background: rgba(45, 90, 39, 0.08);
    border-color: rgba(45, 90, 39, 0.22);
    color: var(--color-secondary);
    transform: translateY(-1px);
}

.header-search:active {
    transform: translateY(0);
}

.header-search:focus-visible {
    outline: 2px solid rgba(45, 106, 79, 0.45);
    outline-offset: 3px;
}

.header.header--transparent:not(.header--solid) .header-search {
    color: #1b4332;
    background: rgba(27, 67, 50, 0.08);
    border-color: rgba(27, 67, 50, 0.12);
}

.header.header--transparent:not(.header--solid) .header-search:hover {
    background: rgba(45, 106, 79, 0.14);
    border-color: rgba(45, 106, 79, 0.25);
    color: #2d6a4f;
}

/* Search modal */
.search-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
}

.search-modal.is-open {
    display: block;
}

.search-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.search-modal-card {
    position: relative;
    z-index: 1;
    width: min(1080px, calc(100vw - 2rem));
    max-height: min(84vh, 820px);
    margin: calc(var(--header-height, 78px) + 18px) auto 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-modal-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.search-input-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.search-input {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    font-family: var(--font-body);
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: rgba(45, 90, 39, 0.65);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.12);
}

.search-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.03);
    cursor: pointer;
    font-size: 1.05rem;
}

.search-filters {
    padding: 0.8rem 1rem 0.2rem;
    display: grid;
    gap: 0.75rem;
}

.search-filter-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(44, 44, 44, 0.7);
    margin-bottom: 0.35rem;
}

.search-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-pill {
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.03);
    color: rgba(44, 44, 44, 0.85);
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    font-size: 0.92rem;
    transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.search-pill:hover {
    transform: translateY(-1px);
    background: rgba(45, 90, 39, 0.06);
    border-color: rgba(45, 90, 39, 0.22);
}

.search-pill.is-active {
    background: rgba(45, 90, 39, 0.12);
    border-color: rgba(45, 90, 39, 0.35);
    color: rgba(45, 90, 39, 0.95);
    font-weight: 700;
}

.search-results {
    padding: 0.75rem 1rem 1rem;
    overflow: auto;
}

.search-empty {
    padding: 1rem 0.25rem;
    color: rgba(44, 44, 44, 0.7);
}

.search-name {
    font-weight: 700;
    color: rgba(44, 44, 44, 0.92);
}

.search-meta {
    font-size: 0.88rem;
    color: rgba(44, 44, 44, 0.62);
}

/* Search results: text list */
.search-list {
    list-style: none;
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
}

.search-link {
    display: flex;
    flex-direction: column;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(0, 0, 0, 0.02);
}

.search-link-row {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 0.75rem;
    align-items: center;
}

.search-thumb {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.search-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.search-text {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.search-link:hover {
    background: rgba(45, 90, 39, 0.05);
    border-color: rgba(45, 90, 39, 0.18);
}

@media (max-width: 768px) {
    .header-search {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .search-modal-card {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        border-radius: 0;
        padding-top: calc(var(--header-height, 70px) + env(safe-area-inset-top, 0px));
    }

    .search-modal-head {
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 2;
    }
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    padding: 0.12rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* No transparency in the header UI */
.header--transparent .lang-switch {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.08);
}

.header--transparent.header--solid .lang-switch {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.08);
}

.lang-switch-btn {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.42rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    background: transparent;
    color: inherit;
    opacity: 0.65;
    transition: opacity var(--transition), background var(--transition), color var(--transition);
}

.lang-switch-btn:hover {
    opacity: 1;
}

.lang-switch-btn.is-active {
    opacity: 1;
    background: rgba(196, 30, 58, 0.12);
    color: var(--color-primary);
}

.header--transparent .lang-switch-btn {
    color: var(--color-dark);
}

.header--transparent .lang-switch-btn.is-active {
    background: rgba(196, 30, 58, 0.12);
    color: var(--color-primary);
}

.header--transparent.header--solid .lang-switch-btn {
    color: var(--color-dark);
}

.header--transparent.header--solid .lang-switch-btn.is-active {
    background: rgba(196, 30, 58, 0.12);
    color: var(--color-primary);
}

.header-logo {
    height: 100%;
    max-height: 100%;
    width: auto;
    max-width: none;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Uzbek: labels are longer — avoid menu overlapping the logo */
html[lang="uz"] .header-brand {
    flex-shrink: 1;
    min-width: 0;
}

html[lang="uz"] .header-logo {
    max-width: clamp(170px, 18vw, 220px);
}

html[lang="uz"] .header-top .nav-list--header-main {
    gap: clamp(0.55rem, 0.85vw, 0.95rem);
}

html[lang="uz"] .header-top .nav-list--header-main .nav-item > a {
    font-size: clamp(0.94rem, 0.9rem + 0.25vw, 1.06rem);
    letter-spacing: 0.005em;
}

@media (min-width: 1025px) and (max-width: 1280px) {
    html[lang="uz"] .header-top {
        gap: clamp(0.55rem, 1.1vw, 1.1rem);
    }
}

/* English can be long too — keep header stable */
html[lang="en"] .header-brand {
    flex-shrink: 1;
    min-width: 0;
}

html[lang="en"] .header-top .nav-item > a {
    white-space: nowrap;
}

@media (min-width: 1281px) and (max-width: 1500px) {
    html[lang="uz"] .header-logo,
    html[lang="en"] .header-logo {
        max-width: clamp(155px, 14vw, 205px);
    }

    html[lang="uz"] .header-top .nav-list--header-main,
    html[lang="en"] .header-top .nav-list--header-main {
        gap: clamp(0.52rem, 0.75vw, 0.9rem);
    }

    html[lang="uz"] .header-top .nav-list--header-main .nav-item > a,
    html[lang="en"] .header-top .nav-list--header-main .nav-item > a {
        font-size: clamp(0.92rem, 0.88rem + 0.22vw, 1.04rem);
    }
}

/* UZ: a bit tighter just before header collapses */
@media (min-width: 1281px) and (max-width: 1500px) {
    html[lang="uz"] .header-logo {
        max-width: clamp(148px, 13vw, 195px);
    }

    html[lang="uz"] .header-top .nav-list--header-main {
        gap: clamp(0.48rem, 0.68vw, 0.84rem);
    }

    html[lang="uz"] .header-top .nav-list--header-main .nav-item > a {
        font-size: clamp(0.9rem, 0.86rem + 0.2vw, 1.02rem);
    }
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle .menu-line {
    width: 21px;
    height: 2px;
    background: var(--color-dark);
    transition: var(--transition);
    transform-origin: center;
}

.menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.nav-overlay.visible {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 769px) {
    .nav-overlay {
        display: none !important;
    }
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    font-weight: 500;
    font-size: 0.95rem;
}

/* HoReCa nav item — выделяем красным цветом */
.nav-item.nav-item--horeca > a {
    color: var(--color-primary);
}

.nav-item.nav-item--horeca > a:hover {
    color: var(--color-primary-dark);
}

/* Шапка: пункты меню и длинные подписи (UZ) не переносятся */
.header-top .nav-item > a {
    white-space: nowrap;
}

.header-top .nav-list--header-main .nav-item > a {
    font-size: clamp(1rem, 0.95rem + 0.35vw, 1.12rem);
    font-weight: 600;
}

.nav-item > a:hover {
    color: var(--color-primary);
}

.nav-item > a.nav-trigger-active {
    color: var(--color-primary);
}

.products-mega-menu {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-18px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
    pointer-events: none;
}

.products-mega-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.products-mega-menu-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem 1.35rem;
}

.products-mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.55rem;
}

.products-mega-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    min-height: 108px;
    padding: 0.7rem 0.35rem;
    border-radius: 16px;
    text-align: center;
    color: var(--color-dark);
    transition: transform 0.25s ease, color 0.25s ease;
}

.products-mega-link:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
}

.products-mega-link img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.products-mega-link:hover img {
    transform: scale(1.06);
}

.products-mega-link span {
    font-size: 0.93rem;
    line-height: 1.2;
    font-weight: 500;
}

.products-mega-menu-grid--brands {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 760px;
    margin: 0 auto;
    justify-items: stretch;
    align-items: stretch;
    gap: 1rem 1.5rem;
}

.products-mega-menu-grid--brands > .products-mega-link--brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 7.85rem;
    width: 100%;
    max-width: 13rem;
    margin: 0 auto;
    padding: 0.65rem 0.5rem 0.55rem;
    box-sizing: border-box;
}

.products-mega-menu-grid--brands .products-mega-link--brand > img {
    flex: 0 0 auto;
    width: min(100%, 11rem);
    height: 4.1rem;
    max-height: 4.1rem;
    max-width: min(11rem, 100%);
    object-fit: contain;
    object-position: center center;
}

.products-mega-menu-grid--brands .products-mega-link--brand > span {
    flex: 0 0 auto;
    margin-top: 0.35rem;
    font-size: 0.9rem;
    line-height: 1.25;
    text-align: center;
    width: 100%;
}

.brand-pick-page {
    /* Высота фиксированной шапки: safe-area + вертикальные отступы .header-top + логотип */
    --brand-pick-header-gap: calc(1.15rem + 46px + 1.05rem + env(safe-area-inset-top, 0px));
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: min(1120px, 96vw);
    margin: 0 auto;
    padding: var(--brand-pick-header-gap) clamp(1.25rem, 4vw, 2rem) clamp(2rem, 4vh, 3rem);
    box-sizing: border-box;
    min-height: 0;
}

.brand-pick-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.02em;
    color: var(--color-dark);
    margin: 0 0 0.65rem;
}

.brand-pick-lead {
    font-size: 1.05rem;
    line-height: 1.5;
    text-align: center;
    color: rgba(44, 44, 44, 0.78);
    max-width: 36rem;
    margin: 0 auto 1.75rem;
}

.brand-pick-grid {
    width: 100%;
    max-width: min(980px, 100%);
    background: rgba(255, 255, 255, 0.65);
    border-radius: 22px;
    padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 3vw, 2rem) clamp(1.65rem, 3vw, 2.35rem);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.brand-pick-page .products-mega-menu-grid--brands {
    max-width: min(980px, 100%);
    gap: 1.25rem 2rem;
}

.brand-pick-page .products-mega-menu-grid--brands > .products-mega-link--brand {
    min-height: 8.75rem;
    max-width: min(18rem, 100%);
    padding: 0.85rem 0.65rem 0.65rem;
}

.brand-pick-page .products-mega-menu-grid--brands .products-mega-link--brand > img {
    width: min(100%, 13rem);
    height: 5.25rem;
    max-height: 5.5rem;
}

.brand-pick-page .products-mega-menu-grid--brands .products-mega-link--brand > span {
    font-size: 1rem;
}

@media (max-width: 520px) {
    .brand-pick-grid.products-mega-menu-grid--brands {
        grid-template-columns: 1fr;
        max-width: min(22rem, 100%);
    }
}

.products-mega-backdrop {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    z-index: 997;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.products-mega-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (max-width: 1100px) {
    .products-mega-menu-grid:not(.products-mega-menu-grid--brands) {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .products-mega-menu,
    .products-mega-backdrop {
        display: none !important;
    }
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    box-shadow: var(--shadow);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    list-style: none;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.dropdown li a:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--color-primary);
}

.dropdown--mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .header-top {
        --header-height: 70px;
        --header-mark-size: var(--header-height);
    }

    .header-top {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        /* More air between logo and actions (search/lang/menu) */
        gap: 0.9rem;
        padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
        padding-bottom: 0.75rem;
        padding-left: max(0.65rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
    }

    .header-top > .header-right {
        flex: 0 1 auto;
        min-width: 0;
    }

    .header-right {
        margin-inline-end: 0;
    }

    /* Prevent search button from visually touching the logo on narrow screens */
    .header-right .header-search {
        margin-inline-start: 0.15rem;
    }

    /* Extra spacing between logo and the right cluster (search/lang/menu) */
    .header-top {
        gap: 1.25rem !important;
    }

    .header-brand {
        margin-left: clamp(0.1rem, 1.1vw, 0.6rem);
        margin-right: 0;
        margin-inline-end: 0.6rem;
        min-width: 0;
    }

    /* Let the logo shrink so it never gets covered by actions */
    .header-logo {
        max-width: min(42vw, 165px);
    }

    .header-right {
        padding-inline-start: 0.2rem;
    }

    .header-inner {
        padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
        padding-bottom: 0.75rem;
        padding-left: max(1rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
    }

    .nav--main .nav-list {
        display: none;
    }

    /* Страницы товара: одна колонка навигации в header-inner */
    .header-inner .nav .nav-list {
        display: none;
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem 0 0;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .header.nav-open .header-inner .nav .nav-list {
        display: flex;
    }

    .menu-toggle {
        display: flex;
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        padding: 9px;
        justify-content: center;
        align-self: center;
    }

    /* Contacts: move into the opened mobile menu */
    .header-contacts {
        display: none;
    }

    /* Keep the instagram button visible in the top bar on mobile */
    .header-instagram {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .nav-mobile-contacts {
        display: none;
    }

    .header.nav-open .nav-mobile-contacts {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
        margin-top: 0.85rem;
        padding: 0 0.2rem;
        border-radius: 0;
        background: transparent;
        border: none;
        pointer-events: auto;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
        align-items: flex-start;
    }

    .header.nav-open .nav-mobile-contacts .header-contacts-phone,
    .header.nav-open .nav-mobile-contacts .header-contacts-email {
        color: var(--color-dark);
        font-weight: 600;
        white-space: normal;
    }

    .header.nav-open .nav-mobile-contacts .header-contacts-email {
        font-weight: 500;
        opacity: 0.85;
    }

    .header.nav-open .nav-mobile-contacts .header-instagram {
        margin-bottom: 0.4rem;
    }

    /* ——— Полноэкранное мобильное меню (Kotányi) ——— */
    .header.nav-open {
        position: fixed;
        inset: 0;
        z-index: 1100;
        max-height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        background: linear-gradient(165deg, #f6f7f4 0%, #ffffff 42%, #fafaf8 100%);
        box-shadow: inset 0 1px 0 rgba(45, 90, 39, 0.12);
    }

    /* Mobile fullscreen menu: do not show logo/brand inside menu */
    .header.nav-open .header-brand {
        display: none;
    }

    .header.nav-open.header--transparent,
    .header.nav-open.header--solid {
        background: linear-gradient(165deg, #f6f7f4 0%, #ffffff 42%, #fafaf8 100%);
    }

    .header.nav-open .header-brand,
    .header.nav-open .nav-item > a {
        color: var(--color-dark);
    }

    .header.nav-open .menu-toggle .menu-line {
        background: var(--color-dark);
    }

    .header.nav-open .nav-overlay.visible {
        display: none;
    }

    /* Сетка: лого + закрыть, затем блоки навигации на всю ширину */
    .header.nav-open .header-top {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: max(0.65rem, env(safe-area-inset-top, 0px)) max(1.25rem, env(safe-area-inset-right, 0px)) 1.25rem max(1.25rem, env(safe-area-inset-left, 0px));
        align-items: center;
        row-gap: 0;
        border-bottom: 1px solid rgba(45, 90, 39, 0.14);
        background: rgba(255, 255, 255, 0.72);
        backdrop-filter: blur(12px);
    }

    .header.nav-open .header-right {
        display: contents;
    }

    .header.nav-open .header-brand {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .header.nav-open .header-actions {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: center;
    }

    .header.nav-open .menu-toggle {
        flex-direction: column;
        gap: 4px;
        padding: 9px;
        min-width: 42px;
        min-height: 42px;
        border-radius: 10px;
        border: 1px solid rgba(44, 44, 44, 0.14);
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    .header.nav-open .menu-toggle.active {
        border-color: rgba(196, 30, 58, 0.35);
        background: rgba(196, 30, 58, 0.06);
    }

    .header.nav-open .nav--main {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        width: 100%;
        padding-top: 1.15rem;
        padding-left: max(var(--page-pad-lg), env(safe-area-inset-left, 0px));
        padding-right: max(var(--page-pad-lg), env(safe-area-inset-right, 0px));
        flex: none;
    }

    .header.nav-open .nav--main .nav-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0 0 0.25rem;
        margin: 0;
        border-top: none;
        width: 100%;
        align-items: stretch;
        list-style: none;
    }

    .header.nav-open .nav--main .nav-list::before {
        content: var(--i18n-nav-mobile-title, 'Меню');
        font-family: var(--font-body);
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(45, 90, 39, 0.75);
        padding: 0 0.2rem 0.5rem;
    }

    .header.nav-open .nav-item {
        width: 100%;
    }

    .header.nav-open .nav-item > a {
        width: 100%;
        min-height: 48px;
        padding: 0.85rem 1.1rem;
        border-radius: 12px;
        font-size: 1.02rem;
        font-weight: 600;
        font-family: var(--font-body);
        background: rgba(45, 90, 39, 0.07);
        border: 1px solid rgba(45, 90, 39, 0.12);
        transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    .header.nav-open .nav-item.nav-item--horeca > a {
        background: rgba(196, 30, 58, 0.12);
        border-color: rgba(196, 30, 58, 0.45);
        color: var(--color-primary);
    }

    .header.nav-open .nav-item.nav-item--horeca > a:active {
        background: rgba(196, 30, 58, 0.26);
        color: var(--color-primary-dark);
    }

    .header.nav-open .nav-item > a:active {
        background: rgba(45, 90, 39, 0.14);
        color: var(--color-secondary);
    }

    /* header-inner (старые страницы товара) */
    .header.nav-open .header-inner {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto 1fr;
        width: 100%;
        max-width: none;
        margin: 0;
        min-height: 100dvh;
        padding: max(0.65rem, env(safe-area-inset-top, 0px)) max(1.25rem, env(safe-area-inset-right, 0px)) max(1.5rem, env(safe-area-inset-bottom, 0px)) max(1.25rem, env(safe-area-inset-left, 0px));
        align-content: start;
        border-bottom: none;
        background: transparent;
    }

    .header.nav-open .header-inner .header-brand {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .header.nav-open .header-inner .menu-toggle {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: center;
        padding: 9px;
        min-width: 42px;
        min-height: 42px;
        border-radius: 10px;
        border: 1px solid rgba(44, 44, 44, 0.14);
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    .header.nav-open .header-inner .menu-toggle.active {
        border-color: rgba(196, 30, 58, 0.35);
        background: rgba(196, 30, 58, 0.06);
    }

    .header.nav-open .header-inner .nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        padding-top: 1.15rem;
        margin-top: 0.85rem;
        border-top: 1px solid rgba(45, 90, 39, 0.14);
    }

    .header.nav-open .header-inner .nav .nav-list {
        border-top: none;
        padding-top: 0;
        gap: 0.5rem;
        width: 100%;
        align-items: stretch;
    }

    .header.nav-open .header-inner .nav .nav-list::before {
        content: var(--i18n-nav-mobile-title, 'Меню');
        font-family: var(--font-body);
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(45, 90, 39, 0.75);
        padding: 0 0.2rem 0.5rem;
    }

    .header.nav-open .nav-list {
        align-items: stretch;
    }
}

/* Intro Page */
.intro-page {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.intro-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.intro-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.intro-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.intro-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
    text-align: center;
    color: white;
    padding-top: 5.5rem;
}

@media (max-width: 1024px) {
    .intro-content {
        padding: 1.5rem max(1rem, env(safe-area-inset-left, 0px)) 1.5rem max(1rem, env(safe-area-inset-right, 0px));
        padding-top: calc(5rem + env(safe-area-inset-top, 0px));
    }

    .intro-title {
        font-size: clamp(1.4rem, 5vw, 1.9rem);
    }

    .intro-text {
        font-size: 1rem;
    }
}

.intro-logo-img {
    max-width: min(260px, 58vw);
    max-height: min(240px, 42vh);
    width: auto;
    height: auto;
    aspect-ratio: 988 / 927;
    margin: 0 auto 1rem;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    object-fit: contain;
}

.intro-slogan {
    font-family: var(--font-body);
    font-size: clamp(1.35rem, 4.5vw, 2.15rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.02em;
    color: #fff;
    text-align: center;
    max-width: min(36rem, 92vw);
    margin: 0 auto 1.35rem;
    padding: 0 1rem;
}

.intro-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border: 2px solid #2d5a27;
    border-radius: 50%;
    padding: 1rem 1.8rem;
    margin-bottom: 1.5rem;
}

.intro-logo .logo-kotanyi {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: #c41e3a;
    letter-spacing: 0.1em;
    border: 1px solid #c41e3a;
    padding: 0.2rem 0.4rem;
    margin-bottom: 0.2rem;
}

.intro-logo .logo-years {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background: #2d5a27;
    border: 1px solid #2d5a27;
    padding: 0.15rem 0.35rem;
}

.intro-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.intro-journey-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2.1rem;
    background: var(--color-secondary);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    transition: var(--transition);
    margin-bottom: 2rem;
}

.intro-journey-btn:hover {
    background: #234c20;
    transform: translateY(-1px);
}

.intro-journey-btn:active {
    transform: translateY(0);
}

.intro-journey-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 4px;
}

.intro-scroll {
    position: absolute;
    bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
    transition: opacity var(--transition), color var(--transition);
}

.intro-scroll:hover {
    color: #fff;
    opacity: 0.92;
}

.intro-scroll:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 6px;
    border-radius: 8px;
}

.intro-scroll-icon {
    animation: bounce 2.2s ease-in-out infinite;
}

/* ——— Главная (макет HoReCa Expert) ——— */
body.page-home {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Верхняя полоса как на главной: светлый фон, зелёная типографика и переключатель языка */
.header.header--transparent:not(.header--solid) {
    background: #fff;
    backdrop-filter: none;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header.header--transparent:not(.header--solid) .nav-item > a,
.header.header--transparent:not(.header--solid) .header-brand {
    color: #1b4332;
}

.header.header--transparent:not(.header--solid) .menu-toggle .menu-line {
    background: #1b4332;
}

.header.header--transparent:not(.header--solid) .header-contacts-phone,
.header.header--transparent:not(.header--solid) .header-contacts-email {
    color: #1b4332;
    text-shadow: none;
}

.header.header--transparent:not(.header--solid) .header-contacts-email {
    color: rgba(27, 67, 50, 0.78);
}

.header.header--transparent:not(.header--solid) .lang-switch {
    background: rgba(27, 67, 50, 0.08);
    border-color: rgba(27, 67, 50, 0.12);
}

.header.header--transparent:not(.header--solid) .lang-switch-btn {
    color: #1b4332;
}

.header.header--transparent:not(.header--solid) .lang-switch-btn.is-active {
    background: #2d6a4f;
    color: #fff;
}

.header.header--transparent:not(.header--solid) .header-instagram {
    color: #1b4332;
    background: rgba(27, 67, 50, 0.08);
    border-color: rgba(27, 67, 50, 0.12);
}

.header.header--transparent:not(.header--solid) .header-instagram:hover {
    background: rgba(45, 106, 79, 0.14);
    border-color: rgba(45, 106, 79, 0.25);
    color: #2d6a4f;
}

.header.header--transparent:not(.header--solid) .nav-item > a:hover {
    color: #2d6a4f;
}

.header.header--transparent.header--solid {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.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;
}

.home-hero {
    position: relative;
    flex: 0 0 auto;
    padding: clamp(5.25rem, 12vw, 6.75rem) 0 clamp(3.25rem, 7vw, 4.75rem);
    background:
        linear-gradient(160deg, rgba(237, 247, 237, 0.95) 0%, #ffffff 38%, #f3faf3 100%);
    overflow: hidden;
}

.home-hero-banner {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}

/* Home page: hero banner is a full composition image (RU/UZ). Show it fully (no crop). */
body.page-home .home-hero.home-hero--fullwidth .home-hero-banner {
    position: relative;
    inset: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

body.page-home .home-hero.home-hero--fullwidth {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -8%;
    width: min(42vw, 520px);
    height: min(70vh, 620px);
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.12) 0%, transparent 55%);
    transform: rotate(-12deg);
    pointer-events: none;
    border-radius: 40% 60% 50% 50% / 40% 40% 60% 60%;
}

.home-hero.home-hero--fullwidth {
    /* Пропорции центрального фрагмента 5073×2027 ≈ 2,5:1 — высота от ширины экрана */
    min-height: clamp(300px, calc(100vw / 2.45), 720px);
    padding-left: 0;
    padding-right: 0;
    padding-bottom: clamp(1.25rem, 3.5vw, 2rem);
    background: #fff;
    overflow: visible;
}

.home-hero--fullwidth::before {
    display: none;
}

/* Главный оверлей: белый квадрат с текстом и логотипами поверх изображения */
.home-hero-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: min(770px, 90vw);
    aspect-ratio: 1 / 1;
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    display: grid;
    place-items: center;
    padding: clamp(1.25rem, 3.2vw, 2rem);
    pointer-events: none;
}

/*
 * Главная: оверлей от правого края героя с ограниченной шириной — перекрывает зону с «просочившимся» текстом справа,
 * не растягивается на весь экран и не перекрывает коллаж слева (листья / изображение). Положение не зависит от RU/UZ.
 */
body.page-home .home-hero.home-hero--fullwidth .home-hero-overlay {
    left: auto;
    right: calc(clamp(16px, 2.4vw, 60px) + 80px);
    top: 50%;
    transform: translateY(-50%);
    width: min(560px, 42vw);
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
}

/* Desktop "narrow window" (where garlic starts overlapping): make overlay slimmer and push right */
@media (max-width: 1280px) and (min-width: 961px) {
    body.page-home .home-hero.home-hero--fullwidth .home-hero-overlay {
        width: min(460px, 38vw);
        right: calc(clamp(20px, 3.5vw, 72px) + 80px);
    }
}

/* Make hero overlay respond to hero width (split-screen safe) */
@supports (width: 1cqw) {
    body.page-home .home-hero.home-hero--fullwidth {
        container-type: inline-size;
    }

    body.page-home .home-hero.home-hero--fullwidth .home-hero-overlay {
        right: clamp(14px, 4cqw, 72px);
        width: min(560px, 48cqw);
    }

    @container (max-width: 980px) {
        body.page-home .home-hero.home-hero--fullwidth .home-hero-overlay {
            right: clamp(10px, 3.2cqw, 44px);
            width: min(460px, 52cqw);
        }
    }

    @container (max-width: 860px) {
        body.page-home .home-hero.home-hero--fullwidth .home-hero-overlay {
            right: clamp(8px, 2.8cqw, 32px);
            width: min(400px, 54cqw);
        }
    }
}

.home-hero-overlay__inner {
    width: 100%;
    max-width: 620px;
    text-align: left;
}

.home-hero-overlay__title {
    margin: 0 0 clamp(0.75rem, 1.6vw, 1rem);
    color: #2d6a4f;
    font-family: var(--font-body);
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.08;
}

.home-hero-overlay__title-main {
    display: block;
    font-size: clamp(1.9rem, 4.8vw, 2.85rem);
}

.home-hero-overlay__title-sub {
    display: block;
    margin-top: 0.35rem;
    font-size: clamp(1.7rem, 4.4vw, 2.65rem);
}

.home-hero-overlay__lead {
    margin: 0 0 clamp(0.9rem, 2.2vw, 1.35rem);
    color: rgba(44, 44, 44, 0.88);
    font-family: var(--font-body);
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.25;
    font-size: clamp(1.05rem, 2.55vw, 1.5rem);
}

.home-hero-overlay__logos {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(1rem, 3.2vw, 1.75rem);
}

.home-hero-overlay__logo {
    display: block;
    width: auto;
    height: clamp(44px, 5.8vw, 72px);
    object-fit: contain;
}

.home-hero-overlay__logo--milford {
    height: clamp(38px, 5.1vw, 64px);
}

/*
 * До 960px: один баннер, как на ПК (3 изображения фона + оверлей поверх),
 * но ниже по высоте и во всю ширину — без «вытягивания» за счёт естественной высоты картинок.
 */
@media (max-width: 960px) {
    :root {
        /* Высота фикс-хедера 68px + 1px зазор */
        --home-hero-header-height: 69px;
    }

    /* Ensure fixed header never overlaps the first screen (RU/UZ, any device font scaling). */
    body.page-home {
        padding-top: var(--home-hero-header-height);
    }

    body.page-home .home-hero.home-hero--fullwidth {
        display: block;
        /* телефоны/планшеты: компактнее, но пропорционально ширине */
        min-height: 0;
        aspect-ratio: auto;
        /* Mobile: remove base hero padding so overlay aligns with banner composition */
        padding-top: 0;
        padding-left: 0;
        padding-right: 0;
        /*
         * Avoid relying on margin-top (can be flaky on some mobile browsers when header height changes).
         * Padding-top guarantees hero content/overlay starts below fixed header for RU/UZ.
         */
        margin-top: 0;
        padding-bottom: 0;
        overflow: hidden;
    }

    body.page-home .home-hero.home-hero--fullwidth .home-hero-banner {
        /* Mobile: render banner as normal image (no background-cropping behavior) */
        position: static;
        inset: auto;
        width: 100%;
        height: auto;
        max-width: none;
        max-height: none;
        object-fit: contain;
        object-position: center;
    }

    /* Overlay was removed in favor of pre-rendered RU/UZ hero images */
    body.page-home .home-hero.home-hero--fullwidth .home-hero-overlay {
        display: none !important;
    }
}

@media (max-width: 600px) {
    :root {
        /* Высота фикс-хедера 68px + 1px зазор */
        --home-hero-header-height: 69px;
    }

    body.page-home .home-hero.home-hero--fullwidth {
        min-height: clamp(220px, 58vw, 420px);
    }

    body.page-home .home-hero.home-hero--fullwidth .home-hero-banner {
        object-position: center 28%;
    }

    body.page-home .home-hero.home-hero--fullwidth .home-hero-overlay {
        left: auto;
        /* Keep inside viewport on narrow phones (avoid page scaling) */
        right: clamp(8px, 3vw, 14px);
        top: 54%;
        transform: translateY(-50%);
        /* Keep enough room for long UZ copy + logos on narrow phones */
        width: min(460px, 82vw);
        padding: clamp(0.75rem, 3.2vw, 1.1rem);
    }

    body.page-home .home-hero.home-hero--fullwidth .home-hero-overlay__inner {
        display: flex;
        flex-direction: column;
        min-height: 100%;
    }

    body.page-home .home-hero-overlay__title-main {
        font-size: clamp(0.62rem, calc(0.12rem + 3.9vw), 1.82rem);
    }

    body.page-home .home-hero-overlay__title-sub {
        font-size: clamp(0.56rem, calc(0.1rem + 3.35vw), 1.62rem);
    }

    body.page-home .home-hero-overlay__lead {
        font-size: clamp(0.5rem, calc(0.09rem + 2.25vw), 1.18rem);
    }

    body.page-home .home-hero-overlay__lead {
        margin-bottom: clamp(0.2rem, 1vw, 0.6rem);
    }

    body.page-home .home-hero-overlay__logos {
        margin-top: auto;
        flex-wrap: wrap;
        row-gap: 0.45rem;
    }

    body.page-home .home-hero-overlay__logos .home-hero-overlay__logo {
        max-width: 48%;
    }

    body.page-home .home-hero-overlay__logo {
        height: clamp(22px, calc(0.2rem + 5.8vw), 52px);
    }

    body.page-home .home-hero-overlay__logo--milford {
        height: clamp(20px, calc(0.18rem + 5.15vw), 46px);
    }
}

/* Очень узкие телефоны — ещё чуть ниже баннер */
@media (max-width: 400px) {
    :root {
        /* Высота фикс-хедера 68px + 1px зазор */
        --home-hero-header-height: 69px;
    }

    body.page-home .home-hero.home-hero--fullwidth {
        min-height: clamp(200px, 64vw, 360px);
    }

    body.page-home .home-hero.home-hero--fullwidth .home-hero-banner {
        object-position: center 26%;
    }

    body.page-home .home-hero.home-hero--fullwidth .home-hero-overlay {
        width: min(440px, 88vw);
    }

    body.page-home .home-hero-overlay__title-main {
        font-size: clamp(0.44rem, calc(0.05rem + 2.85vw), 1.42rem);
    }

    body.page-home .home-hero-overlay__title-sub {
        font-size: clamp(0.38rem, calc(0.04rem + 2.5vw), 1.28rem);
    }

    body.page-home .home-hero-overlay__lead {
        font-size: clamp(0.34rem, calc(0.04rem + 1.65vw), 0.95rem);
    }

    body.page-home .home-hero-overlay__logo {
        height: clamp(16px, calc(0.06rem + 4.35vw), 40px);
    }

    body.page-home .home-hero-overlay__logo--milford {
        height: clamp(14px, calc(0.05rem + 3.75vw), 34px);
    }
}

.home-hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1.85rem;
    background: #d32f2f;
    color: #fff !important;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(211, 47, 47, 0.28);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.home-hero-cta:hover {
    transform: translateY(-2px);
    background: #b71c1c;
    box-shadow: 0 14px 36px rgba(211, 47, 47, 0.35);
}

.home-hero-cta:focus-visible {
    outline: 3px solid rgba(45, 106, 79, 0.45);
    outline-offset: 3px;
}

.home-brands {
    flex: 0 0 auto;
    padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2.5rem) clamp(3rem, 7vw, 4.5rem);
    background: #fff;
    position: relative;
    z-index: 5;
}

.home-brands-inner {
    max-width: min(1200px, var(--container-max));
    margin: 0 auto;
}

.home-brands-catalog-cta {
    margin: 0 0 clamp(2.5rem, 6.5vw, 4.25rem);
    text-align: center;
}

.home-brands-catalog-cta__btn {
    margin: 0;
}

.home-brands-title {
    font-family: var(--font-body);
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    color: #2d6a4f;
    margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.home-brands-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.25rem, 3vw, 2rem);
}

.home-brand-card {
    background: #fff;
    border-radius: 18px;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    box-shadow: 0 12px 40px rgba(27, 67, 50, 0.1);
    border: 1px solid rgba(45, 106, 79, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-brand-card-logo {
    width: auto;
    height: clamp(52px, 6.5vw, 64px);
    object-fit: contain;
    object-position: left center;
}

.home-brand-card-logo--milford {
    height: 38px;
}

.home-brand-card-photo {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #f4f6f4;
}

.home-brand-card-photo--contain {
    object-fit: contain;
    object-position: center center;
    background: #fff;
}

.home-brand-card-text {
    font-size: clamp(0.78rem, 1.4vw, 0.88rem);
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #4a5560;
    flex: 1 1 auto;
}

.home-brand-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
}

.home-brand-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.15rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.home-brand-pill:hover {
    transform: translateY(-1px);
}

.home-brand-pill--red {
    background: #d32f2f;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(211, 47, 47, 0.22);
}

.home-brand-pill--green {
    background: #2d6a4f;
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(45, 106, 79, 0.22);
}

@media (max-width: 1100px) {
    .home-brands-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .home-brands-grid {
        grid-template-columns: 1fr;
    }
}

.home-feedback {
    scroll-margin-top: calc(4.5rem + env(safe-area-inset-top, 0px));
    padding: clamp(2.5rem, 6vw, 4rem) max(1rem, env(safe-area-inset-left, 0px)) clamp(3rem, 8vw, 5rem) max(1rem, env(safe-area-inset-right, 0px));
    background: linear-gradient(180deg, #f8faf7 0%, #ffffff 42%, #f6f7f4 100%);
    border-top: 1px solid rgba(45, 90, 39, 0.12);
}

.home-feedback-inner {
    max-width: 560px;
    margin: 0 auto;
}

.home-feedback-title {
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 3.5vw, 2.1rem);
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.65rem;
    text-align: center;
}

.home-feedback-lead {
    font-size: 1.05rem;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.55;
}

.home-feedback-form {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.home-feedback-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 520px) {
    .home-feedback-row {
        grid-template-columns: 1fr;
    }
}

.home-feedback-label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-dark);
}

.home-feedback-input {
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(44, 44, 44, 0.18);
    border-radius: 10px;
    background: #fff;
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.home-feedback-input:hover {
    border-color: rgba(45, 90, 39, 0.35);
}

.home-feedback-input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.15);
}

.home-feedback-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232c2c2c' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.25rem;
}

.home-feedback-textarea {
    min-height: 8rem;
    resize: vertical;
}

.home-feedback-note {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.45;
}

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

.home-feedback-status {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.45;
    border: 1px solid transparent;
}

.home-feedback-status--ok {
    background: rgba(45, 90, 39, 0.1);
    border-color: rgba(45, 90, 39, 0.25);
    color: #1e3d1a;
}

.home-feedback-status--err {
    background: rgba(196, 30, 58, 0.08);
    border-color: rgba(196, 30, 58, 0.22);
    color: #7a1528;
}

.home-feedback-submit {
    align-self: flex-start;
    margin-top: 0.25rem;
    padding: 0.9rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fff;
    background: var(--color-secondary);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.home-feedback-submit:hover {
    background: #234c20;
    transform: translateY(-1px);
}

.home-feedback-submit:active {
    transform: translateY(0);
}

.home-feedback-submit:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
}

body.scroll-lock {
    overflow: hidden;
}

.feedback-fab {
    position: fixed;
    right: max(18px, env(safe-area-inset-right, 0px));
    bottom: max(18px, env(safe-area-inset-bottom, 0px));
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2d6a4f;
    color: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(11, 36, 25, 0.22);
    cursor: pointer;
    z-index: 9999;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.feedback-fab:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 16px 34px rgba(11, 36, 25, 0.26);
    filter: brightness(1.03);
}

.feedback-fab:active {
    transform: translateY(0) scale(0.99);
}

.feedback-fab:focus-visible {
    outline: 2px solid #2d6a4f;
    outline-offset: 4px;
    box-shadow: 0 0 0 5px rgba(45, 106, 79, 0.18), 0 12px 28px rgba(11, 36, 25, 0.22);
}

.feedback-fab__icon {
    transition: transform var(--transition);
}

.feedback-fab:hover .feedback-fab__icon {
    transform: translateY(-1px) rotate(-6deg);
}

@media (prefers-reduced-motion: reduce) {
    .feedback-fab,
    .feedback-fab__icon {
        transition: none !important;
    }
}

.intro-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--color-primary);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    margin-bottom: 2rem;
}

.intro-btn:hover {
    background: var(--color-primary-dark);
    transform: scale(1.05);
}

.intro-eras {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.intro-era-link img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.intro-era-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    color: white;
    transition: var(--transition);
}

.intro-era-link:hover {
    background: rgba(255,255,255,0.25);
}

.intro-era-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.intro-era-years {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Era nav links (Предыдущая/Следующая эра) */
.era-nav-links {
    display: flex;
    justify-content: space-between;
    max-width: min(1200px, var(--container-max));
    margin: 0 auto;
    padding: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

main .era-nav-links {
    padding: 2rem;
    background: var(--color-cream);
}

.era-nav-prev,
.era-nav-next {
    color: var(--color-primary);
    font-weight: 600;
}

.era-nav-prev:hover,
.era-nav-next:hover {
    text-decoration: underline;
}

.janos-section .intro-btn {
    margin-top: 1rem;
}

/* Hero Section - точь-в-точь как на оригинале */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.15) 40%, transparent 70%);
}

/* Kotanyi.com back link */
.hero-back-link {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.hero-back-link:hover {
    opacity: 0.9;
}

/* Logo + Era selector block */
.hero-top {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 5rem 2rem 1.5rem;
}

.hero-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border: 2px solid #2d5a27;
    border-radius: 50%;
    padding: 1rem 1.8rem;
    margin-bottom: 1rem;
}

.hero-logo .logo-kotanyi {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: #c41e3a;
    letter-spacing: 0.1em;
    border: 1px solid #c41e3a;
    padding: 0.2rem 0.4rem;
    margin-bottom: 0.2rem;
}

.hero-logo .logo-years {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background: #2d5a27;
    border: 1px solid #2d5a27;
    padding: 0.15rem 0.35rem;
    letter-spacing: 0.05em;
}

.era-label {
    font-size: 0.95rem;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Круглые кнопки эпох */
.era-circles {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.era-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    opacity: 0.8;
    transition: var(--transition);
}

.era-circle:hover,
.era-circle.active {
    opacity: 1;
}

.era-circle.active .era-circle-img {
    box-shadow: 0 0 0 3px white, 0 0 20px rgba(255,255,255,0.5);
}

.era-circle-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 2px solid rgba(255,255,255,0.6);
}

.era-circle-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.era-circle-label {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    max-width: 120px;
}

/* Main title overlay */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero-years {
    display: block;
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.3rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    font-weight: 500;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.5s forwards;
}

/* Погружайтесь с шевроном */
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: white;
    font-size: 1rem;
    font-weight: 400;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.hero-scroll:hover {
    opacity: 0.9;
}

.hero-scroll svg {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* Food props - скрыты, фон покажет композицию */
.hero-props {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content .hero-title { transform: none; }
.hero-content .hero-years { transform: none; }

/* Header при скролле */
.header-scroll {
    opacity: 0;
    pointer-events: none;
}

.header-scroll.visible {
    opacity: 1;
    pointer-events: auto;
}

.header .hero-logo {
    padding: 0.5rem 1rem;
}

.header .hero-logo .logo-kotanyi {
    font-size: 0.85rem;
}

.header .hero-logo .logo-years {
    font-size: 0.65rem;
}

main#content {
    position: relative;
    z-index: 1;
}

/* Janos Section */
.janos-section {
    padding: 5rem 2rem;
    background: white;
}

.janos-container {
    max-width: min(1200px, var(--container-max));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.janos-content {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.janos-content.visible {
    opacity: 1;
    transform: translateX(0);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--color-dark);
}

.janos-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-light);
}

.janos-image {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.janos-image.visible {
    opacity: 1;
    transform: translateX(0);
}

.janos-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Recipes Section */
.recipes-section {
    padding: 5rem 2rem;
    background: var(--color-cream);
}

.recipes-container {
    max-width: min(1200px, var(--container-max));
    margin: 0 auto;
}

.recipes-container .section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.recipe-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.recipe-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.recipe-card:nth-child(1) { transition-delay: 0.1s; }
.recipe-card:nth-child(2) { transition-delay: 0.2s; }

.recipe-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--color-primary);
    color: white;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    z-index: 1;
}

.recipe-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.recipe-card:hover .recipe-image img {
    transform: scale(1.05);
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-content h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.recipe-content h3 a:hover {
    color: var(--color-primary);
}

.recipe-content p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Carousel Section */
.carousel-section {
    padding: 5rem 2rem;
    background: white;
}

.carousel-container {
    max-width: min(1200px, var(--container-max));
    margin: 0 auto;
    position: relative;
}

.carousel-container .section-title {
    margin-bottom: 0.5rem;
}

.carousel-counter {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.carousel-wrapper {
    position: relative;
}

.carousel-track {
    display: flex;
    overflow: hidden;
}

.carousel-slide {
    flex: 0 0 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    min-width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.carousel-image img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.carousel-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-light);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: white;
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--color-primary);
    color: white;
}

.carousel-prev {
    left: -25px;
}

.carousel-next {
    right: -25px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--color-primary);
}

.carousel-dot:hover {
    background: rgba(196, 30, 58, 0.3);
}

/* Next Era Section */
.next-era {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.next-era-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.next-era-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.next-era-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 100%);
}

.next-era-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 2rem;
}

.next-era-years {
    display: block;
    font-size: 1rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
}

.next-era-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.next-era-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--color-primary);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
}

.next-era-btn:hover {
    background: var(--color-primary-dark);
    transform: scale(1.05);
}

/* Footer */
.footer {
    background: var(--color-dark);
    color: white;
    padding: 3rem 2rem 2rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .footer {
        padding: 2rem max(1.25rem, env(safe-area-inset-right, 0px)) calc(1.5rem + env(safe-area-inset-bottom, 0px)) max(1.25rem, env(safe-area-inset-left, 0px));
    }

    .footer-contacts {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: rgba(255,255,255,0.8);
}

.breadcrumbs a:hover {
    color: white;
}

.breadcrumbs span {
    color: rgba(255,255,255,0.6);
}

.footer-links {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a:hover {
    color: var(--color-gold);
}

.footer-contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem 2rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.footer-contacts a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: color var(--transition);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.footer-contacts a:hover {
    color: white;
}

.footer-instagram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.footer-instagram svg {
    width: 24px;
    height: 24px;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-bottom p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
}

.footer-legal a {
    color: rgba(255,255,255,0.7);
}

.footer-legal a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .janos-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .janos-image {
        order: -1;
    }
    
    .carousel-slide {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .dropdown--mobile-only {
        display: block;
    }

    .menu-toggle {
        display: flex;
    }
    
    /* Не ломаем полноэкранное меню (.header.nav-open) */
    .header:not(.nav-open) .nav--main {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }
    
    .header:not(.nav-open) .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header.nav-open .nav-list {
        align-items: stretch;
    }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height var(--transition);
    }
    
    .nav-item.dropdown-open .dropdown {
        max-height: 500px;
        padding: 0.5rem 0 0 1rem;
    }
    
    .recipes-grid {
        grid-template-columns: 1fr;
    }
    
    .era-circles {
        gap: 0.8rem;
    }
    .era-circle-img {
        width: 55px;
        height: 55px;
    }
    .era-circle-label {
        font-size: 0.7rem;
        max-width: 90px;
    }
    
    .hero-scroll {
        bottom: 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
        padding-bottom: 0.75rem;
        padding-left: max(1rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
    }

    .header-top {
        --header-height: 60px;
        --header-mark-size: var(--header-height);
        padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
    }

    .header-brand {
        margin-left: 0;
        margin-inline-end: 0.75rem;
    }

    .header-logo {
        max-width: min(40vw, 150px);
    }

    .era-selector,
    .janos-section,
    .recipes-section,
    .carousel-section {
        padding: 3rem 1rem;
    }

    .footer-contacts a {
        font-size: 0.9rem;
    }
}

/* ===== Large screens (override at EOF to win cascade) ===== */
@media (min-width: 1440px) {
    .header-top {
        --header-height: 90px;
        --header-mark-size: var(--header-height);
    }

    .header-top .nav-list--header-main .nav-item > a {
        font-size: clamp(1.08rem, 0.95rem + 0.35vw, 1.24rem);
    }

    .header-top .header-contacts-phone {
        font-size: 1.06rem;
    }

    .header-top .header-contacts-email {
        font-size: 0.92rem;
    }

    /* Keep hero overlay flexible; container queries above handle split-screen. */
    body.page-home .home-hero.home-hero--fullwidth .home-hero-overlay {
        width: min(640px, 40vw);
        right: clamp(18px, 2.2vw, 64px);
    }

    .header-top .header-contacts {
        margin-left: 16px !important;
    }

    .home-hero-overlay__inner {
        max-width: 700px;
    }

    .home-hero-overlay__title-main {
        font-size: clamp(2.35rem, 3.2vw, 3.4rem);
    }

    .home-hero-overlay__title-sub {
        font-size: clamp(2.15rem, 2.95vw, 3.15rem);
    }

    .home-hero-overlay__lead {
        font-size: clamp(1.25rem, 1.65vw, 1.8rem);
    }

    .home-hero-overlay__logo {
        height: clamp(56px, 3.6vw, 92px);
    }

    .home-hero-overlay__logo--milford {
        height: clamp(50px, 3.2vw, 82px);
    }
}

@media (min-width: 2560px) {
    .header-top {
        --header-height: 102px;
        --header-mark-size: var(--header-height);
        padding-top: 1.15rem;
        padding-bottom: 1.05rem;
    }

    .header-top .nav-list--header-main .nav-item > a {
        font-size: 1.3rem;
    }

    .header-top .lang-switch-btn {
        font-size: 0.82rem;
        padding: 0.42rem 0.62rem;
    }

    .header-top .header-contacts-phone {
        font-size: 1.14rem;
    }

    .header-top .header-contacts-email {
        font-size: 1rem;
    }

    body.page-home .home-hero.home-hero--fullwidth .home-hero-overlay {
        width: min(760px, 36vw);
        right: clamp(26px, 2vw, 84px);
    }

    .home-hero-overlay__inner {
        max-width: 820px;
    }

    .home-hero-overlay__title-main {
        font-size: 3.85rem;
    }

    .home-hero-overlay__title-sub {
        font-size: 3.55rem;
    }

    .home-hero-overlay__lead {
        font-size: 2.05rem;
    }

    .home-hero-overlay__logo {
        height: 110px;
    }

    .home-hero-overlay__logo--milford {
        height: 98px;
    }
}
