/* ============================================================
   WEB WEAVE — theme-variants.css  (v3 — layout axis only)
   Layout/UX skin for the three storefront layout archetypes.

   site-settings.js stamps html[data-wtheme="editorial|boutique|bazaar"]
   from the shop's `theme_layout` setting (falling back to the legacy
   `theme_preset` value, which it maps through) and injects this
   stylesheet. The layouts in assets/js/theme-presets.js stay pure
   settings bundles (shape/fonts); THIS file is the layout difference.

   Layout is INDEPENDENT of palette — any of the six palettes in
   theme-presets.js can pair with any layout here. So nothing in this
   file may hardcode a colour: every rule reads the CSS vars the
   settings system owns. A rule that bakes in maroon or gold would
   break the moment a shop picks a different palette.

   The three archetypes (inspiration):
   · EDITORIAL — classic catalogue (Fabindia-style): full-bleed dark
     hero slider, centred ruled headings, sharp cards.
   · BOUTIQUE — minimal split-screen shopfront (COS / Everlane / Dawn):
     light split hero (text panel left, image right), centered two-tier
     header, product-first section flow, 3-col airy grids, pills.
   · BAZAAR — dense marketplace (Nalli / Pothys / big-box grocery):
     cinematic framed hero, category-first section flow, packed 4-col
     grids, full-width accent bands and ornament everywhere.

   Rules:
   - Everything is scoped under html[data-wtheme="..."]. No preset ⇒
     no attribute ⇒ stock template look, untouched.
   - Colours stay owned by the settings system (CSS vars / !important
     injections from site-settings.js). We restyle layout, structure,
     shape and ornament so the Appearance palette keeps working.
   - Announcement-ticker bg/text colours are owned by the Site Editor
     (applyAnnouncementColors) — shape/typography only here.
   - Homepage section re-flow uses flex `order` on main:has(>
     [data-section="hero_slider"]); browsers without :has() gracefully
     keep the source order.
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   EDITORIAL — "classic catalogue"
   The original template IS this layout; we only sharpen its
   editorial signature so it reads designed, not default.
   ════════════════════════════════════════════════════════════ */

html[data-wtheme="editorial"] .site-header {
  border-bottom: 3px double var(--clr-border);
}

html[data-wtheme="editorial"] .nav-link:hover,
html[data-wtheme="editorial"] .nav-link.active {
  text-decoration: underline;
  text-decoration-color: var(--clr-gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

/* Extend the homepage's gold rule under section titles to every page. */
html[data-wtheme="editorial"] .section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--clr-gold);
  margin: var(--space-md) auto 0;
}

html[data-wtheme="editorial"] .product-price .current {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 700;
}

html[data-wtheme="editorial"] .product-card { box-shadow: none; }
html[data-wtheme="editorial"] .product-card:hover {
  box-shadow: 0 10px 24px color-mix(in srgb, var(--clr-ink) 12%, transparent);
}

html[data-wtheme="editorial"] .footer-col h4 {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: var(--space-sm);
}

/* ════════════════════════════════════════════════════════════
   BOUTIQUE — "minimal split-screen shopfront"
   ════════════════════════════════════════════════════════════ */

/* ---- Homepage section flow: product-first (boutiques lead with
   product, story later). Scoped to main:not([data-user-order]) — when a
   shop owner saved an explicit arrangement in the Site Editor, index.html
   stamps data-user-order after its DOM reorder and the owner's flow wins
   over the theme's default. ---- */
html[data-wtheme="boutique"] main:has(> [data-section="hero_slider"]) {
  display: flex;
  flex-direction: column;
}
html[data-wtheme="boutique"] main:not([data-user-order]) > [data-section="hero_slider"]      { order: 1; }
html[data-wtheme="boutique"] main:not([data-user-order]) > [data-section="featured_products"]{ order: 2; }
html[data-wtheme="boutique"] main:not([data-user-order]) > [data-section="fabric_grid"]      { order: 3; }
html[data-wtheme="boutique"] main:not([data-user-order]) > [data-section="why_us"]           { order: 4; }
html[data-wtheme="boutique"] main:not([data-user-order]) > [data-section="occasion_grid"]    { order: 5; }
html[data-wtheme="boutique"] main:not([data-user-order]) > [data-section="testimonials"]     { order: 6; }
html[data-wtheme="boutique"] main:not([data-user-order]) > [data-section="gallery_preview"]  { order: 7; }
html[data-wtheme="boutique"] main:not([data-user-order]) > [data-section="blog_preview"]     { order: 8; }
html[data-wtheme="boutique"] main:not([data-user-order]) > [data-section="newsletter"]       { order: 9; }

/* ---- Buttons: pills, sentence case ---- */
html[data-wtheme="boutique"] .btn {
  border-radius: 999px;
  text-transform: none;
  letter-spacing: 0.2px;
  font-size: 0.92rem;
  padding: 13px 30px;
}
html[data-wtheme="boutique"] .btn-sm { padding: 9px 20px; font-size: 0.8rem; }
html[data-wtheme="boutique"] .btn-lg { padding: 16px 38px; font-size: 0.98rem; }

/* ---- Header: centered logo over a centered nav row (desktop) ---- */
@media (min-width: 769px) {
  html[data-wtheme="boutique"] .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    height: auto;
    padding-top: 14px;
    row-gap: 0;
  }
  html[data-wtheme="boutique"] .logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    align-items: center;
    text-align: center;
  }
  html[data-wtheme="boutique"] .header-icons {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }
  html[data-wtheme="boutique"] .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    gap: var(--space-2xl);
  }
  html[data-wtheme="boutique"] .site-header.scrolled .header-inner {
    height: auto;
    padding-top: 8px;
  }
  html[data-wtheme="boutique"] .nav-link { padding: 10px 0 14px; }
}

html[data-wtheme="boutique"] .site-header.scrolled {
  background: color-mix(in srgb, var(--clr-cream) 80%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--clr-border), 0 8px 24px color-mix(in srgb, var(--clr-ink) 6%, transparent);
}

html[data-wtheme="boutique"] .nav-link {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--clr-ink);
  position: relative;
}
html[data-wtheme="boutique"] .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--clr-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--transition-fast);
}
html[data-wtheme="boutique"] .nav-link:hover,
html[data-wtheme="boutique"] .nav-link.active { color: var(--clr-ink); }
html[data-wtheme="boutique"] .nav-link:hover::after,
html[data-wtheme="boutique"] .nav-link.active::after { transform: scaleX(1); }

html[data-wtheme="boutique"] .mega-menu {
  border: none;
  border-radius: 14px;
  padding: var(--space-lg) var(--space-xl);
  box-shadow: 0 12px 40px color-mix(in srgb, var(--clr-ink) 14%, transparent);
}
html[data-wtheme="boutique"] .mega-menu a { font-size: 0.9rem; }

html[data-wtheme="boutique"] .ticker-item {
  text-transform: none;
  letter-spacing: 0.3px;
  font-size: 0.8rem;
}

/* ---- HERO: light SPLIT-SCREEN — text panel left, image right ----
   The stock full-bleed dark slider becomes a framed, rounded, light
   canvas: cream panel with ink type on the left 45%, the slide photo
   clipped to the right 55%. Totally different architecture from the
   other two themes. */
html[data-wtheme="boutique"] .hero {
  margin: 16px clamp(16px, 3vw, 44px) 0;
  border-radius: 24px;
  height: 76vh;
  min-height: 480px;
  background: var(--clr-cream);
}
html[data-wtheme="boutique"] .hero-bg { left: 45%; }
html[data-wtheme="boutique"] .hero-overlay { display: none; }
html[data-wtheme="boutique"] .hero-slide .container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
html[data-wtheme="boutique"] .hero-content {
  max-width: min(480px, 38%);
  color: var(--clr-ink);
}
html[data-wtheme="boutique"] .hero-content h1 {
  color: var(--clr-ink);
  letter-spacing: -0.02em;
}
html[data-wtheme="boutique"] .hero-content p { color: var(--clr-muted); }
html[data-wtheme="boutique"] .hero-content .overline {
  border: 1px solid color-mix(in srgb, var(--clr-accent) 45%, transparent);
  border-radius: 999px;
  padding: 6px 14px;
  background: color-mix(in srgb, var(--clr-accent) 8%, transparent);
  color: var(--clr-accent);
  letter-spacing: 2px;
}
html[data-wtheme="boutique"] .hero-content .overline::before { content: none; }
/* The white-outline secondary button needs ink on the light panel. */
html[data-wtheme="boutique"] .hero-content .btn-secondary {
  color: var(--clr-ink);
  border-color: var(--clr-ink);
}
html[data-wtheme="boutique"] .hero-content .btn-secondary:hover {
  background: var(--clr-ink);
  color: var(--clr-cream);
}
/* Slider controls live on the photo half. */
html[data-wtheme="boutique"] .hero-arrows { left: 45%; }
html[data-wtheme="boutique"] .hero-arrow {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border-color: transparent;
  color: var(--clr-ink);
}
html[data-wtheme="boutique"] .hero-arrow:hover { background: #fff; }
html[data-wtheme="boutique"] .hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--clr-ink) 25%, transparent);
}
html[data-wtheme="boutique"] .hero-dot.active {
  width: 24px;
  border-radius: 999px;
  background: var(--clr-accent);
}

/* ---- Section headers: left-aligned, no ornament ---- */
html[data-wtheme="boutique"] .section-title {
  text-align: left;
  letter-spacing: -0.02em;
  font-weight: 600;
}
html[data-wtheme="boutique"] .section-title::after { content: none; }
html[data-wtheme="boutique"] .section-subtitle {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}
html[data-wtheme="boutique"] .filter-tabs { justify-content: flex-start; }
html[data-wtheme="boutique"] .filter-tab { border-radius: 999px; }

/* ---- Grids: fewer, larger, airier ---- */
html[data-wtheme="boutique"] .products-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.2vw, 32px);
}
/* Uniform gallery-wall tiles instead of the mosaic. */
html[data-wtheme="boutique"] .fabric-tiles {
  grid-template-rows: repeat(2, 300px);
}
html[data-wtheme="boutique"] .fabric-tile:first-child { grid-row: auto; }
html[data-wtheme="boutique"] .fabric-tile,
html[data-wtheme="boutique"] .occasion-tile,
html[data-wtheme="boutique"] .blog-card,
html[data-wtheme="boutique"] .review-card {
  border-radius: 18px;
  overflow: hidden;
}
html[data-wtheme="boutique"] .occasion-grid { gap: var(--space-lg); }
html[data-wtheme="boutique"] .occasion-tile { height: 150px; }

/* ---- Product cards: soft shadow, lift, pill quick-add ---- */
html[data-wtheme="boutique"] .product-card {
  border: none;
  border-radius: 18px;
  box-shadow: var(--card-shadow, 0 4px 12px rgba(0, 0, 0, 0.08));
}
html[data-wtheme="boutique"] .product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px color-mix(in srgb, var(--clr-ink) 14%, transparent);
}
html[data-wtheme="boutique"] .product-card:hover .product-card-img img {
  transform: none; /* the card lifts; the photo stays still */
}
html[data-wtheme="boutique"] .product-badge { border-radius: 999px; padding: 4px 12px; }
html[data-wtheme="boutique"] .product-wishlist {
  opacity: 1;
  border-radius: 50%;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--clr-ink) 12%, transparent);
}
html[data-wtheme="boutique"] .product-quick-add {
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  padding: 10px;
  text-transform: none;
  letter-spacing: 0.2px;
  font-size: 0.82rem;
  transform: translateY(calc(100% + 12px));
}
html[data-wtheme="boutique"] .product-card:hover .product-quick-add { transform: translateY(0); }
html[data-wtheme="boutique"] .color-swatch { border-radius: 50%; }

/* ---- Why-us: the pale-gold centered band becomes a quiet, light,
   left-aligned editorial block with a two-column checklist. ---- */
html[data-wtheme="boutique"] .why-us {
  background: var(--clr-light-bg);
  color: var(--clr-ink);
}
html[data-wtheme="boutique"] .why-us-content {
  text-align: left;
  max-width: 900px;
  margin-right: auto;
}
html[data-wtheme="boutique"] .why-us-content h2 {
  color: var(--clr-ink);
  text-transform: none;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
}
html[data-wtheme="boutique"] .why-us-content .gold-line {
  margin-left: 0;
  background: var(--clr-accent);
}
html[data-wtheme="boutique"] .usp-list {
  grid-template-columns: 1fr 1fr;
  max-width: none;
  margin-left: 0;
}
html[data-wtheme="boutique"] .why-us-stats {
  justify-content: flex-start;
  border-top-color: color-mix(in srgb, var(--clr-ink) 12%, transparent);
}

/* ---- Reviews: two large borderless quotes ---- */
html[data-wtheme="boutique"] .reviews-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 3vw, 48px);
}
html[data-wtheme="boutique"] .review-card {
  border: none;
  box-shadow: 0 4px 18px color-mix(in srgb, var(--clr-ink) 7%, transparent);
  padding: var(--space-2xl);
}

/* ---- Newsletter: rounded minimal form ---- */
html[data-wtheme="boutique"] .newsletter {
  border-top: none;
  border-bottom: none;
}
html[data-wtheme="boutique"] .newsletter-form { gap: 10px; }
html[data-wtheme="boutique"] .newsletter-form input[type="email"] {
  border-radius: 999px;
  border-right: 1px solid var(--clr-border);
  padding-left: 22px;
}
html[data-wtheme="boutique"] .newsletter-form button {
  border-radius: 999px;
  text-transform: none;
  letter-spacing: 0.2px;
}

/* ---- Shop page: card sidebar, airy grid ---- */
html[data-wtheme="boutique"] .shop-sidebar {
  background: #fff;
  border-radius: 16px;
  padding: var(--space-xl);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--clr-ink) 6%, transparent);
}
html[data-wtheme="boutique"] .shop-products-grid { gap: clamp(20px, 2vw, 30px); }
html[data-wtheme="boutique"] .pagination a,
html[data-wtheme="boutique"] .pagination button,
html[data-wtheme="boutique"] .pagination span { border-radius: 999px; }

/* ---- Product page: rounded gallery ---- */
html[data-wtheme="boutique"] .gallery-main { border-radius: 20px; }
html[data-wtheme="boutique"] .gallery-thumb { border-radius: 10px; }

/* ---- Footer: airy, circular socials, quiet headings ---- */
html[data-wtheme="boutique"] .footer-social-link { border-radius: 50%; }
html[data-wtheme="boutique"] .footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 2px;
}
html[data-wtheme="boutique"] .footer-col a { padding: 6px 0; }

/* ════════════════════════════════════════════════════════════
   BAZAAR — "dense marketplace"
   ════════════════════════════════════════════════════════════ */

/* ---- Homepage section flow: category-first (bazaar shoppers
   browse by category/occasion, not down a flat product list).
   Same data-user-order escape hatch as Boutique — the owner's
   saved Site Editor arrangement always wins. ---- */
html[data-wtheme="bazaar"] main:has(> [data-section="hero_slider"]) {
  display: flex;
  flex-direction: column;
}
html[data-wtheme="bazaar"] main:not([data-user-order]) > [data-section="hero_slider"]      { order: 1; }
html[data-wtheme="bazaar"] main:not([data-user-order]) > [data-section="occasion_grid"]    { order: 2; }
html[data-wtheme="bazaar"] main:not([data-user-order]) > [data-section="fabric_grid"]      { order: 3; }
html[data-wtheme="bazaar"] main:not([data-user-order]) > [data-section="featured_products"]{ order: 4; }
html[data-wtheme="bazaar"] main:not([data-user-order]) > [data-section="why_us"]           { order: 5; }
html[data-wtheme="bazaar"] main:not([data-user-order]) > [data-section="gallery_preview"]  { order: 6; }
html[data-wtheme="bazaar"] main:not([data-user-order]) > [data-section="testimonials"]     { order: 7; }
html[data-wtheme="bazaar"] main:not([data-user-order]) > [data-section="blog_preview"]     { order: 8; }
html[data-wtheme="bazaar"] main:not([data-user-order]) > [data-section="newsletter"]       { order: 9; }

/* ---- Header: accent hairline + woven stripe, diamond nav ---- */
html[data-wtheme="bazaar"] .site-header {
  border-bottom: 1px solid color-mix(in srgb, var(--clr-gold) 55%, transparent);
}
html[data-wtheme="bazaar"] .site-header::after {
  content: '';
  display: block;
  height: 3px;
  background: repeating-linear-gradient(90deg,
    var(--clr-gold) 0 10px, transparent 10px 20px);
  opacity: 0.35;
}
html[data-wtheme="bazaar"] .logo-brand { letter-spacing: 2px; }

html[data-wtheme="bazaar"] .main-nav { gap: calc(var(--space-xl) + 10px); }
html[data-wtheme="bazaar"] .nav-item:not(:last-child)::before {
  content: '✦';
  position: absolute;
  right: calc(-1 * (var(--space-xl) + 10px) / 2);
  top: 50%;
  transform: translate(50%, -50%);
  font-size: 0.55rem;
  color: var(--clr-gold);
  opacity: 0.55;
  pointer-events: none;
}

html[data-wtheme="bazaar"] .mega-menu {
  border: 1px solid color-mix(in srgb, var(--clr-gold) 40%, transparent);
  border-top: 2px solid var(--clr-gold);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--clr-ink) 16%, transparent);
}

html[data-wtheme="bazaar"] .ticker-item { letter-spacing: 1.6px; }

/* ---- HERO: cinematic, near full-viewport, centre-framed ---- */
html[data-wtheme="bazaar"] .hero {
  height: 92vh;
  max-height: 940px;
  min-height: 560px;
}
html[data-wtheme="bazaar"] .hero-overlay {
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--clr-ink) 35%, transparent) 0%,
    color-mix(in srgb, var(--clr-ink) 58%, transparent) 100%);
}
html[data-wtheme="bazaar"] .hero-slide .container {
  display: flex;
  justify-content: center;
}
html[data-wtheme="bazaar"] .hero-content {
  max-width: 780px;
  text-align: center;
  padding: clamp(28px, 4.5vw, 56px) clamp(20px, 4vw, 60px);
  border: 1px solid color-mix(in srgb, var(--clr-gold) 65%, transparent);
  outline: 1px solid color-mix(in srgb, var(--clr-gold) 30%, transparent);
  outline-offset: 7px;
  background: color-mix(in srgb, var(--clr-ink) 22%, transparent);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
/* A Site-Editor banner can ship with no headline (image-only slide) —
   don't draw the ceremonial frame around an empty content box. */
html[data-wtheme="bazaar"] .hero-content:not(:has(h1)),
html[data-wtheme="bazaar"] .hero-content:has(h1:empty):not(:has(p)) {
  border: none;
  outline: none;
  background: none;
  padding: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html[data-wtheme="bazaar"] .hero-content h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
}
html[data-wtheme="bazaar"] .hero-content p {
  margin-left: auto;
  margin-right: auto;
}
html[data-wtheme="bazaar"] .hero-btns { justify-content: center; }
html[data-wtheme="bazaar"] .hero-content .overline {
  border: none;
  padding-bottom: 0;
  letter-spacing: 5px;
}
html[data-wtheme="bazaar"] .hero-content .overline::before,
html[data-wtheme="bazaar"] .hero-content .overline::after {
  content: '✦';
  display: inline-block;
  width: auto;
  height: auto;
  background: none;
  margin: 0 10px;
  font-size: 0.7rem;
  color: var(--clr-gold);
}
html[data-wtheme="bazaar"] .hero-dot { background: color-mix(in srgb, var(--clr-gold) 35%, transparent); }
html[data-wtheme="bazaar"] .hero-dot.active { background: var(--clr-gold); }

/* ---- Section titles: flanked ornament ---- */
html[data-wtheme="bazaar"] .section-title::after {
  content: '❖';
  display: block;
  width: auto;
  height: auto;
  background: none;
  margin: var(--space-sm) auto 0;
  font-size: 0.85rem;
  color: var(--clr-gold);
  letter-spacing: 0;
}

/* ---- Occasion showcase (now the FIRST section after the hero):
   bigger ceremonial tiles with serif titles and gold inner frames. */
html[data-wtheme="bazaar"] .occasion-grid { gap: var(--space-lg); }
html[data-wtheme="bazaar"] .occasion-tile { height: 280px; }
html[data-wtheme="bazaar"] .occasion-tile-content h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
}
html[data-wtheme="bazaar"] .occasion-tile-content span {
  opacity: 1;                 /* the invite is always visible */
  transform: none;
}
html[data-wtheme="bazaar"] .fabric-tile::after,
html[data-wtheme="bazaar"] .occasion-tile::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 2;
}

/* ---- Banded page rhythm: alternate warm tints between sections ---- */
html[data-wtheme="bazaar"] .new-arrivals {
  background: color-mix(in srgb, var(--clr-gold) 6%, var(--clr-light-bg));
}
html[data-wtheme="bazaar"] .reviews-section {
  background: color-mix(in srgb, var(--clr-primary) 4%, var(--clr-light-bg));
}

/* ---- Cards: dense 4-col, gold frames, ribbon badges, warm glow ---- */
html[data-wtheme="bazaar"] .products-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}
html[data-wtheme="bazaar"] .product-card {
  border: 1px solid color-mix(in srgb, var(--clr-gold) 45%, var(--clr-border));
}
html[data-wtheme="bazaar"] .product-card:hover {
  border-color: var(--clr-gold);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--clr-gold) 30%, transparent);
}
html[data-wtheme="bazaar"] .product-badge {
  /* Darker stop derived from --clr-gold, not a fixed gold: layout and
     palette are independent, so a grey/blue palette must not gradient
     into brass. */
  background: linear-gradient(135deg, var(--clr-gold), color-mix(in srgb, var(--clr-gold) 68%, #000));
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%);
  padding-right: 16px;
}
html[data-wtheme="bazaar"] .product-badge.sale {
  background: linear-gradient(135deg, var(--clr-error), #8e1c1c);
}
html[data-wtheme="bazaar"] .product-fabric { color: var(--clr-gold); }
html[data-wtheme="bazaar"] .product-quick-add {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--clr-primary) 92%, black),
    var(--clr-primary));
}
html[data-wtheme="bazaar"] .filter-tab {
  border-color: color-mix(in srgb, var(--clr-gold) 50%, var(--clr-border));
}

/* ---- Why-us: the pale band becomes a deep ceremonial maroon band
   with gold rules — the loudest layout difference from the stock
   homepage's #F2E6B3 strip. ---- */
html[data-wtheme="bazaar"] .why-us {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--clr-primary) 82%, black),
    var(--clr-primary));
  color: color-mix(in srgb, var(--clr-gold) 18%, #fff);
  border-top: 3px double var(--clr-gold);
  border-bottom: 3px double var(--clr-gold);
}
html[data-wtheme="bazaar"] .why-us-content h2 {
  color: color-mix(in srgb, var(--clr-gold) 30%, #fff);
  text-transform: none;
}
html[data-wtheme="bazaar"] .why-us .usp-item { color: rgba(255, 255, 255, 0.92); }
html[data-wtheme="bazaar"] .why-us-stats {
  border-top-color: color-mix(in srgb, var(--clr-gold) 40%, transparent);
}

/* ---- Newsletter: ornate maroon invitation band ---- */
html[data-wtheme="bazaar"] .newsletter {
  background: var(--clr-primary);
  border-top: 3px double var(--clr-gold);
  border-bottom: none;
}
html[data-wtheme="bazaar"] .newsletter-inner h2 {
  color: color-mix(in srgb, var(--clr-gold) 30%, #fff);
}
html[data-wtheme="bazaar"] .newsletter-inner p { color: rgba(255, 255, 255, 0.75); }
html[data-wtheme="bazaar"] .newsletter-form input[type="email"] {
  border-color: color-mix(in srgb, var(--clr-gold) 55%, transparent);
  background: rgba(255, 255, 255, 0.96);
}
html[data-wtheme="bazaar"] .newsletter-form button {
  background: linear-gradient(135deg, var(--clr-gold), color-mix(in srgb, var(--clr-gold) 68%, #000));
}
html[data-wtheme="bazaar"] .newsletter-success { color: var(--clr-gold); }

/* ---- Buttons: wide tracking + accent glow ---- */
html[data-wtheme="bazaar"] .btn { letter-spacing: 2px; }
html[data-wtheme="bazaar"] .btn-primary:hover,
html[data-wtheme="bazaar"] .btn-accent:hover {
  box-shadow: 0 6px 22px color-mix(in srgb, var(--clr-gold) 35%, transparent);
}

/* ---- Shop page: dense bazaar grid, gold-tinted filter panel ---- */
html[data-wtheme="bazaar"] .shop-products-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}
html[data-wtheme="bazaar"] .shop-sidebar {
  background: color-mix(in srgb, var(--clr-gold) 5%, #fff);
  border: 1px solid color-mix(in srgb, var(--clr-gold) 30%, var(--clr-border));
  padding: var(--space-xl);
}

/* ---- Product page: gold double-framed gallery ---- */
html[data-wtheme="bazaar"] .gallery-main {
  border: 1px solid color-mix(in srgb, var(--clr-gold) 60%, transparent);
  outline: 1px solid color-mix(in srgb, var(--clr-gold) 28%, transparent);
  outline-offset: 5px;
}
html[data-wtheme="bazaar"] .gallery-thumb.active,
html[data-wtheme="bazaar"] .gallery-thumb:hover { border-color: var(--clr-gold); }

/* ---- Footer: accent stripe on top, ruled headings ---- */
html[data-wtheme="bazaar"] .site-footer { position: relative; }
html[data-wtheme="bazaar"] .site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--clr-gold) 0 12px, transparent 12px 24px);
  opacity: 0.55;
}
html[data-wtheme="bazaar"] .footer-col h4 {
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid color-mix(in srgb, var(--clr-gold) 40%, transparent);
}
html[data-wtheme="bazaar"] .footer-social-link:hover {
  box-shadow: 0 0 0 1px var(--clr-gold);
}

/* ════════════════════════════════════════════════════════════
   Responsive adjustments
   ════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  /* Give the text panel more room and start the photo later so the
     copy never runs under the image edge on tablets. */
  html[data-wtheme="boutique"] .hero-bg { left: 50%; }
  html[data-wtheme="boutique"] .hero-arrows { left: 50%; }
  html[data-wtheme="boutique"] .hero-content { max-width: min(420px, 42%); }
  html[data-wtheme="bazaar"] .products-grid,
  html[data-wtheme="bazaar"] .shop-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  /* Modern split hero stacks: photo on the top 45%, text below. */
  html[data-wtheme="boutique"] .hero {
    margin: 10px 10px 0;
    border-radius: 16px;
    height: 86vh;
  }
  html[data-wtheme="boutique"] .hero-bg {
    left: 0;
    bottom: 55%;
  }
  html[data-wtheme="boutique"] .hero-slide { align-items: flex-end; }
  html[data-wtheme="boutique"] .hero-slide .container {
    height: 55%;
    align-items: center;
  }
  html[data-wtheme="boutique"] .hero-content { max-width: 100%; }
  html[data-wtheme="boutique"] .hero-arrows { left: 0; }
  html[data-wtheme="boutique"] .products-grid { grid-template-columns: repeat(2, 1fr); }
  html[data-wtheme="boutique"] .fabric-tiles { grid-template-rows: auto; }
  html[data-wtheme="boutique"] .reviews-grid { grid-template-columns: 1fr; }
  html[data-wtheme="boutique"] .usp-list { grid-template-columns: 1fr; }

  html[data-wtheme="bazaar"] .hero { height: 80vh; min-height: 480px; }
  html[data-wtheme="bazaar"] .hero-content {
    padding: 20px 14px;
    outline-offset: 4px;
  }
  html[data-wtheme="bazaar"] .occasion-tile { height: 180px; }
  html[data-wtheme="bazaar"] .products-grid,
  html[data-wtheme="bazaar"] .shop-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
