/* =====================================================================
   KRUVA HARDWARE - MAIN STYLESHEET
   Sections:
   1. Design tokens (colors, fonts, spacing) + light/dark mode
   2. Base and utilities
   3. Buttons and links
   4. Image placeholder system
   5. Loader, header, navigation
   6. Page transitions and scroll reveal
   7. Home: hero slider, marquee, categories, stats, why, process,
      testimonials, quote banner
   8. Catalog: toolbar, filters, product cards
   9. Product modal, gallery, lightbox
   10. About
   11. Contact
   12. Footer
   13. Reduced motion
   ===================================================================== */

/* ============ 1. DESIGN TOKENS ============ */
:root {
  /* Brand */
  /* Brand colours from the Kruva logo: red mark + navy wordmark */
  --charcoal: #16152E;        /* deep navy, used for dark sections */
  --steel: #353262;           /* logo navy */
  --steel-2: #45417A;
  --offwhite: #F5F6F7;
  --accent: #E01F26;          /* logo red */
  --accent-strong: #C3161C;   /* hover */
  --accent-text: #C3161C;     /* red text on light backgrounds, AA contrast */
  --on-accent: #FFFFFF;       /* text on red buttons */

  /* Theme (light) */
  --bg: #F5F6F7;
  --bg-alt: #ECEEF0;
  --surface: #FFFFFF;
  --text: #0F1419;
  --muted: #4B5563;
  --border: #DADFE4;
  --shadow: 0 18px 40px -18px rgba(15, 20, 25, .28);
  --shadow-hover: 0 28px 60px -22px rgba(15, 20, 25, .38);

  /* Placeholder panel */
  --ph-bg: #D9DEE3;
  --ph-line: rgba(43, 52, 64, .08);
  --ph-text: #4B5563;

  /* Type */
  --font-head: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;

  /* Shape and spacing */
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 72px;
  --container: 1240px;
  --gutter: 16px;
  --section-y: clamp(64px, 9vw, 120px);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Dark mode: follows the system unless the visitor picked light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111022; --bg-alt: #17162B; --surface: #1D1C33; --text: #F5F6F7;
    --muted: #AEB0C6; --border: #2E2C4A; --accent-text: #FF6B70;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); --shadow-hover: 0 28px 60px -22px rgba(0, 0, 0, .75);
    --ph-bg: #24233D; --ph-line: rgba(255, 255, 255, .05); --ph-text: #AEB0C6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111022; --bg-alt: #17162B; --surface: #1D1C33; --text: #F5F6F7;
  --muted: #AEB0C6; --border: #2E2C4A; --accent-text: #FF6B70;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); --shadow-hover: 0 28px 60px -22px rgba(0, 0, 0, .75);
  --ph-bg: #24233D; --ph-line: rgba(255, 255, 255, .05); --ph-text: #AEB0C6;
  color-scheme: dark;
}

@media (min-width: 768px) { :root { --gutter: 32px; } }

/* ============ 2. BASE ============ */
/* Anything marked hidden stays hidden, even if a class gives it a display value
   (e.g. the "Load more" button, which is a .btn with display: inline-flex) */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; margin-top: 40px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; transition: transform .2s; }
.skip-link:focus { transform: translateY(72px); }
.noscript { padding: 20px; text-align: center; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: 0 var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--charcoal); color: var(--offwhite); --muted: #AEB0C6; --border: #2E2C4A; --surface: #1D1C33; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.eyebrow { font: 600 .8rem/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 16px; display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--accent); }
.section--dark .eyebrow, .page-hero .eyebrow, .hero .eyebrow { color: #FF5A5F; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--muted); max-width: 640px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }

/* ============ 3. BUTTONS AND LINKS ============ */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem/1 var(--font-head); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transform: translate(var(--mx), var(--my));
  transition: transform .25s var(--ease), background-color .2s, border-color .2s, color .2s, box-shadow .25s;
}
.btn-lg { min-height: 54px; padding: 16px 30px; font-size: 1rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 24px -12px rgba(224, 31, 38, .75); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); }
.section--dark .btn-ghost, .hero .btn-ghost { color: var(--offwhite); border-color: rgba(255,255,255,.28); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color .2s, background-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.icon-btn--glass { background: rgba(15, 20, 25, .45); border-color: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* Animated underline links */
.u-link { position: relative; text-decoration: none; }
.u-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.u-link:hover::after, .u-link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); text-decoration: underline; cursor: pointer; }

/* ============ 4. IMAGE PLACEHOLDER SYSTEM ============
   Every image slot is a .media box with a fixed aspect ratio.
   The .ph placeholder always sits underneath; the real <img> fades in
   on top once it loads. If the file is missing, the <img> is removed
   and the placeholder stays. */
.media { position: relative; overflow: hidden; background: var(--ph-bg); border-radius: inherit; isolation: isolate; }
.ph {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px;
  color: var(--ph-text); text-align: center; padding: 12px;
  background-image:
    linear-gradient(var(--ph-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ph-line) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255,255,255,.08), transparent 60%);
  background-size: 24px 24px, 24px 24px, 100% 100%;
}
.ph svg { width: 30px; height: 30px; opacity: .7; }
.ph-label { font: 500 .78rem/1.3 var(--font-body); letter-spacing: .02em; opacity: .9; }
.ph-size { display: block; font-family: var(--font-head); font-weight: 600; opacity: .75; }
.media--dark { --ph-bg: #1D252E; --ph-line: rgba(255,255,255,.05); --ph-text: #8A96A3; }
.media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .6s ease, transform .8s var(--ease);
}
.media.is-loaded img { opacity: 1; }
.media.is-loaded .ph { visibility: hidden; }

/* ============ 5. LOADER, HEADER, NAV ============ */
.loader {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--charcoal); color: #fff;
  transition: opacity .6s ease, visibility .6s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-inner { display: grid; justify-items: center; gap: 16px; }
.loader-name { font: 700 1.6rem/1 var(--font-head); letter-spacing: .4em; padding-left: .4em; animation: rise .8s var(--ease) both .1s; }
.loader-bar { width: 140px; height: 2px; background: rgba(255,255,255,.15); overflow: hidden; border-radius: 2px; }
.loader-bar span { display: block; height: 100%; background: var(--accent); transform-origin: left; animation: load 1.1s var(--ease) both; }
.loader .logo-mark { animation: pop .7s var(--ease) both; }
@keyframes load { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pop { from { opacity: 0; transform: scale(.6) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h); color: #fff;
  transition: background-color .3s, border-color .3s, color .3s; border-bottom: 1px solid transparent;
}
.site-header.is-scrolled, .site-header.is-solid {
  background: color-mix(in srgb, var(--bg) 82%, transparent); color: var(--text);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--border);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
/* Kruva logo: triangle mark + wordmark. Light wordmark on dark header, navy when the header turns light */
/* wordmark image includes the tagline "SIGNIFY YOUR PRECIOUS CHOICE" under KRUVA */
.logo { gap: 12px; }
.logo-mark-img { height: 44px; width: auto; }
.logo-word { height: 42px; width: auto; }
@media (max-width: 899px) { .logo { gap: 10px; } .logo-mark-img { height: 38px; } .logo-word { height: 36px; } }
.logo-word--dark { display: none; }
.site-header.is-scrolled .logo-word--light, .site-header.menu-open .logo-word--light { display: none; }
.site-header.is-scrolled .logo-word--dark, .site-header.menu-open .logo-word--dark { display: block; }
:root[data-theme="dark"] .site-header .logo-word--light { display: block; }
:root[data-theme="dark"] .site-header .logo-word--dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header .logo-word--light { display: block; }
  :root:not([data-theme="light"]) .site-header .logo-word--dark { display: none; }
}
.loader-logo { width: min(220px, 56vw); height: auto; animation: pop .8s var(--ease) both; }
.footer-logo { display: inline-block; margin-bottom: 18px; }
.footer-logo img { width: 180px; height: auto; }
.logo-mark {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent); color: #111; font: 700 1.25rem/1 var(--font-head);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}
.logo-mark--lg { width: 64px; height: 64px; font-size: 2rem; border-radius: 16px; }
.logo-text { display: grid; font: 700 1.2rem/1 var(--font-head); letter-spacing: .16em; }
.logo-text small { font: 500 .62rem/1.4 var(--font-body); letter-spacing: .3em; text-transform: uppercase; opacity: .7; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 32px; }
.nav-link { font: 500 .95rem/1 var(--font-head); padding: 8px 0; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.site-header .icon-btn { background: transparent; color: inherit; border-color: color-mix(in srgb, currentColor 25%, transparent); }
#themeToggle .i-sun { display: none; }
:root[data-theme="dark"] #themeToggle .i-sun { display: block; }
:root[data-theme="dark"] #themeToggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #themeToggle .i-sun { display: block; }
  :root:not([data-theme="light"]) #themeToggle .i-moon { display: none; }
}
.nav-cta-mobile { display: none; }
.menu-toggle { display: none; }
.burger { display: grid; gap: 5px; width: 20px; }
.burger span { height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.menu-toggle[aria-expanded="true"] .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 899px) {
  .menu-toggle { display: inline-grid; }
  .header-cta { display: none; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto; height: calc(100dvh - var(--header-h));
    background: var(--bg); color: var(--text); padding: 32px var(--gutter);
    display: flex; flex-direction: column; gap: 32px;
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity .3s, transform .3s var(--ease), visibility .3s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .main-nav ul { flex-direction: column; gap: 8px; }
  .nav-link { display: block; font-size: 1.8rem; padding: 10px 0; }
  .nav-link.u-link::after { bottom: 2px; right: auto; width: 40px; }
  .nav-cta-mobile { display: inline-flex; align-self: flex-start; }
  .site-header.menu-open { background: var(--bg); color: var(--text); border-bottom-color: var(--border); }
}

/* ============ 6. PAGE TRANSITIONS AND REVEAL ============ */
/* "backwards" (not "both") so no transform lingers after the fade:
   a lingering transform would trap the fixed filter drawer under the header */
.page { animation: pageIn .55s var(--ease) backwards; }
.page.is-leaving { animation: pageOut .22s ease forwards; }
@keyframes pageIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pageOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Dark page heading band used on Catalog, About, Contact */
.page-hero {
  position: relative; overflow: hidden; background: var(--charcoal); color: var(--offwhite);
  padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) 0 clamp(48px, 7vw, 88px);
}
.page-hero .lead { color: #C2C4D8; }
.page-hero .container { position: relative; }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
}

/* ============ 7. HOME ============ */
/* --- Hero slider --- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; background: var(--charcoal); color: #fff; overflow: hidden; }
.hero-grid { z-index: 1; }
.hero-slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.2s ease, visibility 1.2s; }
.slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero { touch-action: pan-y; }
.slide-parallax { position: absolute; inset: -6% 0; transform: translate3d(0, var(--hp, 0px), 0); will-change: transform; }
.slide-media { position: absolute; inset: 0; border-radius: 0; transform: scale(1.12); }
.slide.is-active .slide-media { animation: kenburns 9s linear both; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.slide-media .media { position: absolute; inset: 0; height: 100%; aspect-ratio: auto !important; }   /* fill the whole hero at any screen shape */
.slide-media .ph { place-content: start end; padding: calc(var(--header-h) + 56px) 10% 0 0; }
.slide::after { /* readability shade over the photo */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(15,20,25,.88) 0%, rgba(15,20,25,.55) 55%, rgba(15,20,25,.25) 100%),
              linear-gradient(0deg, rgba(15,20,25,.7), transparent 40%);
}
.slide-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-top: var(--header-h); padding-bottom: 96px; }
.slide-title { font-size: clamp(2.4rem, 7vw, 5.6rem); max-width: 14ch; margin-bottom: 24px; }
.slide-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.slide-title .w > span { display: inline-block; transform: translateY(110%); transition: transform .9s var(--ease); transition-delay: calc(var(--i) * 70ms + .25s); }
.slide.is-active .slide-title .w > span { transform: none; }
.slide-sub, .slide-cta { opacity: 0; transform: translateY(16px); transition: opacity .8s ease .7s, transform .8s var(--ease) .7s; }
.slide-sub { font-size: clamp(1.02rem, 1.6vw, 1.25rem); color: #C9D1D9; max-width: 560px; margin-bottom: 32px; }
.slide.is-active .slide-sub, .slide.is-active .slide-cta { opacity: 1; transform: none; }
.slide-cta { display: flex; flex-wrap: wrap; gap: 12px; transition-delay: .85s; }

.hero-controls { position: absolute; left: 0; right: 0; bottom: 28px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-inline: auto; }
.hero-dots { display: flex; gap: 8px; flex: 1; max-width: 420px; }
.hero-dot { flex: 1; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; }
.hero-dot span { display: block; width: 100%; height: 3px; background: rgba(255,255,255,.25); border-radius: 3px; overflow: hidden; }
.hero-dot i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.hero-dot.is-done i { transform: scaleX(1); }
.hero-dot.is-active i { animation: dotfill 6s linear both; }
.hero.is-paused .hero-dot.is-active i { animation-play-state: paused; }
@keyframes dotfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-arrows { display: flex; gap: 8px; }
#heroPause .i-play { display: none; }
.hero.is-user-paused #heroPause .i-play { display: block; }
.hero.is-user-paused #heroPause .i-pause { display: none; }

/* --- 3D product stage (slides with a "product" in site.json) ---
   Layers, back to front: glow, faint logo triangle, pedestal ring, ground shadow, floating product.
   --tx / --ty come from the mouse position (js), --pr / --ps from site.json (rotate / scale). */
.slide.has-product .slide-media .ph > * { display: none; }          /* no "Hero image" label behind the product */
.slide.has-product::after { background: linear-gradient(90deg, rgba(22,21,46,.92) 0%, rgba(22,21,46,.6) 50%, rgba(22,21,46,.35) 100%), linear-gradient(0deg, rgba(22,21,46,.7), transparent 40%); }
.slide-stage {
  position: absolute; z-index: 2; pointer-events: none;
  right: 3%; top: calc(var(--header-h) + 4%); bottom: 14%; width: min(48vw, 740px);
  perspective: 1100px;
}
.hero { --tx: 0; --ty: 0; }
.stage-tilt {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateY(calc(var(--tx) * 16deg)) rotateX(calc(var(--ty) * -12deg));
  transition: transform .6s var(--ease);
}
.stage-glow {
  position: absolute; left: 50%; top: 50%; width: 80%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(224,31,38,.38) 0%, rgba(83,78,160,.22) 38%, transparent 68%);
  border-radius: 50%;
}
.stage-mark {
  position: absolute; left: 50%; top: 46%; width: 64%; height: auto; opacity: .1;
  transform: translate(-50%, -50%) translateZ(-120px);
}
.stage-ring {
  position: absolute; left: 50%; bottom: 10%; width: 62%; aspect-ratio: 1;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.18);
  background: radial-gradient(circle, rgba(255,255,255,.08), transparent 65%);
  box-shadow: 0 0 0 18px rgba(255,255,255,.03), 0 0 60px rgba(224,31,38,.25) inset;
  transform: translateX(-50%) rotateX(76deg);
}
.stage-shadow {
  position: absolute; left: 50%; bottom: 22%; width: 52%; height: 7%; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.6), transparent 70%);
  transform: translateX(-50%);
  animation: stageShadow 6s ease-in-out infinite;
}
.stage-float {
  position: absolute; inset: 12% 9% 25%; display: grid; place-items: center;
  transform: translateZ(60px); transform-style: preserve-3d;
}
.stage-bob { width: 100%; height: 100%; display: grid; place-items: center; animation: stageFloat 6s ease-in-out infinite; }
/* whole slide is clickable; the product itself is a link to its details */
.slide.is-active { cursor: pointer; }
.stage-link { pointer-events: auto; display: grid; place-items: center; width: 100%; height: 100%; border-radius: var(--radius); cursor: pointer; }
.stage-link .stage-product { transition: transform .5s var(--ease); }
.stage-link:hover .stage-product, .stage-link:focus-visible .stage-product { transform: rotate(var(--pr)) scale(calc(var(--ps) * 1.05)); }
.stage-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.stage-product {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  transform: rotate(var(--pr)) scale(var(--ps));
  filter: drop-shadow(0 30px 28px rgba(0,0,0,.55)) drop-shadow(0 6px 8px rgba(0,0,0,.35));
}
@keyframes stageFloat { 0%, 100% { transform: translateY(0) rotateZ(0deg); } 50% { transform: translateY(-16px) rotateZ(-1.5deg); } }
@keyframes stageShadow { 0%, 100% { transform: translateX(-50%) scale(1); opacity: .9; } 50% { transform: translateX(-50%) scale(.82); opacity: .55; } }
.stage-tag {
  position: absolute; right: 6%; bottom: 6%; margin: 0; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap;
  padding: 8px 14px; border-radius: 999px; font: 500 .82rem/1 var(--font-head); letter-spacing: .04em; color: #E6E7F2;
  background: rgba(22,21,46,.55); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.stage-tag strong { color: #fff; font-weight: 700; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.25); }

/* Entrance: product swings in from the right in 3D when its slide becomes active */
.slide-stage .stage-tilt > *, .stage-tag { opacity: 0; transition: opacity .9s ease .2s, transform 1.1s var(--ease) .15s; }
.slide-stage .stage-float { transform: translateZ(60px) translateX(18%) rotateY(-35deg); }
.slide.is-active .slide-stage .stage-tilt > * { opacity: 1; }
.slide.is-active .slide-stage .stage-mark { opacity: .1; }
.slide.is-active .slide-stage .stage-float { transform: translateZ(60px); }
.slide.is-active .stage-tag { opacity: 1; transition-delay: .9s; }

/* Text column stays on the left when a product is shown */
@media (min-width: 900px) {
  .slide.has-product .slide-content > * { max-width: min(48vw, 620px); }
  .slide.has-product .slide-title { font-size: clamp(2.4rem, 5.4vw, 5rem); }
}
/* Phones and tablets: product on top, text below */
@media (max-width: 899px) {
  .hero { min-height: 680px; }
  .slide-stage { left: 4%; right: 4%; width: auto; top: calc(var(--header-h) + 4px); bottom: auto; height: 34%; }
  .stage-tag { bottom: -4px; right: 50%; transform: translateX(50%); font-size: .74rem; padding: 6px 12px; }
  .slide.is-active .stage-tag { transform: translateX(50%); }
  .slide.has-product .slide-content { justify-content: flex-end; padding-bottom: 104px; }
  .slide.has-product .slide-title { font-size: clamp(2rem, 9vw, 3rem); margin-bottom: 14px; }
  .slide.has-product .slide-sub { font-size: .98rem; margin-bottom: 20px; }
  .slide.has-product .slide-cta .btn-lg { min-height: 46px; padding: 12px 20px; font-size: .92rem; }
  .slide.has-product::after { background: linear-gradient(0deg, rgba(22,21,46,.95) 35%, rgba(22,21,46,.45) 70%, rgba(22,21,46,.3) 100%); }
}

/* --- Highlights marquee --- */
.marquee { background: var(--accent); color: #fff; overflow: hidden; border-block: 1px solid rgba(0,0,0,.1); }
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 14px; padding: 18px 28px; font: 600 1rem/1 var(--font-head); white-space: nowrap; }
.marquee-item small { font: 500 .85rem/1 var(--font-body); opacity: .85; }
.marquee-item::after { content: ""; width: 0; height: 0; margin-left: 28px; border: 6px solid transparent; border-bottom: 10px solid #fff; border-top: 0; } /* small triangle, echoing the logo mark */
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Category cards --- */
.cat-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1200px) { .cat-grid { grid-template-columns: repeat(5, 1fr); } .cat-card .media { aspect-ratio: 3 / 4 !important; } .cat-body { padding: 48px 18px 18px; } .cat-body h3 { font-size: 1.15rem; } }
.cat-card {
  position: relative; display: block; overflow: hidden; text-decoration: none; color: #fff;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--steel);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.cat-card .media { aspect-ratio: 4 / 3; }
.cat-card .media img, .cat-card .media .ph { transition: transform .8s var(--ease); }
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.cat-card:hover .media img, .cat-card:hover .media .ph { transform: scale(1.06); }
.cat-card .ph { place-content: start center; padding-top: 9%; }
.cat-body { position: absolute; inset: auto 0 0; z-index: 2; padding: 64px 22px 22px; background: linear-gradient(0deg, rgba(15,20,25,.92) 30%, transparent); }
.cat-body h3 { font-size: 1.35rem; margin-bottom: 6px; }
.cat-body p { margin: 0; color: #C9D1D9; font-size: .92rem; }
.cat-arrow { position: absolute; top: 16px; right: 16px; z-index: 2; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: #fff; transform: scale(.8) rotate(-45deg); opacity: 0; transition: transform .35s var(--ease), opacity .35s; }
.cat-card:hover .cat-arrow, .cat-card:focus-visible .cat-arrow { opacity: 1; transform: none; }

/* --- Stats --- */
.stats-section { position: relative; overflow: hidden; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
@media (min-width: 900px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { border-left: 2px solid var(--accent); padding-left: 18px; }
.stat-num { font: 700 clamp(2.4rem, 6vw, 4rem)/1 var(--font-head); letter-spacing: -.03em; display: block; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.stat-label { color: #A7B0BA; font-size: .95rem; }

/* --- Why choose us --- */
.why-grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .why-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (min-width: 1100px) { .why-grid { grid-template-columns: repeat(4, 1fr); } }
.why-card { padding: 28px; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.why-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.why-icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-text); margin-bottom: 20px; }
.why-card p { color: var(--muted); margin: 0; font-size: .95rem; }

/* --- Process timeline --- */
.process { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 700px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .process { grid-template-columns: repeat(6, 1fr); gap: 0; } }
.process li { position: relative; padding: 24px; counter-increment: step; }
.process li::before { content: "0" counter(step); display: block; font: 700 2.2rem/1 var(--font-head); color: var(--accent-text); margin-bottom: 18px; }
.process h3 { font-size: 1.05rem; }
.process p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (min-width: 1100px) {
  .process li { padding: 28px 20px 0 0; }
  .process li::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--border); }
  .process li .bar { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease); transition-delay: var(--d, 0s); z-index: 1; }
  .process li.is-visible .bar { transform: scaleX(1); }
  .process li .dot { position: absolute; top: -5px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); z-index: 2; }
}
@media (max-width: 1099px) { .process li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); } .process .bar, .process .dot { display: none; } }

/* --- Testimonials --- */
.t-nav { display: flex; gap: 8px; }
.t-track { display: grid; grid-auto-flow: column; grid-auto-columns: 88%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 8px; scrollbar-width: none; }
.t-track::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .t-track { grid-auto-columns: calc(50% - 12px); gap: 24px; } }
@media (min-width: 1100px) { .t-track { grid-auto-columns: calc(33.333% - 16px); } }
.t-card { scroll-snap-align: start; padding: 32px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.t-card blockquote { margin: 0; font-size: 1.05rem; line-height: 1.6; }
.t-card blockquote::before { content: "\201C"; display: block; font: 700 3.5rem/0.6 var(--font-head); color: var(--accent); margin-bottom: 12px; }
.t-card figcaption { font-size: .9rem; color: var(--muted); }
.t-card figcaption strong { display: block; color: var(--text); font-family: var(--font-head); }

/* --- Quote banner --- */
.quote-banner {
  position: relative; overflow: hidden; display: grid; gap: 24px; align-items: center;
  padding: clamp(32px, 6vw, 64px); border-radius: calc(var(--radius) + 6px);
  background: var(--charcoal); color: #fff;
  background-image: radial-gradient(circle at 100% 0%, rgba(224,31,38,.35), transparent 50%);
}
.quote-banner p { color: #B9C2CC; margin: 0; max-width: 560px; }
@media (min-width: 900px) { .quote-banner { grid-template-columns: 1fr auto; } }

/* ============ 8. CATALOG ============ */
.catalog { padding-block: 32px var(--section-y); }
.catalog-toolbar { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 24px; position: sticky; top: var(--header-h); z-index: 20; padding-block: 12px; background: var(--bg); }
.search { grid-column: 1 / -1; position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 16px; color: var(--muted); }
.search input, .select select, .field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); transition: border-color .2s, box-shadow .2s;
}
.search input { padding-left: 44px; border-radius: 999px; }
.search input:focus, .select select:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.select select { border-radius: 999px; padding-right: 36px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B7280' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.view-toggle { display: none; gap: 6px; }
.filter-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .75rem; }
@media (min-width: 600px) {
  .catalog-toolbar { grid-template-columns: 1fr auto auto auto; }
  .search { grid-column: auto; }
  .view-toggle { display: flex; }
}

.catalog-body { display: grid; gap: 32px; }
@media (min-width: 1000px) {
  .catalog-body { grid-template-columns: 250px 1fr; }
  .filter-open { display: none; }
  .catalog-toolbar { grid-template-columns: 1fr auto auto; }
}

/* Filters: drawer on mobile, sidebar on desktop */
.filter-panel { align-self: start; }
.filter-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.filter-head h2 { font-size: 1.2rem; margin: 0; }
.filter-group { padding: 4px 0; border-top: 1px solid var(--border); }
.filter-group summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-height: 44px; font: 600 .8rem/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::after { content: "+"; font-size: 1.2rem; font-weight: 500; }
.filter-group[open] summary::after { content: "\2212"; }
.filter-group .opts { border: 0; margin: 0 0 12px; padding: 0; display: grid; gap: 2px; min-width: 0; }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
.check .n { margin-left: auto; color: var(--muted); font-size: .8rem; }
.filter-foot { display: flex; gap: 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.filter-foot .btn { flex: 1; }
.filter-apply, .filter-close { display: none; }
.filter-backdrop { position: fixed; inset: 0; z-index: 140; background: rgba(15,20,25,.55); }

@media (max-width: 999px) {
  .filter-panel {
    position: fixed; inset: 0 auto 0 0; z-index: 150; width: min(340px, 88vw); overflow-y: auto;
    background: var(--bg); padding: 20px; border-right: 1px solid var(--border);
    transform: translateX(-105%); transition: transform .4s var(--ease); visibility: hidden;
  }
  .filter-panel.is-open { transform: none; visibility: visible; }
  .filter-apply, .filter-close { display: inline-flex; }
  .filter-foot { position: sticky; bottom: -20px; background: var(--bg); padding-bottom: 20px; }
}
@media (min-width: 1000px) {
  .filter-panel { position: sticky; top: calc(var(--header-h) + 90px); max-height: calc(100vh - var(--header-h) - 110px); overflow-y: auto; padding-right: 8px; }
  .filter-backdrop { display: none; }
}

.result-count { color: var(--muted); font-size: .92rem; margin-bottom: 16px; }
.empty-state { padding: 48px 0; text-align: center; color: var(--muted); }

/* Product grid and cards */
.product-grid { display: grid; gap: 16px; grid-template-columns: 1fr; perspective: 1200px; }
@media (min-width: 480px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (min-width: 1700px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  --rx: 0deg; --ry: 0deg;
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .5s var(--ease), box-shadow .4s, border-color .3s;
}
.product-card.is-tilting { transition: transform .1s linear, box-shadow .4s, border-color .3s; }
.product-card:hover { box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.product-card .media { border-radius: var(--radius) var(--radius) 0 0; }
.product-card .media img, .product-card .media .ph { transition: transform .8s var(--ease); }
.product-card:hover .media img, .product-card:hover .media .ph { transform: scale(1.07); }
.p-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.p-cat { font: 600 .72rem/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.p-name { font-size: 1.08rem; margin: 2px 0 0; }
.p-sku { font: 500 .8rem/1 var(--font-head); color: var(--muted); letter-spacing: .04em; }
.p-spec { font-size: .88rem; color: var(--muted); margin: 4px 0 12px; }
.p-actions { margin-top: auto; display: flex; gap: 8px; }
.p-actions .btn { min-height: 40px; padding: 10px 16px; font-size: .88rem; }
.quick-view { flex: 1; }
.p-desc { display: none; color: var(--muted); font-size: .92rem; }
.product-card { cursor: pointer; }

/* List view */
.product-grid.is-list { grid-template-columns: 1fr; }
.product-grid.is-list .product-card { flex-direction: row; }
.product-grid.is-list .product-card .media { width: clamp(130px, 28%, 240px); flex: none; border-radius: var(--radius) 0 0 var(--radius); }
.product-grid.is-list .p-desc { display: block; }
@media (max-width: 599px) { .product-grid.is-list .product-card { flex-direction: column; } .product-grid.is-list .product-card .media { width: 100%; } }

/* Packing information */
/* Cards are added per row only when each one is at least 270px wide, so table rows never wrap */
.packing-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
@media (min-width: 1100px) { .packing-grid { gap: 20px; } }
.packing-card { padding: 20px; }
.packing-card h3 { font-size: 1rem; margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.packing-card table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .85rem; font-variant-numeric: tabular-nums; }
.packing-card .pk-size { width: 44%; }
.packing-card .pk-pcs { width: 24%; }
.packing-card .pk-box { width: 32%; }
.packing-card th, .packing-card td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.packing-card th { font-weight: 600; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .02em; padding: 0 8px 8px 0; }
.packing-card td { padding: 8px 8px 8px 0; border-top: 1px solid var(--border); line-height: 1.3; }
.packing-card th:last-child, .packing-card td:last-child { padding-right: 0; }
.packing-card .pk-note { color: var(--muted); }

/* ============ 9. MODAL, GALLERY, LIGHTBOX ============ */
dialog { padding: 0; border: 0; color: var(--text); }
dialog::backdrop { background: rgba(10, 14, 18, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal {
  width: min(1100px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border-radius: calc(var(--radius) + 4px);
  background: var(--bg); border: 1px solid var(--border); overflow: hidden;
}
.modal[open] { animation: modalIn .4s var(--ease) both; }
.modal[open]::backdrop { animation: fadeIn .3s ease both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-inner { position: relative; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.modal-close { position: sticky; top: 12px; float: right; margin: 12px 12px -56px 0; z-index: 5; }
.modal-body { padding: 20px; display: grid; gap: 28px; }
@media (min-width: 900px) { .modal-body { grid-template-columns: 1.05fr 1fr; padding: 32px; gap: 40px; } }
.modal-info h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 8px; padding-right: 48px; }
.modal-info .p-desc { display: block; font-size: 1rem; margin-bottom: 20px; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: .95rem; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--border); }
.spec-table th { color: var(--muted); font-weight: 500; width: 38%; }
.finish-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.finish-chips li { font-size: .8rem; line-height: 1.3; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.spec-table td { vertical-align: top; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.related { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 24px; }
.related h3 { margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.related-item { display: block; text-align: left; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; overflow: hidden; transition: border-color .2s, transform .3s var(--ease); }
.related-item:hover { border-color: var(--accent); transform: translateY(-3px); }
.related-item .media { aspect-ratio: 1; border-radius: 0; }
.related-item .media .ph-label { display: none; }
.related-item span.r-name { display: block; padding: 10px 12px; font: 600 .85rem/1.3 var(--font-head); }

/* Gallery (js/viewer.js) */
.gallery-main {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1000 / 846; cursor: zoom-in;
  box-shadow: 0 30px 50px -30px rgba(15,20,25,.55); /* soft floating shadow */
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.gallery-main .media { position: absolute; inset: 0; }
.gallery-main .media img, .gallery-main .media .ph { transition: transform .6s var(--ease); }
.gallery-main:hover .media img { transform: scale(1.05); }
.gallery-main button.g-zoom { position: absolute; inset: 0; z-index: 3; border: 0; background: none; cursor: zoom-in; }
.zoom-hint { position: absolute; right: 12px; bottom: 12px; z-index: 4; pointer-events: none; display: inline-flex; gap: 6px; align-items: center; font-size: .78rem; padding: 6px 10px; border-radius: 999px; background: rgba(15,20,25,.65); color: #fff; }
.gallery-thumbs[hidden] { display: none; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; padding: 4px 2px; }
.g-thumb { flex: none; width: 76px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; transition: border-color .2s; }
.g-thumb .media { aspect-ratio: 1; border-radius: 8px; }
.g-thumb .ph-label { display: none; }
.g-thumb .ph svg { width: 18px; height: 18px; }
.g-thumb[aria-current="true"] { border-color: var(--accent); }
.viewer-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.viewer-tabs button { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: 600 .82rem/1 var(--font-head); }
.viewer-tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.spin-stage { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--ph-bg); cursor: grab; touch-action: pan-y; }
.spin-stage img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.spin-stage model-viewer { width: 100%; height: 100%; }

/* Lightbox */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(10,14,18,.96); color: #fff; }
.lightbox[open] { display: grid; place-items: center; animation: fadeIn .3s ease both; }
.lb-stage { width: min(92vw, 1100px, calc(82dvh * 1000 / 846)); aspect-ratio: 1000 / 846; overflow: hidden; border-radius: var(--radius); cursor: zoom-in; }
.lb-stage .media { width: 100%; height: 100%; }
.lb-stage .media img, .lb-stage .media .ph { transition: transform .45s var(--ease); }
.lb-stage.is-zoomed { cursor: zoom-out; }
.lb-stage.is-zoomed .media img, .lb-stage.is-zoomed .media .ph { transform: scale(2.2); }
.lb-close { position: fixed; top: 16px; right: 16px; z-index: 3; }
.lb-prev, .lb-next { position: fixed; top: 50%; z-index: 3; transform: translateY(-50%); }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-caption { position: fixed; bottom: 12px; left: 0; right: 0; text-align: center; font-size: .9rem; color: #B9C2CC; margin: 0; }

/* ============ 10. ABOUT ============ */
.about-story { display: grid; gap: 48px; }
@media (min-width: 1000px) { .about-story { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; } #storyText { position: sticky; top: calc(var(--header-h) + 40px); } }
#storyText p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline-line { position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--accent); transform-origin: top; transform: scaleY(var(--p, 0)); }
.timeline li { position: relative; padding-bottom: 36px; }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline .year { font: 700 1.6rem/1 var(--font-head); color: var(--accent-text); display: block; margin-bottom: 8px; }
.timeline h3 { margin-bottom: 4px; }
.timeline p { color: var(--muted); margin: 0; }

.mission { font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 600; line-height: 1.25; max-width: 900px; }
.section-head .mission { margin-top: 4px; }
.values-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .values-grid { gap: 24px; } }
.value { padding: 30px; border: 1px solid #2E2C4A; border-radius: var(--radius); }
.value h3 { color: #FF5A5F; }
.value p { color: #C2C4D8; margin: 0; font-size: 1.05rem; }

.factory-grid { display: grid; gap: 16px; }
@media (min-width: 800px) { .factory-grid { grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; gap: 24px; } .factory-grid figure:first-child { grid-row: span 2; } }
.factory-grid figure, .team-grid figure { margin: 0; }
.factory-grid .media, .team-grid .media { border-radius: var(--radius); box-shadow: var(--shadow); }
.factory-grid .media { aspect-ratio: 4 / 3; }
@media (min-width: 800px) { .factory-grid figure:first-child .media { height: 100%; aspect-ratio: auto; min-height: 100%; } .factory-grid figure:first-child { display: flex; flex-direction: column; } .factory-grid figure:first-child .media { flex: 1; } }
figcaption.cap { margin-top: 10px; font-size: .9rem; color: var(--muted); }
.parallax-img .media img, .parallax-img .media .ph { transform: translateY(var(--py, 0)) scale(1.12); }

/* Leadership: cards keep a sensible width whether there are 2 or more people */
.team-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 340px)); }
.team-grid .media { aspect-ratio: 1; }
.team-grid h3 { margin: 16px 0 4px; }
.team-grid p { color: var(--muted); margin: 0; font-size: .92rem; }

/* ============ 11. CONTACT ============ */
.contact-layout { display: grid; gap: 24px; }
@media (min-width: 1000px) { .contact-layout { grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; } }
.contact-form { position: relative; padding: clamp(20px, 4vw, 40px); }
.contact-form h2 { font-size: 1.6rem; }
.form-note { color: var(--muted); font-size: .9rem; }
.form-grid { display: grid; gap: 18px; margin: 24px 0; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
.field label { display: block; font: 600 .88rem/1.2 var(--font-head); margin-bottom: 8px; }
.field textarea { resize: vertical; min-height: 130px; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #DC2626; }
.field-error { color: #DC2626; font-size: .84rem; margin: 6px 0 0; min-height: 0; }
:root[data-theme="dark"] .field-error { color: #F87171; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field-error { color: #F87171; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit-btn { width: 100%; }
@media (min-width: 640px) { .submit-btn { width: auto; } }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
.submit-btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { margin: 14px 0 0; font-size: .92rem; color: var(--muted); }
.form-status.is-error { color: #DC2626; }
.form-success { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; text-align: center; gap: 8px; padding: 32px; background: var(--surface); border-radius: var(--radius); animation: rise .5s var(--ease) both; }
.form-success[hidden] { display: none; }
.form-success svg { color: #16A34A; margin-bottom: 8px; }
.form-success p { color: var(--muted); }

.contact-side { display: grid; gap: 24px; }
.contact-list { list-style: none; margin: 0; padding: 8px 24px; }
.contact-list li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.contact-list li:last-child { border-bottom: 0; }
.c-icon { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-text); }
.c-label { display: block; font: 600 .75rem/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.contact-list a { font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--accent-text); }
.wa-btn { display: inline-flex; margin-top: 8px; min-height: 38px; padding: 8px 16px; background: #25D366; color: #0B2E17 !important; border-radius: 999px; font: 600 .85rem/1.4 var(--font-head); }
.map { overflow: hidden; position: relative; }
.map iframe { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; background: var(--ph-bg); }
.map-link { position: absolute; bottom: 12px; left: 12px; background: var(--surface); }

/* ============ 12. FOOTER ============ */
.site-footer { background: var(--charcoal); color: #C9D1D9; padding-top: 72px; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr; padding-bottom: 48px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; } }
.footer-brand .logo { color: #fff; margin-bottom: 18px; }
.footer-small { font-size: .9rem; color: #A3A6BF; max-width: 300px; }
.footer-title { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: .95rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 24px; border-top: 1px solid #2E2C4A; font-size: .85rem; color: #A3A6BF; }
.footer-bottom p { margin: 0; }

/* Back-to-top arrow (bottom right) */
.to-top {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90;
  width: 48px; height: 48px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--charcoal); color: #fff;
  box-shadow: 0 8px 24px rgba(15, 20, 25, .28);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.9);
  transition: opacity .3s, transform .3s var(--ease), visibility .3s, background-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); }
.to-top:hover svg:last-child { transform: translateY(-2px); }
.to-top svg:last-child { position: relative; transition: transform .2s; }
.to-top-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.to-top-ring circle { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--prog, 0)); }
.to-top:hover .to-top-ring circle { stroke: #fff; }
.to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (min-width: 768px) { .to-top { right: 28px; bottom: 28px; } }
body.is-locked .to-top { opacity: 0; visibility: hidden; }

/* ============ 13. REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-track [aria-hidden="true"] { display: none; }
  .gallery-main { animation: none; }
  .slide.is-active .slide-media { animation: none; transform: none; }
}
.packing-card td.pk-note { white-space: normal; overflow: visible; text-overflow: clip; }

/* Hidden buttons stay hidden even though .icon-btn sets a display value */
.icon-btn[hidden] { display: none; }
.filter-count[hidden] { display: none; }
/* the text column's empty area must not cover the product link */
.slide.has-product .slide-content { pointer-events: none; }
.slide.has-product .slide-content > * { pointer-events: auto; }

/* Contact form: hint, character counter, select error */
.field-hint { font-size: .84rem; margin: 6px 0 0; color: var(--muted); }
.field-hint button { background: none; border: 0; padding: 0; color: var(--accent-text); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.field-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.char-count { flex: none; font-size: .78rem; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.char-count.is-over { color: #DC2626; }
.field.has-error select { border-color: #DC2626; }
