/* =========================================================================
   TR JEWELS — CATALOGUE
   Architecture: Tokens > Reset > Base > Layout > Components > Sections >
                 Utilities > Responsive > Accessibility / Print
   ========================================================================= */

/* ===================== 01. TOKENS ===================== */
:root {
  --bg: #121010;
  --bg-raised: #1C1917;
  --bg-sunken: #1A1613;
  --ink: #F4EDE1;
  --ink-soft: #A99C8B;
  --line: #322C24;
  --line-strong: #4A3F2E;
  --gold: #D3B073;
  --gold-fill: #D3B073;
  --gold-fill-hover: #E4C68C;
  --gold-tint: rgba(211, 176, 115, 0.12);
  --gold-tint-2: rgba(211, 176, 115, 0.24);
  --gold-on-image: #E4C68C;
  --scrim: rgba(0, 0, 0, 0.76);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 20px 45px -20px rgba(0, 0, 0, 0.6);
  --shadow-3: 0 34px 80px -26px rgba(0, 0, 0, 0.72);
  --logo-plate: linear-gradient(160deg, #26221c, #0e0d0c);

  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-sans: 'Jost', 'Poppins', 'Segoe UI', Arial, sans-serif;

  --fs-2xs: clamp(0.66rem, 0.63rem + 0.12vw, 0.72rem);
  --fs-xs: clamp(0.72rem, 0.68rem + 0.18vw, 0.8rem);
  --fs-sm: clamp(0.84rem, 0.8rem + 0.2vw, 0.94rem);
  --fs-base: clamp(0.98rem, 0.93rem + 0.22vw, 1.08rem);
  --fs-md: clamp(1.12rem, 1rem + 0.5vw, 1.35rem);
  --fs-lg: clamp(1.4rem, 1.15rem + 1vw, 2rem);
  --fs-xl: clamp(1.85rem, 1.4rem + 1.9vw, 2.7rem);

  --sp-3xs: clamp(0.25rem, 0.22rem + 0.15vw, 0.375rem);
  --sp-2xs: clamp(0.5rem, 0.42rem + 0.3vw, 0.75rem);
  --sp-xs: clamp(0.75rem, 0.63rem + 0.5vw, 1.1rem);
  --sp-sm: clamp(1.1rem, 0.9rem + 0.85vw, 1.65rem);
  --sp-md: clamp(1.75rem, 1.35rem + 1.7vw, 2.75rem);
  --sp-lg: clamp(2.75rem, 2rem + 3vw, 4.75rem);
  --sp-xl: clamp(4rem, 2.6rem + 5.6vw, 7.5rem);

  --content-max: 1400px;
  --edge: clamp(1.1rem, 0.8rem + 2.2vw, 2.75rem);
  --radius-xs: 4px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --nav-h: clamp(4rem, 3.6rem + 1.2vw, 4.75rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.2s;
  --dur-mid: 0.4s;
  color-scheme: dark;
}
@media (prefers-contrast: more) {
  :root { --line: var(--line-strong); --ink-soft: var(--ink); }
}

/* ===================== 02. RESET ===================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body, h1, h2, h3, h4, p, dl, dd { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input { font: inherit; color: inherit; }
:where(button, a, input) { touch-action: manipulation; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ===================== 03. BASE ===================== */
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: var(--fs-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100svh;
}
body.modal-locked { position: fixed; inset: 0; overflow: hidden; width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; color: var(--ink); text-wrap: balance; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

/* ===================== 04. LAYOUT ===================== */
.wrap { max-width: var(--content-max); margin-inline: auto; padding-inline: max(var(--edge), env(safe-area-inset-left)) max(var(--edge), env(safe-area-inset-right)); }
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 500;
  background: var(--ink); color: var(--bg);
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
  transform: translateY(-140%);
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ===================== 05. COMPONENTS ===================== */

/* --- Logo --- */
.logo-plate { display: inline-flex; align-items: center; justify-content: center; background: var(--logo-plate); border-radius: var(--radius-sm); padding: 5px 9px; box-shadow: var(--shadow-1); flex-shrink: 0; }
.logo-plate img { height: clamp(30px, 3vw, 38px); width: auto; object-fit: contain; }
.logo-plate.lg { padding: 10px 16px; border-radius: var(--radius-md); }
.logo-plate.lg img { height: clamp(50px, 5vw, 64px); }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2xs); min-height: 46px; padding-inline: clamp(1.1rem, 0.9rem + 0.8vw, 1.6rem); border-radius: 999px; font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; transition: transform var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--gold-fill-hover); border-color: var(--gold-fill-hover); transform: translateY(-2px); box-shadow: var(--shadow-2); }
  .btn-outline:hover { border-color: var(--gold); color: var(--gold); }
  .btn-ghost:hover { background: var(--gold-tint-2); }
}
.btn-primary { background: var(--gold-fill); color: #17130B; border: 1px solid var(--gold-fill); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost { background: var(--gold-tint); color: var(--gold); padding-inline: var(--sp-sm); min-height: 40px; }
.btn-sm { min-height: 38px; padding-inline: var(--sp-sm); font-size: 0.7rem; }
.btn-block { width: 100%; }

/* --- Media box (CLS-safe) --- */
.media-box { display: block; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 42%, var(--bg-raised) 0%, var(--bg-sunken) 72%); }
.media-box img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.media-box.img-missing { background: radial-gradient(circle, var(--gold-tint) 0%, var(--bg-sunken) 70%); }
.media-box.img-missing::after { content: ""; position: absolute; inset: 0; margin: auto; width: 30%; aspect-ratio: 1; border: 1px solid var(--gold-tint-2); border-radius: 50%; }

/* ===================== 06. HEADER / TOOLBAR ===================== */
.site-header {
  position: sticky; top: 0; z-index: 200;
  padding-top: env(safe-area-inset-top);
  background: rgba(18, 16, 16, 0.88);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header-top { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); }
.brand-block { display: flex; align-items: center; gap: var(--sp-2xs); }
.brand-text { display: none; }
.brand-text strong { display: block; font-family: var(--font-display); font-size: var(--fs-md); letter-spacing: 0.02em; }
.brand-text span { display: block; font-size: var(--fs-2xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-top: 1px; }
.header-actions { display: flex; align-items: center; gap: var(--sp-2xs); }

.toolbar { padding-block: var(--sp-xs); border-top: 1px solid var(--line); }
.toolbar-row { display: flex; gap: var(--sp-xs); align-items: center; }
.search-field { position: relative; flex: 1 1 auto; }
.search-field svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-soft); }
.search-field input { width: 100%; min-height: 44px; padding: 0 var(--sp-sm) 0 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-raised); font-size: var(--fs-sm); transition: border-color var(--dur-fast); }
.search-field input:focus { border-color: var(--gold); }
.filter-toggle-btn { display: none; flex-shrink: 0; align-items: center; gap: 6px; min-height: 44px; padding-inline: var(--sp-sm); border-radius: 999px; border: 1px solid var(--line); background: var(--bg-raised); font-size: var(--fs-xs); letter-spacing: 0.04em; text-transform: uppercase; }
.filter-toggle-btn svg { width: 15px; height: 15px; color: var(--gold); }

.cat-tabs { display: flex; gap: var(--sp-3xs); overflow-x: auto; margin-top: var(--sp-xs); scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding-inline: var(--sp-sm); border-radius: 999px; border: 1px solid var(--line); background: var(--bg-raised); font-size: var(--fs-xs); letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-soft); transition: all var(--dur-fast) var(--ease); }
@media (hover: hover) and (pointer: fine) { .cat-tab:hover { border-color: var(--gold); color: var(--ink); } }
.cat-tab.active { background: var(--gold-fill); border-color: var(--gold-fill); color: #17130B; }
.cat-tab .count { opacity: 0.7; font-variant-numeric: tabular-nums; }

/* ===================== 07. HERO STRIP ===================== */
.cat-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(360px, 62svh, 560px);
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  background: #14100c;
}
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 28%;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide-1 { background-image: url("../assets/hero/hero-red-saree.jpg"); }
.hero-slide-2 { background-image: url("../assets/hero/hero-ivory-saree.jpg"); }
.hero-slide-3 { background-image: url("../assets/hero/hero-pillar.jpg"); }
.cat-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, rgba(10,7,4,0.86) 0%, rgba(10,7,4,0.42) 55%, rgba(10,7,4,0.18) 100%);
}
.cat-hero .wrap { position: relative; z-index: 2; padding-block: var(--sp-md); width: 100%; }
.eyebrow { display: inline-flex; align-items: center; gap: var(--sp-2xs); font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; }
.cat-hero .eyebrow { color: var(--gold-on-image); }
.cat-hero h1 { font-size: var(--fs-xl); margin-top: var(--sp-2xs); color: #fdfaf4; }
.cat-hero p { margin-top: var(--sp-2xs); color: rgba(253,250,244,0.82); font-size: var(--fs-sm); max-width: 62ch; }
.cat-hero .stat-row { display: flex; gap: var(--sp-md); margin-top: var(--sp-sm); flex-wrap: wrap; }
.cat-hero .stat { font-size: var(--fs-sm); }
.cat-hero .stat strong { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--gold-on-image); display: block; line-height: 1; }
.cat-hero .stat span { color: rgba(253,250,244,0.68); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 700px) {
  .cat-hero { min-height: clamp(320px, 56svh, 460px); }
  .cat-hero .stat.stat-wide strong { font-size: var(--fs-md); }
}

/* --- Floating gold jewel particles (diamonds, rings, gems, pendants) --- */
/* Populated by initJewelParticles(); each particle carries its own inline
   position, size, drift, spin and timing so no two follow the same path. */
/* top/right/bottom/left first so older phones that don't know `inset` still
   give the layer a real size — without it the layer collapses and nothing shows. */
.particle-layer { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.particle {
  position: absolute; display: block;
  color: var(--gold-on-image);
  opacity: 0;
  will-change: transform, opacity;
  /* Softened: a touch of blur keeps them reading as ambient light rather than
     sharp icons sliding behind the text. */
  filter: blur(0.9px) drop-shadow(0 0 7px rgba(211, 176, 115, 0.32));
  animation-name: floatJewel;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
.particle svg { width: 100%; height: 100%; display: block; fill: none; stroke: currentColor; stroke-width: 1; stroke-linejoin: round; stroke-linecap: round; }
.particle svg .solid { fill: currentColor; stroke: none; }
@keyframes floatJewel {
  0%   { transform: translate3d(0, 40px, 0) rotate(0deg) scale(0.65); opacity: 0; }
  12%  { opacity: var(--p-max, 0.45); }
  78%  { opacity: var(--p-max, 0.45); }
  100% { transform: translate3d(var(--p-drift, 20px), -150px, 0) rotate(var(--p-spin, 180deg)) scale(1); opacity: 0; }
}
/* Behind the copy in the about band and behind the piece in the modal. */
.about-section .particle-layer,
.modal-gallery .particle-layer { z-index: 0; }
/* Fixed to the viewport so jewels keep drifting behind the card grid as it
   scrolls — visible through the transparent gaps between cards. */
.page-particles { position: fixed; z-index: 0; }
main { position: relative; z-index: 1; }

/* ===================== 07b. ABOUT + PURITY ===================== */
.about-section {
  position: relative; overflow: hidden;
  padding-block: var(--sp-lg);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-sunken) 0%, var(--bg) 100%);
}
/* Slow diagonal light pass — the "polished metal" catch of light. */
.shine-sweep {
  position: absolute; top: 0; bottom: 0; left: -45%; width: 42%;
  background: linear-gradient(100deg, transparent 0%, rgba(211,176,115,0.05) 40%, rgba(228,198,140,0.11) 50%, rgba(211,176,115,0.05) 60%, transparent 100%);
  pointer-events: none;
  animation: sweep 11s ease-in-out infinite;
}
@keyframes sweep { 0% { left: -45%; } 60%, 100% { left: 118%; } }

.about-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: var(--sp-md); align-items: start; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1.6fr 1fr; gap: var(--sp-lg); } }
.about-copy h2 { font-size: var(--fs-lg); margin-top: var(--sp-2xs); max-width: 22ch; }
.about-copy p { margin-top: var(--sp-sm); color: var(--ink-soft); font-size: var(--fs-sm); line-height: 1.78; max-width: 64ch; }

.purity-card {
  position: relative; overflow: hidden; text-align: center;
  padding: var(--sp-md) var(--sp-sm);
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% -10%, rgba(211,176,115,0.14), transparent 68%), var(--bg-raised);
  box-shadow: var(--shadow-2);
}
.purity-card::after {
  content: ""; position: absolute; inset: -40%; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(211,176,115,0.13), transparent 58%);
  animation: glowPulse 8s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50%      { opacity: 0.9;  transform: scale(1.08); }
}
.purity-card > * { position: relative; z-index: 1; }
.purity-card .eyebrow { justify-content: center; }
.purity-row { display: flex; align-items: center; justify-content: center; gap: clamp(0.55rem, 2.2vw, 1.5rem); margin-top: var(--sp-sm); }
.purity-val { font-family: var(--font-display); font-size: clamp(1.55rem, 1.1rem + 2.5vw, 2.7rem); line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.purity-sep { width: 1px; align-self: stretch; min-height: 1.7em; background: linear-gradient(180deg, transparent, var(--line-strong), transparent); }
.purity-tagline { margin-top: var(--sp-sm); font-size: var(--fs-xs); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }

/* ===================== 08. PRODUCT GRID ===================== */
.catalogue-section { position: relative; overflow: hidden; padding-block: var(--sp-lg); }
.catalogue-section > .wrap { position: relative; z-index: 1; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-sm); }
.results-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-sm); font-size: var(--fs-xs); color: var(--ink-soft); letter-spacing: 0.03em; text-transform: uppercase; }

/* Slightly translucent so the drifting jewels glow faintly through the card body.
   Solid colour first: phones without color-mix() would otherwise drop the whole
   declaration and render the card fully transparent. */
.product-card { container-type: inline-size; background: var(--bg-raised); background: rgba(28, 25, 23, 0.84); background: color-mix(in srgb, var(--bg-raised) 84%, transparent); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; transition: transform var(--dur-mid) var(--ease), box-shadow var(--dur-mid) var(--ease); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); } }
.product-card .media-box { aspect-ratio: 1/1; border-radius: var(--radius-md) var(--radius-md) 0 0; }
.product-card img { transition: transform 0.5s var(--ease); }
@media (hover: hover) and (pointer: fine) { .product-card:hover img { transform: scale(1.06); } }
.product-badge { position: absolute; top: var(--sp-2xs); left: var(--sp-2xs); z-index: 1; padding: 4px 11px; border-radius: 999px; background: rgba(18, 16, 16, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: var(--gold-on-image); font-size: var(--fs-2xs); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.product-body { padding: var(--sp-xs) var(--sp-sm) var(--sp-sm); }
.product-cat { font-size: 0.66rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--gold); }
.product-style { font-family: var(--font-display); font-size: var(--fs-md); margin-top: 2px; font-variant-numeric: tabular-nums; }
.product-specs { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: var(--sp-2xs); font-size: var(--fs-2xs); color: var(--ink-soft); }
.product-specs span { display: inline-flex; align-items: center; gap: 3px; }
.product-specs b { color: var(--ink); font-weight: 600; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-sm); gap: var(--sp-2xs); }
.product-price { font-size: var(--fs-2xs); color: var(--ink-soft); font-style: italic; }
@container (max-width: 220px) { .product-body { padding: var(--sp-2xs) var(--sp-xs) var(--sp-xs); } .product-style { font-size: var(--fs-sm); } }

.skeleton-card { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); background: var(--bg-raised); }
.skeleton-media { aspect-ratio: 1/1; background: var(--bg-sunken); position: relative; overflow: hidden; }
.skeleton-body { padding: var(--sp-sm); }
.skeleton-line { height: 11px; border-radius: 4px; background: var(--bg-sunken); position: relative; overflow: hidden; margin-bottom: var(--sp-2xs); }
.skeleton-line.w-40 { width: 40%; height: 8px; }
.skeleton-line.w-70 { width: 70%; height: 15px; }
.skeleton-media::after, .skeleton-line::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--gold-tint-2), transparent); transform: translateX(-100%); animation: shine 1.6s ease-in-out infinite; }
@keyframes shine { 100% { transform: translateX(100%); } }

.empty-state { grid-column: 1/-1; text-align: center; padding: var(--sp-xl) var(--edge); color: var(--ink-soft); }
.empty-state svg { width: 40px; height: 40px; color: var(--gold-tint-2); margin: 0 auto var(--sp-sm); }

/* --- Pagination / load more --- */
.load-more-wrap { display: flex; justify-content: center; margin-top: var(--sp-lg); }

/* ===================== 09. MOBILE FILTER DRAWER ===================== */
.filter-drawer { position: fixed; inset: 0; z-index: 320; visibility: hidden; pointer-events: none; }
.filter-drawer .fd-backdrop { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity var(--dur-mid) var(--ease); }
.filter-drawer .fd-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--bg-raised); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: var(--sp-sm) var(--sp-md) calc(var(--sp-md) + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform var(--dur-mid) var(--ease); max-height: 80svh; overflow-y: auto; box-shadow: var(--shadow-3); }
.filter-drawer.is-open { visibility: visible; pointer-events: auto; }
.filter-drawer.is-open .fd-backdrop { opacity: 1; }
.filter-drawer.is-open .fd-sheet { transform: translateY(0); }
.fd-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 0 auto var(--sp-sm); }
.fd-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-sm); }
.fd-head h3 { font-size: var(--fs-md); }
.fd-cats { display: flex; flex-direction: column; gap: 2px; }
.fd-cat-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding-inline: var(--sp-2xs); border-radius: var(--radius-sm); font-size: var(--fs-sm); }
.fd-cat-row.active { background: var(--gold-tint); color: var(--gold); font-weight: 600; }
.modal-close { position: absolute; top: var(--sp-xs); right: var(--sp-xs); width: 42px; height: 42px; border-radius: 50%; background: var(--bg-raised); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; z-index: 2; }
@media (hover: hover) and (pointer: fine) { .modal-close:hover { border-color: var(--gold); color: var(--gold); } }
.modal-close svg { width: 16px; height: 16px; }
/* The modal footer's "Close" is a text button that only borrows the .modal-close
   hook for its click handler. Without this it inherits the round icon geometry,
   and border-radius:50% on a wide box renders as an oval. */
.modal-actions .btn.modal-close {
  width: auto; height: auto; min-height: 46px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--line-strong);
}

/* ===================== 10. PRODUCT QUICK-VIEW MODAL ===================== */
.modal-overlay { container-type: inline-size; position: fixed; inset: 0; z-index: 300; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: var(--sp-md); opacity: 0; visibility: hidden; transition: opacity var(--dur-mid) var(--ease), visibility var(--dur-mid) var(--ease); }
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal-panel { width: min(960px, 100%); max-height: 88vh; max-height: 88svh; overflow-y: auto; overscroll-behavior: contain; background: var(--bg-raised); border-radius: var(--radius-lg); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr; transform: translateY(28px) scale(0.97); opacity: 0; transition: transform 0.45s var(--ease), opacity 0.35s var(--ease); box-shadow: var(--shadow-3); }
.modal-overlay.is-open .modal-panel { transform: translateY(0) scale(1); opacity: 1; }
@container (min-width: 700px) { .modal-panel { grid-template-columns: 1fr 1fr; } }

.modal-gallery { position: relative; overflow: hidden; background: var(--bg-sunken); padding: var(--sp-md); }
/* Soft breathing glow behind the piece — subtle "showcase light". */
.gallery-glow {
  position: absolute; inset: -25%; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 42%, rgba(211,176,115,0.15), transparent 58%);
  animation: glowPulse 8s ease-in-out infinite;
}
/* Swipe surface: allow vertical page scroll, we handle horizontal ourselves. */
.gallery-stage { position: relative; z-index: 1; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: rgba(28, 25, 23, 0.9);
  background: color-mix(in srgb, var(--bg-raised) 90%, transparent);
  border: 1px solid var(--line); color: var(--ink);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.gallery-stage.has-multiple .gal-nav { display: flex; }
.gal-nav svg { width: 17px; height: 17px; }
.gal-prev { left: 10px; }
.gal-next { right: 10px; }
@media (hover: hover) and (pointer: fine) {
  .gal-nav:hover { border-color: var(--gold); color: var(--gold); }
  .gal-prev:hover { transform: translateY(-50%) translateX(-2px); }
  .gal-next:hover { transform: translateY(-50%) translateX(2px); }
}
.gallery-dots { display: none; justify-content: center; gap: 6px; margin-top: var(--sp-2xs); }
.gallery-stage.has-multiple .gallery-dots { display: flex; }
.gallery-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); transition: all var(--dur-fast) var(--ease); }
.gallery-dot.active { width: 18px; border-radius: 3px; background: var(--gold); }
.gallery-main { aspect-ratio: 1/1; margin-inline: auto; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; position: relative; background: radial-gradient(circle at 50% 42%, var(--bg-raised) 0%, var(--bg-sunken) 72%); }
/* No padding, so the photo reaches the frame edge and picks up its rounded
   corners; radius on the img too for browsers that don't clip replaced
   content to the parent's radius. contain keeps the piece uncropped. */
.gallery-main img { width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius-md); }
.gallery-main .expand-hint { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(28, 25, 23, 0.85); background: color-mix(in srgb, var(--bg-raised) 85%, transparent); display: flex; align-items: center; justify-content: center; }
.gallery-main .expand-hint svg { width: 15px; height: 15px; color: var(--gold); }
.gallery-thumbs { display: flex; gap: var(--sp-2xs); margin-top: var(--sp-xs); overflow-x: auto; padding-bottom: 2px; }
.gallery-thumb { flex: 0 0 auto; width: 58px; height: 58px; border-radius: var(--radius-sm); overflow: hidden; border: 1.5px solid var(--line); opacity: 0.65; transition: all var(--dur-fast) var(--ease); background: var(--bg-raised); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.gallery-thumb.active { border-color: var(--gold); opacity: 1; }

.modal-info { padding: var(--sp-md); display: flex; flex-direction: column; }
.modal-info h3 { font-size: var(--fs-lg); margin-top: 2px; font-variant-numeric: tabular-nums; }
.modal-details { margin-top: var(--sp-sm); border-top: 1px solid var(--line); padding-top: var(--sp-xs); }
.modal-details dl { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2xs) var(--sp-sm); }
.modal-details dt { font-size: var(--fs-xs); color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.modal-details dd { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.modal-price { margin-top: var(--sp-sm); font-family: var(--font-display); font-size: var(--fs-md); color: var(--gold); font-style: italic; }
.modal-actions { margin-top: auto; padding-top: var(--sp-md); display: flex; gap: var(--sp-2xs); flex-wrap: wrap; }
.modal-actions .btn { flex: 1 1 auto; }

@media (max-width: 900px) {
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal-panel { width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border: none; display: flex; flex-direction: column; }
  .modal-gallery { padding-top: max(var(--sp-md), env(safe-area-inset-top)); flex-shrink: 0; }
  .modal-info { flex: 1; }
  .modal-close { top: max(var(--sp-xs), env(safe-area-inset-top)); }
  .modal-actions { position: sticky; bottom: 0; background: var(--bg-raised); margin-inline: calc(var(--sp-md) * -1); margin-bottom: calc(var(--sp-md) * -1); padding: var(--sp-sm) var(--sp-md); padding-bottom: max(var(--sp-sm), env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
}

.lightbox { position: fixed; inset: 0; z-index: 340; background: rgba(0,0,0,0.94); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity var(--dur-fast); }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(94vw, 1100px); max-height: 88svh; object-fit: contain; border-radius: var(--radius-md); }
.lightbox-close { position: absolute; top: max(var(--sp-sm), env(safe-area-inset-top)); right: max(var(--sp-sm), env(safe-area-inset-right)); width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: #fff; }
.lightbox-close svg { width: 18px; height: 18px; }

/* ===================== 11. FOOTER ===================== */
.site-footer { padding-block: var(--sp-lg) var(--sp-md); border-top: 1px solid var(--line); background: var(--bg-sunken); }
.footer-top { display: grid; grid-template-columns: 1fr; gap: var(--sp-md); padding-bottom: var(--sp-md); }
.footer-brand p { margin-top: var(--sp-xs); color: var(--ink-soft); font-size: var(--fs-sm); max-width: 36ch; }
.footer-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--sp-sm); padding: 6px 14px; border-radius: 999px; background: var(--gold-tint); color: var(--gold); font-size: var(--fs-2xs); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.footer-col h4 { font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: var(--sp-sm); }
.footer-col .person { margin-bottom: var(--sp-sm); }
.footer-col .person strong { display: block; font-size: var(--fs-sm); }
.footer-col .person a { display: block; font-size: var(--fs-sm); color: var(--ink-soft); }
@media (hover: hover) and (pointer: fine) { .footer-col .person a:hover { color: var(--gold); } }
.footer-col p.addr { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.7; }
.footer-col p.addr strong { display: block; margin-bottom: 2px; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.footer-col p.addr + p.addr { margin-top: var(--sp-sm); }
.footer-col a.inline-link { font-size: var(--fs-sm); }
@media (hover: hover) and (pointer: fine) { .footer-col a.inline-link:hover { color: var(--gold); } }
.footer-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2xs); margin-top: var(--sp-sm); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: var(--sp-sm); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-2xs); font-size: var(--fs-2xs); color: var(--ink-soft); }

@media (min-width: 700px) {
  .footer-top { grid-template-columns: 1.3fr 1fr 1fr; }
}

/* ===================== 12. MOBILE STICKY CTA ===================== */
.mobile-cta { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 250; background: rgba(28, 25, 23, 0.96); background: color-mix(in srgb, var(--bg-raised) 96%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: var(--sp-2xs) max(var(--sp-sm), env(safe-area-inset-left)); padding-bottom: max(var(--sp-2xs), env(safe-area-inset-bottom)); box-shadow: 0 -12px 30px -20px rgba(0,0,0,0.35); }
.mobile-cta-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2xs); }
.mobile-cta a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; border-radius: var(--radius-xs); font-size: 0.64rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-soft); }
.mobile-cta a svg { width: 18px; height: 18px; color: var(--gold); }
.mobile-cta a.primary { color: var(--ink); background: var(--gold-tint); border-radius: var(--radius-sm); }

/* ===================== 13. UTILITIES ===================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===================== 14. RESPONSIVE ===================== */
@media (max-width: 700px) {
  .filter-toggle-btn { display: inline-flex; }
  .cat-tabs { display: none; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-2xs); }
  .mobile-cta { display: block; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

  /* Keep the name + tagline visible on phones, just tighter. */
  .brand-text { display: block; min-width: 0; }
  .brand-text strong { font-size: var(--fs-base); }
  .brand-text span { font-size: 0.6rem; letter-spacing: 0.1em; }
  .header-top { gap: var(--sp-2xs); }

  /* drop-shadow on ~100 elements is costly on budget GPUs and can stall the
     whole animation; keep just the cheap blur so they stay soft on phones. */
  .particle { filter: blur(0.7px); }

  .about-section { padding-block: var(--sp-md); }
  .modal-gallery { padding: var(--sp-sm); }
  .gal-nav { width: 46px; height: 46px; }
  .gal-prev { left: 6px; }
  .gal-next { right: 6px; }
}
@media (min-width: 701px) {
  .brand-text { display: block; }
}

/* Smooth momentum scrolling + no rubber-banding leak on the horizontal strips. */
.cat-tabs, .gallery-thumbs { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.gallery-thumbs { scrollbar-width: none; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
/* Anchor/scroll targets clear the sticky header. */
html { scroll-padding-top: calc(var(--nav-h) + 4.5rem); }

/* ===================== 15. ACCESSIBILITY / PRINT ===================== */
@media print {
  .site-header, .mobile-cta, .filter-drawer, .modal-overlay, .lightbox, .btn { display: none !important; }
  body { background: #fff; color: #000; padding-bottom: 0; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
