/*
Theme Name: VividPix
Theme URI: https://vividpix.in
Author: VividPix Technologies
Author URI: https://vividpix.in
Description: A premium WooCommerce theme for VividPix LED matrix displays. Soft Showroom Lite — light lavender / peach palette, animated GIF hero, full WhatsApp checkout fallback, mobile-friendly. Works with Razorpay plugin for full payments.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vividpix
Tags: e-commerce, woocommerce, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   VividPix — Soft Showroom (Lite) Design Tokens
   Same variable names as before so existing inline styles
   inherit the new palette automatically.
   ============================================================ */

:root {
  /* Brand */
  --brand-violet: #6D0FC5;
  --brand-purple: #8A1FB8;
  --brand-magenta: #C813AC;
  --brand-pink: #E13F92;
  --brand-grad: linear-gradient(95deg, #6D0FC5 0%, #8A1FB8 35%, #C813AC 75%, #E13F92 100%);
  --brand-grad-soft: linear-gradient(135deg, rgba(109,15,197,0.10), rgba(225,63,146,0.10));

  /* Surfaces — REMAPPED to light theme but same variable names */
  --bg-0: #F3EBF6;         /* section bg (slightly purpler than page) */
  --bg-1: #FBF8FC;         /* page */
  --bg-2: #FFFFFF;         /* card */
  --bg-3: #F8F2FA;         /* elevated / hover bg */
  --bg-4: #EFE0F4;         /* pressed / chip bg */
  --line: rgba(26,11,38,0.08);
  --line-strong: rgba(26,11,38,0.16);

  /* Text */
  --fg-0: #1A0B26;
  --fg-1: #3D2B4C;
  --fg-2: #6B5A78;
  --fg-3: #A092AC;

  /* Soft showroom secondaries */
  --lav-50:  #F8F2FA;
  --lav-100: #EFE0F4;
  --lav-200: #E4CBED;
  --lav-300: #C9A5DC;
  --peach:   #FFC8B0;
  --peach-200: #FFD9C5;

  /* Accents */
  --ok: #2E9F66;
  --warn: #C08428;

  /* Typography */
  --font-display: "Space Grotesk", "Helvetica Neue", system-ui, sans-serif;
  --font-body: "Manrope", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Courier New", monospace;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Shadows */
  --shadow-glow: 0 30px 80px -20px rgba(200, 19, 172, 0.25), 0 10px 30px -10px rgba(109, 15, 197, 0.2);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.5) inset, 0 20px 50px -30px rgba(26,11,38,0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-1);
  color: var(--fg-0);
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(900px 600px at 90% -10%, rgba(225,63,146,0.10), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(109,15,197,0.08), transparent 65%),
    var(--bg-1);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

::selection { background: var(--brand-magenta); color: white; }

/* Typography helpers */
.font-display { font-family: var(--font-display); letter-spacing: -0.02em; }
.font-mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* ===== Layout ===== */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
}

/* ===== Nav (pill-style floating) ===== */
.nav {
  position: sticky; top: 16px; z-index: 50;
  margin: 16px auto 0;
  max-width: 1320px;
  padding: 0 20px;
}
.nav-inner {
  background: rgba(251,248,252,0.85);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px 10px 22px;
  display: flex; align-items: center; justify-content: space-between;
  height: auto;
  box-shadow: 0 8px 24px -8px rgba(26,11,38,0.08);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 22px; letter-spacing: -0.03em;
}
.nav-logo .mark {
  width: 28px; height: 28px;
  background: var(--brand-grad);
  border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: white;
  box-shadow: 0 4px 12px rgba(200,19,172,0.35);
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  color: var(--fg-1);
  transition: background .2s, color .2s;
}
.nav-link:hover { background: var(--bg-3); color: var(--fg-0); }
.nav-link.active { background: var(--fg-0); color: var(--bg-1); }
.nav-actions {
  display: flex; align-items: center; gap: 8px;
}
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--fg-0);
  position: relative;
  transition: background .2s, transform .2s;
}
.icon-btn:hover { background: var(--bg-4); }
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--brand-magenta);
  color: white;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
  border: 2px solid var(--bg-1);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600; font-size: 14px;
  border: 1px solid transparent;
  transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--brand-grad);
  color: white;
  box-shadow: 0 10px 28px -6px rgba(200,19,172,0.45);
}
.btn-primary:hover { box-shadow: 0 14px 32px -6px rgba(200,19,172,0.55); }
.btn-primary:disabled { background: var(--bg-4); color: var(--fg-3); box-shadow: none; cursor: not-allowed; transform: none; }
.btn-secondary {
  background: var(--bg-3);
  color: var(--fg-0);
  border-color: var(--line);
}
.btn-secondary:hover { background: var(--bg-4); border-color: var(--line-strong); }
.btn-dark {
  background: var(--fg-0);
  color: var(--bg-1);
}
.btn-dark:hover { background: var(--fg-1); }
.btn-ghost {
  background: transparent; color: var(--fg-1);
}
.btn-ghost:hover { color: var(--fg-0); }
.btn-lg { padding: 16px 26px; font-size: 15px; }

/* ===== Pill / chip ===== */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em;
  color: var(--fg-1);
}
.chip-glow {
  background: rgba(200,19,172,0.10);
  border-color: rgba(200,19,172,0.3);
  color: var(--brand-violet);
  font-weight: 600;
}

/* ===== Card ===== */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* ===== Section ===== */
section { padding: 96px 0; position: relative; }
@media (max-width: 720px) { section { padding: 64px 0; } }

.section-head {
  display: flex; flex-direction: column; gap: 16px;
  margin-bottom: 48px;
  max-width: 720px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}
.section-head p {
  font-size: 17px;
  color: var(--fg-1);
  line-height: 1.6;
  margin: 0;
  text-wrap: pretty;
}

/* ===== Gradient text ===== */
.grad-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== Product photo backdrop (lavender→peach) ===== */
.photo-bg {
  background: linear-gradient(160deg, var(--lav-50) 0%, var(--peach-200) 100%);
}
.photo-bg-cool {
  background: linear-gradient(160deg, var(--lav-50) 0%, var(--lav-100) 100%);
}
.photo-bg-warm {
  background: linear-gradient(160deg, var(--peach-200) 0%, var(--lav-100) 100%);
}
.photo-bg-dark {
  background: linear-gradient(160deg, #3D2B4C 0%, var(--fg-0) 100%);
  color: white;
}

/* ===== LED bezel (dark chassis around a GIF or live grid) ===== */
.led-bezel {
  background: #0A0710;
  border-radius: 10px;
  border: 4px solid #050308;
  padding: 12px;
  box-shadow: 0 30px 60px -25px rgba(10,7,16,0.5), inset 0 0 30px rgba(0,0,0,0.6);
  position: relative;
  overflow: hidden;
}
.led-bezel img {
  width: 100%; height: auto; border-radius: 2px;
  transition: filter .3s;
}
.led-bezel.mono img { filter: saturate(0) sepia(0.5) hue-rotate(290deg) saturate(8) brightness(0.8); }
.led-bezel.bit3 img { filter: saturate(2.5) contrast(2); }

/* For live (JS-rendered) LED dot grids, kept for product preview / app demo */
.led-matrix {
  display: grid;
  background: #000;
  padding: 14px;
  border-radius: 8px;
  border: 4px solid #0a0a0a;
  box-shadow:
    inset 0 0 0 1px #1a1a1a,
    inset 0 0 30px rgba(0,0,0,0.8),
    0 30px 60px -20px rgba(0,0,0,0.4);
  position: relative;
}
.led-matrix::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
  border-radius: 8px;
}
.led-dot {
  border-radius: 50%;
  background: #0a0a0a;
  transition: background 60ms linear;
}
.led-dot.on {
  box-shadow: 0 0 4px currentColor, 0 0 8px currentColor;
}

/* ===== Wavy SVG accent helper ===== */
.wave-accent {
  position: absolute;
  pointer-events: none;
  opacity: 0.4;
}

/* ===== Marquee ===== */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee {
  display: flex;
  overflow: hidden;
  gap: 64px;
  mask: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex; gap: 64px;
  animation: marquee 40s linear infinite;
  flex-shrink: 0;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
  background: var(--bg-1);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin: 0 0 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--fg-1); font-size: 14px; transition: color .2s; }
.footer ul a:hover { color: var(--fg-0); }
.footer-bottom {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--fg-3);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

/* ===== Cart Drawer ===== */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(26,11,38,0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(460px, 100vw);
  background: var(--bg-1);
  border-left: 1px solid var(--line);
  z-index: 101;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -30px 0 60px -20px rgba(26,11,38,0.15);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.drawer-foot { padding: 20px 24px; border-top: 1px solid var(--line); background: var(--bg-3); }

/* ===== Form ===== */
.input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--fg-0);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--brand-magenta); box-shadow: 0 0 0 4px rgba(200,19,172,0.1); }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--fg-0);
  color: var(--bg-1);
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 20px 40px -10px rgba(26,11,38,0.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6FE0A4;
  box-shadow: 0 0 8px #6FE0A4;
}

/* ===== Anim helpers ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s cubic-bezier(.2,.8,.2,1) both; }

/* ===== Spec table ===== */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.spec-table tr { border-top: 1px solid var(--line); }
.spec-table tr:first-child { border-top: none; }
.spec-table th, .spec-table td {
  text-align: left;
  padding: 16px 0;
  font-weight: 400;
  vertical-align: top;
}
.spec-table th {
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: 200px;
}
.spec-table td { color: var(--fg-0); }

/* utility */
.flex { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.relative { position: relative; }

/* ===== Mode pill (mono/3bit/12bit toggle) ===== */
.mode-pill {
  display: inline-flex;
  padding: 4px;
  background: var(--fg-0);
  border-radius: 999px;
  gap: 2px;
}
.mode-pill button {
  padding: 8px 14px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.55);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.mode-pill button.active {
  background: var(--brand-grad);
  color: white;
}

/* Responsive grids (drive layout from CSS, not inline JSX styles) */
.responsive-grid-2 { grid-template-columns: 1fr 1fr; }
.responsive-grid-3 { grid-template-columns: repeat(3, 1fr); }
.product-detail-grid { grid-template-columns: 1.1fr 1fr; }
.series-models-grid { grid-template-columns: repeat(3, 1fr); }

/* Stop grid children from blowing out their tracks: by default grid items have
   min-width: auto which expands to fit the largest content (e.g. a fixed-width
   LED panel). Forcing min-width: 0 makes the 1fr column honor the viewport. */
.product-detail-grid > *,
.responsive-grid-2 > *,
.responsive-grid-3 > *,
.series-models-grid > *,
.hero-grid > * { min-width: 0; }

/* Hard cap any embedded LED matrix at viewport width so it can't overflow */
.led-matrix { max-width: 100%; overflow: hidden; }
.led-bezel { max-width: 100%; }
.led-bezel img { max-width: 100%; height: auto; }

/* ============================================================
   MOBILE / TABLET RESPONSIVE
   ============================================================ */

/* Mobile menu styles (always loaded, hidden on desktop) */
.nav-burger { display: none; }
.nav-mobile-menu { display: none; }

/* ===== Tablet: ≤ 1024px ===== */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; }

  /* hero & most 2-col grids collapse */
  .hero-grid,
  .responsive-grid-2,
  .product-detail-grid,
  div[style*="grid-template-columns: 1.05fr 1fr"],
  div[style*="grid-template-columns: 1.1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1.2fr"],
  div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 56"],
  div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 48"] {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  /* series cards: stack image above text */
  div[style*="grid-template-columns: 1fr 1.3fr"],
  div[style*="grid-template-columns: 1.3fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* 4-up grids → 2-up */
  div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* In-this-series grid (dynamic repeat(N,1fr)) → 2-up on tablet */
  .responsive-grid-3,
  .series-models-grid { grid-template-columns: 1fr 1fr !important; }

  /* footer 5-col → 2-col */
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
}

/* ===== Phone: ≤ 720px ===== */
@media (max-width: 720px) {
  /* Tighter page padding & section gaps */
  .wrap { padding: 0 16px; }
  section { padding: 56px 0; }

  /* Force every responsive grid to a single column on phones */
  .responsive-grid-3,
  .responsive-grid-2,
  .product-detail-grid,
  .series-models-grid { grid-template-columns: 1fr !important; gap: 24px !important; }

  /* Breadcrumb on product detail: don't overflow on tiny screens */
  .breadcrumb { flex-wrap: wrap; row-gap: 6px; }

  /* Nav: keep pill shape but allow it to breathe */
  .nav { top: 12px; padding: 0 12px; }
  .nav-inner { padding: 8px 8px 8px 16px; }
  .nav-logo { font-size: 18px; }
  .nav-logo svg { width: 24px; height: 24px; }
  .icon-btn { width: 36px; height: 36px; }
  .nav-wa { display: none; }   /* WhatsApp icon is in mobile menu + floating button */

  /* Mobile dropdown menu */
  .nav-mobile-menu {
    display: block;
    position: fixed;
    top: 76px; left: 12px; right: 12px;
    background: rgba(251,248,252,0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 30px 60px -10px rgba(26,11,38,0.18);
    padding: 16px;
    z-index: 51;
    animation: fadeUp .25s ease-out both;
  }
  .nav-mobile-inner { display: flex; flex-direction: column; gap: 4px; }
  .nav-mobile-link {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 16px; font-weight: 500;
    color: var(--fg-1);
  }
  .nav-mobile-link:hover { background: var(--bg-3); }
  .nav-mobile-link.active { background: var(--fg-0); color: var(--bg-1); }

  /* Big headings: cap a bit lower than clamp default for phone readability */
  .section-head h2 { font-size: 30px; }
  .section-head p { font-size: 15px; }

  /* All 3-up grids → 1 col */
  div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* All 2-up grids → 1 col (catches everything we missed at tablet) */
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* 4-up → 1 col on small phones */
  div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  /* Footer 5-col → 1 col on phones */
  .footer-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  /* Series cards: reduce padding inside */
  div[style*="grid-template-columns: 1fr 1.3fr"] > div,
  div[style*="grid-template-columns: 1.3fr 1fr"] > div {
    padding: 28px !important;
  }

  /* Showroom & CTA cards: reduce padding */
  div[style*="padding: 80px 64px"] { padding: 40px 24px !important; }
  div[style*="padding: 64px"] { padding: 32px 20px !important; }
  div[style*="padding: 48px"] { padding: 28px !important; }
  div[style*="padding: 36px 28px"] { padding: 24px 20px !important; }

  /* Buttons full-width on small screens when in a hero / CTA flex */
  .hero-grid .btn-lg,
  .btn-lg { font-size: 14px; padding: 13px 20px; }

  /* Floating WhatsApp: shrink to circular icon only */
  .floating-wa { padding: 0 !important; width: 56px; height: 56px; justify-content: center !important; bottom: 16px !important; right: 16px !important; }
  .floating-wa .fwa-label { display: none; }

  /* Cart drawer: full width on small phones */
  .drawer { width: 100% !important; max-width: 100vw; }

  /* Product detail: reduce empty space around the image on phones */
  .product-photo-stage { min-height: 280px !important; padding: 20px !important; }
  .product-photo-stage img { max-height: 220px !important; }

  /* Spec table: stack the rows */
  .spec-table th, .spec-table td { display: block; width: auto; padding: 8px 0 !important; }
  .spec-table th { padding-top: 16px !important; }
  .spec-table tr { padding: 4px 0; }

  /* Body-level safety net so any stray fixed-width element can't break the page */
  html, body { overflow-x: hidden; max-width: 100vw; }

  /* Thumbnails row on product page should wrap */
  .flex.gap-3.mt-4 { flex-wrap: wrap; }

  /* Quantity + add-to-cart row: wrap when narrow */
  .product-detail-grid .btn-lg { flex-shrink: 1; min-width: 0; }

  /* Hero strip: stack feature pills */
  div[style*="background: rgba(255,255,255,0.55)"][style*="border-radius: 20px"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  /* Product detail: thumbnails wrap */
  div[style*="display: grid"][style*="grid-template-columns: repeat(3, 1fr)"][style*="gap: 20"] {
    grid-template-columns: 1fr !important;
  }

  /* Floating button taps shouldn't be hidden by browser chrome */
  body { padding-bottom: env(safe-area-inset-bottom, 0); }

  /* Reduce LED bezel image padding on tiny screens */
  .led-bezel { padding: 8px; }

  /* Mode pill: shrink slightly */
  .mode-pill button { padding: 7px 10px; font-size: 10px; }

  /* Tables / structured grids inside cards */
  div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 16"],
  div[style*="grid-template-columns: 1fr 1fr"][style*="gap: 14"] {
    grid-template-columns: 1fr 1fr !important; /* keep 2-col for stat grids */
  }

  /* Quantity + Add-to-cart row stays horizontal but tighter */
  div[style*="display: inline-flex"][style*="border-radius: 999px"][style*="padding: 4px"] {
    flex-shrink: 0;
  }
}

/* ===== Small phone: ≤ 380px ===== */
@media (max-width: 380px) {
  div[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  .nav-logo span { display: none; }  /* hide wordmark, keep just pinwheel */
  .section-head h2 { font-size: 26px; }
}
