/* ═══════════════════════════════════════════════════════════════════════
   Components — Navigation
   Desktop navbar (glass) + Mobile hamburger + Slide drawer + Footer
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Top Navbar (sticky, glass) ───────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  width: 100%;
  height: var(--header-h-mob);
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--line);
  transition: background var(--tr);
}

@media (min-width: 768px) {
  .navbar { height: var(--header-h); }
}

.navbar.scrolled {
  background: rgba(5, 5, 5, 0.92);
  box-shadow: var(--shadow-md);
}

.navbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

/* Logo */
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--gold);
  text-decoration: none;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-brand-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background: var(--grad-gold);
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-on-gold);
  font-weight: var(--weight-black);
  font-size: var(--text-md);
  box-shadow: 0 4px 12px rgba(255, 46, 198, 0.30);
}

.nav-brand:hover {
  color: var(--gold-light);
}

/* Desktop nav links */
.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-1);
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  color: var(--text-soft);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: var(--r-md);
  transition: all var(--tr-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--gold);
  background: var(--gold-soft);
}

.nav-link.active {
  color: var(--gold);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  inset-inline: var(--space-4);
  height: 2px;
  background: var(--grad-gold-line);
  border-radius: var(--r-pill);
}

/* Right side actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Lang switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface-1);
  border-radius: var(--r-pill);
  overflow: hidden;
  height: 36px;
}

.lang-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 100%;
  padding: 0 var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: all var(--tr-fast);
}

.lang-switcher a:hover { color: var(--gold); }
.lang-switcher a.active {
  background: var(--gold-soft);
  color: var(--gold);
}

/* User menu (logged-in customer/admin) */
.user-menu {
  position: relative;
}

.user-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--tr-fast);
  min-height: 36px;
}

.user-menu-btn:hover {
  border-color: var(--gold);
}

.user-menu-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad-gold);
  color: var(--text-on-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-xs);
}

.user-menu-name {
  display: none;
  font-size: var(--text-sm);
  color: var(--text);
  font-weight: var(--weight-medium);
  padding-inline-end: var(--space-2);
}

@media (min-width: 768px) {
  .user-menu-name { display: inline; }
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  inset-inline-end: 0;
  min-width: 220px;
  background: var(--surface-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xl);
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--tr-fast);
  z-index: var(--z-dropdown);
}

.user-menu.open .user-menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-dropdown a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  color: var(--text-soft);
  text-decoration: none;
  border-radius: var(--r-sm);
  font-size: var(--text-sm);
  transition: all var(--tr-fast);
}

.user-menu-dropdown a:hover {
  background: var(--gold-soft);
  color: var(--gold);
}

.user-menu-dropdown .divider {
  height: 1px;
  background: var(--line);
  margin: var(--space-2) 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   MOBILE HAMBURGER + DRAWER
   ═══════════════════════════════════════════════════════════════════════ */

.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch);
  height: var(--touch);
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all var(--tr-fast);
  position: relative;
}

@media (min-width: 1024px) {
  .hamburger { display: none; }
}

.hamburger-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.hamburger-lines span {
  height: 2px;
  background: var(--gold);
  border-radius: var(--r-pill);
  transition: all var(--tr);
  transform-origin: center;
}

.hamburger.active .hamburger-lines span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active .hamburger-lines span:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-lines span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Drawer overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: all var(--tr);
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Drawer panel */
.drawer {
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  height: 100dvh;
  width: 88%;
  max-width: 360px;
  background: var(--ink);
  border-inline-start: 1px solid var(--line);
  z-index: calc(var(--z-overlay) + 1);
  transform: translateX(100%);
  transition: transform var(--tr-slow);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

[dir="rtl"] .drawer {
  transform: translateX(-100%);
}

.drawer.active {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
}

.drawer-body nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.drawer-body nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  min-height: var(--touch);
  color: var(--text-soft);
  text-decoration: none;
  border-radius: var(--r-md);
  font-weight: var(--weight-medium);
  transition: all var(--tr-fast);
}

.drawer-body nav a:hover,
.drawer-body nav a.active {
  background: var(--gold-soft);
  color: var(--gold);
}

.drawer-body nav a.active {
  border-inline-start: 3px solid var(--gold);
}

.drawer-foot {
  padding: var(--space-4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════ */

.footer {
  margin-top: var(--space-9);
  /* Bottom padding: base 24px + iOS safe-area inset for iPhone home indicator.
     `max()` ensures we never go below the base 24px even on devices without
     a safe area. On Android/desktop, env() resolves to 0 → behavior unchanged. */
  padding: var(--space-7) 0 max(var(--space-5), env(safe-area-inset-bottom, 0px));
  background: var(--ink-deep);
  border-top: 1px solid var(--line);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 1px;
  background: var(--grad-gold-line);
  opacity: 0.5;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr repeat(3, 1fr);
  }
}

.footer-col h4 {
  font-size: var(--text-sm);
  color: var(--gold);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  font-family: var(--font-display);
}

.footer-col p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-col ul a {
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--tr-fast);
}

.footer-col ul a:hover {
  color: var(--gold);
}

.footer-social {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-muted);
  transition: all var(--tr-fast);
}

.footer-social a:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: start;
  }
}
