*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Page transition fade */
body {
  opacity: 0;
  transition: opacity 0.28s ease;
}
body.is-loaded { opacity: 1; }
body.is-leaving { opacity: 0; transition: opacity 0.18s ease; }

/* Scroll-reveal — sections fade + lift as they enter the viewport */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  body, body.is-loaded, body.is-leaving {
    opacity: 1 !important;
    transition: none !important;
  }
  .reveal, .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400; /* Archivo Black is intrinsically heavy at weight 400 */
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-transform: uppercase;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* NAV */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.site-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.site-nav .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.08em;
  color: var(--text);
}
.site-nav .logo .accent { color: var(--accent); }
.site-logo-img {
  height: 48px;
  width: auto;
  transition: filter 0.3s;
}
[data-theme="light"] .site-logo-img {
  filter: invert(1) hue-rotate(180deg) brightness(1.1);
}
.site-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav ul a {
  color: var(--text);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.05em;
}
.site-nav ul a:hover { color: var(--accent); }
.nav-actions { display: flex; gap: 14px; align-items: center; }

/* Hamburger button — hidden on desktop, shown on mobile */
.nav-hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}
.nav-hamburger:hover { color: var(--accent); border-color: var(--accent); }
.nav-hamburger svg { width: 22px; height: 22px; display: block; }


/* CART WIDGET (nav-actions) */
.nav-cart {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  color: var(--text);
  border: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-cart:hover { color: var(--accent); border-color: var(--border); }
.nav-cart-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-cart-icon-wrap svg { width: 22px; height: 22px; }
.nav-cart-count {
  position: absolute;
  top: -7px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.nav-cart-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.nav-cart-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 500;
}
.nav-cart-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.nav-cart:hover .nav-cart-total { color: var(--accent); }

@media (max-width: 640px) {
  .nav-cart-meta { display: none; }
}

/* FOOTER */
.site-footer {
  background: var(--bg-surface);
  color: var(--text-muted);
  padding: 48px 0;
  margin-top: 80px;
  border-top: 1px solid var(--border);
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.site-footer h4 { color: var(--text); }

/* SECTIONS */
section { padding: 64px 0; }
.section-title {
  font-size: 36px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 28px;
  background: var(--accent);
}

/* HERO */
.hero {
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
  padding: 120px 0;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55));
  z-index: 1;
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 2; }
.hero h1 {
  font-size: 64px;
  color: var(--white);
}
.hero p { color: var(--text-muted); font-size: 18px; }

/* GRID */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* ── DRAWER WRAPPER ──
   On desktop, .site-drawer is transparent (display: contents) so the ul + nav-actions
   render as if they were direct children of .nav-inner. On mobile, it becomes a
   slide-in panel. */
.site-drawer { display: contents; }
.site-nav-scrim { display: none; }
.nav-cart-mobile { display: none; }

/* TABLET + MOBILE — slide-in drawer */
@media (max-width: 1024px) {
  .nav-hamburger { display: inline-flex; }

  .site-nav .nav-inner {
    flex-wrap: nowrap;
    height: 60px;
    gap: 12px;
    padding: 0;
    align-items: center;
    justify-content: space-between;
  }
  .site-nav .logo { margin-right: auto; }

  /* Drawer panel — slides in from the right */
  .site-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: min(86vw, 340px);
    height: 100vh;
    height: 100dvh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border);
    padding: 76px 20px 32px;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.4);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0;
  }
  .site-nav.is-open .site-drawer { transform: translateX(0); }

  /* Backdrop */
  .site-nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 150;
  }
  body.nav-locked .site-nav-scrim { opacity: 1; pointer-events: auto; }
  body.nav-locked { overflow: hidden; }
  /* When drawer is open, lift the whole navbar (which owns the drawer) above
     the scrim so taps hit the drawer items, not the scrim. */
  body.nav-locked .site-nav { z-index: 250; }

  /* Hamburger sits above the drawer so the close icon stays tappable */
  .nav-hamburger { position: relative; z-index: 210; margin-left: 0; }

  /* Compact cart icon shown in the navbar so customers can hit the cart
     without opening the drawer. Sits between the logo and the hamburger. */
  .nav-cart-mobile {
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    color: var(--text);
    background: transparent;
    z-index: 210;
  }
  .nav-cart-mobile svg { width: 22px; height: 22px; }
  .nav-cart-mobile:hover { color: var(--accent); border-color: var(--accent); }
  .nav-cart-mobile__count {
    position: absolute;
    top: -7px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  /* Nav links — full-width rows with 48px tap target */
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    padding: 0;
    margin: 0;
  }
  .site-nav ul li { width: 100%; padding: 0; }
  .site-nav ul a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 6px;
  }
  .site-nav ul a:hover,
  .site-nav ul a:active { background: var(--bg-elevated); color: var(--accent); }

  /* Actions section — stacked, dividers, generous tap targets */
  .site-nav .nav-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }

  /* Language toggle as pill buttons */
  .site-nav .nav-actions [data-lang-wrap] {
    display: flex !important;
    gap: 8px !important;
    margin-right: 0 !important;
    width: 100%;
  }
  .site-nav .nav-actions [data-lang-wrap] a {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--text);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .site-nav .nav-actions [data-lang-wrap] span { display: none !important; }

  /* Theme toggle: row with label */
  .site-nav .nav-actions [data-theme-btn] {
    margin-left: 0 !important;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 18px !important;
    justify-content: center;
  }

  /* Cart pill — full-width row */
  .site-nav .nav-cart {
    width: 100%;
    justify-content: flex-start;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    min-height: 56px;
  }
  .nav-cart-meta { display: flex !important; }

  /* Auth block — stacked buttons */
  .site-nav [data-nav-auth] {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .site-nav [data-nav-auth] > * {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }

  /* Bigger logo image on tablet, keep current 32px on small phones below */
  .site-logo-img { height: 36px; }
}

/* SMALL PHONES — content sizing */
@media (max-width: 768px) {
  .site-logo-img { height: 32px; }
  .site-nav .logo { font-size: 0; }

  .btn { padding: 10px 14px; font-size: 13px; min-height: 40px; }
  .btn--sm { padding: 8px 12px; font-size: 13px; min-height: 36px; }

  .hero h1 { font-size: 32px; }
  .hero p { font-size: 15px; }
  .hero { padding: 48px 0; }
  section { padding: 32px 0; }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  .section-title { font-size: 24px; margin-bottom: 24px; }
  .container { padding: 0 16px; }
}
