/* =============================================================
   GLAZE — Zen Cart custom template
   Design system + component styles + responsive / mobile drawer
   ============================================================= */

:root {
  /* Brand primary - rose berry */
  --brand: #B82B5E;
  --brand-hover: #9E2350;
  --brand-light: #FFF0F5;
  --brand-ink: #FFFFFF;

  /* Surface scale (warm neutral) */
  --bg: #FEFAFB;
  --surface: #FFFFFF;
  --surface-2: #FDF2F5;
  --surface-3: #F9E8ED;

  /* Text scale */
  --ink: #1F1D20;
  --ink-2: #6E6A70;
  --ink-3: #A8A3AA;

  /* Lines & borders */
  --line: #F2E4E9;
  --border: #F2E4E9;
  --input: #E8D8DE;
  --ring: #D6336C;

  /* Radius scale */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(31,29,32,.04), 0 1px 1px rgba(31,29,32,.03);
  --shadow-2: 0 8px 24px -8px rgba(214,51,108,.18);
  --shadow-3: 0 24px 60px -20px rgba(31,29,32,.20);

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Semantic aliases for Tailwind (used by design prototypes) */
  --glaze-background: var(--bg);
  --glaze-foreground: var(--ink);
  --glaze-card: var(--surface);
  --glaze-card-foreground: var(--ink);
  --glaze-popover: var(--surface);
  --glaze-popover-foreground: var(--ink);
  --glaze-primary: var(--brand);
  --glaze-primary-foreground: var(--brand-ink);
  --glaze-secondary: var(--surface-2);
  --glaze-secondary-foreground: var(--ink);
  --glaze-muted: var(--surface-2);
  --glaze-muted-foreground: var(--ink-2);
  --glaze-accent: var(--surface-2);
  --glaze-accent-foreground: var(--ink);
  --glaze-destructive: #E53935;
  --glaze-destructive-foreground: #FFFFFF;
  --glaze-border: var(--line);
  --glaze-input: var(--input);
  --glaze-ring: var(--ring);
  --glaze-radius-sm: var(--r-sm);
  --glaze-radius-md: var(--r-md);
  --glaze-radius-lg: var(--r-lg);
  --glaze-radius-xl: var(--r-lg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.font-display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
.text-balance { text-wrap: balance; }

/* ---------- Layout container ---------- */
.container-glaze { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container-glaze { padding: 0 32px; } }
.maxw-7xl { max-width: 1280px; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) { .px-site { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1024px) { .px-site { padding-left: 32px; padding-right: 32px; } }

/* ---------- Buttons ---------- */
.btn-primary { transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease; }
.btn-primary:hover { transform: translateY(-1px); background: var(--brand-hover); box-shadow: var(--shadow-2); }
.btn-outline { transition: transform .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease; }
.btn-outline:hover { transform: translateY(-1px); background: var(--brand-light); border-color: var(--brand); color: var(--brand); }
.btn-ghost { transition: color .2s ease, background-color .2s ease; }
.btn-ghost:hover { color: var(--brand); }
.icon-btn { border-radius: var(--r-md); transition: background-color .2s, color .2s; }
.icon-btn:hover { background: var(--brand-light); color: var(--brand); }

/* ---------- Announcement bar ---------- */
.announcement { background: var(--brand); color: #fff; position: relative; }

/* ---------- Header ---------- */
.glaze-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s ease;
}
.glaze-header.scrolled { box-shadow: var(--shadow-1); }

.nav-link { position: relative; padding: 4px 0; transition: color .2s ease; cursor: pointer; }
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--brand); transform: scaleX(0);
  transform-origin: center; transition: transform .25s ease; border-radius: 2px;
}
.nav-item:hover > .nav-link::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--brand); }
.nav-item { position: relative; height: 72px; display: flex; align-items: center; }

/* ---------- Mega menu ---------- */
.mega-menu {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 720px; background: #fff;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: 0 20px 60px -15px rgba(31,29,32,.18);
  border: 1px solid var(--line); border-top: none;
  padding: 32px; opacity: 0; visibility: hidden;
  transition: all .2s ease; pointer-events: none; z-index: 50;
}
.nav-item:hover > .mega-menu, .nav-item:hover > .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); pointer-events: auto;
}
.mega-menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.mega-col h5 {
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 1px;
  margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.mega-col ul { list-style: none; padding: 0; margin: 0; }
.mega-col li { margin-bottom: 10px; }
.mega-col a { font-size: 13px; color: var(--ink-2); text-decoration: none; transition: color .15s; display: block; }
.mega-col a:hover { color: var(--brand); }
.mega-col .item-count { font-size: 11px; color: var(--ink-3); margin-left: 4px; }
.mega-featured { grid-column: span 1; border-radius: var(--r-md); overflow: hidden; position: relative; background: var(--surface-2); min-height: 180px; }
.mega-featured img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.mega-featured-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(31,29,32,.7) 100%); }
.mega-featured-content { position: absolute; bottom: 16px; left: 16px; right: 16px; color: #fff; }
.mega-featured-content span { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; opacity: .9; }
.mega-featured-content h6 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin: 4px 0 8px; }
.mega-featured-content a { font-size: 12px; font-weight: 600; color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; border-bottom: 1px solid rgba(255,255,255,.5); padding-bottom: 2px; }

/* ---------- Dropdown ---------- */
.dropdown-menu {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 200px; background: #fff;
  border-radius: 0 0 var(--r-md) var(--r-md);
  box-shadow: 0 12px 40px -10px rgba(31,29,32,.18);
  border: 1px solid var(--line); border-top: none;
  padding: 12px 0; opacity: 0; visibility: hidden;
  transition: all .2s ease; pointer-events: none; z-index: 50;
}
.dropdown-menu a { display: block; padding: 10px 20px; font-size: 13px; color: var(--ink-2); text-decoration: none; transition: all .15s; }
.dropdown-menu a:hover { color: var(--brand); background: var(--brand-light); }
.dropdown-badge { display: inline-block; margin-left: 8px; padding: 1px 6px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 600; border-radius: var(--r-pill); text-transform: uppercase; }

/* ---------- Shape mega menu ---------- */
.mega-menu-shapes { min-width: 560px; }
.mega-menu-shapes-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; padding: 8px 0; }
.shape-item { text-align: center; cursor: pointer; transition: transform .2s; text-decoration: none; display: block; }
.shape-item:hover { transform: translateY(-2px); }
.shape-icon { width: 56px; height: 56px; margin: 0 auto 8px; background: var(--surface-2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--brand); transition: background .2s; }
.shape-item:hover .shape-icon { background: var(--brand-light); }
.shape-item span { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.shape-item:hover span { color: var(--brand); }

/* ---------- Product card ---------- */
.product-card { transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease; position: relative; }
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.product-card .quick-add {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  transform: translateY(120%); opacity: 0;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .3s ease;
}
.product-card:hover .quick-add { transform: translateY(0); opacity: 1; }
.product-card .fav-btn { transition: transform .2s ease, color .2s ease; }
.product-card .fav-btn:hover { transform: scale(1.15); color: var(--brand); }
.product-card .fav-btn.active { color: var(--brand); }
.product-card .fav-btn.active svg { fill: var(--brand); }

/* ---------- Category tile ---------- */
.cat-tile { transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease; overflow: hidden; }
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.cat-tile .cat-img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.cat-tile:hover .cat-img { transform: scale(1.06); }

/* ---------- Hero Carousel ---------- */
.hero-carousel { position: relative; width: 100%; overflow: hidden; background: var(--surface-2); }
.hero-carousel-track { display: flex; transition: transform 0.5s ease-in-out; }
.hero-slide { min-width: 100%; position: relative; }
.hero-slide img { width: 100%; height: 520px; object-fit: cover; display: block; }
@media (min-width: 768px) { .hero-slide img { height: 600px; } }
@media (min-width: 1024px) { .hero-slide img { height: 680px; } }
.hero-slide-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(31,29,32,0.55) 0%, rgba(31,29,32,0.28) 45%, rgba(31,29,32,0) 70%); }
.hero-slide-content { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 72px; }
.hero-info-box { background: rgba(255,255,255,0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: var(--r-lg); padding: 28px; max-width: 440px; box-shadow: var(--shadow-2); }
.hero-carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.92); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; transition: background 0.2s, transform 0.2s; }
.hero-carousel-btn:hover { background: #fff; transform: translateY(-50%) scale(1.05); }
.hero-carousel-prev { left: 20px; }
.hero-carousel-next { right: 20px; }
.hero-carousel-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.hero-carousel-dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(0,0,0,0.32); border: 2px solid rgba(255,255,255,0.92); box-shadow: 0 1px 3px rgba(0,0,0,0.25); cursor: pointer; transition: background 0.2s, transform 0.2s; padding: 0; }
.hero-carousel-dot:hover { transform: scale(1.2); }
.hero-carousel-dot.active { background: #fff; border-color: #fff; transform: scale(1.2); }
@media (max-width: 767px) {
  .hero-info-box { margin: 0 20px; padding: 22px; max-width: none; width: calc(100% - 40px); }
  .hero-slide-content { align-items: flex-end; padding-bottom: 76px; }
  .hero-carousel-prev { left: 8px; top: 24px; transform: none; }
  .hero-carousel-next { right: 8px; top: 24px; transform: none; }
}

/* ---------- Testimonial ---------- */
.testimonial-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); transition: transform .3s ease, box-shadow .3s ease; }
.testimonial-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--brand); position: relative; overflow: hidden; }
.newsletter::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 80% at 20% 50%, rgba(255,255,255,.08), transparent 60%); pointer-events: none; }
/* Text colors — unlayered base typography (h1-h6/p) would otherwise override Tailwind white utilities */
.newsletter h2, .newsletter h3, .newsletter h4 { color: #FFFFFF; }
.newsletter p { color: rgba(255,255,255,.85); }
.newsletter p:last-child { color: rgba(255,255,255,.70); }

/* ---------- Footer ---------- */
.site-footer { background: #1F1D20; color: #E8E4E6; }
.site-footer a { color: #B8B2B6; transition: color .2s ease; }
.site-footer a:hover { color: #fff; }

/* ---------- Badges ---------- */
.badge-new { background: var(--brand); color: #fff; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-sm); }
.badge-bestseller { background: var(--ink); color: #fff; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-sm); }
.star-filled { color: #E8B04C; fill: #E8B04C; }

/* ---------- Cart badge ---------- */
.cart-badge {
  position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px;
  text-align: center; border-radius: var(--r-pill); border: 2px solid #fff;
}

/* ---------- Focus / reduced motion ---------- */
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--r-sm); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile nav drawer (NEW) ---------- */
.mobile-drawer { position: fixed; inset: 0; z-index: 80; display: none; }
.mobile-drawer.open { display: block; }
.mobile-drawer__overlay { position: absolute; inset: 0; background: rgba(31,29,32,.5); opacity: 0; transition: opacity .25s ease; }
.mobile-drawer.open .mobile-drawer__overlay { opacity: 1; }
.mobile-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 360px);
  background: var(--surface); box-shadow: var(--shadow-3);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; overflow-y: auto;
}
.mobile-drawer.open .mobile-drawer__panel { transform: translateX(0); }
.mobile-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.mobile-drawer__body { padding: 12px 20px; }
.mobile-drawer__link { display: block; padding: 14px 0; font-size: 16px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none; }
.mobile-drawer__sub a { display: block; padding: 8px 0 8px 14px; font-size: 14px; color: var(--ink-2); text-decoration: none; }

/* ---------- Category filter (Category page) ---------- */
.filter-section { border-bottom: 1px solid var(--line); padding: 20px 0; }
.filter-section:first-child { padding-top: 0; }
.filter-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.filter-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.filter-item:hover { color: var(--ink); }
.filter-item input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border: 1.5px solid var(--input); border-radius: 3px; cursor: pointer; position: relative; flex-shrink: 0; transition: all .15s; }
.filter-item input[type="checkbox"]:checked { background: var(--brand); border-color: var(--brand); }
.filter-item input[type="checkbox"]:checked::after { content: ''; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.filter-count { font-size: 12px; color: var(--ink-3); margin-left: auto; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.color-swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all .2s; position: relative; box-sizing: border-box; }
.color-swatch:hover { transform: scale(1.1); }
/* product-page swatches are <label> wrapping a hidden radio */
.color-swatch input { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
.color-swatch.disabled { cursor: not-allowed; opacity: .4; }
.color-swatch.selected,
.color-swatch:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-light); }
.color-swatch.selected::after,
.color-swatch:has(input:checked)::after { content: ''; position: absolute; inset: 4px; border: 2px solid #fff; border-radius: 50%; opacity: .7; }
.price-input { width: 100%; padding: 8px 10px; border: 1px solid var(--input); border-radius: var(--r-sm); font-size: 13px; color: var(--ink); background: #fff; outline: none; }
.price-input:focus { border-color: var(--brand); }
.sort-select { padding: 8px 32px 8px 12px; border: 1px solid var(--input); border-radius: var(--r-sm); font-size: 13px; color: var(--ink); background: #fff; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236E6A70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 12px; background: var(--brand-light); color: var(--brand); font-size: 12px; font-weight: 500; border-radius: var(--r-pill); }
.filter-chip button { display: flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: transparent; color: var(--brand); cursor: pointer; border: none; }
.filter-chip button:hover { background: rgba(214,51,108,.15); }

/* ---------- Product grid (category) ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-grid .product-image-wrap { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--surface-2); }
.product-grid .product-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-image-wrap img { transform: scale(1.05); }
.product-badge { position: absolute; top: 12px; left: 12px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .3px; }
.product-badge.new { background: var(--ink); }
.product-badge.sale { background: #E53935; }
.wishlist-btn { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ink-2); cursor: pointer; transition: all .2s; box-shadow: var(--shadow-1); }
.wishlist-btn:hover { color: var(--brand); }
.product-price .original { font-size: 13px; font-weight: 400; color: var(--ink-3); text-decoration: line-through; margin-left: 6px; }
.product-rating .stars { display: flex; gap: 1px; color: #F5A623; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 40px; flex-wrap: wrap; }
.page-btn { min-width: 40px; height: 40px; padding: 0 12px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--r-md); font-size: 14px; font-weight: 500; color: var(--ink-2); background: #fff; cursor: pointer; transition: all .2s; }
.page-btn:hover { color: var(--brand); border-color: var(--brand); }
.page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Product detail ---------- */
.product-gallery-grid { display: grid; grid-template-columns: 55fr 45fr; gap: 3rem; align-items: start; }
.thumbs-row { display: flex; gap: .75rem; margin-top: .875rem; }
.thumb-item { width: 60px; height: 60px; border-radius: var(--r-md); overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color .2s; flex-shrink: 0; }
.thumb-item.active { border-color: var(--brand); }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.variant-pill { display: inline-flex; align-items: center; justify-content: center; padding: .5rem 1rem; border-radius: var(--r-pill); border: 1.5px solid var(--line); font-size: .875rem; font-weight: 500; cursor: pointer; transition: all .2s; background: var(--surface); color: var(--ink); }
.variant-pill:hover { border-color: var(--brand); color: var(--brand); }
.variant-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.qty-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: all .15s; color: var(--ink); }
.qty-btn:hover { border-color: var(--brand); color: var(--brand); }
.tab-btn { padding: .875rem 1.5rem; font-size: .9375rem; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent; cursor: pointer; transition: all .2s; background: none; white-space: nowrap; }
.tab-btn.active { color: var(--ink); border-bottom-color: var(--brand); }
.tab-btn:hover { color: var(--brand); }
.tab-panel { display: none; padding-top: 2rem; }
.tab-panel.active { display: block; }
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; font-size: .9375rem; font-weight: 600; color: var(--ink); cursor: pointer; background: none; text-align: left; border: none; }
.accordion-trigger:hover { color: var(--brand); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.accordion-content.open { max-height: 240px; padding-bottom: 1rem; }
.accordion-content p { font-size: .875rem; color: var(--ink-2); line-height: 1.6; }
.review-bar-track { height: 6px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; }
.review-bar-fill { height: 100%; background: var(--brand); border-radius: var(--r-pill); }

/* ---------- Responsive breakpoints ---------- */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-gallery-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
  .glaze-nav-desktop { display: none !important; }
  .mobile-menu-btn { display: inline-flex !important; }
  .mega-menu, .dropdown-menu { display: none !important; } /* mobile uses drawer */
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 769px) {
  /* Tailwind CDN (@tailwindcss/browser) often fails to emit responsive variant
     CSS (.md\\:flex) reliably. This explicit fallback keeps the desktop nav
     visible at >=769px even if the Tailwind runtime doesn't inject it. */
  .glaze-nav-desktop { display: flex !important; align-items: center; gap: 1.75rem; }
  .mobile-menu-btn { display: none !important; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* =============================================================
   Semantic token fallback classes
   The design prototypes use Tailwind semantic utilities
   (bg-card, text-primary, border-border, ...). These static
   fallbacks make them render correctly without the Tailwind
   CDN; when the CDN is active they are harmless no-ops.
   ============================================================= */
.bg-background { background-color: var(--glaze-background); }
.text-background { color: var(--glaze-background); }
.border-background { border-color: var(--glaze-background); }
.ring-background { --tw-ring-color: var(--glaze-background); }
.bg-foreground { background-color: var(--glaze-foreground); }
.text-foreground { color: var(--glaze-foreground); }
.border-foreground { border-color: var(--glaze-foreground); }
.ring-foreground { --tw-ring-color: var(--glaze-foreground); }
.bg-card { background-color: var(--glaze-card); }
.text-card { color: var(--glaze-card); }
.border-card { border-color: var(--glaze-card); }
.ring-card { --tw-ring-color: var(--glaze-card); }
.bg-card-foreground { background-color: var(--glaze-card-foreground); }
.text-card-foreground { color: var(--glaze-card-foreground); }
.border-card-foreground { border-color: var(--glaze-card-foreground); }
.ring-card-foreground { --tw-ring-color: var(--glaze-card-foreground); }
.bg-popover { background-color: var(--glaze-popover); }
.text-popover { color: var(--glaze-popover); }
.border-popover { border-color: var(--glaze-popover); }
.ring-popover { --tw-ring-color: var(--glaze-popover); }
.bg-popover-foreground { background-color: var(--glaze-popover-foreground); }
.text-popover-foreground { color: var(--glaze-popover-foreground); }
.border-popover-foreground { border-color: var(--glaze-popover-foreground); }
.ring-popover-foreground { --tw-ring-color: var(--glaze-popover-foreground); }
.bg-primary { background-color: var(--glaze-primary); }
.text-primary { color: var(--glaze-primary); }
.border-primary { border-color: var(--glaze-primary); }
.ring-primary { --tw-ring-color: var(--glaze-primary); }
.bg-primary-foreground { background-color: var(--glaze-primary-foreground); }
.text-primary-foreground { color: var(--glaze-primary-foreground); }
.border-primary-foreground { border-color: var(--glaze-primary-foreground); }
.ring-primary-foreground { --tw-ring-color: var(--glaze-primary-foreground); }
.bg-secondary { background-color: var(--glaze-secondary); }
.text-secondary { color: var(--glaze-secondary); }
.border-secondary { border-color: var(--glaze-secondary); }
.ring-secondary { --tw-ring-color: var(--glaze-secondary); }
.bg-secondary-foreground { background-color: var(--glaze-secondary-foreground); }
.text-secondary-foreground { color: var(--glaze-secondary-foreground); }
.border-secondary-foreground { border-color: var(--glaze-secondary-foreground); }
.ring-secondary-foreground { --tw-ring-color: var(--glaze-secondary-foreground); }
.bg-muted { background-color: var(--glaze-muted); }
.text-muted { color: var(--glaze-muted); }
.border-muted { border-color: var(--glaze-muted); }
.ring-muted { --tw-ring-color: var(--glaze-muted); }
.bg-muted-foreground { background-color: var(--glaze-muted-foreground); }
.text-muted-foreground { color: var(--glaze-muted-foreground); }
.border-muted-foreground { border-color: var(--glaze-muted-foreground); }
.ring-muted-foreground { --tw-ring-color: var(--glaze-muted-foreground); }
.bg-accent { background-color: var(--glaze-accent); }
.text-accent { color: var(--glaze-accent); }
.border-accent { border-color: var(--glaze-accent); }
.ring-accent { --tw-ring-color: var(--glaze-accent); }
.bg-accent-foreground { background-color: var(--glaze-accent-foreground); }
.text-accent-foreground { color: var(--glaze-accent-foreground); }
.border-accent-foreground { border-color: var(--glaze-accent-foreground); }
.ring-accent-foreground { --tw-ring-color: var(--glaze-accent-foreground); }
.bg-destructive { background-color: var(--glaze-destructive); }
.text-destructive { color: var(--glaze-destructive); }
.border-destructive { border-color: var(--glaze-destructive); }
.ring-destructive { --tw-ring-color: var(--glaze-destructive); }
.bg-destructive-foreground { background-color: var(--glaze-destructive-foreground); }
.text-destructive-foreground { color: var(--glaze-destructive-foreground); }
.border-destructive-foreground { border-color: var(--glaze-destructive-foreground); }
.ring-destructive-foreground { --tw-ring-color: var(--glaze-destructive-foreground); }
.bg-border { background-color: var(--glaze-border); }
.text-border { color: var(--glaze-border); }
.border-border { border-color: var(--glaze-border); }
.ring-border { --tw-ring-color: var(--glaze-border); }
.bg-input { background-color: var(--glaze-input); }
.text-input { color: var(--glaze-input); }
.border-input { border-color: var(--glaze-input); }
.ring-input { --tw-ring-color: var(--glaze-input); }
.bg-ring { background-color: var(--glaze-ring); }
.text-ring { color: var(--glaze-ring); }
.border-ring { border-color: var(--glaze-ring); }
.ring-ring { --tw-ring-color: var(--glaze-ring); }

/* ---------- Helpers used by design prototypes ---------- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
[data-icon] {
  display: inline-flex; align-items: center; justify-content: center;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  background-color: currentColor;
}

/* ---------- Glaze search drawer ---------- */
.glaze-search-drawer {
  display: none;
  background: var(--surface, #fff);
  border-top: 1px solid var(--line, #F2E4E9);
  box-shadow: var(--shadow-2, 0 12px 32px -18px rgba(31, 29, 32, .18));
}
.glaze-search-drawer.open { display: block; }
.glaze-search-drawer form { display: flex; align-items: center; gap: 12px; width: 100%; }

/* ---------- Checkout steps ---------- */
.checkout-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.checkout-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3, #9a8e92);
  padding: 6px 4px;
}
.checkout-step .step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--line, #F2E4E9);
  color: var(--ink-3, #9a8e92);
  font-size: 13px;
}
.checkout-step.active { color: var(--brand, #D6336C); }
.checkout-step.active .step-num { background: var(--brand, #D6336C); color: #fff; }
.checkout-step.done { color: var(--ink, #1f1d20); }
.checkout-step.done .step-num { background: var(--brand-light, #FCE7EF); color: var(--brand, #D6336C); }

/* ---------- Checkout layout ---------- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
.checkout-main { display: flex; flex-direction: column; gap: 16px; }
.checkout-block {
  background: var(--surface, #fff);
  border: 1px solid var(--line, #F2E4E9);
  border-radius: var(--r-lg, 16px);
  padding: 20px 24px;
}
.checkout-block-title {
  font-family: var(--font-display, inherit);
  font-size: 18px;
  color: var(--ink, #1f1d20);
  margin: 0 0 14px;
}
.checkout-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink, #1f1d20);
  margin: 0 0 6px;
}
.checkout-address address { font-style: normal; line-height: 1.6; color: var(--ink-2, #6b6467); }
.checkout-addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.checkout-side { position: sticky; top: 90px; }

/* ---------- Shipping / payment options ---------- */
.glaze-ship-fieldset, .glaze-pay-fieldset, .glaze-credit-fieldset {
  border: none;
  margin: 0 0 12px;
  padding: 0;
}
.glaze-ship-fieldset legend,
.glaze-pay-fieldset legend,
.glaze-credit-fieldset legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3, #9a8e92);
  margin-bottom: 8px;
  padding: 0;
}
.glaze-ship-option,
.glaze-pay-label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--line, #F2E4E9);
  border-radius: var(--r-md, 12px);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.glaze-ship-option:hover,
.glaze-pay-label:hover { border-color: var(--brand, #D6336C); }
.glaze-ship-option.selected { border-color: var(--brand, #D6336C); background: var(--brand-light, #FCE7EF); }
.glaze-ship-option input[type="radio"],
.glaze-pay-label input[type="radio"] { accent-color: var(--brand, #D6336C); }
.ship-name, .pay-name { font-weight: 600; color: var(--ink, #1f1d20); flex: 1; }
.ship-price { font-weight: 700; color: var(--ink, #1f1d20); }
.ship-price.free { color: var(--brand, #D6336C); }
.shipping-group-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3, #9a8e92);
  margin: 16px 0 8px;
}
.shipping-group-label:first-child { margin-top: 0; }
.glaze-pay-field, .glaze-credit-field { margin: 8px 0; }
.glaze-pay-field label, .glaze-credit-field label { display: block; font-size: 12px; color: var(--ink-3, #9a8e92); margin-bottom: 4px; }
.glaze-pay-field input, .glaze-credit-field input { width: 100%; }

/* ---------- Confirmation products ---------- */
.confirm-products { display: flex; flex-direction: column; gap: 12px; }
.confirm-product {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line, #F2E4E9);
}
.confirm-product:last-child { border-bottom: none; padding-bottom: 0; }
.confirm-product-img img { border-radius: var(--r-sm, 8px); }
.confirm-product-name { font-weight: 600; color: var(--ink, #1f1d20); }
.confirm-product-qty { color: var(--ink-3, #9a8e92); }
.confirm-product-price { font-weight: 700; color: var(--ink, #1f1d20); }

/* ---------- Checkout actions ---------- */
.checkout-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}
.checkout-success-actions { margin: 0 auto; }
.notify-products { display: flex; flex-direction: column; gap: 8px; }
.notify-product { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2, #6b6467); }
.gv-redeem { background: var(--brand-light, #FCE7EF); color: var(--brand, #D6336C); padding: 10px; border-radius: var(--r-md, 12px); }

@media (max-width: 768px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-side { position: static; }
  .checkout-addresses { grid-template-columns: 1fr; }
  .checkout-actions { flex-direction: column-reverse; }
  .checkout-actions .checkout-btn, .checkout-actions .continue-shopping { width: 100%; justify-content: center; }
}

/* ---------- Embedded create-account module fields (glaze theming) ---------- */
#register-panel .form-group { margin-bottom: 14px; }
#register-panel fieldset { border: none; padding: 0; margin: 0 0 8px; }
#register-panel legend,
#register-panel .inputLabel {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2, #6b6467);
  margin-bottom: 6px;
}
#register-panel input[type="text"],
#register-panel input[type="email"],
#register-panel input[type="password"],
#register-panel input[type="tel"],
#register-panel select,
#register-panel textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line, #F2E4E9);
  border-radius: var(--r-md, 12px);
  font-size: 14px;
  color: var(--ink, #1f1d20);
  background: var(--surface, #fff);
  transition: border-color .15s;
}
#register-panel input:focus,
#register-panel select:focus,
#register-panel textarea:focus { outline: none; border-color: var(--brand, #D6336C); }
#register-panel .alert,
#register-panel .messageStackError {
  color: #c2410c;
  font-size: 12px;
  margin: 4px 0 8px;
}
#register-panel .back,
#register-panel br.clearBoth { display: none; }
#register-panel .buttonRow { margin-top: 6px; }

