/* ==========================================================================
   RendrFY — Minimalist Modern 3D Printing Studio Design System
   Standalone CSS (Zero Node.js / Tailwind build step required)
   Source of truth: docs/DESIGN.md
   ========================================================================== */

:root {
  color-scheme: light;
  accent-color: #0052ff;

  /* Native scrollbar tokens (contrast >= 3:1) */
  --scrollbar-thumb: #94a3b8;
  --scrollbar-thumb-hover: #64748b;
  --scrollbar-track: #f1f5f9;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: auto;

  /* Typography Families */
  --font-display: "Calistoga", Georgia, serif;
  --font-primary: "Calistoga", Georgia, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-secondary: var(--font-sans);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Signature Electric Blue Brand Tokens */
  --accent: #0052ff;
  --accent-primary: #0052ff;
  --accent-secondary: #4d7cff;
  --accent-hover: #0045d8;
  --accent-subtle: rgba(0, 82, 255, 0.08);
  --accent-tint: rgba(0, 82, 255, 0.05);
  --accent-glow: rgba(0, 82, 255, 0.25);
  --accent-gradient: linear-gradient(to right, #0052ff, #4d7cff);
  --accent-gradient-br: linear-gradient(to bottom right, #0052ff, #4d7cff);
  --ring: #0052ff;

  /* Light Canvas & Elevated Surfaces */
  --bg: #fafafa;
  --bg-deep: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --surface-hover: #f1f5f9;
  --ink: #0f172a;
  --ink-secondary: #475569;
  --ink-muted: #64748b;
  --ink-subtle: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-hover: rgba(0, 82, 255, 0.3);
  --border-accent: rgba(0, 82, 255, 0.35);

  /* Inverted Contrast Surface Tokens */
  --bg-inverted: #0f172a;
  --ink-inverted: #fafafa;
  --ink-inverted-muted: #94a3b8;
  --border-inverted: rgba(255, 255, 255, 0.12);

  /* Semantic & E-Commerce Status Tokens */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-ink: #047857;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-ink: #b45309;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-ink: #b91c1c;
  --info: #0052ff;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  --star-rating: #f59e0b;

  /* Shadows & Glows (DESIGN.md 2.3) */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  --shadow-card-hover: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-accent: 0 4px 14px rgba(0, 82, 255, 0.25);
  --shadow-accent-lg: 0 8px 24px rgba(0, 82, 255, 0.35);
  --shadow-xl: 0 20px 30px -10px rgba(15, 23, 42, 0.14), 0 8px 12px -6px rgba(15, 23, 42, 0.06);

  /* Radii Scale */
  --radius-sm: 0.5rem;
  --radius-md: 0.625rem;
  --radius: 0.75rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-pill: 9999px;

  /* Layout Metrics */
  --container-max: 1280px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   1. Base Reset & Accessibility Foundations
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  accent-color: var(--accent);
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
  scroll-padding-top: 5.5rem;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

::selection {
  background-color: rgba(0, 82, 255, 0.15);
  color: #0052ff;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
  color: var(--ink);
}

h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}

p,
blockquote,
li {
  text-wrap: pretty;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
}

textarea {
  resize: vertical;
}

:where(a:any-link, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):user-invalid,
textarea:user-invalid,
select:user-invalid {
  border-color: var(--danger);
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  overscroll-behavior: contain;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -999px;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background-color: var(--ink);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus-visible {
  inset-block-start: 1rem;
}

.sr-only,
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Scrollbar WebKit fallback */
@supports not (scrollbar-color: auto) {
  *::-webkit-scrollbar {
    width: 12px;
    height: 12px;
  }
  *::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 6px;
  }
  *::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
  }
  *::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}

/* Touch targets for coarse pointers */
@media (pointer: coarse) {
  :where(
    button,
    [role="button"],
    nav a,
    label:has(input[type="checkbox"], input[type="radio"]),
    input:not([type="checkbox"], [type="radio"]),
    select,
    textarea
  ) {
    min-block-size: 44px;
  }

  .touch-target {
    position: relative;
  }

  .touch-target::after {
    content: "";
    position: absolute;
    inset: -6px;
  }
}

/* Forced Colors / High Contrast Mode */
@media (forced-colors: active) {
  :where(a:any-link, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }

  .gradient-text {
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    color: CanvasText !important;
  }

  .btn-primary {
    border: 1px solid ButtonText;
  }
}

/* ==========================================================================
   2. Typography & Signature Gradient Utilities
   ========================================================================== */

.font-display,
.font-primary {
  font-family: var(--font-display);
}

.font-sans,
.font-secondary {
  font-family: var(--font-sans);
}

.font-mono {
  font-family: var(--font-mono);
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-underline {
  display: block;
  height: 0.35rem;
  width: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent-gradient);
}

.bg-accent-gradient {
  background: var(--accent-gradient);
}

.shadow-accent {
  box-shadow: var(--shadow-accent);
}

.shadow-accent-lg {
  box-shadow: var(--shadow-accent-lg);
}

.section-inverted {
  color-scheme: dark;
  background-color: var(--bg-inverted);
  color: var(--ink-inverted);
}

.section-inverted h1,
.section-inverted h2,
.section-inverted h3,
.section-inverted h4 {
  color: #ffffff;
}

.dot-pattern-dark {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.85) 1px, transparent 1px);
  background-size: 32px 32px;
}

.text-xs { font-size: 0.75rem; line-height: 1.45; }
.text-sm { font-size: 0.875rem; line-height: 1.5; }
.text-base { font-size: 1rem; line-height: 1.6; }
.text-lg { font-size: 1.125rem; line-height: 1.45; }
.text-xl { font-size: 1.25rem; line-height: 1.35; }
.text-2xl { font-size: 1.5rem; line-height: 1.25; }
.text-3xl { font-size: 1.875rem; line-height: 1.15; }
.text-4xl { font-size: 2.25rem; line-height: 1.1; }
.text-5xl { font-size: 3rem; line-height: 1.05; }
.text-hero { font-size: clamp(2.15rem, 4.5vw, 3.75rem); line-height: 1.06; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.04em; }
.tracking-wider { letter-spacing: 0.1em; }
.tracking-label { letter-spacing: 0.15em; }

.text-ink { color: var(--ink); }
.text-muted,
.text-ink-muted { color: var(--ink-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success-ink); }
.text-warning { color: var(--warning-ink); }
.text-danger { color: var(--danger-ink); }
.text-white { color: #ffffff; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-all { word-break: break-all; }
.underline-link {
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 150ms ease;
}
.underline-link:hover { color: var(--accent); }

/* ==========================================================================
   3. Layout Containers, Grids & Spacing Helpers
   ========================================================================== */

.store-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  flex-direction: column;
  overflow-x: clip;
  background-color: var(--bg);
  color: var(--ink);
}

.store-main {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}

.container-narrow {
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

.container-sheet {
  width: 100%;
  max-width: 50rem;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .container,
  .container-narrow {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 2rem;
  }
}

.section {
  padding-block: 3rem;
}

.section-sm {
  padding-block: 1.75rem;
}

.section-lg {
  padding-block: 4.25rem;
}

@media (min-width: 768px) {
  .section {
    padding-block: 4.5rem;
  }
  .section-sm {
    padding-block: 2.5rem;
  }
  .section-lg {
    padding-block: 5.5rem;
  }
}

.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-xs { display: flex; flex-direction: column; gap: 0.375rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.625rem; }
.stack-md { display: flex; flex-direction: column; gap: 1.25rem; }
.stack-lg { display: flex; flex-direction: column; gap: 1.75rem; }
.stack-xl { display: flex; flex-direction: column; gap: 2.5rem; }

.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.cluster-sm { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.split { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.w-full { width: 100%; }
[hidden],
.hidden { display: none !important; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-12 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 2.25rem; align-items: center; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem; }
  .col-span-2 { grid-column: span 2 / span 2; }
  .col-span-3 { grid-column: span 3 / span 3; }
  .col-span-4 { grid-column: span 4 / span 4; }
  .col-span-5 { grid-column: span 5 / span 5; }
  .col-span-6 { grid-column: span 6 / span 6; }
  .col-span-7 { grid-column: span 7 / span 7; }
  .col-span-8 { grid-column: span 8 / span 8; }
  .col-span-9 { grid-column: span 9 / span 9; }
  .col-span-12 { grid-column: span 12 / span 12; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; }
}

.mt-1 { margin-block-start: 0.25rem; }
.mt-2 { margin-block-start: 0.5rem; }
.mt-3 { margin-block-start: 0.75rem; }
.mt-4 { margin-block-start: 1rem; }
.mt-6 { margin-block-start: 1.5rem; }
.mt-8 { margin-block-start: 2rem; }
.my-2 { margin-block: 0.5rem; }
.mb-2 { margin-block-end: 0.5rem; }
.mb-4 { margin-block-end: 1rem; }
.mb-6 { margin-block-end: 1.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.pt-3 { padding-block-start: 0.75rem; }
.pt-4 { padding-block-start: 1rem; }
.pb-4 { padding-block-end: 1rem; }
.pb-6 { padding-block-end: 1.5rem; }

/* ==========================================================================
   4. UI Primitives (Buttons, Badges, Cards, Forms, Tables, States)
   ========================================================================== */

/* 4.1 Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms ease-out,
    background-color 180ms ease-out,
    border-color 180ms ease-out,
    box-shadow 180ms ease-out,
    filter 180ms ease-out,
    color 180ms ease-out;
}

.btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  pointer-events: none;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.btn-primary,
.btn-default {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover,
.btn-default:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: var(--shadow-accent-lg);
}

.btn-primary:active,
.btn-default:active {
  transform: translateY(0) scale(0.98);
}

.btn-outline {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
  background-color: var(--surface-alt);
  border-color: var(--border-hover);
  color: var(--ink);
}

.btn-secondary {
  background-color: var(--surface-alt);
  border-color: var(--border);
  color: var(--ink);
}

.btn-secondary:hover {
  background-color: #e2e8f0;
  border-color: var(--border-strong);
}

.btn-ghost {
  background-color: transparent;
  color: var(--ink-muted);
}

.btn-ghost:hover {
  background-color: var(--surface-alt);
  color: var(--ink);
}

.btn-destructive,
.btn-danger {
  background-color: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-ink);
}

.btn-destructive:hover,
.btn-danger:hover {
  background-color: #fee2e2;
  border-color: #fca5a5;
}

.btn-link {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn-link:hover {
  color: var(--accent-hover);
}

.btn-xs {
  min-height: 2rem;
  padding: 0.3rem 0.625rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-sm {
  min-height: 2.25rem;
  padding: 0.45rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-lg {
  min-height: 3rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
}

.btn-icon {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
}

.btn-pill {
  border-radius: var(--radius-pill);
}

.btn-block {
  width: 100%;
}

/* 4.2 Badges & Section Labels */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: fit-content;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hover);
  background-color: rgba(0, 82, 255, 0.06);
  color: var(--accent);
  padding: 0.15rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-secondary {
  border-color: var(--border);
  background-color: var(--surface-alt);
  color: var(--ink);
}

.badge-outline {
  border-color: var(--border);
  background-color: var(--surface);
  color: var(--ink-muted);
}

.badge-success {
  border-color: var(--success-border);
  background-color: var(--success-bg);
  color: var(--success-ink);
}

.badge-warning {
  border-color: var(--warning-border);
  background-color: var(--warning-bg);
  color: var(--warning-ink);
}

.badge-danger,
.badge-destructive {
  border-color: var(--danger-border);
  background-color: var(--danger-bg);
  color: var(--danger-ink);
}

.badge-info {
  border-color: var(--info-border);
  background-color: var(--info-bg);
  color: var(--accent);
}

.badge-bestseller,
.badge-customisable {
  border-color: transparent;
  background: var(--accent-gradient);
  color: #ffffff;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.badge-new {
  border-color: transparent;
  background-color: var(--ink);
  color: #ffffff;
  font-weight: 600;
}

.badge-popular {
  border-color: var(--border-hover);
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--accent);
  font-weight: 600;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hover);
  background-color: var(--accent-tint);
  padding: 0.3rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

@media (min-width: 640px) {
  .section-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    padding: 0.375rem 1rem;
  }
}

.section-label-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-pill);
  background-color: var(--accent);
  flex-shrink: 0;
}

.section-label-inverted {
  border-color: rgba(77, 124, 255, 0.4);
  background-color: rgba(0, 82, 255, 0.15);
  color: #93c5fd;
}

.section-label-inverted .section-label-dot {
  background-color: var(--accent-secondary);
}

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  background: var(--accent-gradient-br);
  color: #ffffff;
  box-shadow: var(--shadow-accent);
  flex-shrink: 0;
  transition: transform 220ms ease-out;
}

.card-interactive:hover .icon-box {
  transform: scale(1.08);
}

/* 4.3 Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  color: var(--ink);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition:
    box-shadow 260ms ease,
    border-color 260ms ease,
    transform 260ms ease;
}

.card-pad {
  padding: 1.25rem;
}

.card-pad-sm {
  padding: 1rem 1.15rem;
}

@media (min-width: 640px) {
  .card-pad {
    padding: 1.5rem;
  }
}

.card.split {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.card.grid,
.card.grid-2,
.card.grid-3,
.card.grid-4,
.card.grid-12 {
  display: grid;
}

.card-interactive:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.card-featured {
  padding: 2px;
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, #0052ff, #4d7cff, #0052ff);
  box-shadow: var(--shadow-accent);
}

.card-featured-inner {
  background-color: var(--surface);
  border-radius: calc(var(--radius-2xl) - 2px);
  height: 100%;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0;
}

.card-header-bordered {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.card-desc {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.card-body {
  padding: 1.25rem 1.5rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.stat-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.stat-value {
  margin-top: 0.35rem;
  font-family: var(--font-sans);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.banner-asymmetric {
  border-radius: 3rem 1rem 3rem 1rem;
}

/* Product Card */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 250ms ease, border-color 250ms ease, transform 250ms ease;
}

.product-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.product-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: var(--surface-alt);
  overflow: hidden;
}

.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms var(--ease-out-expo);
}

.product-card:hover .product-card-media img {
  transform: scale(1.04);
}

.product-card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  z-index: 2;
}

.product-card-wishlist {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--ink-muted);
  backdrop-filter: blur(4px);
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.product-card-wishlist:hover {
  background-color: #ffffff;
  color: var(--danger);
  border-color: var(--danger-border);
}

.product-card-wishlist[aria-pressed="true"],
.product-card-wishlist.is-saved {
  color: var(--danger);
  border-color: var(--danger-border);
  background-color: var(--danger-bg);
}

.product-card-wishlist[aria-pressed="true"] svg,
.product-card-wishlist.is-saved svg {
  fill: currentColor;
}

.product-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
}

/* 4.4 Form Controls */
.form-group,
.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-inline-size: 0;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink-secondary);
}

.input,
.select,
.textarea {
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: var(--surface);
  padding: 0.625rem 1rem;
  font-size: 1rem;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

@media (min-width: 768px) {
  .input,
  .select,
  .textarea {
    font-size: 0.875rem;
  }
}

.input-sm,
.select-sm {
  min-height: 2.5rem;
  padding: 0.45rem 0.75rem;
}

.textarea {
  min-height: 6rem;
  padding-block: 0.75rem;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--ink-subtle);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--border-strong);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.2);
  outline: none;
}

.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap > svg {
  position: absolute;
  left: 0.875rem;
  width: 1rem;
  height: 1rem;
  color: var(--ink-subtle);
  pointer-events: none;
}

.input-icon-wrap > .input {
  padding-left: 2.5rem;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.form-error {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--danger-ink);
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: var(--surface);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.radio-card:hover {
  border-color: var(--border-hover);
}

.radio-card.is-selected,
.radio-card:has(input:checked) {
  border-color: var(--accent);
  background-color: rgba(0, 82, 255, 0.04);
  box-shadow: var(--shadow-xs);
}

.radio-card.is-disabled,
.radio-card:has(input:disabled) {
  opacity: 0.58;
  cursor: not-allowed;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  cursor: pointer;
}

.checkbox-row input {
  margin-top: 0.15rem;
  accent-color: var(--accent);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--surface);
  box-shadow: var(--shadow-xs);
}

.qty-stepper-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 2.35rem;
  color: var(--ink);
  transition: background-color 150ms ease;
}

.qty-stepper-btn:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.qty-stepper-btn:last-child { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.qty-stepper-btn:hover { background-color: var(--surface-alt); }

.qty-stepper-val {
  min-width: 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* 4.5 Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  background-color: var(--surface);
  box-shadow: var(--shadow-xs);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.table th {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background-color: var(--surface-alt);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--ink);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background-color: rgba(241, 245, 249, 0.65);
}

/* 4.6 Alerts, Separators, Progress, Empty/Error States & Skeletons */
.separator,
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--border);
  border: 0;
  margin: 0;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background-color: var(--surface);
  font-size: 0.875rem;
  line-height: 1.45;
  box-shadow: var(--shadow-xs);
}

.alert svg {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.12rem;
  flex-shrink: 0;
}

.alert-danger,
.alert-error {
  border-color: rgba(239, 68, 68, 0.35);
  background-color: var(--danger-bg);
  color: var(--danger-ink);
}

.alert-success {
  border-color: var(--success-border);
  background-color: var(--success-bg);
  color: var(--success-ink);
}

.alert-warning {
  border-color: var(--warning-border);
  background-color: var(--warning-bg);
  color: var(--warning-ink);
}

.alert-info {
  border-color: rgba(0, 82, 255, 0.25);
  background-color: var(--accent-tint);
  color: var(--ink);
}

.progress-bar {
  width: 100%;
  height: 0.5rem;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background-color: var(--border);
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent-gradient);
  transition: width 400ms var(--ease-out-expo);
}

.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-2xl);
  border: 1px dashed var(--border);
  background-color: var(--surface);
  text-align: center;
}

.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-xl);
  background-color: var(--accent-subtle);
  color: var(--accent);
}

.empty-state-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.empty-state-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.empty-state-body {
  margin: 0;
  max-width: 28rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.skeleton {
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-line {
  height: 0.875rem;
  width: 100%;
  border-radius: var(--radius-sm);
}

.skeleton-card {
  height: 14rem;
  width: 100%;
  border-radius: var(--radius-2xl);
}

/* 4.7 Breadcrumbs, Tabs & Checkout Stepper */
.breadcrumb > ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.breadcrumb > ol > li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb > ol > li + li::before {
  content: "/" / "";
  color: var(--ink-subtle);
  user-select: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: var(--surface);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: all 180ms ease;
}

.tab-btn:hover {
  background-color: var(--surface-alt);
  color: var(--ink);
}

.tab-btn.is-active,
.tab-btn[aria-selected="true"] {
  border-color: transparent;
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-accent);
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (min-width: 640px) {
  .stepper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.75rem;
  }
}

.stepper-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-lg);
  background-color: var(--surface-alt);
  color: var(--ink-muted);
  text-align: center;
  transition: background-color 180ms ease, color 180ms ease;
}

@media (min-width: 640px) {
  .stepper-pill {
    width: auto;
  }
}

.stepper-pill.is-active {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-accent);
}

.stepper-pill.is-complete {
  background-color: rgba(0, 82, 255, 0.1);
  color: var(--accent);
}

.stepper-arrow {
  display: none;
  color: var(--border-strong);
}

@media (min-width: 640px) {
  .stepper-arrow {
    display: inline;
  }
}

/* ==========================================================================
   5. Storefront Chrome (Announcement, Header, Dropdowns, Footer, WhatsApp)
   ========================================================================== */

.announcement-bar {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  width: 100%;
  background: var(--accent-gradient);
  color: #ffffff;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}

.announcement-inner {
  display: flex;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.announcement-msg {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.announcement-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: var(--radius-pill);
  background-color: #ffffff;
  flex-shrink: 0;
}

.announcement-msg-desktop { display: none; }
.announcement-links { display: none; align-items: center; gap: 0.9rem; flex-shrink: 0; }
.announcement-links a { color: rgba(255, 255, 255, 0.9); transition: color 150ms ease; }
.announcement-links a:hover { color: #ffffff; text-decoration: underline; text-underline-offset: 4px; }
.announcement-sep { opacity: 0.4; }

@media (min-width: 640px) {
  .announcement-bar { min-height: 2.375rem; padding-inline: 1rem; }
  .announcement-msg { justify-content: flex-start; font-size: 0.75rem; }
  .announcement-msg-mobile { display: none; }
  .announcement-msg-desktop { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .announcement-links { display: flex; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background-color: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
}

@media (min-width: 640px) {
  .header-inner {
    gap: 1rem;
    padding: 0.75rem 1.25rem;
  }
}

@media (min-width: 1280px) {
  .header-inner {
    padding-inline: 2rem;
  }
}

.header-brand-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  border-radius: var(--radius-lg);
}

.logo-lockup {
  height: 2.25rem;
  width: auto;
  max-width: 112px;
  object-fit: contain;
  filter: brightness(1.04) contrast(1.02);
  mix-blend-mode: multiply;
  transition: transform 200ms ease;
}

@media (min-width: 640px) {
  .logo-lockup {
    height: 2.75rem;
    max-width: none;
  }
}

.logo-link:hover .logo-lockup {
  transform: scale(1.02);
}

.logo-inverted {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  user-select: none;
}

.logo-wordmark {
  display: flex;
  flex-direction: column;
}

.logo-wordmark-name {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.logo-wordmark-accent {
  color: var(--accent-secondary);
}

.logo-wordmark-tagline {
  margin-top: 0.25rem;
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  color: var(--ink-inverted-muted);
}

.header-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .header-nav {
    display: flex;
  }
  .header-mobile-toggle {
    display: none !important;
  }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: var(--radius-lg);
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.nav-link:hover {
  background-color: var(--surface-alt);
  color: var(--ink);
}

.nav-link.is-active,
.nav-link.active {
  background-color: rgba(0, 82, 255, 0.06);
  font-weight: 600;
  color: var(--accent);
}

.nav-link-home.is-active,
.nav-link-home.active {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-accent);
}

.nav-pill-new {
  border-radius: var(--radius-pill);
  background: var(--accent-gradient);
  padding: 0.15rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1;
  color: #ffffff;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.45rem 0.5rem 0.2rem;
  border-radius: var(--radius-lg);
  color: var(--ink-muted);
  transition: background-color 160ms ease, color 160ms ease;
}

.nav-dropdown-trigger:hover {
  background-color: var(--surface-alt);
  color: var(--ink);
}

.nav-dropdown-chevron {
  width: 0.875rem;
  height: 0.875rem;
  opacity: 0.75;
  transition: transform 200ms ease;
}

.nav-dropdown.is-open .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 50;
  width: 18rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  background-color: var(--surface);
  padding: 0.5rem;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.nav-dropdown.is-open .nav-dropdown-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.nav-dropdown-heading {
  padding: 0.375rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav-dropdown-item {
  display: block;
  border-radius: var(--radius-lg);
  padding: 0.5rem 0.75rem;
  white-space: normal;
  transition: background-color 140ms ease;
}

.nav-dropdown-item:hover {
  background-color: var(--surface-alt);
}

.nav-dropdown-item-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
}

.nav-dropdown-item:hover .nav-dropdown-item-title {
  color: var(--accent);
}

.nav-dropdown-item-desc {
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .header-actions { gap: 0.5rem; }
}

.header-search {
  display: none;
  position: relative;
}

.header-search-input {
  height: 2.5rem;
  width: 13.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: rgba(241, 245, 249, 0.8);
  padding: 0 0.875rem 0 2.4rem;
  font-size: 0.8125rem;
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.header-search-input:focus {
  border-color: var(--accent);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.18);
}

.header-search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--ink-subtle);
  pointer-events: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .header-search { display: block; }
  .header-search-toggle { display: none !important; }
}

@media (min-width: 1280px) {
  .header-search { display: block; }
  .header-search-input { width: 15rem; }
  .header-search-toggle { display: none !important; }
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-lg);
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: background-color 150ms ease, color 150ms ease;
}

.icon-btn:hover {
  background-color: var(--surface-alt);
  color: var(--ink);
}

.icon-btn[aria-current="page"],
.icon-btn.is-active {
  background-color: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--border-hover);
}

.stat-card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.stat-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius-lg);
  background-color: var(--accent-subtle);
  color: var(--accent);
  flex-shrink: 0;
}

.stat-card-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.icon-btn-ink {
  color: var(--ink);
}

.icon-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-badge {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  display: flex;
  min-width: 1.25rem;
  height: 1.25rem;
  padding-inline: 0.25rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--accent-gradient);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

.icon-badge-danger {
  background: var(--danger);
}

.mobile-search-bar {
  border-top: 1px solid var(--border);
  background-color: rgba(255, 255, 255, 0.96);
  padding: 0.625rem 0.75rem;
}

.mobile-search-form {
  display: flex;
  max-width: var(--container-max);
  margin-inline: auto;
  align-items: center;
  gap: 0.5rem;
}

/* Global Store Footer */
.site-footer {
  position: relative;
  overflow: hidden;
  border-top: 1px solid #1e293b;
  font-size: 0.875rem;
  color: var(--ink-inverted-muted);
}

.footer-ambient-dots {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
}

.footer-ambient-glow {
  position: absolute;
  top: -8rem;
  right: 0;
  width: 26rem;
  height: 26rem;
  border-radius: var(--radius-pill);
  background-color: rgba(0, 82, 255, 0.16);
  filter: blur(120px);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 3rem 1rem;
}

@media (min-width: 768px) {
  .footer-inner { padding: 4rem 2rem; }
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  padding-bottom: 2.5rem;
}

.footer-col-brand,
.footer-col-newsletter {
  grid-column: span 2;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem; }
  .footer-col-brand,
  .footer-col-newsletter { grid-column: span 3; }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 0.9fr 1.2fr; gap: 2rem; }
  .footer-col-brand,
  .footer-col-newsletter { grid-column: span 1; }
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 0.85rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: var(--ink-inverted-muted);
  transition: color 150ms ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--ink-inverted-muted);
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.footer-social-btn:hover {
  border-color: var(--accent-secondary);
  background-color: rgba(0, 82, 255, 0.2);
  color: #ffffff;
}

.footer-newsletter-wrap {
  position: relative;
}

.footer-newsletter-input {
  width: 100%;
  height: 2.85rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background-color: rgba(255, 255, 255, 0.06);
  padding: 0 3.25rem 0 0.95rem;
  font-size: 0.875rem;
  color: #ffffff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.footer-newsletter-input::placeholder {
  color: var(--ink-inverted-muted);
}

.footer-newsletter-input:focus {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 2px rgba(77, 124, 255, 0.35);
}

.footer-newsletter-submit {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-accent);
  transition: filter 160ms ease;
}

.footer-newsletter-submit:hover {
  filter: brightness(1.1);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.75rem;
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; }
}

.payment-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.payment-pill {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
}

/* Floating WhatsApp Button */
.whatsapp-fab {
  position: fixed;
  right: 0.875rem;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background-color: #059669;
  color: #ffffff;
  box-shadow: 0 10px 20px -6px rgba(5, 150, 105, 0.55);
  transition: transform 180ms ease-out, background-color 180ms ease-out, box-shadow 180ms ease-out;
}

.whatsapp-fab:hover {
  transform: translateY(-2px);
  background-color: #047857;
  box-shadow: 0 14px 26px -6px rgba(5, 150, 105, 0.6);
}

.whatsapp-fab svg {
  width: 1.65rem;
  height: 1.65rem;
}

.whatsapp-fab.has-sticky-bar {
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 640px) {
  .whatsapp-fab {
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
  }
}

@media (min-width: 768px) {
  .whatsapp-fab,
  .whatsapp-fab.has-sticky-bar {
    bottom: 1.5rem;
  }
}

@media (max-width: 47.99rem) {
  body:has([data-mobile-sticky-bar]) .site-footer {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   6. Auth & Admin Shells
   ========================================================================== */

.auth-shell {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--ink);
}

.auth-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at top, rgba(0, 82, 255, 0.06), transparent 65%);
}

.auth-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background-color: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(12px);
}

.auth-header-inner {
  display: flex;
  max-width: var(--container-max);
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
}

@media (min-width: 640px) {
  .auth-header-inner { padding: 1rem 1.5rem; }
}

.auth-main {
  position: relative;
  z-index: 10;
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 28rem;
}

/* Admin Layout Shell */
.admin-shell {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
}

.admin-sidebar {
  display: none;
  width: 15rem;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background-color: var(--surface);
  padding: 1rem;
}

@media (min-width: 1024px) {
  .admin-sidebar {
    display: block;
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

.admin-sidebar-logo {
  padding: 0.25rem 0.75rem 1.5rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-nav-link {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 0.75rem;
  border-radius: var(--radius-lg);
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.admin-nav-link svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.admin-nav-link:hover {
  background-color: var(--surface-alt);
  color: var(--ink);
}

.admin-nav-link.is-active,
.admin-nav-link.active {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 82, 255, 0.2);
}

.admin-main-wrap {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  padding: 0.5rem 0.75rem;
}

@media (min-width: 640px) {
  .admin-topbar { padding-inline: 1.5rem; }
}

.admin-content {
  flex: 1 1 auto;
  padding: 0.875rem;
}

@media (min-width: 640px) {
  .admin-content { padding: 1.25rem; }
}

@media (min-width: 1024px) {
  .admin-content { padding: 1.5rem; }
}

.admin-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-accent);
  background-color: var(--surface);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   7. Slide-Over Drawers, Modals & Toast Notifications
   ========================================================================== */

.drawer-dialog {
  margin: 0;
  height: 100svh;
  max-height: none;
  width: min(24rem, 92dvw);
  max-width: none;
  border: 0;
  padding: 0;
  background-color: var(--surface);
  color: var(--ink);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer-left {
  margin-right: auto;
  border-right: 1px solid var(--border);
  width: min(21.5rem, 88dvw);
}

.drawer-right {
  margin-left: auto;
  border-left: 1px solid var(--border);
}

.drawer-inner {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.25rem max(1.5rem, env(safe-area-inset-bottom, 0px));
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.85rem;
}

.drawer-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 0.875rem;
  margin-top: auto;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: var(--surface);
  padding: 0.65rem;
}

.drawer-item-thumb {
  width: 4rem;
  height: 4rem;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background-color: var(--surface-alt);
  overflow: hidden;
  padding: 0.25rem;
}

.drawer-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-dialog {
  margin: auto;
  width: calc(100% - 2rem);
  max-width: 28rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  background-color: var(--surface);
  padding: 1.5rem;
  color: var(--ink);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

/* Toast Region */
.toast-region {
  position: fixed;
  right: 1rem;
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(23rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--ink);
  padding: 0.85rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  box-shadow: var(--shadow-xl);
  animation: toast-in 220ms var(--ease-out-expo) both;
}

.toast-success { border-color: var(--success-border); background-color: var(--success-bg); color: var(--success-ink); }
.toast-error { border-color: var(--danger-border); background-color: var(--danger-bg); color: var(--danger-ink); }
.toast-warning { border-color: var(--warning-border); background-color: var(--warning-bg); color: var(--warning-ink); }
.toast-info { border-color: var(--info-border); background-color: var(--info-bg); color: var(--ink); }

.toast-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--radius-sm);
  color: currentColor;
  opacity: 0.65;
  flex-shrink: 0;
}

.toast-close:hover { opacity: 1; }

/* ==========================================================================
   8. STL Mesh Viewport & Error Pages
   ========================================================================== */

.stl-viewer {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.stl-canvas-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: #0f172a;
}

.stl-canvas {
  display: block;
  width: 100%;
  height: 17rem;
  cursor: grab;
  touch-action: none;
}

.stl-canvas:active {
  cursor: grabbing;
}

.stl-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.stl-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1.25rem;
  border-radius: var(--radius-2xl);
  border: 2px dashed var(--border-strong);
  background-color: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.stl-dropzone:hover,
.stl-dropzone.is-dragover {
  border-color: var(--accent);
  background-color: var(--accent-tint);
}

.error-page {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  min-height: 68vh;
  padding-block: 3.5rem;
}

.error-page-centered {
  align-items: center;
  text-align: center;
}

/* ==========================================================================
   9. Motion, Scroll Reveal ([data-reveal]) & Reduced Motion Support
   ========================================================================== */

@keyframes reveal-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes studio-spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes studio-float-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes studio-float-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-pulse { animation: pulse-soft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-spin { animation: spin 0.9s linear infinite; }

@media (prefers-reduced-motion: no-preference) {
  .reveal-above-fold {
    animation: reveal-fade-up 0.65s var(--ease-out-expo) both;
  }

  [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition:
      opacity 0.65s var(--ease-out-expo),
      transform 0.65s var(--ease-out-expo);
  }

  [data-reveal][data-revealed="true"] {
    opacity: 1;
    transform: translateY(0);
  }

  .studio-spin-slow {
    animation: studio-spin-slow 60s linear infinite;
  }

  .studio-float-up {
    animation: studio-float-up 4s ease-in-out infinite;
  }

  .studio-float-down {
    animation: studio-float-down 5s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  [data-reveal],
  .reveal-above-fold,
  .studio-spin-slow,
  .studio-float-up,
  .studio-float-down,
  .animate-pulse,
  .skeleton {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .btn:hover,
  .btn:active,
  .card-interactive:hover,
  .product-card:hover {
    transform: none !important;
  }
}

/* ==========================================================================
   10. Print Styles — GST Tax Invoices & Packing Slips (A4)
   ========================================================================== */

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-hidden,
  .skip-link,
  .announcement-bar,
  .site-header,
  .site-footer,
  .whatsapp-fab,
  .admin-sidebar,
  .admin-topbar,
  .toast-region,
  dialog {
    display: none !important;
  }

  .store-shell,
  .admin-shell,
  .admin-main-wrap,
  .admin-content,
  .store-main {
    display: block !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
  }

  .print-sheet,
  .invoice-sheet,
  .packing-slip {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }

  .page-break-after,
  .packing-slip {
    break-after: page;
    page-break-after: always;
  }

  .page-break-after:last-child,
  .packing-slip:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .break-inside-avoid,
  tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-grid-2 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }

  .table-wrap {
    overflow: visible !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  thead {
    display: table-header-group;
  }

  a[href]::after {
    content: none !important;
  }
}
