/* The site header (partials/site/lfh-header.htm): a slim bar, the menu in a drawer; phones get their own bar,
   a step-by-step drawer and an app-like tab bar */

/* The page background of the whole site: the grey of the home page and the catalog (2026-12-02; was white elsewhere) */
html body { background-color: #f9f9f9; }

.lfh {
    --ink: #111; --muted: #6f6f6f; --line: #e9e6e1; --soft: #f7f5f2; --gold: #b08d57; --red: #a3141f;
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    font-family: 'CenturyGothic', Arial, Helvetica, sans-serif; font-size: 14px; color: var(--ink);
}
.lfh * { font-size: inherit; box-sizing: border-box; }
.lfh a { color: inherit; text-decoration: none; }
.lfh a:hover { color: inherit; text-decoration: none; }
.lfh ul { margin: 0; padding: 0; list-style: none; }
.lfh li { display: block; }
.lfh button { font-family: inherit; color: inherit; }
.lfh [hidden] { display: none !important; }
@media (max-width: 767px) { .lfh-main { display: none !important; } }
@media (min-width: 768px) { .lfh-m, .lfh-tabbar, .lfh-drawer { display: none !important; } }

/* the pages keep the top space of the old 137px header: the new one is 85px on desktop */
@media (min-width: 768px) { body:has(.lfh) { margin-top: -52px; } }

.lfh-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.lfh-main { position: relative; background: #fff; border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.lfh--scrolled .lfh-main { box-shadow: 0 6px 20px rgba(0,0,0,.05); }
.lfh-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 84px; }
.lfh-logo { display: block; justify-self: center; }
.lfh-logo img { display: block; height: 36px; width: auto; }
.lfh-right { display: flex; align-items: center; justify-content: flex-end; gap: 22px; }
.lfh-left { display: flex; align-items: center; gap: 22px; }

/* icons */
.lfh-icons { display: flex; align-items: center; gap: 4px; }
.lfh-icon {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
    transition: background .2s;
}
.lfh-icon:hover { background: var(--soft); }
.lfh-icon svg, .lfh-icon img { width: 22px; height: 22px; }
.lfh-count {
    position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
    background: var(--ink); color: #fff; font-size: 10px; line-height: 17px; text-align: center;
}
.lfh-count--zero { display: none; }
/* the cart icon steps left inside its button, so the count beside it no longer covers the bag */
.lfh-icon--cart svg, .lfh-icon--cart img { transform: translateX(-9px); }
.lfh-icon--cart .lfh-count { right: 0; }

/* text links */
.lfh-link {
    position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; margin: 0;
    border: 0; background: none; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
.lfh-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transition: transform .25s; }
.lfh-link:hover::after { transform: scaleX(1); }
.lfh-link--sale, .lfh-link--sale:hover { color: var(--red) !important; }
/* the Rivoli logo as a link to the brand's catalog, no underline */
.lfh-link--rivoli img { display: block; height: 14px; width: auto; transition: opacity .2s; }
.lfh-link--rivoli::after { display: none; }
.lfh-link--rivoli:hover img { opacity: .7; }
.lfh-phone { font-size: 14px; letter-spacing: .02em; white-space: nowrap; }

/* «Меню» */
.lfh-burger {
    position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 16px 0 12px; margin: 0;
    border: 1px solid var(--line); border-radius: 20px; background: #fff; cursor: pointer; transition: border-color .2s;
}
.lfh-burger:hover { border-color: var(--ink); }
.lfh-burger i { position: absolute; left: 14px; width: 16px; height: 1.4px; background: currentColor; }
.lfh-burger i:nth-child(1) { top: 14px; } .lfh-burger i:nth-child(2) { top: 19px; } .lfh-burger i:nth-child(3) { top: 24px; width: 10px; }
.lfh-burger span { margin-left: 26px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }

/* the search bar under the header */
.lfh-search { display: none; align-items: center; gap: 12px; max-width: 760px; margin: 0 auto; padding: 14px 32px 18px; }
.lfh--search .lfh-search { display: flex; }
.lfh-search svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.lfh-search input {
    flex: 1; height: 46px; padding: 0 16px; border: 1px solid var(--line); border-radius: 23px; background: var(--soft);
    font-size: 15px; color: var(--ink); outline: none;
}
.lfh-search input:focus { border-color: var(--ink); background: #fff; }
.lfh-search__close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; font-size: 24px; color: var(--muted); cursor: pointer; }
.lfh-search__close:hover { background: var(--soft); color: var(--ink); }

/* the drawer */
.lfh-drawer { position: fixed; inset: 0; z-index: 1001; visibility: hidden; background: rgba(17,17,17,0); transition: background .25s, visibility .25s; }
.lfh--drawer .lfh-drawer { visibility: visible; background: rgba(17,17,17,.35); }
.lfh-drawer__panel {
    display: flex; flex-direction: column; width: 420px; max-width: 92vw; height: 100%;
    background: #fff; transform: translateX(-100%); transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.lfh--drawer .lfh-drawer__panel { transform: none; }
.lfh-drawer__head { display: flex; align-items: center; justify-content: space-between; height: 84px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.lfh-drawer__head img { height: 28px; }
.lfh-drawer__close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; font-size: 28px; line-height: 1; cursor: pointer; }
.lfh-drawer__close:hover { background: var(--soft); }
.lfh-drawer__body { flex: 1; overflow-y: auto; padding: 12px 28px 24px; }
.lfh-col { min-width: 0; }
.lfh-col__title { display: block; margin-bottom: 12px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold) !important; }
.lfh-col li a { display: block; padding: 5px 0; font-size: 14px; color: var(--ink); transition: color .15s, transform .15s; }
.lfh-col li a:hover { color: var(--gold); transform: translateX(3px); }
.lfh-all { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--line); }
.lfh-all:hover { border-color: var(--ink); }
.lfh-drawer__link { display: block; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.lfh-drawer__link:hover { color: var(--gold) !important; }
.lfh-promo { position: relative; display: block; height: 180px; margin-top: 24px; overflow: hidden; border-radius: 10px; }
.lfh-promo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.lfh-promo:hover img { transform: scale(1.04); }
.lfh-promo span {
    position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 8px 12px; border-radius: 6px;
    background: rgba(255,255,255,.92); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-align: center;
}
.lfh-drawer__foot { display: block; padding: 18px 28px 24px; border-top: 1px solid var(--line); background: var(--soft); font-size: 13px; line-height: 1.8; color: var(--muted); }
.lfh-drawer__foot a:first-child { display: block; font-size: 16px; color: var(--ink); }
.lfh-drawer__foot span { display: block; margin-bottom: 6px; }
.lfh-drawer__foot a:hover { color: var(--ink); }
body.lfh-noscroll { overflow: hidden; }
body.lfh-noscroll > jdiv { opacity: 0; }

@media (max-width: 1100px) {
    .lfh-wrap { padding: 0 20px; }
    .lfh-phone { display: none; }
    .lfh-left { gap: 16px; }
}
/* «Журнал» stays in the drawer: next to «Меню», Rivoli and «Акции» it would push the logo off the centre */
@media (max-width: 1000px) {
    .lfh-left > a[href="/journal"] { display: none; }
}

/* the step-by-step menu (the desktop dropdown and the phone drawer): one screen at a time, like the old menu */
.lfh-dd { position: relative; padding: 0; overflow-x: hidden; }
.lfh-dd__screen { display: none; padding: 4px 16px 20px; }
.lfh-dd__screen.is-on { display: block; animation: lfh-dd-in .2s ease-out; }
@keyframes lfh-dd-in { from { opacity: 0; transform: translateX(16px); } }
.lfh-dd__row {
    display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 0; padding: 17px 0;
    border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 17px; text-align: left; cursor: pointer;
}
.lfh-dd__row--sub { padding: 15px 0 15px 12px; font-size: 15px; }
.lfh-dd__chevron { width: 8px; height: 8px; margin-right: 4px; border-top: 1.4px solid var(--muted); border-right: 1.4px solid var(--muted); transform: rotate(45deg); }
.lfh-dd__back {
    display: flex; align-items: center; gap: 10px; width: calc(100% + 32px); margin: -4px -16px 0; padding: 18px 16px;
    border: 0; background: var(--soft); font-size: 17px; text-align: left; cursor: pointer;
}
.lfh-dd__back::before { content: ''; width: 8px; height: 8px; border-bottom: 1.6px solid var(--ink); border-left: 1.6px solid var(--ink); transform: rotate(45deg); }
.lfh-dd__title {
    display: flex; align-items: baseline; justify-content: space-between; padding: 18px 0 12px;
    border-bottom: 1px solid var(--line); font-size: 19px;
}
.lfh-dd__title { cursor: default; }   /* a heading: only «Все» is a link */
.lfh .lfh-dd__title a, .lfh-drawer .lfh-dd__title a { flex: none; margin-left: 12px; padding: 4px 0; font-size: 13px; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; }
.lfh .lfh-dd__title a:hover, .lfh-drawer .lfh-dd__title a:hover { color: var(--ink); border-bottom-color: var(--ink); }


/* desktop: the menu slides down under «Меню» (the old site's dropdown, in the site's look) */
/* the wrapper is as tall as the (hidden) panel: it must not take the clicks meant for the page under it */
.lfh-menu { position: absolute; left: 0; right: 0; top: 100%; height: 0; pointer-events: none; }
.lfh--menu .lfh-menu__panel { pointer-events: auto; }
.lfh-menu__panel {
    display: grid; grid-template-columns: 340px 240px; grid-template-rows: auto auto; width: max-content; max-width: 100%;
    margin-top: -1px; background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px;
    box-shadow: 0 24px 40px rgba(0,0,0,.08); overflow: hidden;
    /* as on myjewels.ru: the menu fades in and out over 150 ms (Preline's opacity transition, ease-in-out) */
    visibility: hidden; opacity: 0; transition: opacity .15s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .15s;  /* hidden once faded out */
}
.lfh--menu .lfh-menu__panel { visibility: visible; opacity: 1; transition: opacity .15s cubic-bezier(.4, 0, .2, 1), visibility 0s; }  /* visible (hoverable) at once */
.lfh-menu__list { max-height: calc(100vh - 220px); overflow-y: auto; border-right: 1px solid var(--line); }
.lfh-menu__list .lfh-dd__screen { padding: 4px 22px 18px; }
.lfh-menu__list .lfh-dd__back { width: calc(100% + 44px); margin: -4px -22px 0; padding: 16px 22px; font-size: 15px; }
.lfh-menu__list .lfh-dd__row { padding: 14px 0; font-size: 15px; transition: color .15s; }
.lfh-menu__list .lfh-dd__row:hover { color: var(--gold) !important; }
.lfh-menu__list .lfh-dd__row--sub { padding: 12px 0 12px 10px; font-size: 14px; }
.lfh-menu__list .lfh-dd__title { font-size: 17px; }
.lfh-menu__promo { align-self: start; height: 300px; margin: 18px; border-radius: 10px; }  /* a fixed height: a long list must not stretch the photo */
.lfh-menu__foot {
    grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline;
    padding: 14px 22px 16px; border-top: 1px solid var(--line); background: var(--soft); font-size: 13px; color: var(--muted);
}
.lfh-menu__foot > a:first-child { font-size: 15px; color: var(--ink); }
.lfh-menu__foot a:hover { color: var(--ink); }
.lfh--menu .lfh-burger { border-color: var(--ink); }
/* no browser focus ring after a click; a ring only for the keyboard */
.lfh-burger:focus { outline: none; }
.lfh-burger:focus-visible { box-shadow: 0 0 0 3px rgba(17,17,17,.15); }

/* ================= Phones ================= */
@media (max-width: 767px) {
    .lfh-m { background: #fff; border-bottom: 1px solid var(--line); }
    .lfh--scrolled .lfh-m { box-shadow: 0 6px 20px rgba(0,0,0,.06); }
    .lfh-m__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 56px; padding: 0 8px; }
    .lfh-m__side { display: flex; align-items: center; }
    .lfh-m__side--end { justify-content: flex-end; }
    .lfh-m__logo img { display: block; height: 26px; width: auto; }
    .lfh-m .lfh-icon { width: 42px; height: 42px; }
    /* search half way between the menu and the logo, favourites half way between the logo and the cart */
    .lfh-m__side .js-lfh-search { margin: 0 auto; }
    .lfh-m__side--end .lfh-icon:first-child { margin: 0 auto; }
    .lfh-m__burger { position: relative; display: block; width: 20px; height: 14px; }
    .lfh-m__burger i { position: absolute; left: 0; width: 20px; height: 1.4px; background: var(--ink); }
    .lfh-m__burger i:nth-child(1) { top: 0; } .lfh-m__burger i:nth-child(2) { top: 6px; } .lfh-m__burger i:nth-child(3) { top: 12px; width: 13px; }
    .lfh-m .lfh-search { padding: 4px 12px 12px; }
    .lfh-m .lfh-search input { height: 42px; }

    /* the drawer goes full width */
    .lfh-drawer__panel { width: 100%; max-width: 100%; }
    .lfh-drawer__head { height: 56px; padding: 0 8px 0 16px; }
    .lfh-drawer__head img { height: 24px; }
    .lfh-drawer__foot { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }

    /* the app-like tab bar */
    .lfh-tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; display: grid; grid-template-columns: repeat(5, 1fr);
        height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
        background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(8px);
    }
    .lfh-tabbar a, .lfh-tabbar button {
        position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        margin: 0; padding: 0; border: 0; background: none; font-size: 10px; letter-spacing: .02em; color: var(--muted); cursor: pointer;
    }
    .lfh-tabbar svg, .lfh-tabbar img { width: 22px; height: 22px; }
    .lfh-tabbar .is-on { color: var(--ink); }
    .lfh-tabbar .lfh-count { top: 5px; right: calc(50% - 20px); }
    body:has(.lfh-tabbar) { padding-bottom: 60px; }
    body:has(.lfh-tabbar) jdiv.__jivoMobileButton { bottom: 70px !important; }  /* Jivo sits above the tab bar */
}

/* The account on phones: «Кабинет» in the open menu's head (partials/site/lfh-header); the menu's «Профиль» row is hidden
   there (the desktop menu keeps it) */
@media (max-width: 767px) {
    .lfh-drawer .lfh-dd__row--profile { display: none; }
    .lfh-drawer__profile {
        display: inline-flex; align-items: center; gap: 8px; margin-left: auto; margin-right: 6px; padding: 0 14px; height: 36px;
        border: 1px solid var(--line); border-radius: 18px; font-size: 13px; color: var(--ink); text-decoration: none;
    }
    .lfh-drawer__profile:hover { color: var(--ink); text-decoration: none; border-color: var(--ink); }
    .lfh-drawer__profile svg { width: auto; height: 18px; }
}

/* Tablets (2026-12-01): at 768–899px «Скидки» next to «Акции» ran into the logo; it stays in «Меню» */
@media (max-width: 899px) {
    .lfh-left > a[href="/discounts"] { display: none; }
}
