/* =====================================================================
   SITE CHROME — shared styles for header, mobile drawer and footer.
   Include in <head> on every page:
     <link rel="preconnect" href="https://fonts.googleapis.com">
     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
     <link href="https://fonts.googleapis.com/css2?family=Golos+Text:wght@500;600;700;800&family=Google+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap" rel="stylesheet">
     <link rel="stylesheet" href="assets/css/site-chrome.css">
===================================================================== */
:root{
  --bg-deep: #323A5C;
  --accent: #BB9C5E;
  --accent-soft: #D3BF96;
  --ink: #F8F2EE;
  --ink-muted: #AEB4D2;
  --line: rgba(244,241,232,0.22);
  --font-body: 'Google Sans', 'Manrope', 'Segoe UI', system-ui, sans-serif;
}

  /* =====================================================================
     SITE HEADER — two-tier (top info bar + bottom nav bar)
  ===================================================================== */
  .site-header{
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
  }

  /* ---------- top bar: logo, search (visual), phone, messengers, CTA ---------- */
  .header-top-bar{
    width: 100%;
    background: rgba(170, 191, 196, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    /* light background here — flip text/icon/line tones for contrast */
    --ink: #24304A;
    --ink-muted: #4B5A72;
    --line: rgba(36, 48, 74, 0.25);
  }
  .header-top-bar .header-search{ background: rgba(36,48,74,0.06); }
  .header-top-bar .msg-btn,
  .header-top-bar .cabinet-btn,
  .header-top-bar .burger{ background: rgba(36,48,74,0.08); }
  .header-top-inner{
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: clamp(14px, 2vw, 28px);
    padding: 12px clamp(16px, 3vw, 40px);
  }
  .site-logo{ display: flex; align-items: center; flex: 0 0 auto; }
  .site-logo img{ height: 80px; width: auto; display: block; }
  @media (min-width: 981px){
    .site-logo img{ height: 136px; }
  }

  .header-search{
    flex: 1 1 320px;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(244,241,232,0.08);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 14px;
    height: 38px;
  }
  .header-search-icon{ width: 16px; height: 16px; color: var(--ink-muted); flex: 0 0 auto; }
  .header-search-input{
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.85rem;
  }
  .header-search-input::placeholder{ color: var(--ink-muted); opacity: 0.9; }
  .header-search-input:disabled{ cursor: default; opacity: 1; }

  .header-top-actions{
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
  }
  .header-phone{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
  }
  .header-phone svg{ width: 17px; height: 17px; color: var(--accent-soft); flex: 0 0 auto; }
  .header-phone-text{ display: flex; flex-direction: column; line-height: 1.3; }
  .header-phone-text strong{
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
  }
  .header-phone-text small{
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--ink-muted);
  }
  .header-messengers{ display: flex; align-items: center; gap: 6px; }
  .msg-btn{
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(244,241,232,0.1);
    border: 1px solid var(--line);
    color: var(--ink-muted);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
  }
  .msg-btn:hover{ background: var(--accent-soft); color: var(--bg-deep); border-color: var(--accent-soft); }
  .msg-btn svg{ width: 15px; height: 15px; }

  .header-cta{
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bg-deep);
    background: var(--accent-soft);
    border: 1.5px solid var(--accent-soft);
    border-radius: 999px;
    padding: 10px 20px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 180ms ease, transform 180ms ease;
  }
  .header-cta:hover{ background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }

  .burger{
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(244,241,232,0.1);
    border: 1px solid var(--line);
    cursor: pointer;
    flex: 0 0 auto;
  }
  .burger span{
    display: block;
    width: 18px; height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 220ms ease, opacity 220ms ease;
  }
  .burger.is-active span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  .burger.is-active span:nth-child(2){ opacity: 0; }
  .burger.is-active span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

  /* ---------- bottom bar: catalog button, nav links, cabinet ---------- */
  .header-bottom-bar{
    width: 100%;
    background: #262B45;
    border-bottom: 1px solid var(--line);
  }
  .header-bottom-inner{
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: clamp(10px, 1.6vw, 22px);
    padding: 0 clamp(16px, 3vw, 40px);
  }
  .catalog-btn{
    flex: 0 0 auto;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--bg-deep);
    background: var(--accent-soft);
    text-decoration: none;
    white-space: nowrap;
    padding: 11px 20px;
    border-radius: 999px;
    transition: background 180ms ease;
  }
  .catalog-btn svg{ width: 17px; height: 17px; flex: 0 0 auto; }
  .catalog-btn:hover{ background: var(--accent); }

  .main-nav{ flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; }
  .main-nav-list{
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 4px;
  }
  .main-nav-item{ position: relative; }
  .main-nav-link{
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: var(--font-body);
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: background 180ms ease, color 180ms ease;
  }
  .main-nav-icon{ width: 19px; height: 19px; display: inline-flex; flex: 0 0 auto; }
  .main-nav-icon svg{ width: 100%; height: 100%; }
  .main-nav-icon img{ width: 100%; height: 100%; object-fit: contain; display: block; }
  .main-nav-text{ display: inline-flex; align-items: center; gap: 4px; }
  .main-nav-link:hover, .main-nav-item.is-open .main-nav-link{
    background: rgba(244, 241, 232, 0.12);
    color: var(--accent-soft);
  }
  .main-nav-link .chevron{
    width: 11px; height: 11px;
    transition: transform 200ms ease;
    flex: 0 0 auto;
  }
  .main-nav-item.is-open .chevron{ transform: rotate(180deg); }

  .dropdown-panel{
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 260px;
    max-width: 340px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 24px 48px -18px rgba(10,12,24,0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
    z-index: 5;
  }
  .main-nav-item.is-open .dropdown-panel,
  .cabinet-item.is-open .dropdown-panel{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .dropdown-panel a{
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-body);
    font-size: 0.86rem;
    color: var(--ink-muted);
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 10px;
    line-height: 1.35;
    transition: background 160ms ease, color 160ms ease;
  }
  .dropdown-panel a:hover{ background: rgba(244,241,232,0.08); color: var(--ink); }
  .dropdown-panel-icon{ width: 18px; height: 18px; flex: 0 0 auto; display: inline-flex; }
  .dropdown-panel-icon svg{ width: 100%; height: 100%; }

  .header-bottom-actions{
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
  }

  .cabinet-item{ position: relative; }
  .cabinet-btn{
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(244,241,232,0.1);
    border: 1px solid var(--line);
    color: var(--ink);
    cursor: pointer;
    flex: 0 0 auto;
  }
  .cabinet-btn svg{ width: 17px; height: 17px; }
  .cabinet-btn:hover{ border-color: var(--accent-soft); }
  .cabinet-item .dropdown-panel{ left: auto; right: 0; min-width: 240px; }

  .cart-btn{ position: relative; text-decoration: none; }

  @media (max-width: 980px){
    .header-top-inner .header-top-actions{ display: none; }
    .header-top-inner .header-search{ flex: 1 1 auto; max-width: none; }
    .header-bottom-bar{ display: none; }
    .burger{ display: flex; margin-left: auto; }
  }

  /* ---------- mobile drawer ---------- */
  .drawer-backdrop{
    position: fixed; inset: 0;
    background: rgba(10,12,24,0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 240ms ease, visibility 240ms;
  }
  .drawer-backdrop.is-open{ opacity: 1; visibility: visible; }

  .mobile-drawer{
    position: fixed;
    top: 0; right: 0;
    height: 100%;
    width: min(360px, 88vw);
    background: var(--bg-deep);
    z-index: 151;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 280ms cubic-bezier(.22,1,.36,1);
    box-shadow: -20px 0 50px -20px rgba(10,12,24,0.6);
  }
  .mobile-drawer.is-open{ transform: translateX(0); }
  .mobile-drawer-head{
    display: flex; align-items: center; justify-content: flex-end;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
  }
  .drawer-close{
    width: 34px; height: 34px;
    border-radius: 10px;
    background: rgba(244,241,232,0.1);
    border: 1px solid var(--line);
    color: var(--ink);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
  }
  .drawer-close svg{ width: 15px; height: 15px; }
  .mobile-drawer-nav{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 10px 20px;
  }
  .drawer-item{ border-bottom: 1px solid rgba(244,241,232,0.08); }
  .drawer-item-head{
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    padding: 14px 8px;
  }
  .drawer-item-link{
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .drawer-item-catalog{ background: rgba(211,191,150,0.1); border-radius: 12px; margin-bottom: 4px; border-bottom: none; }
  .drawer-item-catalog .drawer-item-link{ color: var(--accent-soft); font-weight: 700; }
  .drawer-item-catalog .drawer-item-icon{ width: 18px; height: 18px; flex: 0 0 auto; }
  .drawer-item-toggle{
    background: none; border: none; color: var(--ink-muted);
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
  }
  .drawer-item-toggle svg{ width: 13px; height: 13px; transition: transform 200ms ease; }
  .drawer-item.is-open .drawer-item-toggle svg{ transform: rotate(180deg); }
  .drawer-sub{
    list-style: none; margin: 0; padding: 0 8px 10px 14px;
    display: none;
  }
  .drawer-item.is-open .drawer-sub{ display: block; }
  .drawer-sub a{
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--ink-muted);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 10px;
  }
  .drawer-sub a:hover{ background: rgba(244,241,232,0.08); color: var(--ink); }
  .drawer-sub-icon{ width: 17px; height: 17px; flex: 0 0 auto; display: inline-flex; }
  .drawer-sub-icon svg{ width: 100%; height: 100%; }
  .mobile-drawer-foot{
    flex: 0 0 auto;
    padding: 16px 18px 22px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .mobile-drawer-foot .header-phone{ font-size: 0.98rem; }
  .mobile-drawer-foot .header-messengers{ gap: 8px; }
  .mobile-drawer-foot .header-cta{
    text-align: center;
    padding: 13px 20px;
  }

  /* =====================================================================
     SITE FOOTER
  ===================================================================== */
  .site-footer{
    position: relative;
    overflow: hidden;
    background: var(--bg-deep);
    border-top: 1px solid var(--line);
    padding: clamp(40px, 6vw, 64px) clamp(20px, 5vw, 64px) 0;
  }
  .footer-mandala{
    position: absolute;
    top: 50%;
    right: clamp(-90px, -4vw, 30px);
    transform: translateY(-50%);
    width: clamp(220px, 24vw, 380px);
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
  }
  .footer-mandala img{ width: 100%; height: auto; display: block; }
  .footer-top{
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: clamp(32px, 5vw, 56px);
    padding-bottom: 40px;
  }
  .footer-brand{
    flex: 0 1 260px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .footer-brand img{ height: 56px; width: auto; }
  .footer-brand p{
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--ink-muted);
    max-width: 34ch;
  }
  .footer-contact{ display: flex; flex-direction: column; gap: 10px; }
  .footer-contact .header-phone{ font-size: 0.95rem; }
  .footer-cta{
    align-self: flex-start;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--bg-deep);
    background: var(--accent-soft);
    border: 1.5px solid var(--accent-soft);
    border-radius: 999px;
    padding: 11px 22px;
    text-decoration: none;
    transition: background 180ms ease, transform 180ms ease;
  }
  .footer-cta:hover{ background: var(--accent); transform: translateY(-1px); }

  .footer-columns{
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 26px 20px;
  }
  .footer-col h4{
    margin: 0 0 12px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--ink);
  }
  .footer-col h4 a{ color: inherit; text-decoration: none; }
  .footer-col h4 a:hover{ color: var(--accent-soft); }
  .footer-col ul{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
  .footer-col a{
    font-family: var(--font-body);
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--ink-muted);
    text-decoration: none;
    transition: color 160ms ease;
  }
  .footer-col a:hover{ color: var(--accent-soft); }

  .footer-bottom{
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 0 22px;
    border-top: 1px solid var(--line);
  }
  .footer-bottom p{
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.76rem;
    color: var(--ink-muted);
  }
  .footer-bottom-links{ display: flex; gap: 16px; flex-wrap: wrap; }
  .footer-bottom-links a{
    font-family: var(--font-body);
    font-size: 0.76rem;
    color: var(--ink-muted);
    text-decoration: none;
  }
  .footer-bottom-links a:hover{ color: var(--accent-soft); }

  @media (max-width: 640px){
    .footer-columns{ grid-template-columns: repeat(2, 1fr); }
    .footer-top{ flex-direction: column; }
  }
