/* GemOtvet header — designed to match the emerald / ivory / muted-gold identity. */
.site-header {
    position: relative;
    z-index: 1030;
    margin: 0;
    border-bottom: 1px solid rgba(11, 73, 63, .09);
    background: rgba(251, 250, 246, .97);
    box-shadow: 0 5px 24px rgba(7, 61, 53, .045);
}
.gem-navbar { min-height: 88px; }
.gem-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(18px, 2.5vw, 42px);
    width: min(100% - 56px, 1440px);
    min-height: 88px;
    margin-inline: auto;
}
.gem-brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    color: var(--gem-900);
    text-decoration: none;
}
.gem-brand:hover { color: var(--gem-800); }
.gem-brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    overflow: visible;
    place-items: center;
    border: none;
    border-radius: 0;
    background: transparent;
}
.gem-brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.gem-brand-copy { display: flex; flex-direction: column; line-height: 1; }
.gem-brand-name {
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 2vw, 2rem);
    letter-spacing: -.035em;
}
.gem-brand-tagline {
    margin-top: 7px;
    color: var(--muted);
    font-size: .55rem;
    font-weight: 700;
    letter-spacing: .17em;
}
.gem-navbar-collapse { flex: 1 1 auto; }
.gem-nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(13px, 1.8vw, 28px);
    margin: 0;
    padding: 0;
    list-style: none;
}
.gem-nav-links a {
    display: inline-block;
    padding: 10px 0;
    color: #334b44;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .075em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color .18s ease;
}
.gem-nav-links a:hover, .gem-nav-links a:focus-visible { color: var(--gold-700); }
.gem-nav-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}
.gem-search {
    display: flex;
    align-items: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    transition: width .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.gem-search:focus-within { width: 210px; border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(198,173,124,.13); }
.gem-search input {
    width: 0;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: .83rem;
}
.gem-search:focus-within input { width: 100%; padding-left: 14px; }
.gem-search button {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--gem-800);
}
.gem-icon-link {
    position: relative;
    display: inline-grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--gem-800);
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.gem-icon-link:hover { border-color: var(--gold-500); background: #fff; color: var(--gold-700); }
.gem-cart-wrapper { position: relative; display: flex; align-items: center; gap: 5px; }
.gem-cart-count {
    position: absolute;
    top: -4px;
    right: -3px;
    display: grid;
    min-width: 17px;
    height: 17px;
    padding-inline: 4px;
    place-items: center;
    border: 2px solid var(--ivory);
    border-radius: 999px;
    background: var(--gem-800);
    color: #fff;
    font-size: .58rem;
    line-height: 1;
}
.gem-cart-total { display: none; }
.gem-logout-form { margin: 0; }
.gem-text-action {
    padding: 7px 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: .78rem;
}
.gem-text-action:hover { color: var(--gem-800); }
.gem-nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
}
.gem-nav-toggle span { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--gem-800); }
.gem-cart-menu {
    position: absolute;
    top: calc(100% + 13px);
    right: -20px;
    z-index: 1200;
    width: min(360px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-md);
}
.gem-cart-menu-header, .gem-cart-menu-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.gem-cart-menu-header { border-bottom: 1px solid var(--line); }
.gem-cart-menu-header strong { color: var(--gem-950); }
.gem-cart-menu-header a { color: var(--muted); font-size: .78rem; }
.gem-cart-menu-body { max-height: 260px; overflow: auto; padding: 8px 0; }
.gem-cart-menu-body .cart-empty { padding: 22px 16px; color: var(--muted); text-align: center; }
.gem-cart-menu-footer { border-top: 1px solid var(--line); }
.gem-cart-menu-footer > div { display: grid; gap: 2px; }
.gem-cart-total-label { color: var(--muted); font-size: .78rem; }
.gem-cart-menu-footer .cart-dropdown-total { color: var(--gem-950); font-size: 1.05rem; }

@media (min-width: 1200px) {
    .gem-navbar-collapse { display: flex !important; align-items: center; justify-content: space-between; gap: clamp(18px, 2.5vw, 42px); }
    .gem-cart-total { display: inline; color: var(--gem-900); font-size: .75rem; font-weight: 600; white-space: nowrap; }
}
@media (max-width: 1199.98px) {
    .gem-navbar-inner { width: min(100% - 36px, 1440px); gap: 18px; }
    .gem-navbar-collapse { padding: 14px 0 18px; }
    .gem-navbar-collapse:not(.show):not(.collapsing) { display: none; }
    .gem-navbar-inner { flex-wrap: wrap; }
    .gem-nav-toggle { display: block; margin-left: auto; }
    .gem-navbar-collapse { flex-basis: 100%; order: 3; }
    .gem-nav-links { align-items: stretch; flex-direction: column; gap: 0; }
    .gem-nav-links li { border-top: 1px solid rgba(11,73,63,.08); }
    .gem-nav-links a { display: block; padding: 12px 4px; }
    .gem-nav-actions { justify-content: flex-start; flex-wrap: wrap; padding-top: 12px; }
    .gem-search { width: min(100%, 320px); }
    .gem-search input { width: 100%; padding-left: 14px; }
    .gem-search:focus-within { width: min(100%, 320px); }
}
@media (max-width: 575.98px) {
    .gem-navbar-inner { width: calc(100% - 28px); min-height: 76px; }
    .gem-navbar { min-height: 76px; }
    .gem-brand-mark { width: 52px; height: 52px;}
    .gem-brand-name { font-size: 1.5rem; }
    .gem-brand-tagline { font-size: .48rem; }
    .gem-nav-actions { gap: 8px; }
    .gem-cart-menu { right: auto; left: -100px; }
}
@media (prefers-reduced-motion: reduce) {
    .gem-search, .gem-icon-link { transition: none; }
}

/* 2026-11: compact VK/MAX links, responsive on mobiles */
.gem-social-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; min-height: 36px; padding: 0 7px;
    border: 1px solid var(--line); border-radius: 20px;
    color: var(--gem-800); background: #fff; text-decoration: none;
    font-size: .68rem; font-weight: 700; white-space: nowrap;
}
.gem-social-link:hover, .gem-social-link:focus-visible { border-color: var(--gold-500); color: var(--gold-700); }
.gem-footer-socials { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 12px; }
.gem-footer-socials a { color: inherit; padding: 7px 12px; border: 1px solid currentColor; border-radius: 20px; text-decoration: none; }
.gem-footer-socials a:hover { text-decoration: underline; }
