/* =========================================================================
   SilkAiLabs — Design System
   Light-first, warm/premium, still abstract-generative (no photography).
   Dark mode is a full alternate palette via [data-theme="dark"], toggled by
   js/main.js and persisted to localStorage. Used by index.php, cart.php,
   checkout.php, thank-you.php, and setup/install.php. Admin panel has its
   own fixed-dark admin.css and is not affected by this toggle.
   ========================================================================= */

/* ---- Design tokens: shared across both themes --------------------------- */
:root {
  --white: #ffffff;

  /* brand gradient stays constant across themes — it's applied on top of
     whatever surface is behind it (buttons, badges, text-clip), not the
     page background itself, so it doesn't need to shift with the theme. */
  --gradient-aurora: linear-gradient(135deg, #2f6bff 0%, #7c3aed 55%, #db2777 100%);

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Design tokens: light theme (default) -------------------------------- */
:root {
  --bg: #f8f7fb;
  --bg-elevated: #ffffff;
  --indigo: #c9c2ee;

  --electric-blue: #2f6bff;
  --neon-cyan: #0891b2;
  --violet: #7c3aed;
  --soft-pink: #db2777;
  --aurora-green: #059669;

  --text-primary: #17172a;
  --text-muted: #5b5b72;
  --text-faint: #8d8da3;

  --glass-frost: rgba(255, 255, 255, 0.65);
  --glass-frost-strong: rgba(255, 255, 255, 0.85);
  --border-glass: rgba(23, 23, 36, 0.08);
  --border-glow: rgba(124, 58, 237, 0.28);

  --gradient-mesh: radial-gradient(60% 50% at 15% 20%, rgba(47, 107, 255, 0.10), transparent 60%),
                    radial-gradient(50% 45% at 85% 10%, rgba(124, 58, 237, 0.10), transparent 60%),
                    radial-gradient(55% 55% at 50% 100%, rgba(219, 39, 119, 0.08), transparent 60%);

  --nav-bg: rgba(255, 255, 255, 0.72);
  --hero-overlay-grad: linear-gradient(180deg, rgba(248, 247, 251, 0.1) 0%, rgba(248, 247, 251, 0.65) 70%, var(--bg) 100%);
  --card-edge-a: rgba(255, 255, 255, 0.9);
  --card-edge-b: rgba(124, 58, 237, 0.18);
  --shimmer-color: rgba(23, 23, 36, 0.06);

  --shadow-glow: 0 20px 60px -20px rgba(124, 58, 237, 0.22);
  --shadow-soft: 0 20px 45px -22px rgba(23, 23, 36, 0.14);

  --danger: #dc2626;
}

/* ---- Design tokens: dark theme (alternate, via toggle) ------------------- */
:root[data-theme="dark"] {
  --bg: #060611;
  --bg-elevated: #0b0c1c;
  --indigo: #241454;

  --electric-blue: #3b82f6;
  --neon-cyan: #22d3ee;
  --violet: #8b5cf6;
  --soft-pink: #f472b6;
  --aurora-green: #34d399;

  --text-primary: #f4f4fb;
  --text-muted: #9b9bb5;
  --text-faint: #6c6c8a;

  --glass-frost: rgba(255, 255, 255, 0.055);
  --glass-frost-strong: rgba(255, 255, 255, 0.09);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-glow: rgba(139, 92, 246, 0.45);

  --gradient-mesh: radial-gradient(60% 50% at 15% 20%, rgba(59, 130, 246, 0.22), transparent 60%),
                    radial-gradient(50% 45% at 85% 10%, rgba(139, 92, 246, 0.20), transparent 60%),
                    radial-gradient(55% 55% at 50% 100%, rgba(244, 114, 182, 0.14), transparent 60%);

  --nav-bg: rgba(6, 6, 17, 0.55);
  --hero-overlay-grad: linear-gradient(180deg, rgba(6, 6, 17, 0.2) 0%, rgba(6, 6, 17, 0.55) 70%, var(--bg) 100%);
  --card-edge-a: rgba(255, 255, 255, 0.25);
  --card-edge-b: rgba(139, 92, 246, 0.35);
  --shimmer-color: rgba(255, 255, 255, 0.08);

  --shadow-glow: 0 20px 60px -20px rgba(139, 92, 246, 0.45);
  --shadow-soft: 0 20px 40px -20px rgba(0, 0, 0, 0.6);

  --danger: #fb7185;
}

/* Both themes transition smoothly when the toggle flips, instead of snapping. */
body, .navbar, .glass-card, .btn, .product-card { transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease; }

/* ---- Reset --------------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  background-image: var(--gradient-mesh);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
::selection { background: var(--violet); color: var(--white); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--indigo); border-radius: var(--radius-pill); }

/* focus visibility for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; position: relative; }
.muted { color: var(--text-muted); }
.accent-text {
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--gradient-aurora);
  color: var(--white);
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 24px 70px -18px rgba(139, 92, 246, 0.6); }
.btn-outline {
  background: var(--glass-frost);
  border-color: var(--border-glass);
  color: var(--text-primary);
  backdrop-filter: blur(12px);
}
.btn-outline:hover { border-color: var(--border-glow); background: var(--glass-frost-strong); }
.btn-lg { padding: 18px 38px; font-size: 1.05rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 50%; }

/* magnetic wrapper (JS applies transform via inline style on this element) */
.magnetic { display: inline-flex; will-change: transform; }

/* ---- Glass surfaces ------------------------------------------------------- */
.glass-card {
  background: var(--glass-frost);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
  position: relative;
}
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--card-edge-a), transparent 40%, transparent 60%, var(--card-edge-b));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.hover-lift { transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s var(--ease-out); }
.hover-lift:hover { transform: translateY(-8px); box-shadow: var(--shadow-glow); border-color: var(--border-glow); }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.floaty { animation: floaty 6s ease-in-out infinite; }

/* ---- Reveal-on-scroll (class toggled by main.js IntersectionObserver/GSAP) */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- Navbar --------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  transition: background 0.3s;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 32px; gap: 24px; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { font-weight: 500; color: var(--text-muted); transition: color 0.2s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.cart-link { position: relative; display: inline-flex; align-items: center; font-size: 1.3rem; }
.cart-badge {
  position: absolute; top: -8px; right: -10px;
  background: var(--gradient-aurora); color: var(--white);
  font-size: 0.65rem; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.nav-toggle { display: none; font-size: 1.5rem; background: none; border: none; color: var(--text-primary); }
.nav-cta { padding: 12px 24px; }
.theme-toggle-btn { position: relative; font-size: 1.15rem; }
.theme-toggle-btn .icon-dark { display: none; }
:root[data-theme="dark"] .theme-toggle-btn .icon-light { display: none; }
:root[data-theme="dark"] .theme-toggle-btn .icon-dark { display: inline; }

/* ---- Hero ------------------------------------------------------------------ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding-top: 90px; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.9; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--hero-overlay-grad);
}
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 900px; margin: 0 auto; padding: 0 24px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: var(--radius-pill);
  background: var(--glass-frost); border: 1px solid var(--border-glass);
  font-size: 0.82rem; font-weight: 600; margin-bottom: 28px; color: var(--neon-cyan);
}
.hero-title { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.08; margin-bottom: 24px; }
.hero-subtitle { font-size: clamp(1rem, 1.6vw, 1.25rem); color: var(--text-muted); max-width: 640px; margin: 0 auto 40px; }
.hero-actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.scroll-indicator {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-faint); font-size: 0.75rem;
}
.scroll-indicator .mouse { width: 26px; height: 42px; border: 2px solid var(--border-glass); border-radius: var(--radius-pill); position: relative; }
.scroll-indicator .mouse::before {
  content: ''; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
  background: var(--neon-cyan); border-radius: 2px; animation: scrollDot 1.6s infinite;
}
@keyframes scrollDot { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* animated stat counters in hero/below */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 56px; }
.stat-card { text-align: center; padding: 24px 12px; }
.stat-value { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; }
.stat-label { color: var(--text-muted); font-size: 0.85rem; margin-top: 6px; }

/* ---- Decorative mesh blobs (abstract/generative background texture) --------- */
.mesh-blob { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; z-index: 0; }
.why-section { position: relative; overflow: hidden; }
.why-blob-1 { width: 380px; height: 380px; top: -140px; left: -120px; background: var(--electric-blue); opacity: 0.16; }
.why-blob-2 { width: 320px; height: 320px; bottom: -140px; right: -100px; background: var(--soft-pink); opacity: 0.12; }
:root[data-theme="dark"] .why-blob-1 { opacity: 0.22; }
:root[data-theme="dark"] .why-blob-2 { opacity: 0.18; }
.why-highlight-icon { font-size: 3.5rem; color: var(--neon-cyan); }
.bento-tile-icon { font-size: 2rem; color: var(--neon-cyan); }

/* ---- Bento grid (asymmetric card layout for "Why SilkAiLabs") --------------- */
.bento-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(150px, auto); gap: 24px; position: relative; z-index: 1; }
.bento-hero-tile { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: center; padding: 44px; text-align: center; }
.bento-tile { grid-column: span 2; padding: 32px 28px; }
@media (max-width: 980px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-hero-tile { grid-column: span 2; grid-row: span 1; }
  .bento-tile { grid-column: span 1; }
}
@media (max-width: 600px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-hero-tile, .bento-tile { grid-column: span 1; }
}

/* ---- Sections --------------------------------------------------------------- */
.section { padding: 120px 0; position: relative; }
.section-header { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-badge {
  display: inline-block; padding: 6px 18px; border-radius: var(--radius-pill);
  background: var(--glass-frost); border: 1px solid var(--border-glass);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--violet); margin-bottom: 20px;
}
.section-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ---- Category filter --------------------------------------------------------- */
.category-filter { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 48px; }
.filter-pill {
  padding: 10px 22px; border-radius: var(--radius-pill); font-size: 0.85rem; font-weight: 600;
  background: var(--glass-frost); border: 1px solid var(--border-glass); color: var(--text-muted);
  transition: all 0.25s var(--ease-out);
}
.filter-pill:hover { color: var(--text-primary); border-color: var(--border-glow); }
.filter-pill.active { background: var(--gradient-aurora); color: var(--white); border-color: transparent; }

/* ---- Product / service cards --------------------------------------------------- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.product-card {
  padding: 32px 28px; display: flex; flex-direction: column; gap: 18px;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.product-card:hover { transform: translateY(-10px) scale(1.01); box-shadow: var(--shadow-glow); border-color: var(--border-glow); }
.product-icon {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(139,92,246,0.25));
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--neon-cyan);
}
.product-title { font-size: 1.25rem; }
.product-desc { color: var(--text-muted); font-size: 0.9rem; flex-grow: 1; }
.product-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.category-tag {
  background: var(--glass-frost-strong); padding: 5px 14px; border-radius: var(--radius-pill);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--soft-pink);
}
.product-price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.product-price small { font-size: 0.7rem; color: var(--text-faint); font-weight: 500; }
.product-actions { display: flex; gap: 10px; }
.product-actions .btn { flex: 1; padding: 12px 18px; font-size: 0.85rem; }

/* ---- Process steps ------------------------------------------------------------- */
.process-step { padding: 32px 26px; text-align: center; }
.process-num {
  width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-aurora); color: var(--white); font-family: var(--font-display); font-weight: 700;
}
.process-step h4 { margin-bottom: 8px; }
.process-step p { color: var(--text-muted); font-size: 0.9rem; }

/* ---- Testimonials -------------------------------------------------------------- */
.testimonial-slider { position: relative; min-height: 260px; }
.testimonial-slide {
  position: absolute; inset: 0; opacity: 0; pointer-events: none; transform: translateY(16px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  padding: 40px; display: flex; flex-direction: column; justify-content: center; text-align: center;
}
.testimonial-slide.active { opacity: 1; pointer-events: auto; transform: translateY(0); position: relative; }
.testimonial-slide i.quote-icon { font-size: 2rem; color: var(--violet); margin-bottom: 20px; }
.testimonial-slide p { font-size: 1.15rem; font-style: italic; margin-bottom: 20px; }
.testimonial-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--gradient-aurora); color: var(--white); margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.testimonial-dots { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.testimonial-dots button { width: 8px; height: 8px; border-radius: 50%; background: var(--border-glass); border: none; padding: 0; }
.testimonial-dots button.active { background: var(--violet); width: 24px; border-radius: var(--radius-pill); transition: all 0.3s; }

/* ---- Tech stack strip ------------------------------------------------------------ */
.tech-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; align-items: center; }
.tech-logo { font-size: 2rem; color: var(--text-faint); transition: color 0.3s, filter 0.3s; filter: grayscale(1); }
.tech-logo:hover { color: var(--neon-cyan); filter: grayscale(0) drop-shadow(0 0 14px rgba(34,211,238,0.6)); }

/* ---- FAQ accordion ---------------------------------------------------------------- */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.faq-item { padding: 6px 8px; }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: none; border: none; color: var(--text-primary); font-family: var(--font-display);
  font-size: 1.05rem; padding: 18px 16px; text-align: left;
}
.faq-question i { transition: transform 0.3s var(--ease-out); color: var(--violet); }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease-out); padding: 0 16px; }
.faq-answer p { color: var(--text-muted); padding-bottom: 18px; }
.faq-item.open .faq-answer { max-height: 240px; }

/* ---- CTA banner ---------------------------------------------------------------------- */
.cta-banner { text-align: center; padding: 80px 48px; border-radius: var(--radius-xl); position: relative; overflow: hidden; }
.cta-banner::after { content: ''; position: absolute; inset: 0; background: var(--gradient-mesh); opacity: 0.8; pointer-events: none; }
.cta-banner h3 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 16px; position: relative; }
.cta-banner p { color: var(--text-muted); max-width: 520px; margin: 0 auto 32px; position: relative; }
.cta-banner .btn { position: relative; }

/* ---- Footer --------------------------------------------------------------------------- */
footer { border-top: 1px solid var(--border-glass); padding: 80px 0 32px; margin-top: 60px; background: var(--bg-elevated); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 48px; margin-bottom: 56px; }
.footer-col h4 { margin-bottom: 20px; font-size: 0.95rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--text-muted); transition: color 0.2s; }
.footer-col a:hover { color: var(--neon-cyan); }
.footer-about p { color: var(--text-muted); margin: 16px 0 24px; max-width: 320px; }
.newsletter-form { display: flex; gap: 10px; max-width: 340px; }
.newsletter-form input {
  flex: 1; padding: 12px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-glass); background: var(--glass-frost); color: var(--text-primary);
}
.social-icons { display: flex; gap: 14px; margin-top: 24px; }
.social-icons a {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--glass-frost); border: 1px solid var(--border-glass); transition: all 0.25s;
}
.social-icons a:hover { background: var(--gradient-aurora); border-color: transparent; }
.footer-bottom { text-align: center; padding-top: 32px; border-top: 1px solid var(--border-glass); color: var(--text-faint); font-size: 0.85rem; }

/* ---- Alerts / toasts --------------------------------------------------------------------- */
.alert { padding: 16px 20px; border-radius: var(--radius-md); font-size: 0.9rem; margin-bottom: 16px; border: 1px solid; }
.alert-success { background: rgba(5, 150, 105, 0.14); border-color: rgba(5, 150, 105, 0.35); color: var(--aurora-green); }
.alert-error { background: rgba(220, 38, 38, 0.12); border-color: rgba(220, 38, 38, 0.35); color: var(--danger); }
.alert-info { background: rgba(47, 107, 255, 0.12); border-color: rgba(47, 107, 255, 0.35); color: var(--electric-blue); }
.alert-warning { background: rgba(217, 119, 6, 0.12); border-color: rgba(217, 119, 6, 0.35); color: #d97706; }
:root[data-theme="dark"] .alert-success { background: rgba(52, 211, 153, 0.1); }
:root[data-theme="dark"] .alert-error { background: rgba(244, 63, 94, 0.1); }
:root[data-theme="dark"] .alert-info { background: rgba(59, 130, 246, 0.1); }
:root[data-theme="dark"] .alert-warning { background: rgba(245, 158, 11, 0.1); color: #fbbf24; }

.toast-container { position: fixed; bottom: 28px; right: 28px; z-index: 300; display: flex; flex-direction: column; gap: 12px; }
.toast {
  min-width: 260px; padding: 16px 20px; border-radius: var(--radius-md);
  background: var(--bg-elevated); border: 1px solid var(--border-glass); box-shadow: var(--shadow-soft);
  display: flex; align-items: center; gap: 12px; font-size: 0.88rem;
  transform: translateX(120%); opacity: 0; transition: transform 0.4s var(--ease-out), opacity 0.4s var(--ease-out);
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.success i { color: var(--aurora-green); }
.toast.error i { color: var(--danger); }

/* ---- Forms ------------------------------------------------------------------------------- */
.stacked-form { display: flex; flex-direction: column; gap: 18px; }
.form-label { display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.form-input, .form-textarea, select.form-input {
  padding: 14px 16px; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.95rem;
  background: var(--glass-frost); border: 1px solid var(--border-glass); color: var(--text-primary);
  transition: border-color 0.25s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--violet); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ---- Skeleton loaders ---------------------------------------------------------------------- */
.skeleton { position: relative; overflow: hidden; background: var(--glass-frost); border-radius: var(--radius-md); }
.skeleton::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--shimmer-color), transparent);
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skeleton-row { height: 80px; }

/* ---- Cart page ------------------------------------------------------------------------------ */
.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; margin-top: 130px; }
.cart-list { display: flex; flex-direction: column; gap: 18px; }
.cart-item { display: flex; align-items: center; gap: 20px; padding: 22px; }
.cart-item-icon { width: 56px; height: 56px; border-radius: var(--radius-md); background: var(--gradient-aurora); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 1.05rem; margin-bottom: 4px; }
.qty-stepper { display: flex; align-items: center; gap: 10px; background: var(--glass-frost); border-radius: var(--radius-pill); padding: 6px; }
.qty-stepper button { width: 28px; height: 28px; border-radius: 50%; border: none; background: var(--glass-frost-strong); color: var(--text-primary); }
.qty-stepper span { min-width: 24px; text-align: center; font-weight: 600; }
.cart-item-price { font-weight: 700; min-width: 100px; text-align: right; }
.cart-remove { color: var(--text-faint); font-size: 1.2rem; transition: color 0.2s; }
.cart-remove:hover { color: var(--danger); }
.cart-summary { padding: 28px; position: sticky; top: 120px; }
.summary-line { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--border-glass); font-size: 0.95rem; }
.summary-line.total { font-size: 1.3rem; font-weight: 700; border-top: 2px solid var(--border-glass); border-bottom: none; margin-top: 8px; padding-top: 20px; }
.coupon-row { display: flex; gap: 10px; margin: 20px 0; }
.cart-empty-state { text-align: center; padding: 100px 20px; }
.cart-empty-state i { font-size: 3.5rem; color: var(--text-faint); margin-bottom: 20px; }

/* ---- Checkout page --------------------------------------------------------------------------- */
.checkout-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; margin-top: 130px; align-items: start; }
.checkout-form-card { padding: 32px; }
.order-summary-card { padding: 28px; position: sticky; top: 120px; }
.order-line { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-glass); font-size: 0.9rem; }
.pay-btn-spinner { display: none; }
.pay-btn.loading .pay-btn-spinner { display: inline-block; animation: spin 1s linear infinite; }
.pay-btn.loading .pay-btn-label { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Thank-you page -------------------------------------------------------------------------- */
.result-hero { text-align: center; padding: 160px 20px 60px; }
.result-icon { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 28px; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.result-icon.success { background: rgba(52,211,153,0.15); color: var(--aurora-green); }
.result-icon.fail { background: rgba(244,63,94,0.15); color: var(--danger); }
.result-icon.info { background: rgba(59,130,246,0.15); color: var(--electric-blue); }
.result-message { margin: 16px 0 32px; }
.result-message-lg { margin: 16px 0 40px; }
.receipt-card { max-width: 560px; margin: 0 auto; padding: 32px; }
.receipt-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border-glass); font-size: 0.92rem; }
.receipt-total-line { font-weight: 700; font-size: 1.1rem; border-bottom: none; padding-top: 16px; }
.receipt-note { margin-top: 20px; font-size: 0.85rem; }
.receipt-actions { display: flex; gap: 12px; margin-top: 28px; }
#confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 250; }

/* ---- Cart drawer (site-wide) ------------------------------------------------------------------ */
.cart-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.35s; }
.cart-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 201;
  background: var(--bg-elevated); border-left: 1px solid var(--border-glass);
  transform: translateX(100%); transition: transform 0.45s var(--ease-out);
  display: flex; flex-direction: column; padding: 28px;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.cart-drawer-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.cart-drawer-footer { border-top: 1px solid var(--border-glass); padding-top: 20px; margin-top: 20px; }

/* ---- Setup / installer page (shares this stylesheet) ------------------------------------------ */
.setup-body { min-height: 100vh; }
.setup-container { max-width: 560px; margin: 0 auto; padding-top: 80px; padding-bottom: 80px; }
.setup-card { padding: 40px; }

/* ---- Utility classes (used instead of inline style="" attributes) ------------------------------ */
.page-heading { margin-top: 150px; margin-bottom: 40px; }
.u-flex { display: flex; }
.u-flex-col { display: flex; flex-direction: column; }
.u-inline-flex { display: inline-flex; }
.u-inline { display: inline; }
.u-hidden { display: none; }
.u-items-center { align-items: center; }
.u-justify-between { justify-content: space-between; }
.u-justify-center { justify-content: center; }
.u-text-center { text-align: center; }
.u-relative { position: relative; }
.u-w-full { width: 100%; }
.u-flex-1 { flex: 1; }
.u-gap-2 { gap: 8px; }
.u-gap-3 { gap: 12px; }
.u-gap-4 { gap: 16px; }
.u-gap-6 { gap: 24px; }
.u-mt-2 { margin-top: 8px; }
.u-mt-3 { margin-top: 12px; }
.u-mt-4 { margin-top: 16px; }
.u-mt-5 { margin-top: 20px; }
.u-mt-6 { margin-top: 24px; }
.u-mt-8 { margin-top: 32px; }
.u-mb-2 { margin-bottom: 8px; }
.u-mb-3 { margin-bottom: 12px; }
.u-mb-4 { margin-bottom: 16px; }
.u-mb-5 { margin-bottom: 20px; }
.u-mb-6 { margin-bottom: 24px; }
.u-mb-8 { margin-bottom: 32px; }
.u-ml-2 { margin-left: 8px; }
.u-text-sm { font-size: 0.85rem; }
.u-text-xs { font-size: 0.8rem; }
.u-no-border { border: none; }
.u-pointer { cursor: pointer; }

/* ---- Responsive ---------------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .order-summary-card, .cart-summary { position: static; }
}
@media (max-width: 780px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .cart-item { flex-wrap: wrap; }
}
