/* ═══════════════════════════════════════════
   ZOURÌ — Navigation
═══════════════════════════════════════════ */

/* ── HEADER ──────────────────────────────── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.4s ease;
}

/* Navbar */
.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px 32px;
  transition: padding 0.4s ease;
}

/* Nav right group — currency + cart together */
.nav-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ── NAV CURRENCY ────────────────────────── */
.nav-currency {
  position: relative;
}

.nav-currency-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--deep-brown);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.4s ease, opacity 0.2s;
  white-space: nowrap;
}

.nav-currency-toggle:hover { opacity: 0.7; }

/* Match cart colour on transparent nav (over hero) */
#site-header.is-transparent .nav-currency-toggle { color: #fff; }

/* Match cart colour on scrolled nav */
#site-header.is-scrolled .nav-currency-toggle { color: var(--deep-brown); }

.nav-currency-symbol {
  font-size: 15px;
  line-height: 1;
}

.nav-currency-label {
  font-size: 12px;
  letter-spacing: 0.04em;
}

.nav-currency-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.nav-currency-toggle.open .nav-currency-chevron { transform: rotate(180deg); }

.nav-currency-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 120px;
  display: none;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  z-index: 600;
}

.nav-currency-dropdown.active { display: block; }

.nav-currency-dropdown .currency-list { max-height: 260px; overflow-y: auto; scrollbar-width: none; }
.nav-currency-dropdown .currency-list::-webkit-scrollbar { display: none; }

.nav-currency-dropdown .currency-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  white-space: nowrap;
}

.nav-currency-dropdown .currency-option:last-child { border-bottom: none; }
.nav-currency-dropdown .currency-option:hover { background: var(--warm-white); color: var(--earth); }
.nav-currency-dropdown .currency-option.active { background: var(--sand); }

.nav-currency-dropdown .currency-option-symbol {
  font-size: 14px;
  color: var(--taupe);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* Transparent state — on hero */
#site-header.is-transparent .nav-menu-btn span { background: #fff; }
#site-header.is-transparent .nav-logo .logo-dark  { opacity: 0; }
#site-header.is-transparent .nav-logo .logo-light { opacity: 1; }
#site-header.is-transparent .nav-cart             { color: #fff; }

/* Scrolled — white bg */
#site-header.is-scrolled {
  background: var(--cream);
  box-shadow: 0 1px 0 rgba(61,43,31,0.08);
}

#site-header.is-scrolled .navbar { padding: 14px 32px; }
#site-header.is-scrolled .nav-menu-btn span { background: var(--deep-brown); }
#site-header.is-scrolled .nav-logo .logo-dark  { opacity: 1; }
#site-header.is-scrolled .nav-logo .logo-light { opacity: 0; }
#site-header.is-scrolled .nav-cart             { color: var(--deep-brown); }

/* Hidden on scroll down */
#site-header.is-hidden { transform: translateY(-100%); }

/* ── NAV ELEMENTS ────────────────────────── */
.nav-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
  justify-self: start;
}

.nav-menu-btn span {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--deep-brown);
  transition: background 0.4s ease, width 0.3s ease;
}

.nav-menu-btn span:nth-child(2) { width: 70%; }
.nav-menu-btn:hover span:nth-child(2) { width: 100%; }

.nav-logo {
  justify-self: center;
  position: relative;
  width: 120px;
  height: 36px;
}

.nav-logo img { height: 36px; }

.nav-logo .logo-dark,
.nav-logo .logo-light {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
  white-space: nowrap;
}

.nav-logo .logo-dark  { opacity: 1; }
.nav-logo .logo-light { opacity: 0; }

.nav-cart {
  justify-self: end;
  position: relative;
  color: var(--deep-brown);
  display: flex;
  align-items: center;
  transition: color 0.4s ease, opacity 0.2s;
}

.nav-cart:hover { opacity: 0.7; }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--earth);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

.cart-badge.visible { display: flex; }

/* ── BACKDROP ────────────────────────────── */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20,14,10,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.menu-backdrop.open { opacity: 1; pointer-events: all; }

/* ── FLOATING DRAWER ─────────────────────── */
.menu-drawer {
  position: fixed;
  top: 16px;
  left: 16px;
  bottom: 16px;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--cream);
  z-index: 700;
  border-radius: 16px;               /* all 4 corners rounded */
  transform: translateX(calc(-100% - 32px));
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;                   /* clip children to rounded corners */
  box-shadow: 0 24px 64px rgba(20,12,8,0.28);
}

.menu-drawer.open { transform: translateX(0); }

/* Close button — fixed at top of drawer */
.drawer-header {
  flex-shrink: 0;                     /* never shrink, always visible */
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 2;
}

.drawer-close {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.drawer-close:hover { color: var(--earth); }

/* Nav body — scrollable */
.drawer-nav {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0;
}

/* Hide scrollbar visually but keep it functional */
.drawer-nav::-webkit-scrollbar { width: 0; }
.drawer-nav { scrollbar-width: none; }

/* Links */
.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 24px;
  font-size: 16px;
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  border-bottom: 1px solid var(--border);
  text-align: left;
  transition: color 0.2s, padding-left 0.25s ease;
}

.drawer-link:hover {
  color: var(--earth);
  padding-left: 30px;
}

/* Accordion */
.drawer-accordion-btn .chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.drawer-accordion-btn[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.drawer-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: var(--warm-white);
}

.drawer-accordion-content.open { max-height: 300px; }

.drawer-sub-link {
  display: block;
  padding: 12px 24px 12px 38px;
  font-size: 14px;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, padding-left 0.25s ease, background 0.2s;
}

.drawer-sub-link:hover {
  color: var(--earth);
  padding-left: 44px;
  background: rgba(139,111,78,0.05);
}

/* Footer */
.drawer-footer {
  flex-shrink: 0;
  padding: 20px 24px;
  background: var(--cream);
  border-top: 1px solid var(--border);
}

.drawer-divider { display: none; } /* border-top on footer handles it */

.drawer-socials { display: flex; flex-direction: column; gap: 10px; }

.drawer-socials a {
  font-size: 14px;
  color: var(--text-light);
  transition: color 0.2s;
}

.drawer-socials a:hover { color: var(--earth); }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 16px 20px; }
  #site-header.is-scrolled .navbar { padding: 12px 20px; }
  .menu-drawer { width: 300px; }
}

@media (max-width: 480px) {
  .navbar { padding: 14px 16px; }
  #site-header.is-scrolled .navbar { padding: 10px 16px; }
  .menu-drawer {
    top: 12px;
    left: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    max-width: 100%;
    border-radius: 14px;
  }
}