/* site-header.css — единые стили хедера OZARELA
   [t584 14.10, окно «Стол» aurao-75] Шаг 0 «сайт под design-x»: вид шапки = .topbar design-x (белая, 56 px, тонкая линия снизу,
   логотип капсом, кнопки справа — как .tb-btn: 34 px, рамка --border-light, 14 px). Разметка и JS (site-header.js) не менялись. */

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--border-light, #EBE3DA);
    padding: 0;
    transition: box-shadow 0.2s;
}
/* [t584] высота постоянная (56 + линия = 57 — под неё стоит .pipeline-strip top:57px); при прокрутке только тень */
.site-header.scrolled {
    box-shadow: 0 2px 12px rgba(26, 22, 20, 0.06);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    max-width: none;   /* [t584] как .topbar design-x — во всю ширину (в рамке 1200 меню + имя + кошелёк не помещались, кнопка справа обрезалась) */
    height: 56px;
    margin: 0 auto;
    padding: 0 20px;
}
.site-header .sh-nav { flex: 0 1 auto; min-width: 0; height: 56px; overflow: hidden; }   /* [t584] что не влезло — в «Ещё ▾» (site-header.js fitNav) */
.site-header .sh-logo, .site-header .sh-more { flex: none; }
.site-header .sh-right, .site-header .sh-burger { margin-left: auto; }   /* меню сразу за логотипом, как крошка design-x; вход и кошелёк — вправо */
.sh-more { position: relative; display: flex; align-items: center; height: 56px; }
.sh-more[hidden] { display: none; }
.sh-more-btn { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 10px; background: none; border: none; cursor: pointer;
    font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 500; color: var(--text-muted, #6B5E57); position: relative; }
.sh-more-btn:hover, .sh-more.active .sh-more-btn { color: var(--text-primary, #1A1614); }
.sh-more.active .sh-more-btn { font-weight: 600; }
.sh-more.active .sh-more-btn::after { content: ''; position: absolute; bottom: 0; left: 10px; right: 10px; height: 2px; background: var(--accent-terracotta); }
.sh-more-menu { display: none; position: absolute; top: calc(100% + 1px); right: 0; min-width: 200px; background: #fff; border: 1px solid var(--border-light, #EBE3DA);
    border-radius: 2px; box-shadow: 0 8px 24px rgba(26, 22, 20, 0.08); z-index: 1001; padding: 4px 0; }
.sh-more-menu.open { display: block; }
.site-header .sh-more-menu a { display: block; height: auto; padding: 10px 16px; font-size: 14px; color: var(--text-body, #2D2926); text-decoration: none; }
.site-header .sh-more-menu a:hover { background: var(--bg-warm, #FDF5EE); color: var(--text-primary, #1A1614); }
.site-header .sh-more-menu a.active { color: var(--text-primary, #1A1614); font-weight: 600; }
.site-header .sh-more-menu a.active::after { display: none; }
@media (max-width: 1280px) { .site-header .sh-nav a { padding: 0 7px; } .site-header .sh-logo { font-size: 22px; } }   /* [t584] узкий ноутбук */

/* Logo */
.site-header .sh-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary, #1A1614);
    text-decoration: none;
    letter-spacing: 0.14em;   /* [t584] как логотип design-x: капсом (было lowercase, 28px) */
    flex-shrink: 0;
}

/* Nav links */
.site-header .sh-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.site-header .sh-nav a {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted, #6B5E57);
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 10px;
    transition: color 0.2s;
    white-space: nowrap;
    position: relative;
}
.site-header .sh-nav a:hover {
    color: var(--text-primary, #1A1614);
}
.site-header .sh-nav a.active {
    color: var(--text-primary, #1A1614);
    font-weight: 600;
}
.site-header .sh-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 10px; right: 10px;
    height: 2px;
    background: var(--accent-terracotta);   /* [t584] выбранное в design-x — терракота (было золото) */
}

/* Right side */
.site-header .sh-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Wallet chip */
.sh-wallet {
    display: none;
    align-items: center;
    gap: 6px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #1A1614);
    background: #fff;
    border: 1px solid var(--border-light, #EBE3DA);
    height: 34px;
    padding: 0 12px;
    text-decoration: none;
    transition: border-color 0.2s;
    border-radius: 2px;
}
.sh-wallet:hover { border-color: var(--text-primary, #1A1614); }   /* [t584] как .tb-btn design-x */
.sh-wallet i { font-size: 18px; color: var(--accent-gold-dark); }
body.logged-in .sh-wallet.loaded { display: inline-flex; }

/* Auth link */
.sh-auth-link {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted, #6B5E57);
    text-decoration: none;
    padding: 6px 10px;
    transition: color 0.2s;
}
.sh-auth-link:hover { color: var(--text-primary, #1A1614); }

/* CTA button */
.sh-cta {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #1A1614);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--text-primary, #1A1614);
    border-radius: 2px;
    transition: all 0.2s;
    white-space: nowrap;
}
.sh-cta:hover {
    background: var(--text-primary, #1A1614);
    color: var(--text-light, #F5F0EB);
}
.sh-cta-arrow {
    display: inline-block;
    transition: transform 0.2s;
    margin-left: 4px;
}
.sh-cta:hover .sh-cta-arrow { transform: translateX(3px); }

/* User menu */
.sh-user-menu { position: relative; }
.sh-user-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--border-light, #EBE3DA);
    border-radius: 2px;
    height: 34px;
    padding: 0 12px;
    max-width: 220px;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #1A1614);
    transition: border-color 0.2s;
}
.sh-user-trigger:hover { border-color: var(--text-primary, #1A1614); }   /* [t584] как .tb-btn design-x */
#shUserName { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* [t584] длинное имя — в одну строку с «…», как .who design-x (кадр 14.10: переносилось на 2 строки) */
.sh-user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid var(--border-light, #EBE3DA);
    min-width: 180px;
    z-index: 1001;
    border-radius: 2px;
    box-shadow: 0 8px 24px rgba(26, 22, 20, 0.08);
}
.sh-user-dropdown.open { display: block; }
.sh-user-dropdown a {
    display: block;
    padding: 10px 16px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: var(--text-body, #1A1614);
    text-decoration: none;
    transition: background 0.15s;
}
.sh-user-dropdown a:hover { background: var(--bg-warm, #FDF5EE); }

/* Guest / logged-in visibility */
.sh-guest { display: flex; align-items: center; gap: 12px; }
.sh-logged { display: none; align-items: center; gap: 12px; }
body.logged-in .sh-guest { display: none; }
body.logged-in .sh-logged { display: flex; }

/* Burger (mobile) */
.sh-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 4px;
}
.sh-burger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-primary, #1A1614);
    transition: all 0.3s;
}

/* Mobile overlay */
.sh-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 22, 20, 0.3);
    z-index: 999;
}
.sh-mobile-overlay.open { display: block; }

.sh-mobile-menu {
    display: none;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(86vw, 340px);
    background: #fff;
    z-index: 1002;
    padding: 24px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s;
}
.sh-mobile-menu.open {
    display: block;
    transform: translateX(0);
}
.sh-mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: none;
    border: 1px solid var(--border-light, #EBE3DA);
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted, #6B5E57);
    margin-bottom: 24px;
    margin-left: auto;
}
.sh-mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sh-mobile-menu nav a {
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-body, #2D2926);
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light, #EBE3DA);
}
.sh-mobile-menu nav a.active {
    color: var(--text-primary, #1A1614);
    font-weight: 600;
}
.sh-mobile-menu .sh-mobile-auth {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light, #EBE3DA);
}
/* t101: были две мелкие ссылки в строку — человек не находил вход в кабинет.
   Теперь столбиком и кнопками: вход — обводка, целевое действие — заливка. */
/* столбик — только для ВИДИМОГО состояния, иначе перебивает скрытие второго блока */
.sh-mobile-menu .sh-mobile-auth .sh-guest { display: grid; gap: 10px; }
.sh-mobile-menu .sh-mobile-auth .sh-logged { display: none; gap: 10px; }
body.logged-in .sh-mobile-menu .sh-mobile-auth .sh-guest { display: none; }
body.logged-in .sh-mobile-menu .sh-mobile-auth .sh-logged { display: grid; }
.sh-mobile-menu .sh-mobile-auth a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary, #1A1614);
    text-decoration: none;
    border: 1px solid var(--text-primary, #1A1614);
    border-radius: 2px;
    text-align: center;
}
.sh-mobile-menu .sh-mobile-auth a.sh-m-primary {   /* [t584] токен вместо ручного #C45B3E */
    background: var(--accent-terracotta);
    border-color: var(--accent-terracotta);
    color: #fff;
}
.sh-mobile-menu .sh-mobile-auth a.sh-m-primary:hover { background: var(--accent-terracotta-hover); border-color: var(--accent-terracotta-hover); }
.sh-mobile-wallet {
    display: none;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-muted, #6B5E57);
}
body.logged-in .sh-mobile-wallet.loaded { display: block; }

/* Responsive */
@media (max-width: 900px) {
    .site-header .sh-nav { display: none; }
    .site-header .sh-right { display: none; }
    .sh-burger { display: flex; }
}
