/* ============================================================
   RED CHILLI CRACKERS — Light festival design system
   ============================================================ */

:root {
  /* Palette — warm light, premium festival */
  --bg: #FFF8EC;            /* warm paper */
  --bg-tint: #FFEFD6;       /* secondary cream */
  --surface: #FFFFFF;
  --surface-2: #FFF3DF;
  --ink: #1B0F2A;           /* primary text */
  --ink-2: #3D2A4F;
  --muted: #7A6B8A;
  --hairline: #F2E2C8;
  --hairline-2: #E8D6B6;

  /* Brand colors */
  --saffron: #FF6B1A;       /* primary — marigold */
  --saffron-2: #FF8A3D;
  --crimson: #E0356E;       /* secondary — rose */
  --crimson-2: #F26195;
  --plum: #5B2E91;          /* premium accent */
  --plum-2: #7C4BC0;
  --gold: #E8A317;
  --gold-2: #F5C44A;
  --emerald: #0F8E5F;
  --teal: #15A8B5;

  /* Functional */
  --radius: 22px;
  --radius-sm: 14px;
  --radius-lg: 32px;
  --shadow-sm: 0 2px 8px rgba(91, 46, 145, .06);
  --shadow: 0 14px 34px -16px rgba(91, 46, 145, .22), 0 4px 12px rgba(27, 15, 42, .04);
  --shadow-lg: 0 32px 80px -32px rgba(224, 53, 110, .35), 0 8px 24px rgba(27, 15, 42, .06);
  --max: 1280px;
  --nav-h: 70px;          /* height of the fixed header; kept in sync by JS */

  /* Typography */
  --font-display: "Bricolage Grotesque", "Playfair Display", serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 88% -10%, rgba(255, 138, 61, .22), transparent 60%),
    radial-gradient(900px 500px at -10% 18%, rgba(224, 53, 110, .16), transparent 60%),
    radial-gradient(800px 600px at 50% 100%, rgba(91, 46, 145, .10), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(28px, 4.4vw, 46px); }
h2 { font-size: clamp(21px, 2.8vw, 34px); }
h3 { font-size: clamp(17px, 1.9vw, 22px); }
p  { margin: 0; }

.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.text-muted { color: var(--muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--saffron);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px; background: currentColor; opacity: .7;
}
.eyebrow.plum { color: var(--plum); }
.eyebrow.crimson { color: var(--crimson); }
.eyebrow.emerald { color: var(--emerald); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 22px;
  border-radius: 999px;
  font-weight: 700; font-size: 15px;
  border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--saffron) 0%, var(--crimson) 100%);
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(255, 107, 26, .55), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(224, 53, 110, .55); }
.btn--ink {
  background: var(--ink); color: #fff;
}
.btn--ink:hover { transform: translateY(-2px); }
.btn--ghost {
  background: var(--surface); color: var(--ink);
  border-color: var(--hairline-2);
}
.btn--ghost:hover { background: var(--surface-2); }
.btn--wa {
  background: #25D366; color: #033F1A;
}
.btn--wa:hover { transform: translateY(-2px); }
.btn--sm { height: 38px; padding: 0 14px; font-size: 13px; }
/* Highlighted "Add" button with bucket icon (replaces old "Add to quote") */
.btn--add {
  background: linear-gradient(135deg, var(--gold-2) 0%, var(--gold) 100%);
  color: #4a2f00;
  border-color: rgba(184, 120, 10, .38);
  box-shadow: 0 10px 24px -10px rgba(232, 163, 23, .60), inset 0 1px 0 rgba(255, 255, 255, .45);
  font-weight: 800;
  gap: 8px;
}
.btn--add:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(232, 163, 23, .72); }
.btn--add::before {
  content: "";
  width: 1.15em; height: 1.15em; flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 11 4-7'/%3E%3Cpath d='m19 11-4-7'/%3E%3Cpath d='M2 11h20'/%3E%3Cpath d='m4 11 1.7 8.6a2 2 0 0 0 2 1.4h8.6a2 2 0 0 0 2-1.4L20 11'/%3E%3Cpath d='M9.5 15v3'/%3E%3Cpath d='M14.5 15v3'/%3E%3C/svg%3E");
  mask: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 11 4-7'/%3E%3Cpath d='m19 11-4-7'/%3E%3Cpath d='M2 11h20'/%3E%3Cpath d='m4 11 1.7 8.6a2 2 0 0 0 2 1.4h8.6a2 2 0 0 0 2-1.4L20 11'/%3E%3Cpath d='M9.5 15v3'/%3E%3Cpath d='M14.5 15v3'/%3E%3C/svg%3E");
}

/* Pills, badges */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hairline);
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--saffron); box-shadow: 0 0 0 4px rgba(255,107,26,.16); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  background: rgba(15, 142, 95, .12); color: var(--emerald);
}
.badge--saffron { background: rgba(255, 107, 26, .14); color: #C24E0F; }
.badge--crimson { background: rgba(224, 53, 110, .12); color: var(--crimson); }
.badge--plum { background: rgba(91, 46, 145, .12); color: var(--plum); }
.badge--gold { background: rgba(232, 163, 23, .18); color: #946600; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.card--glow {
  position: relative;
  overflow: hidden;
}
.card--glow::before {
  content: "";
  position: absolute; inset: -1px;
  background: linear-gradient(135deg, rgba(255,107,26,.25), rgba(224,53,110,.18), rgba(91,46,145,.18));
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity .3s;
}
.card--glow:hover::before { opacity: 1; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 90;
  backdrop-filter: blur(18px) saturate(140%);
  background: rgba(255, 248, 236, .82);
  border-bottom: 1px solid var(--hairline);
}
.site-header .nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 24px;
}
.brand-mark {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 20px;
  letter-spacing: -.02em;
  white-space: nowrap; flex-shrink: 0;
}
.brand-mark__icon { flex-shrink: 0; }
.brand-mark > div { line-height: 1.1; }
.brand-mark__icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, var(--gold-2), var(--saffron) 50%, var(--crimson) 100%);
  position: relative;
  box-shadow: 0 8px 22px -6px rgba(255,107,26,.55);
}
.brand-mark__icon::before, .brand-mark__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: #fff; border-radius: 999px;
  transform: translate(-50%, -50%);
}
.brand-mark__icon::before { width: 2.5px; height: 18px; }
.brand-mark__icon::after  { width: 18px; height: 2.5px; }
.brand-mark__icon span {
  position: absolute; inset: 0; border-radius: inherit;
  background:
    radial-gradient(circle at 20% 80%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 80% 25%, #fff 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 70% 75%, #fff 0 1.5px, transparent 2.5px);
  opacity: .9;
}
.brand-mark small {
  display: block; font-family: var(--font-body); font-size: 10.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.nav-links { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.nav-links a {
  padding: 9px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: background .2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.nav-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.nav-search {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px; height: 42px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 999px; color: var(--muted); font-size: 13px;
  min-width: 240px;
  box-shadow: var(--shadow-sm);
}
.nav-search input {
  flex: 1; border: 0; background: transparent; outline: none; font: inherit; color: var(--ink);
}
.nav-search kbd {
  font-family: var(--font-mono); font-size: 10px;
  padding: 2px 6px; border-radius: 6px;
  background: var(--bg-tint); color: var(--muted);
  border: 1px solid var(--hairline-2);
}
.menu-btn {
  display: none; height: 42px; width: 42px;
  border-radius: 12px; border: 1px solid var(--hairline);
  background: var(--surface);
}
/* Header scales down before it can wrap: tighten spacing, shrink search,
   then collapse the full nav into the menu button on tablet widths. */
@media (max-width: 1240px) {
  .site-header .nav { gap: 16px; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 9px 11px; }
  .nav-search { min-width: 150px; }
}
@media (max-width: 1040px) {
  .nav-links, .nav-search { display: none; }
  .menu-btn { display: grid; place-items: center; }
}

/* Footer */
.site-footer {
  margin-top: 80px; padding: 56px 0 24px;
  background: linear-gradient(180deg, transparent 0%, var(--bg-tint) 30%, var(--bg-tint) 100%);
  border-top: 1px solid var(--hairline);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 36px;
}
.foot-col h4 {
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 16px;
}
.foot-col a { display: block; padding: 6px 0; color: var(--ink-2); font-size: 14px; }
.foot-col a:hover { color: var(--saffron); }
.foot-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--muted);
}

/* Floating actions */
.fab-stack {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  display: flex; flex-direction: column; gap: 12px;
  align-items: flex-end;
}
.fab {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-size: 22px;
  box-shadow: 0 18px 40px -12px rgba(27, 15, 42, .35);
  border: 0;
  position: relative;
}
.fab--wa { background: #25D366; }
.fab--wa::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid #25D366; animation: pulse 2.4s infinite;
}
.fab--quote { background: linear-gradient(135deg, var(--saffron), var(--crimson)); }
.fab--top { background: var(--ink); width: 44px; height: 44px; font-size: 16px; }
.fab-label {
  position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  background: var(--ink); color: #fff; padding: 7px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.fab:hover .fab-label { opacity: 1; }

@keyframes pulse {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Fireworks canvas wrapper */
.fireworks-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 90%);
}

/* Sparkle decoration */
.sparkle {
  position: absolute;
  width: 14px; height: 14px;
  background:
    linear-gradient(transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px));
  color: var(--gold);
  animation: twinkle 2.4s infinite ease-in-out;
  opacity: .7;
}
.sparkle::after {
  content: ""; position: absolute; inset: 0;
  background: inherit;
  transform: rotate(45deg);
  opacity: .6;
}
@keyframes twinkle {
  0%, 100% { transform: scale(.4) rotate(0deg); opacity: .3; }
  50%      { transform: scale(1) rotate(180deg); opacity: 1; }
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Util */
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(2, 1fr); }
.grid-3 { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.grid-4 { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }

/* Section heads */
.section { padding: 46px 0; position: relative; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; }
.section-head h2 { max-width: 16ch; }
.section-head p { color: var(--muted); max-width: 50ch; }

/* Marigold divider */
.divider-marigold {
  display: flex; align-items: center; gap: 14px; color: var(--gold);
  font-size: 18px; opacity: .7;
}
.divider-marigold::before, .divider-marigold::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline-2), transparent);
}

/* Inputs */
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.input, .select, .textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--hairline-2);
  background: var(--surface);
  font: inherit; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--saffron);
  box-shadow: 0 0 0 4px rgba(255, 107, 26, .14);
}
.textarea { min-height: 110px; resize: vertical; }

/* Product card */
.product-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 107, 26, .35);
}
.product-card__media {
  aspect-ratio: 4/3;
  background:
    radial-gradient(circle at 30% 30%, var(--gold-2), transparent 50%),
    radial-gradient(circle at 75% 70%, var(--crimson-2), transparent 55%),
    linear-gradient(135deg, var(--bg-tint), var(--surface-2));
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 64px;
}
.product-card__body { padding: 18px; display: grid; gap: 8px; }
.product-card__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.product-card__meta { display: flex; justify-content: space-between; align-items: end; }
.price { font-family: var(--font-mono); font-weight: 700; font-size: 20px; color: var(--ink); }
.price s { color: var(--muted); font-weight: 500; font-size: 13px; margin-right: 6px; }
.product-card__actions { display: flex; gap: 8px; padding: 0 18px 18px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  border: 1px solid var(--hairline-2); background: var(--surface);
  color: var(--ink-2); transition: .2s;
}
.icon-btn:hover { color: var(--crimson); border-color: var(--crimson); background: rgba(224,53,110,.05); }

/* Responsive */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (max-width: 820px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 32px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .nav-links, .nav-search { display: none; }
  .menu-btn { display: grid; place-items: center; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  h1 { font-size: clamp(24px, 8vw, 38px); }
}

/* ===== MOBILE RESPONSIVE SAFETY (global) ===== */
/* Use overflow-x:clip (not hidden) so it stops sideways scroll WITHOUT
   creating a scroll container — hidden here breaks position:sticky
   (e.g. the products filter panel would not stay fixed while scrolling). */
html, body { overflow-x: clip; max-width: 100%; }
* { min-width: 0; }
img, svg, canvas, video { max-width: 100%; }
@media (max-width: 600px) {
  .nav-actions .btn--ink { display: none; }
  .brand-mark { font-size: 17px; }
  .brand-mark small { font-size: 9px; }
  .brand-mark__icon { width: 38px; height: 38px; }
  .container { width: min(1280px, calc(100% - 28px)); }
}

/* ===== brand logo + loading splash ===== */
.brand-logo{width:46px;height:46px;object-fit:contain;flex-shrink:0;border-radius:10px;}
.rc-splash{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;background:radial-gradient(circle at 50% 42%,#FFF8EC,#FFEFD6);transition:opacity .5s ease,visibility .5s ease;}
.rc-splash.hide{opacity:0;visibility:hidden;}
.rc-splash-logo{position:relative;display:grid;place-items:center;width:240px;height:240px;}
.rc-splash-img{width:150px;height:150px;object-fit:contain;border-radius:50%;z-index:3;position:relative;animation:rcpulse 1.6s ease-in-out infinite;}
.rc-splash-img.rc-nologo{background:radial-gradient(circle at 30% 30%,var(--gold-2),var(--saffron) 55%,var(--crimson));color:transparent;font-size:0;}
@keyframes rcpulse{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
.rc-splash-name{position:absolute;bottom:18px;font-family:var(--font-display);font-weight:800;letter-spacing:.16em;color:var(--crimson);font-size:13px;z-index:3;}
.rc-ring{position:absolute;width:196px;height:196px;border-radius:50%;background:conic-gradient(from 0deg,var(--gold),var(--saffron),var(--crimson),var(--plum),var(--gold));filter:blur(9px);opacity:.45;animation:rcspin 3s linear infinite;z-index:0;}
@keyframes rcspin{to{transform:rotate(360deg)}}
.rc-sparks{position:absolute;left:50%;top:50%;width:0;height:0;z-index:1;}
.rc-spark{position:absolute;left:-3px;top:-3px;width:7px;height:7px;border-radius:50%;box-shadow:0 0 8px currentColor;transform:rotate(var(--a)) translateY(-70px) scale(.3);opacity:0;animation:rcburst 1.5s ease-out infinite;}
@keyframes rcburst{0%{transform:rotate(var(--a)) translateY(-70px) scale(.3);opacity:0}25%{opacity:1}100%{transform:rotate(var(--a)) translateY(-135px) scale(1);opacity:0}}
