/* =============================================================
   THE TAILOR — Design System
   Aesthetic: Light luxury editorial (Angelo Jakob inspired)
   Fonts: Cormorant Garamond (display) + DM Sans (body)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ── Variables ────────────────────────────────────────────── */
:root {
  /* Light theme */
  --black:       #0a0a08;
  --white:       #ffffff;
  --bg:          #f0eeea;
  --bg-2:        #e8e5e0;
  --bg-3:        #dedad3;
  --surface:     #ffffff;
  --surface-2:   #f7f5f2;
  --surface-3:   #f0eeea;
  --border:      #dedad4;
  --border-2:    #ccc8c0;
  --muted:       #9c9488;
  --text-dim:    #6e685e;
  --text:        #3a3630;
  --cream:       #2c2820;  /* Dark text on light bg */
  --gold:        #9a7a50;  /* muted gold/tan */
  --gold-light:  #b89060;
  --gold-dim:    #c8a878;
  --error:       #a33;
  --success:     #2d7a4f;
  --warning:     #8a6030;

  --ff-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --ff-sans:  'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  --radius:    0px;
  --radius-md: 2px;
  --radius-lg: 4px;

  --t:    0.18s ease;
  --t-md: 0.3s ease;
  --t-lg: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  --max-w:   1320px;
  --nav-h:   60px;
  --sidebar: 360px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow:    0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.10);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--ff-sans); font-size: .9375rem; font-weight: 400; line-height: 1.6; color: var(--text); background: var(--bg); min-height: 100vh; }
img  { display: block; max-width: 100%; height: auto; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Typography ───────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-family: var(--ff-serif); font-weight: 400; line-height: 1.1; color: var(--cream); }
h1 { font-size: clamp(2.8rem, 7vw, 6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.015em; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.25rem; }
p  { color: var(--text); line-height: 1.7; }

.serif  { font-family: var(--ff-serif); }
.italic { font-style: italic; }
.caps   { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 500; }
.gold   { color: var(--gold); }
.dim    { color: var(--text-dim); }

/* ── Layout ───────────────────────────────────────────────── */
.container        { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }
.container--narrow { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 2rem; }
.container--wide  { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 2rem; }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--t-md), border-color var(--t-md);
}
.nav__inner {
  height: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.nav__logo {
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: .06em;
  text-decoration: none;
  flex-shrink: 0;
}
.nav__logo span { color: var(--gold); }
.nav__links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav__link {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--t);
  position: relative;
  padding-bottom: 2px;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 100%;
  height: 1px;
  background: var(--cream);
  transition: right var(--t-md);
}
.nav__link:hover, .nav__link.active { color: var(--cream); }
.nav__link:hover::after, .nav__link.active::after { right: 0; }
.nav__actions { display: flex; align-items: center; gap: 1.25rem; }
.nav__cart {
  position: relative;
  display: flex; align-items: center; gap: .4rem;
  color: var(--text-dim);
  font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  transition: color var(--t);
}
.nav__cart:hover { color: var(--cream); }
.nav__cart-badge {
  position: absolute; top: -5px; right: -8px;
  background: var(--cream); color: var(--white);
  font-size: .55rem; font-weight: 700;
  width: 15px; height: 15px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 4px; }
.nav__burger span { display: block; width: 22px; height: 1px; background: var(--text); transition: var(--t-md); }
.nav__mobile {
  display: none; position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 999;
  padding: 2rem; flex-direction: column; gap: .5rem; overflow-y: auto;
}
.nav__mobile.open { display: flex; }
.nav__mobile a { font-family: var(--ff-serif); font-size: 1.8rem; color: var(--cream); padding: .6rem 0; border-bottom: 1px solid var(--border); }
.nav__mobile .nav__mobile-sub { font-size: .8rem; font-family: var(--ff-sans); color: var(--text-dim); padding: .3rem 0; border-bottom: none; }

/* Page offset for fixed nav */
.page-top { padding-top: var(--nav-h); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: .85rem 2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer; transition: all var(--t); text-decoration: none;
  white-space: nowrap;
}
.btn--primary  { background: var(--cream); color: var(--white); border-color: var(--cream); }
.btn--primary:hover  { background: var(--text); border-color: var(--text); }
.btn--secondary { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn--secondary:hover { background: var(--cream); color: var(--white); }
.btn--outline { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn--outline:hover { background: var(--cream); color: var(--white); }
.btn--ghost { background: transparent; color: var(--text-dim); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--cream); color: var(--cream); }
.btn--lg { padding: 1rem 2.5rem; font-size: .75rem; }
.btn--full { width: 100%; justify-content: center; }
.btn--sm { padding: .5rem 1.2rem; font-size: .68rem; }

/* ── Forms ────────────────────────────────────────────────── */
.form-label { display: block; font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: .4rem; }
.form-control {
  width: 100%; padding: .7rem 1rem;
  background: var(--surface); color: var(--cream);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: .9rem; transition: border-color var(--t);
}
.form-control:focus { outline: none; border-color: var(--cream); }
.form-control::placeholder { color: var(--muted); }
.form-group { margin-bottom: 1.25rem; }
.form-grid  { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--bg-2);
  display: flex; align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}
.hero__bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #e8e5df 0%, #d8d3cc 50%, #ccc7be 100%);
}
.hero__content { position: relative; z-index: 2; width: 100%; }
.hero__eyebrow { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.5rem; }
.hero__title   { font-family: var(--ff-serif); color: var(--cream); margin-bottom: 1.5rem; line-height: 1.05; }
.hero__subtitle { font-size: 1rem; color: var(--text-dim); max-width: 460px; line-height: 1.7; margin-bottom: 2.5rem; }
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── Split hero panels ────────────────────────────────────── */
.split-panels {
  display: grid; grid-template-columns: 1fr 1fr;
  height: 60vh; min-height: 480px;
}
.split-panel {
  position: relative; overflow: hidden;
  background: var(--bg-3);
  display: flex; align-items: flex-end;
  cursor: pointer;
}
.split-panel__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split-panel__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.4) 0%, transparent 60%); }
.split-panel__label {
  position: relative; z-index: 2;
  padding: 2rem;
  color: #fff;
  font-family: var(--ff-serif);
  font-size: 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,.5);
}

/* ── Product type selector ─────────────────────────────────── */
.product-selector { margin-bottom: 2rem; }
.product-selector__label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: .75rem; }
.product-selector__options { display: flex; gap: .5rem; flex-wrap: wrap; }
.product-type-card {
  display: flex; flex-direction: column; gap: .2rem;
  padding: .75rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--surface); border-radius: 999px;
  cursor: pointer; transition: all var(--t);
}
.product-type-card input[type=radio] { display: none; }
.product-type-card:hover, .product-type-card.active { border-color: var(--cream); background: var(--cream); color: #fff; }
.product-type-card__name { font-size: .78rem; font-weight: 500; letter-spacing: .06em; }
.product-type-card__price { font-size: .7rem; color: var(--muted); }
.product-type-card.active .product-type-card__price { color: rgba(255,255,255,.7); }

/* ── Product grid ─────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.product-card {
  display: block; background: var(--surface); text-decoration: none;
  transition: box-shadow var(--t);
}
.product-card:hover { box-shadow: var(--shadow); }
.product-card__image {
  aspect-ratio: 3/4; overflow: hidden;
  background: var(--bg-2);
  position: relative;
}
.product-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.product-card:hover .product-card__image img { transform: scale(1.03); }
.product-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1.5rem; font-family: var(--ff-serif); }
.badge-featured { position: absolute; top: .75rem; left: .75rem; background: var(--cream); color: #fff; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; padding: .2rem .6rem; }
.product-card__body { padding: .75rem 0; display: block; }
.product-card__name  { font-size: .85rem; color: var(--cream); }
.product-card__price { font-size: .82rem; color: var(--text-dim); }
.product-card__category { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.product-card__model { font-size: .72rem; color: var(--muted); }

/* ── Store page ───────────────────────────────────────────── */
.store-page { padding-top: var(--nav-h); min-height: 100vh; }
.store-hero { padding: 4rem 0 2rem; background: var(--bg); }
.store-hero h1 { font-family: var(--ff-serif); font-size: clamp(3rem, 8vw, 7rem); color: var(--cream); }
.store-hero p  { color: var(--text-dim); font-size: 1rem; margin-top: .75rem; }
.store-layout  { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; padding-top: 2rem; padding-bottom: 4rem; align-items: start; }
.store-sidebar { position: sticky; top: calc(var(--nav-h) + 1rem); }
.filter-group  { margin-bottom: 1.5rem; }
.filter-label  { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); display: block; margin-bottom: .5rem; }
.filter-group select, .filter-group input { width: 100%; padding: .5rem .75rem; background: var(--surface); border: 1px solid var(--border); color: var(--cream); font-size: .82rem; }
.price-inputs { display: flex; align-items: center; gap: .5rem; }
.price-inputs input { flex: 1; }
.price-inputs span { color: var(--muted); }
.btn-filter { margin-top: .5rem; width: 100%; padding: .55rem; background: var(--cream); color: #fff; border: none; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.clear-filters { display: block; font-size: .75rem; color: var(--muted); text-decoration: underline; margin-top: .75rem; }
.store-meta { font-size: .78rem; color: var(--muted); margin-bottom: 1.5rem; }
.store-empty { text-align: center; padding: 4rem; color: var(--muted); }
.related-products { padding: 4rem 0; border-top: 1px solid var(--border); margin-top: 3rem; }
.related-products h2 { font-family: var(--ff-serif); font-size: 2rem; margin-bottom: 2rem; color: var(--cream); }

/* ── Product detail ───────────────────────────────────────── */
.product-detail { padding-top: var(--nav-h); min-height: 100vh; background: var(--bg); }
.product-detail__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; padding: 3rem 0; }
.product-gallery { position: sticky; top: calc(var(--nav-h) + 1rem); }
.gallery-main { background: var(--surface); overflow: hidden; margin-bottom: .75rem; }
.gallery-main img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .5rem; }
.gallery-thumbs .thumb { width: 64px; height: 64px; object-fit: cover; cursor: pointer; opacity: .6; transition: opacity var(--t); border: 1px solid transparent; }
.gallery-thumbs .thumb.active, .gallery-thumbs .thumb:hover { opacity: 1; border-color: var(--cream); }
.product-info { padding-top: 1.5rem; }
.product-info__category { font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.product-info__name  { font-family: var(--ff-serif); font-size: 2.2rem; color: var(--cream); margin-bottom: .5rem; }
.product-info__model { font-size: .8rem; color: var(--muted); margin-bottom: .75rem; }
.product-info__price { font-family: var(--ff-serif); font-size: 1.6rem; color: var(--cream); margin-bottom: 1.5rem; }
.product-info__desc  { font-size: .9rem; color: var(--text-dim); line-height: 1.7; margin-bottom: 2rem; }
.color-swatches { display: flex; gap: .5rem; flex-wrap: wrap; }
.color-swatch input[type=radio] { display: none; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; display: block; transition: border-color var(--t); }
.color-swatch:has(input:checked) .swatch { border-color: var(--cream); }
.swatch-label { font-size: .7rem; color: var(--muted); text-align: center; margin-top: .2rem; display: none; }
.size-grid { display: flex; gap: .4rem; flex-wrap: wrap; }
.size-option input[type=radio] { display: none; }
.size-option span {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border: 1px solid var(--border); font-size: .82rem; color: var(--text-dim);
  cursor: pointer; transition: all var(--t);
}
.size-option:has(input:checked) span { border-color: var(--cream); color: var(--cream); background: var(--cream); color: #fff; }
.size-option.out-of-stock span { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.qty-input { width: 60px; padding: .55rem .75rem; border: 1px solid var(--border); background: var(--surface); color: var(--cream); font-size: .9rem; text-align: center; }
.product-form .btn--primary { width: 100%; margin-bottom: .75rem; border-radius: 0; padding: 1.1rem; font-size: .78rem; background: var(--cream); }
.product-details-block { border-top: 1px solid var(--border); }
.product-details-block summary { padding: 1rem 0; font-size: .82rem; letter-spacing: .06em; color: var(--text-dim); cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.product-details-block summary::after { content: '+'; font-size: 1rem; }
.product-details-block[open] summary::after { content: '−'; }
.product-details-block p { padding-bottom: 1rem; font-size: .85rem; color: var(--text-dim); }
.breadcrumb { font-size: .72rem; color: var(--muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--cream); }
.breadcrumb span { color: var(--text-dim); }

/* ── Auth pages ───────────────────────────────────────────── */
.auth-page { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-page__left { position: relative; background: var(--bg-2); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 4rem; }
.auth-page__left-bg { position: absolute; inset: 0; background: linear-gradient(160deg, #d8d3cc, #c8c3ba); }
.auth-page__brand { font-family: var(--ff-serif); font-size: 2.2rem; color: var(--cream); position: relative; z-index: 1; letter-spacing: .03em; }
.auth-page__tagline { font-family: var(--ff-serif); font-style: italic; font-size: 1.1rem; color: var(--text-dim); text-align: center; max-width: 320px; position: relative; z-index: 1; margin-top: 1.5rem; line-height: 1.6; }
.auth-page__right { display: flex; align-items: center; justify-content: center; background: var(--surface); padding: 4rem 3rem; }
.auth-form-box { width: 100%; max-width: 400px; }
.auth-form-box__title { font-family: var(--ff-serif); font-size: 2rem; color: var(--cream); margin-bottom: .4rem; }
.auth-form-box__sub { font-size: .85rem; color: var(--text-dim); margin-bottom: 2rem; }
.auth-link { text-align: center; margin-top: 1.5rem; font-size: .85rem; color: var(--text-dim); }
.auth-link a { color: var(--cream); font-weight: 500; }
.alert { padding: .85rem 1.1rem; border-radius: var(--radius-md); margin-bottom: 1.25rem; font-size: .85rem; }
.alert--error   { background: #fdf2f2; color: #a33; border-left: 3px solid #a33; }
.alert--success { background: #f2faf5; color: #2d7a4f; border-left: 3px solid #2d7a4f; }
.alert--warning { background: #fdf8ee; color: #8a6030; border-left: 3px solid #c49040; }

/* ── Cart ─────────────────────────────────────────────────── */
.cart-page { padding-top: var(--nav-h); min-height: 100vh; background: var(--bg); padding-bottom: 6rem; }
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 3rem; align-items: start; margin-top: 2.5rem; }
.cart-item { display: flex; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.cart-item__image { width: 100px; height: 130px; object-fit: cover; background: var(--bg-2); flex-shrink: 0; }
.cart-item__body { flex: 1; min-width: 0; }
.cart-item__name { font-family: var(--ff-serif); font-size: 1.1rem; color: var(--cream); margin-bottom: .25rem; }
.cart-item__meta { font-size: .78rem; color: var(--text-dim); line-height: 1.5; }
.cart-item__price { font-size: 1rem; color: var(--cream); font-weight: 500; }
.cart-summary { position: sticky; top: calc(var(--nav-h) + 1.5rem); background: var(--surface); padding: 1.5rem; border: 1px solid var(--border); }
.cart-summary h3 { font-family: var(--ff-serif); font-size: 1.3rem; margin-bottom: 1.25rem; color: var(--cream); }
.cart-summary-row { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-dim); margin-bottom: .6rem; }
.cart-summary-row--total { font-size: 1rem; color: var(--cream); font-weight: 600; padding-top: .75rem; border-top: 1px solid var(--border); margin-top: .5rem; }

/* ── Checkout ─────────────────────────────────────────────── */
.checkout-page { padding-top: var(--nav-h); min-height: 100vh; background: var(--bg); }
.checkout-layout { display: grid; grid-template-columns: 1fr 420px; gap: 4rem; align-items: start; padding: 3rem 0; }
.checkout-section { margin-bottom: 2.5rem; }
.checkout-section h2 { font-family: var(--ff-serif); font-size: 1.6rem; color: var(--cream); margin-bottom: 1.25rem; }
.checkout-sidebar { position: sticky; top: calc(var(--nav-h) + 1.5rem); background: var(--surface); border: 1px solid var(--border); padding: 1.5rem; }
.checkout-item { display: flex; gap: 1rem; margin-bottom: 1.25rem; }
.checkout-item img { width: 64px; height: 80px; object-fit: cover; background: var(--bg-2); }

/* ── Account pages ────────────────────────────────────────── */
.account-page { padding-top: var(--nav-h); min-height: 100vh; background: var(--bg); padding-bottom: 6rem; }
.account-page .container { padding-top: 3rem; }

/* ── Wizard ───────────────────────────────────────────────── */
.wizard { padding-top: var(--nav-h); }

/* ── Booking page ─────────────────────────────────────────── */
.booking-page { padding-top: var(--nav-h); min-height: 100vh; background: var(--bg); }
.booking-container { padding-top: 3rem; padding-bottom: 5rem; }
.booking-intro { font-size: .9rem; color: var(--text-dim); }

/* ── Status badges ────────────────────────────────────────── */
.status-badge {
  display: inline-block; padding: .25rem .65rem;
  font-size: .65rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.status-pending    { background: #f5f0e4; color: #8a6030; }
.status-confirmed  { background: #edf5f0; color: #2d7a4f; }
.status-in_tailoring { background: #e8eef8; color: #3a5888; }
.status-ready      { background: #eef5e8; color: #3a7a1a; }
.status-shipped, .status-delivered { background: #f0f0f0; color: #555; }
.status-cancelled  { background: #fdf2f2; color: #a33; }

/* ── Badges ───────────────────────────────────────────────── */
.badge { display: inline-block; padding: .2rem .55rem; font-size: .62rem; letter-spacing: .08em; font-weight: 600; text-transform: uppercase; }
.badge-success  { background: #edf5f0; color: #2d7a4f; }
.badge-danger   { background: #fdf2f2; color: #a33; }
.badge-warning  { background: #fdf8ee; color: #8a6030; }
.badge-secondary{ background: var(--bg-2); color: var(--text-dim); }
.badge-gold     { background: #f7f0e4; color: var(--gold); }
.badge--gold    { background: var(--gold-dim); color: #fff; font-size: .62rem; padding: .2rem .55rem; letter-spacing: .08em; text-transform: uppercase; }

/* ── Data tables ──────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data-table th { padding: .6rem 1rem; font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); text-align: left; background: var(--surface-2); font-weight: 600; }
.data-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.data-table tr:hover td { background: var(--surface-2); }
.table-card { background: var(--surface); border: 1px solid var(--border); overflow: hidden; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; margin-top: 2rem; flex-wrap: wrap; }
.page-link {
  padding: .45rem .9rem; border: 1px solid var(--border); font-size: .78rem;
  color: var(--text-dim); text-decoration: none; transition: all var(--t);
}
.page-link:hover, .page-link.active { border-color: var(--cream); background: var(--cream); color: #fff; }

/* ── Footer ───────────────────────────────────────────────── */
.footer { background: var(--bg-3); border-top: 1px solid var(--border); padding: 4rem 0 2rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer__brand { font-family: var(--ff-serif); font-size: 1.4rem; color: var(--cream); margin-bottom: .75rem; }
.footer__tagline { font-size: .85rem; color: var(--text-dim); line-height: 1.6; }
.footer__heading { font-size: .65rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; font-weight: 600; }
.footer__links { display: flex; flex-direction: column; gap: .5rem; }
.footer__links a { font-size: .85rem; color: var(--text-dim); transition: color var(--t); }
.footer__links a:hover { color: var(--cream); }
.footer__bottom { padding-top: 2rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.footer__copy { font-size: .72rem; color: var(--muted); }

/* ── Summary/Review page ──────────────────────────────────── */
.summary-page { padding-top: var(--nav-h); min-height: 100vh; background: var(--bg); padding-bottom: 5rem; }
.summary-grid { display: grid; grid-template-columns: 1fr 360px; gap: 3rem; margin-top: 2rem; align-items: start; }
.summary-card { background: var(--surface); border: 1px solid var(--border); }
.summary-card__header { padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.summary-card__title { font-family: var(--ff-serif); font-size: 1.05rem; color: var(--cream); }
.summary-row { display: flex; justify-content: space-between; padding: .6rem 1.5rem; border-bottom: 1px solid var(--border); font-size: .85rem; }
.summary-row__label { color: var(--text-dim); }
.summary-row__value { color: var(--cream); text-align: right; }
.summary-row--total { font-size: 1rem; font-weight: 600; }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .store-layout { grid-template-columns: 1fr; }
  .store-sidebar { position: static; }
  .cart-layout, .checkout-layout, .product-detail__inner { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .split-panels { grid-template-columns: 1fr; height: auto; }
  .split-panel { min-height: 300px; }
}
@media (max-width: 768px) {
  h1 { font-size: 2.8rem; }
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__actions .nav__link { display: none; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-page__left { display: none; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .container { padding: 0 1.25rem; }
  .summary-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: calc(var(--nav-h) + 3rem) 0 4rem; }
}

/* ── Home page specific ───────────────────────────────────── */
.home-section { padding: 5rem 0; }
.home-section--alt { background: var(--surface); }
.home-section h2 { font-family: var(--ff-serif); margin-bottom: 1rem; }
.featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; }
.editorial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.editorial-img { aspect-ratio: 3/4; overflow: hidden; background: var(--bg-2); }
.editorial-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.editorial-img:hover img { transform: scale(1.04); }

/* ── Empty/placeholder states ─────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state__icon { font-size: 2.5rem; margin-bottom: 1rem; color: var(--muted); }
.empty-state__title { font-family: var(--ff-serif); font-size: 1.4rem; color: var(--cream); margin-bottom: .5rem; }

/* ── Measurement form ─────────────────────────────────────── */
.measurement-form { }
.measurement-section { margin-bottom: 2.5rem; }
.measurement-section__title { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; font-weight: 600; }
.measurement-unit { font-size: .78rem; color: var(--text-dim); margin-bottom: 1.25rem; }

/* ── Store filter buttons (used in customizer too) ─────────── */
.fabric-filters { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-btn {
  padding: .3rem .85rem; border: 1px solid var(--border); background: var(--surface);
  font-size: .72rem; letter-spacing: .06em; border-radius: 999px;
  cursor: pointer; color: var(--text-dim); transition: all var(--t);
}
.filter-btn.active, .filter-btn:hover { background: var(--cream); border-color: var(--cream); color: #fff; }

/* ── Option/accessory cards ───────────────────────────────── */
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.option-card input[type=radio] { display: none; }
.option-card__inner { border: 1px solid var(--border); padding: .8rem; cursor: pointer; transition: border-color var(--t), background var(--t); }
.option-card:has(input:checked) .option-card__inner { border-color: var(--cream); background: var(--surface); }
.option-card__image { aspect-ratio: 1; background: var(--bg-2); margin-bottom: .5rem; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.option-card__image img { width: 100%; height: 100%; object-fit: cover; }
.option-card__image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.option-card__name  { font-size: .85rem; color: var(--cream); margin-bottom: .25rem; }
.option-card__desc  { font-size: .75rem; color: var(--text-dim); line-height: 1.4; }
.option-card__price { font-size: .75rem; color: var(--gold); margin-top: .25rem; }

/* ── Accessory grid ───────────────────────────────────────── */
.accessory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; }
.accessory-card input[type=checkbox] { display: none; }
.accessory-card__inner { padding: 1rem; border: 1px solid var(--border); text-align: center; cursor: pointer; transition: border-color var(--t); }
.accessory-card:has(input:checked) .accessory-card__inner { border-color: var(--cream); background: var(--surface); }
.accessory-card__icon { font-size: 1.5rem; margin-bottom: .4rem; }
.accessory-card__name { font-size: .78rem; color: var(--cream); }
.accessory-card__price { font-size: .72rem; color: var(--text-dim); }

/* ── Product visual (hero illustration) ───────────────────── */
.product-visual { }
.product-visual__frame { }
.product-visual__placeholder { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.product-visual__svg { max-width: 260px; width: 100%; }

/* ── Fabric card (grid style) ─────────────────────────────── */
.fabric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.fabric-card { cursor: pointer; }
.fabric-card input[type=radio] { display: none; }
.fabric-card__inner { border: 1px solid var(--border); overflow: hidden; transition: border-color var(--t); background: var(--surface); }
.fabric-card:has(input:checked) .fabric-card__inner { border-color: var(--cream); }
.fabric-card__swatch { aspect-ratio: 1; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.fabric-card__swatch img { width: 100%; height: 100%; object-fit: cover; }
.fabric-card__swatch-color { width: 100%; height: 100%; display: block; }
.fabric-card__check { display: none; }
.fabric-card__info { padding: .5rem .65rem; }
.fabric-card__name { font-size: .78rem; color: var(--cream); font-weight: 500; }
.fabric-card__meta { font-size: .68rem; color: var(--muted); }
.fabric-card__price { font-size: .7rem; color: var(--gold); margin-top: .15rem; }

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-up { animation: fadeUp .7s ease both; }
.animate-fade-up--delay-1 { animation-delay: .1s; }
.animate-fade-up--delay-2 { animation-delay: .2s; }
.animate-fade-up--delay-3 { animation-delay: .3s; }
.animate-fade-up--delay-4 { animation-delay: .4s; }

/* ── Divider ──────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); }

/* ── Miscellaneous ────────────────────────────────────────── */
.mt-2 { margin-top: 1.25rem; }
.back-link { display: inline-flex; align-items: center; gap: .3rem; color: var(--text-dim); font-size: .82rem; text-decoration: none; margin-bottom: 1.5rem; }
.back-link:hover { color: var(--cream); }
.detail-card { background: var(--surface); border: 1px solid var(--border); padding: 2rem; }
.detail-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.detail-table th, .detail-table td { padding: .7rem 0; border-bottom: 1px solid var(--border); text-align: left; }
.detail-table th { color: var(--text-dim); width: 140px; font-weight: 400; }
.detail-table td { color: var(--cream); }
.actions a, .actions button { font-size: .78rem; color: var(--gold); margin-right: .75rem; text-decoration: none; background: none; border: none; cursor: pointer; padding: 0; }
.actions a:hover, .actions button:hover { color: var(--cream); }

/* ── Password wrapper ─────────────────────────────────────── */
.password-wrapper { position: relative; }
.password-wrapper .form-control { padding-right: 2.8rem; }
.toggle-pw { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--muted); padding: 0; display: flex; align-items: center; transition: color .2s; }
.toggle-pw:hover { color: var(--cream); }

/* ══════════════════════════════════════════════════════════
   PATCH v3 — Mobile sidebar, wizard fixes, mobile layout
   ══════════════════════════════════════════════════════════ */

/* ── Nav: Customize dropdown (desktop) ─────────────────── */
.nav__item { position: relative; }
.nav__item > .nav__link { display: flex; align-items: center; gap: .3rem; }
.nav__chevron {
  display: inline-block; width: 7px; height: 7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); margin-top: -3px; opacity: .6;
}
.nav__dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--black); border: 1px solid rgba(255,255,255,.08);
  min-width: 190px; z-index: 200; padding: .4rem 0;
}
.nav__item:hover .nav__dropdown { display: block; }
.nav__dropdown a {
  display: block; padding: .55rem 1.1rem;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(240,237,230,.65); text-decoration: none;
  transition: background .15s, color .15s; white-space: nowrap;
}
.nav__dropdown a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav__dropdown.js-open { display: block !important; } /* JS click/touch toggle */

/* ── Unit toggle (navbar) ───────────────────────────────── */
.unit-toggle {
  display: flex; align-items: center;
  background: rgba(255,255,255,.07); border-radius: 3px;
  overflow: hidden; border: 1px solid rgba(255,255,255,.1);
}
.unit-toggle__btn {
  padding: .22rem .5rem; font-size: .59rem; font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase;
  color: rgba(240,237,230,.45); background: none; border: none;
  cursor: pointer; transition: all .2s; font-family: var(--ff-sans);
}
.unit-toggle__btn.active { background: rgba(255,255,255,.15); color: #f0ede6; }

/* ── Mobile sidebar overlay ────────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 900;
  opacity: 0; transition: opacity .3s;
}
.sidebar-overlay.open { display: block; opacity: 1; }

/* ── Mobile sidebar panel ──────────────────────────────── */
.nav-sidebar {
  position: fixed; top: 0; right: -100%;
  width: min(320px, 88vw); height: 100vh;
  background: #111109; z-index: 901;
  transition: right .35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow-y: auto;
  padding-bottom: 2rem;
}
.nav-sidebar.open { right: 0; }

.nav-sidebar__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.nav-sidebar__brand {
  font-family: var(--ff-serif); font-size: 1rem; color: #f0ede6; text-decoration: none;
}
.nav-sidebar__close {
  background: none; border: none; cursor: pointer;
  color: rgba(240,237,230,.6); font-size: 1.3rem; line-height: 1;
  transition: color .2s; padding: 4px;
}
.nav-sidebar__close:hover { color: #f0ede6; }
.sidebar-section { border-bottom: 1px solid rgba(255,255,255,.05); padding: .4rem 0; }
.sidebar-section__label {
  display: block; padding: .55rem 1.5rem .2rem;
  font-size: .58rem; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(240,237,230,.3);
}
.sidebar-link {
  display: block; padding: .65rem 1.5rem;
  font-size: .8rem; color: rgba(240,237,230,.72);
  text-decoration: none; transition: background .15s, color .15s;
}
.sidebar-link:hover { background: rgba(255,255,255,.05); color: #f0ede6; }
.sidebar-link.primary { color: #d4b878; font-weight: 500; }
.sidebar-sub {
  display: block; padding: .5rem 1.5rem .5rem 2.5rem;
  font-size: .72rem; color: rgba(240,237,230,.42);
  text-decoration: none; transition: color .15s;
}
.sidebar-sub:hover { color: rgba(240,237,230,.75); }
.sidebar-units { display: flex; gap: .4rem; padding: .85rem 1.5rem; align-items: center; }
.sidebar-unit-btn {
  padding: .25rem .65rem; font-size: .63rem; letter-spacing: .08em;
  text-transform: uppercase; font-family: var(--ff-sans);
  background: none; border: 1px solid rgba(255,255,255,.14);
  color: rgba(240,237,230,.45); border-radius: 3px; cursor: pointer; transition: all .2s;
}
.sidebar-unit-btn.active {
  background: rgba(255,255,255,.14); color: #f0ede6;
  border-color: rgba(255,255,255,.3);
}

/* ── Burger animation ───────────────────────────────────── */
.nav__burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Wizard step footer buttons ─────────────────────────── */
.wiz-foot {
  display: flex; gap: .75rem; padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface); flex-shrink: 0;
}
.btn-wiz-back {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .65rem 1.25rem; background: var(--bg-2);
  color: var(--text); border: 1px solid var(--border);
  border-radius: 4px; font-family: var(--ff-sans);
  font-size: .7rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; cursor: pointer; text-decoration: none;
  transition: border-color .2s; white-space: nowrap; flex-shrink: 0;
}
.btn-wiz-back:hover { border-color: var(--cream); }
.btn-wiz-next {
  flex: 1; display: inline-flex; align-items: center;
  justify-content: center; gap: .35rem;
  padding: .75rem 1.5rem; background: var(--cream);
  color: #fff; border: none; border-radius: 4px;
  font-family: var(--ff-sans); font-size: .72rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer; transition: background .2s; white-space: nowrap;
}
.btn-wiz-next:hover { background: var(--text); }

/* ── Wizard topbar total/delivery: hide on mobile ───────── */
@media (max-width: 768px) {
  .wiz-top__delivery { display: none !important; }
  .wiz-top__total { font-size: .85rem; }
  /* Product gallery: fix z-index so it doesn't overlap nav */
  .product-gallery {
    position: relative !important;
    top: auto !important;
    z-index: 0;
  }
  /* Store sidebar: not sticky on mobile */
  .store-sidebar { position: relative !important; top: auto !important; }
  /* Product detail: single column */
  .product-detail__inner { grid-template-columns: 1fr !important; gap: 2rem !important; }
  /* Wizard panel not sticky on mobile */
  .wiz-right { height: auto !important; overflow: visible !important; }
}

/* ── Reports page cards ─────────────────────────────────── */
.report-cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 1rem; margin-bottom: 2rem; }
.report-card { background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem; }
.report-card__label { font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .5rem; }
.report-card__value { font-family: var(--ff-serif); font-size: 2rem; color: var(--cream); }

/* ── Store: left-aligned product cards ──────────────────── */
.product-card__meta { font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.product-card__name { font-family: var(--ff-serif); font-size: 1rem; color: var(--text); margin-bottom: .15rem; }
.product-card__price { font-size: .9rem; font-weight: 500; color: var(--text); }

/* ── Garment selector page ──────────────────────────────── */
.garment-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 1.25rem; }
.garment-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; text-decoration: none; color: var(--text); transition: border-color .25s, box-shadow .25s; }
.garment-card:hover { border-color: var(--cream); box-shadow: 0 4px 20px rgba(0,0,0,.07); }
.garment-card__img { background: var(--bg-2); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.garment-card__body { padding: 1.1rem 1.4rem 1.4rem; }

/* ── Checkout guest/account ─────────────────────────────── */
.checkout-guest-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem; margin-bottom: 1.5rem; }


/* ══════════════════════════════════════════════════════════
   PATCH v4 — Navbar, Cart, Store, Mobile & Wizard fixes
   ══════════════════════════════════════════════════════════ */

/* ── Ensure every page body has nav clearance ─────────────── */
body > div:first-child:not(.wiz):not(.auth-page):not([class]) {
  padding-top: var(--nav-h);
}

/* ── Page-header: always clear the fixed nav ──────────────── */
.page-header {
  padding-top: calc(var(--nav-h) + 2.5rem) !important;
}

/* ── Cart layout ──────────────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3rem;
  margin-top: 2rem;
  align-items: start;
}

/* ── Order summary: better button stack ───────────────────── */
.order-summary { background: var(--surface); border: 1px solid var(--border); }
.order-summary__header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.order-summary__title { font-family: var(--ff-serif); font-size: 1rem; color: var(--cream); }
.order-summary__body { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; }
.order-summary__line { display: flex; justify-content: space-between; font-size: .84rem; }
.order-summary__key { color: var(--text-dim); }
.order-summary__val { color: var(--cream); }
.order-summary__line--total { padding-top: .75rem; border-top: 1px solid var(--border); font-size: 1rem; font-weight: 600; color: var(--cream); }
.order-summary__line--total .key, .order-summary__line--total .val { color: var(--cream); font-size: 1rem; font-weight: 600; }
.order-summary__footer {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  border-top: 1px solid var(--border);
}

/* Cart item */
.cart-item { display: grid; grid-template-columns: 88px 1fr auto; gap: 1.25rem; padding: 1.5rem 0; border-bottom: 1px solid var(--border); align-items: start; }
.cart-item__image { width: 88px; aspect-ratio: 1; background: var(--surface); overflow: hidden; flex-shrink: 0; }
.cart-item__image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__name { font-family: var(--ff-serif); font-size: 1rem; color: var(--cream); margin-bottom: .3rem; }
.cart-item__fabric { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text-dim); margin-bottom: .5rem; }
.cart-item__fabric-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cart-item__customizations { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.customization-tag { font-size: .72rem; padding: .2rem .55rem; background: var(--bg-2); color: var(--text-dim); border: 1px solid var(--border); }
.cart-item__price { font-family: var(--ff-serif); font-size: 1.05rem; color: var(--cream); }
.cart-item__actions { display: flex; gap: .5rem; margin-top: .5rem; }

/* ── Buttons: proper sizing ───────────────────────────────── */
.btn--full { width: 100%; text-align: center; justify-content: center; }
.btn--lg { padding: .85rem 2rem; font-size: .88rem; }
.btn--sm { padding: .45rem 1rem; font-size: .75rem; }

/* ── Mobile: cart goes single column ──────────────────────── */
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 72px 1fr auto; gap: .75rem; }
  .cart-item__image { width: 72px; }
}

/* ── Mobile nav: burger always visible, account link hidden ── */
@media (max-width: 768px) {
  .nav__burger { display: flex !important; }
  .nav__actions .nav__link { display: none; }
  .nav__actions .nav__link:last-of-type { display: none; } /* hide Join on mobile too */
  .nav__actions .nav__cart { display: flex; } /* always show cart */
}

/* ── Mobile sidebar: force correct positioning ────────────── */
.nav-sidebar {
  position: fixed !important;
  top: 0 !important;
  right: -100% !important;
  width: min(320px, 88vw) !important;
  height: 100dvh !important;
  height: 100vh !important;
  z-index: 9999 !important;
  transition: right .32s cubic-bezier(.4,0,.2,1) !important;
}
.nav-sidebar.open { right: 0 !important; }

.sidebar-overlay {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,.55) !important;
  z-index: 9998 !important;
}
.sidebar-overlay.open { display: block !important; }

/* ── Wizard: continue button always above fold ────────────── */
.wiz {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100vh;
  overflow: hidden;
}
.wiz-body { flex: 1; overflow: hidden; display: flex; min-height: 0; }
.wiz-panel {
  display: flex;
  flex-direction: column;
  width: 420px;
  min-width: 320px;
  max-width: 45vw;
  border-left: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  overflow: hidden;
}
.wiz-options, .wiz-measure {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.wiz-bar {
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 20 !important;
  background: var(--surface) !important;
  border-top: 1px solid var(--border) !important;
  padding: .85rem 1.5rem !important;
}

@media (max-width: 768px) {
  .wiz-panel { width: 100%; max-width: 100%; border-left: none; }
  .wiz-options { max-height: calc(100dvh - 220px); }
  .wiz-bar { padding: .75rem 1rem !important; }
  .btn-next { width: 100%; justify-content: center; }
}

/* ── Store listing: product card ─────────────────────────── */
.product-card { text-decoration: none; display: block; }
.product-card__image { aspect-ratio: 3/4; overflow: hidden; background: var(--surface); border: 1px solid var(--border); margin-bottom: .75rem; position: relative; }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; display: block; }
.product-card:hover .product-card__image img { transform: scale(1.04); }
.product-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.product-card__body { padding: .1rem 0; }
.product-card__name { font-family: var(--ff-serif); font-size: 1rem; color: var(--cream); margin-bottom: .25rem; }
.product-card__price { font-size: .88rem; color: var(--cream); }

/* ── Store page: ensure breadcrumb area clears nav ─────────── */
.store-page { padding-top: var(--nav-h); }

/* ══════════════════════════════════════════════════════════
   PATCH v5 — Mobile responsiveness complete fix
   ══════════════════════════════════════════════════════════ */

/* ── Nav: always show burger on mobile, keep cart ───────── */
@media (max-width: 768px) {
  /* Force nav links off */
  .nav__links { display: none !important; }
  /* Force burger on */
  .nav__burger {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    background: none !important;
    border: none !important;
    padding: 6px !important;
    cursor: pointer !important;
    z-index: 200 !important;
  }
  .nav__burger span {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    background: var(--text) !important;
    transition: var(--t-md) !important;
  }
  /* Hide text nav links in actions — keep cart + account icon */
  .nav__actions > .nav__link:not(.nav__cart) { display: none !important; }
  /* Hide Join pill */
  .nav__actions > a[href="/register"] { display: none !important; }
  /* Keep cart */
  .nav__cart { display: flex !important; }
  /* Shrink inner padding */
  .nav__inner { padding: 0 1rem !important; }
}

/* ── Container: proper mobile padding ───────────────────── */
@media (max-width: 640px) {
  .container { padding-left: 1rem !important; padding-right: 1rem !important; }
}

/* ── Nav bleed fix: ALL main content pages ────────────────── */
body > main,
body > div[style*="padding-bottom"],
body > div[style*="min-height"],
.pd-wrap,
.store-page,
.booking-page,
.account-page,
.cart-layout-wrap,
.summary-page {
  padding-top: var(--nav-h) !important;
}

/* Cart page specific — the outer div has no class */
.page-header {
  padding-top: calc(var(--nav-h) + 2rem) !important;
  padding-bottom: 2rem !important;
}

/* ── Sidebar: force proper fixed overlay behaviour ─────── */
.nav-sidebar {
  position: fixed !important;
  top: 0 !important;
  right: -100vw !important;
  width: min(340px, 90vw) !important;
  height: 100% !important;
  height: 100dvh !important;
  background: #111109 !important;
  z-index: 99999 !important;
  overflow-y: auto !important;
  transition: right .3s cubic-bezier(.4,0,.2,1) !important;
  display: flex !important;
  flex-direction: column !important;
}
.nav-sidebar.open {
  right: 0 !important;
}
.sidebar-overlay {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,.6) !important;
  z-index: 99998 !important;
  transition: opacity .3s !important;
}
.sidebar-overlay.open {
  display: block !important;
  opacity: 1 !important;
}

/* ── Cart page: proper nav clearance ──────────────────────── */
.cart-page-wrap {
  padding-top: var(--nav-h);
  padding-bottom: 6rem;
  background: var(--bg);
  min-height: 100vh;
}
@media (max-width: 768px) {
  .cart-layout { grid-template-columns: 1fr !important; }
  .cart-item { grid-template-columns: 70px 1fr auto !important; gap: .75rem !important; }
  .cart-item__image { width: 70px !important; }
  .order-summary { margin-top: 1.5rem; }
}

/* ── Checkout: responsive layout ─────────────────────────── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3rem;
  align-items: start;
  margin-top: 2rem;
}
@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-sidebar { position: static !important; margin-top: 2rem; }
}

/* ── Store listing mobile ─────────────────────────────────── */
@media (max-width: 768px) {
  .store-layout { grid-template-columns: 1fr !important; }
  .store-sidebar { display: none; } /* hide sidebar filters on mobile */
  .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem !important; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr !important; }
}

/* ── Product detail (store/show) mobile ───────────────────── */
@media (max-width: 768px) {
  .pd-grid { grid-template-columns: 1fr !important; gap: 1.25rem !important; }
  .pd-gallery { position: static !important; }
  .pd-name { font-size: 1.6rem !important; }
}

/* ── Summary page mobile ──────────────────────────────────── */
@media (max-width: 768px) {
  div[style*="grid-template-columns:1fr 360px"] {
    display: block !important;
  }
  div[style*="grid-template-columns: 1fr 360px"] {
    display: block !important;
  }
}

/* ── General responsive text / spacing ───────────────────── */
@media (max-width: 480px) {
  h1 { font-size: clamp(2rem, 8vw, 3rem) !important; }
  .btn--lg { padding: .75rem 1.5rem !important; font-size: .82rem !important; }
  .home-section { padding: 3rem 0 !important; }
}
