/* ============================================================
   Sivakasi Fireworks - Global Styles (mobile-first)
   Theme: festive Diwali — deep maroon & marigold-gold, warm glow
   Palette: rich maroon surfaces/primary, marigold-gold accent for
            prices & highlights, warm cream base, functional red/green
   ============================================================ */
:root {
  --bg: #fdf6ea;
  --surface: #fffdf8;
  --surface-2: #fbeed9;
  --border: #eddcb8;
  --text: #2a1207;
  --muted: #8a6a45;
  /* primary (mapped onto the old --gold token so every existing class updates) */
  --gold: #c8951f;
  --gold-dark: #a5780f;
  --primary: #8a1220;
  --primary-dark: #6b0d18;
  --accent: #c8951f;      /* marigold-gold accent for prices */
  --crimson: #dc2626;
  --green: #16a34a;
  --marigold: #f2a900;
  --marigold-light: #ffd76a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(60, 20, 5, .06), 0 8px 24px rgba(120, 40, 10, .10);
  --shadow-sm: 0 1px 2px rgba(60, 20, 5, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  /* Establishes a stacking context (with z-index:0) so the watermark
     pseudo-element below (z-index:-1) is guaranteed to stay behind all
     normal page content without having to touch every child's z-index -
     this keeps things like .modal / .toast-wrap unaffected. */
  position: relative;
  z-index: 0;
}

/* ---------- Brand watermark background ----------
   A single, large, centered logo watermark fixed behind all content, so
   it stays visible to the user no matter how far they scroll down the
   page. Semi-transparent and non-interactive so it never blocks clicks/
   taps or hurts text readability, while still being clearly viewable. */
body.has-brand-bg::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  background-image: url("../img/logo.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(80vmin, 820px);
  opacity: 0.28;
  pointer-events: none;
  user-select: none;
}
@media print { body.has-brand-bg::before { display: none; } }

/* The header, cards, tables and footer normally use a fully opaque white
   surface, which was hiding the watermark behind them almost everywhere
   on real, content-heavy pages (the logo only showed in the thin gray
   gaps between panels). Making those panels slightly translucent lets
   the watermark show through consistently across the whole page, while
   the ~95% opacity keeps text contrast and readability unaffected.
   Scoped to .has-brand-bg only, so the admin panel (which reuses this
   same stylesheet but has no watermark) keeps its solid white surfaces. */
body.has-brand-bg .site-header,
body.has-brand-bg .site-footer,
body.has-brand-bg .card,
body.has-brand-bg table.products,
body.has-brand-bg .invoice,
body.has-brand-bg .cart-bar {
  background: rgba(255, 255, 255, 0.94);
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--marigold), var(--primary)) 1;
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 50;
}
.diwali-banner {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary) 45%, #a3311f 55%, var(--primary-dark));
  color: #ffe9b8;
  font-size: 0.82rem; font-weight: 700; letter-spacing: .02em;
  text-align: center; padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 215, 106, .35);
}
.diwali-banner .diya { display: inline-block; vertical-align: -3px; margin: 0 4px; }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 0; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: -.01em; }
.brand span.spark { color: var(--primary); }
.brand-logo {
  height: 44px; width: 44px; object-fit: contain; border-radius: 999px; flex-shrink: 0;
  background: radial-gradient(circle at 50% 42%, #ffe9b8 0%, var(--marigold) 55%, var(--primary) 100%);
  padding: 2px;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--marigold-light), 0 2px 10px rgba(200, 149, 31, .35);
}
.brand-name { max-width: 220px; line-height: 1.15; }
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding: 2px; background: var(--surface-2); border-radius: 999px; }
.lang-switch a { color: var(--muted); padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; }
.lang-switch a.active { background: var(--primary); color: #fff; }
@media (max-width: 560px) { .brand-name { font-size: 1rem; max-width: 150px; } }
.nav-links a {
  color: var(--muted); padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: var(--surface-2); color: var(--primary); }
.nav-links a.active { background: linear-gradient(135deg, #fdecc2, #fbdc94); color: var(--primary-dark); }

.menu-toggle {
  display: none; /* shown only on mobile, see media query below */
  align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); flex-shrink: 0;
}
.menu-toggle:hover { color: var(--primary); }

.cart-badge {
  background: var(--crimson); color: #fff; border-radius: 999px;
  font-size: 0.75rem; padding: 1px 7px; margin-left: 4px; font-weight: 700;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffe9b8; border: 1px solid var(--primary-dark); border-radius: 10px;
  padding: 10px 18px; font-weight: 700; font-size: 0.95rem; cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease, filter .15s ease;
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(242, 169, 0, .25) inset;
}
.btn:hover { filter: brightness(1.08); box-shadow: var(--shadow), 0 0 14px rgba(242, 169, 0, .35); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #cbd5e1; border-color: #cbd5e1; color: #ffffff; cursor: not-allowed; box-shadow: none; filter: none; }
.btn-outline { background: var(--surface); border: 1px solid var(--gold); color: var(--primary); box-shadow: none; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--surface-2); }
.btn-danger { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- Cards / Sections ---------- */
.section { padding: 28px 0; }
.page-title { font-size: 1.6rem; color: var(--text); margin-bottom: 4px; letter-spacing: -.02em; font-weight: 800; }
.page-sub { color: var(--muted); margin-bottom: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}

/* ---------- Product table (user) ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input, .filters select {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 10px 12px; border-radius: 10px; font-size: 0.95rem;
}
.filters input:focus, .filters select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 149, 31, .18); }
.filters input { flex: 1; min-width: 180px; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
table.products { width: 100%; border-collapse: collapse; min-width: 640px; background: var(--surface); }
table.products th, table.products td {
  padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle;
}
table.products tbody tr:last-child td { border-bottom: none; }
table.products tbody tr:hover { background: var(--surface-2); }
table.products th { background: linear-gradient(135deg, var(--surface-2), #f6dfae); color: var(--primary-dark); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.thumb {
  width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border);
  cursor: pointer; background: var(--surface-2);
}
.price-now { color: var(--accent); font-weight: 800; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 0.85rem; margin-left: 6px; }
.qty-input { width: 74px; background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 8px; border-radius: 8px; text-align: center; }
.qty-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 149, 31, .18); }
.pill { font-size: 0.72rem; padding: 3px 9px; border-radius: 999px; font-weight: 700; }
.pill-out { background: #fef2f2; color: var(--crimson); }
.pill-stock { background: #ecfdf5; color: var(--green); }
.pill-pending { background: #fdf3e0; color: var(--gold-dark); }
.pill-success { background: #ecfdf5; color: var(--green); }
.pill-cancelled { background: #fef2f2; color: var(--crimson); }

.status-select {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 6px 10px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.status-select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 149, 31, .18); }

.status-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.status-tabs a {
  color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 0.85rem;
}
.status-tabs a.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #ffe9b8; border-color: var(--primary-dark); }

/* ---------- Cart (Meesho-style item cards) ---------- */
.cart-list { display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-sm);
}
.cart-item-media {
  width: 76px; height: 76px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
}
.cart-item-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-item-name { font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.cart-item-price { color: var(--muted); font-size: 0.85rem; }
.cart-item-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.qty-stepper .qty-input {
  width: 40px; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  border-radius: 0; padding: 6px 2px; text-align: center;
}
.qty-step-btn {
  width: 30px; height: 30px; background: var(--surface-2); border: none; color: var(--primary);
  font-size: 1rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.qty-step-btn:hover { background: var(--surface); }
.cart-item-line { font-weight: 800; color: var(--accent); margin-left: auto; }
.cart-item-remove {
  width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--crimson); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.cart-item-remove:hover { background: #fef2f2; border-color: var(--crimson); }

/* Sticky order-summary + checkout bar, kept visible while reviewing the cart */
.cart-summary-sticky {
  position: sticky; bottom: 0; margin-top: 18px; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, .1);
}
.cart-summary-inner { padding: 14px 16px; }
.cart-summary-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cart-checkout-btn { font-size: 1.02rem; padding: 13px 18px; }

@media (max-width: 640px) {
  .cart-item-name { font-size: 0.9rem; }
  .cart-item-line { font-size: 0.95rem; }
}

/* ---------- Sticky cart bar ---------- */
.cart-bar {
  position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, .06);
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; z-index: 40;
}
.cart-bar .total { font-weight: 700; }
.cart-bar .total b { color: var(--accent); font-size: 1.15rem; }
.hint { color: var(--muted); font-size: 0.85rem; }
.hint.warn { color: var(--crimson); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 11px 12px; border-radius: 10px; font-size: 0.95rem;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 149, 31, .18); }
.field textarea { min-height: 84px; resize: vertical; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; border: 1px solid transparent; }
.alert-success { background: #ecfdf5; color: #15803d; border-color: #bbf7d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-info { background: #fdf3e0; color: var(--primary-dark); border-color: #f2cf8e; }

/* ---------- Grid of stat cards (admin) ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 800px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat .num { font-size: 1.9rem; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.stat .label { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

/* ---------- Admin sidebar layout ---------- */
.admin-shell { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 860px) { .admin-shell { grid-template-columns: 232px 1fr; } }
.admin-nav {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px; box-shadow: var(--shadow); align-self: start;
}
.admin-nav a {
  color: var(--muted); padding: 10px 14px; border-radius: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .15s ease, color .15s ease;
}
.admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a.active { background: linear-gradient(135deg, #fdecc2, #fbdc94); color: var(--primary-dark); }
.admin-nav .note { background: var(--crimson); color: #fff; border-radius: 999px; font-size: 0.72rem; padding: 1px 8px; }

/* ---------- Invoice ---------- */
.invoice { background: var(--surface); color: #1a1a1a; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; max-width: 720px; margin: 0 auto; box-shadow: var(--shadow); }
.invoice h2 { color: var(--text); }
.invoice table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.invoice th, .invoice td { border: 1px solid var(--border); padding: 9px 11px; text-align: left; font-size: 0.9rem; }
.invoice th { background: var(--surface-2); color: var(--muted); text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; }
.invoice .totals td { border: none; }
.invoice .totals .grand { font-weight: 800; font-size: 1.1rem; color: var(--text); }
.qr-box { text-align: center; margin: 18px 0; }
.qr-box img { width: 200px; margin: 0 auto; border: 1px solid var(--border); border-radius: 8px; }

/* ---------- Mobile enhancements (product / cart / price list / contact) ---------- */
@media (max-width: 640px) {
  .section { padding: 18px 0; }
  .page-title { font-size: 1.3rem; }
  .filters { flex-direction: column; }
  .filters input, .filters select { width: 100%; }

  /* Turn product & cart tables into stacked cards on small screens */
  table.responsive-cards { min-width: 0; }
  table.responsive-cards thead { display: none; }
  table.responsive-cards, table.responsive-cards tbody, table.responsive-cards tr, table.responsive-cards td {
    display: block; width: 100%;
  }
  .table-wrap:has(table.responsive-cards) { overflow-x: visible; }
  table.responsive-cards tr {
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
  }
  table.responsive-cards tbody tr:last-child { border-bottom: none; }
  table.responsive-cards td {
    border-bottom: none;
    padding: 6px 0;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    text-align: right;
  }
  table.responsive-cards td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .04em;
    font-weight: 700; text-align: left; flex-shrink: 0;
  }
  table.responsive-cards td.cell-name {
    font-weight: 700; font-size: 1rem;
    justify-content: flex-start; text-align: left; flex-wrap: wrap;
  }
  table.responsive-cards .thumb { width: 64px; height: 64px; margin-left: auto; }
  table.responsive-cards .qty-input { width: 100%; max-width: 110px; }

  /* Price list: stack action buttons */
  .price-list-actions { flex-direction: column; }
  .price-list-actions .btn { width: 100%; }

  /* Most mobile browsers can't render an embedded PDF at all, so hide the
     embed and show a short note pointing at the open/download buttons instead. */
  .pdf-embed-wrap { display: none; }
}

@media (min-width: 641px) {
  /* Desktop/tablet can render the PDF embed fine, so hide the mobile-only note there. */
  .mobile-price-list-note { display: none; }
}

@media (max-width: 480px) {
  .brand-logo { height: 36px; width: 36px; }
  .nav-links a { padding: 7px 10px; font-size: 0.88rem; }
}

/* ---------- Image modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .72); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal.open { display: flex; }
.modal img { max-width: 92vw; max-height: 88vh; border-radius: 12px; border: 2px solid var(--surface); box-shadow: var(--shadow); }
.modal .close { position: absolute; top: 18px; right: 22px; color: #fff; font-size: 2rem; cursor: pointer; }
body.modal-open { overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--primary), var(--marigold), var(--primary)) 1;
  padding: 24px 0; color: var(--muted); font-size: 0.9rem; margin-top: 30px; background: var(--surface);
}
.site-footer strong { color: var(--primary) !important; }

/* ---------- Toast notification ---------- */
.toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--gold);
  color: var(--text); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: 320px;
  animation: slidein .3s ease;
}
@keyframes slidein { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

@media print {
  .site-header, .site-footer, .no-print, .cart-bar, .wa-float, .mobile-side-menu, .side-menu-overlay { display: none !important; }
  body { background: #fff; }
  .invoice { box-shadow: none; border: none; }
}

/* ============================================================
   Home page & product cards (mobile-first grid UX)
   ============================================================ */
.section-title { font-size: 1.25rem; font-weight: 800; color: var(--text); margin: 30px 0 6px; letter-spacing: -.01em; }

/* ---------- Hero banner ---------- */
.hero-banner {
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 55%, #a3311f);
  color: #fff3d6; border-radius: var(--radius); padding: 40px 20px 34px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.hero-decor { font-size: 1.4rem; letter-spacing: 10px; color: var(--marigold-light); opacity: .85; margin-bottom: 10px; }
.hero-headline { font-size: 1.5rem; font-weight: 800; max-width: 640px; margin: 0 auto 10px; line-height: 1.3; }
.hero-sub { color: #ffe9b8; opacity: .9; max-width: 560px; margin: 0 auto 18px; font-size: 0.92rem; }
.hero-cta { background: linear-gradient(135deg, var(--marigold), #d98a00); color: #3a1a00; border-color: #d98a00; }
@media (min-width: 640px) { .hero-headline { font-size: 2rem; } }

/* ---------- Product grid & card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 26px; }
@media (min-width: 560px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.pcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.pcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.pcard-media { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; }
.pcard-img-zoom { cursor: zoom-in; transition: filter .15s ease; }
.pcard-img-zoom:hover, .pcard-img-zoom:focus-visible { filter: brightness(1.04); }
.pcard-img-zoom:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.pcard-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--border); }
.badge-discount {
  position: absolute; top: 8px; left: 8px; background: var(--crimson); color: #fff;
  font-size: 0.72rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.badge-soldout {
  position: absolute; inset: 0; background: rgba(20, 10, 5, .55); color: #fff; font-weight: 800;
  font-size: 0.85rem; display: flex; align-items: center; justify-content: center; letter-spacing: .04em;
}
.pcard-icons { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 6px; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 999px; border: none; background: rgba(255,255,255,.92);
  color: var(--muted); font-size: 0.95rem; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: transform .1s ease, color .1s ease;
}
.icon-btn:hover { transform: scale(1.08); }
.icon-btn.wish-btn.active { color: var(--crimson); }
.pcard-icon-form, .pcard-wish-form { margin: 0; }

.pcard-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard-cat {
  align-self: flex-start; background: var(--surface-2); color: var(--primary-dark); font-size: 0.68rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px;
}
.pcard-name {
  font-weight: 700; font-size: 0.88rem; line-height: 1.3; min-height: 2.2em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price-off { color: var(--green); font-weight: 700; font-size: 0.74rem; }
.pcard-cart-form { margin-top: auto; }
.pcard-add-btn { width: 100%; padding: 9px 6px; font-size: 0.8rem; white-space: nowrap; }
.pcard-add-btn svg { flex-shrink: 0; }

/* ---------- Category / occasion tiles ---------- */
.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 26px; }
@media (min-width: 560px) { .tile-grid { grid-template-columns: repeat(4, 1fr); } }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: var(--shadow-sm); color: var(--text); font-weight: 700; font-size: 0.85rem;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.tile:hover, .tile.active { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--gold); color: var(--primary-dark); }
.tile img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.tile-icon { font-size: 1.9rem; line-height: 1; }

/* ---------- Quick view modal ---------- */
.quickview-box {
  background: var(--surface); border-radius: var(--radius); max-width: 560px; width: 100%;
  display: grid; grid-template-columns: 1fr; overflow: hidden; box-shadow: var(--shadow); position: relative;
}
@media (min-width: 560px) { .quickview-box { grid-template-columns: 1fr 1fr; } }
.qv-media { background: var(--surface-2); aspect-ratio: 1/1; }
.qv-media img { width: 100%; height: 100%; object-fit: cover; }
.qv-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.qv-body h3 { font-size: 1.1rem; }
.quickview-box .close { position: absolute; top: 10px; right: 14px; color: var(--muted); font-size: 1.6rem; cursor: pointer; z-index: 2; }

/* ---------- Compliance modal (one-time legal notice) ---------- */
.compliance-modal-box { grid-template-columns: 1fr !important; max-width: 520px; }
.compliance-modal-box .qv-body { padding: 24px; }

/* ---------- Compliance / policy card (About page) ---------- */
.compliance-card p { margin-bottom: 12px; font-size: 0.92rem; line-height: 1.6; color: var(--text); }
.compliance-card p:last-child { margin-bottom: 0; }

/* ---------- Footer social icons + floating WhatsApp button ---------- */
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 999px; background: var(--surface-2); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.footer-social a:hover { filter: brightness(1.1); transform: translateY(-2px); }
.footer-social a.fb { background: #1877F2; color: #fff; }
.footer-social a.yt { background: #FF0000; color: #fff; }
.footer-social a.ig {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  color: #fff;
}

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 56px; height: 56px; border-radius: 999px; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.28);
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.08); }
@media (max-width: 480px) { .wa-float { right: 12px; bottom: 12px; width: 50px; height: 50px; } }

/* ---------- Mobile side menu (hamburger-triggered off-canvas panel) ---------- */
.side-menu-overlay {
  display: none; position: fixed; inset: 0; z-index: 96;
  background: rgba(15, 23, 42, .55); opacity: 0; transition: opacity .2s ease;
}
.side-menu-overlay.open { display: block; opacity: 1; }

.mobile-side-menu {
  position: fixed; top: 0; bottom: 0; right: 0; z-index: 97;
  width: 78vw; max-width: 300px;
  background: var(--surface, #fffdf8); box-shadow: -6px 0 24px rgba(15, 23, 42, .18);
  display: flex; flex-direction: column; gap: 2px;
  padding: 4px 10px calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(100%); transition: transform .22s ease;
  overflow-y: auto;
}
.mobile-side-menu.open { transform: translateX(0); }

.side-menu-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 6px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.side-menu-title { font-weight: 800; font-size: 1rem; color: var(--text); }
.side-menu-close {
  width: 32px; height: 32px; border-radius: 999px; color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; line-height: 1;
  background: var(--surface-2); flex-shrink: 0;
}

.mobile-side-menu > a {
  display: flex; align-items: center; gap: 12px; color: var(--muted);
  padding: 12px 10px; border-radius: 10px; font-weight: 700; font-size: 0.95rem;
}
.mobile-side-menu > a svg { flex-shrink: 0; }
.mobile-side-menu > a.active { color: var(--primary-dark); background: linear-gradient(135deg, #fdecc2, #fbdc94); }
.mobile-side-menu > a .cart-badge { margin-left: auto; }

.side-menu-lang {
  display: flex; align-items: center; gap: 6px; margin: 10px 6px 4px;
  background: var(--surface-2); border-radius: 999px; padding: 3px;
}
.side-menu-lang a { flex: 1; text-align: center; padding: 8px 10px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; color: var(--muted); }
.side-menu-lang a.active { background: var(--primary); color: #fff; }

body.side-menu-open { overflow: hidden; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
}

@media (max-width: 640px) {
  .pcard-name { font-size: 0.82rem; }
}
