:root{
  --bg:#FFF3EC; --red:#D62839; --red-dark:#A81E2B; --green:#1F6F54; --green-dark:#155541;
  --gold:#F2B705; --gold-dark:#C9930A; --ink:#241C1C; --ink-soft:#6B5E5A;
  --white:#FFFFFF; --card:#FFFFFF; --line:#F0DFD6;
}
*{box-sizing:border-box; margin:0; padding:0;}
html,body{height:100%;}
body{ background:var(--bg); font-family:'Nunito',sans-serif; color:var(--ink); min-height:100dvh; }

.app-shell{ width:100%; max-width:560px; margin:0 auto; min-height:100dvh; background:var(--bg);
  display:flex; flex-direction:column; }

/* Header */
.header{ background:var(--white); padding:14px 16px 12px; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:10; }
.header-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.brand{ display:flex; align-items:center; gap:9px; text-decoration:none; color:inherit; }
.brand-mark{ width:36px; height:36px; border-radius:50%; overflow:hidden; flex-shrink:0; }
.brand-mark img{ width:100%; height:100%; object-fit:cover; }
.brand-text .name{ font-family:'Fredoka',sans-serif; font-weight:700; font-size:17px; line-height:1; }
.brand-text .tag{ font-size:9px; font-weight:800; letter-spacing:.08em; color:var(--red); text-transform:uppercase; }
.header-icons{ display:flex; align-items:center; gap:16px; }
.icon-btn{ position:relative; color:var(--ink); }
.icon-btn svg{ width:22px; height:22px; display:block; }
.badge{ position:absolute; top:-6px; right:-8px; background:var(--red); color:#fff; font-size:9px; font-weight:800;
  border-radius:20px; padding:1px 5px; }
.search{ display:flex; align-items:center; gap:8px; background:var(--bg); border:1.5px solid var(--line);
  border-radius:14px; padding:9px 12px; }
.search input{ border:none; background:transparent; outline:none; font-size:13px; color:var(--ink); width:100%; }
.twist-divider{ height:10px; width:100%; background:repeating-linear-gradient(-45deg, var(--gold) 0 8px, var(--red) 8px 16px); }

/* Category chips */
.hero-banner{ display:none; }
.categories{ display:flex; gap:14px; overflow-x:auto; padding:16px 16px 8px; }
.cat{ flex-shrink:0; display:flex; flex-direction:column; align-items:center; gap:6px; width:64px; text-decoration:none; color:inherit; }
.cat-icon{ width:56px; height:56px; border-radius:50%; background:var(--white); border:1.5px solid var(--line);
  display:flex; align-items:center; justify-content:center; font-size:24px; }
.cat.active .cat-icon{ border-color:var(--red); }
.cat-label{ font-size:10px; font-weight:700; text-align:center; color:var(--ink-soft); }
.cat.active .cat-label{ color:var(--red); }

/* Section */
.section{ padding:18px 16px 4px; display:grid; grid-template-columns:repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap:14px; }
.section-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.ribbon{ font-family:'Fredoka'; font-weight:600; font-size:15px; }
.see-all{ font-size:11.5px; font-weight:800; color:#fff; background:var(--gold-dark); padding:6px 12px;
  border-radius:20px; text-decoration:none; }

/* Product card */
.product{ display:flex; gap:12px; background:var(--card); border-radius:16px; padding:10px; margin-bottom:10px;
  border:1px solid var(--line); position:relative; text-decoration:none; color:inherit; }
.product-link{ display:flex; gap:12px; text-decoration:none; color:inherit; flex:1; width:100%; }
.product-img{ width:78px; height:78px; border-radius:12px; flex-shrink:0; background:#F3E8E2; position:relative; overflow:hidden; }
.product-img img{ width:100%; height:100%; object-fit:cover; }
.discount-badge{ position:absolute; top:4px; left:4px; background:var(--red); color:#fff; font-size:8.5px; font-weight:800;
  padding:2px 6px; border-radius:6px; }
.product-info{ flex:1; min-width:0; padding-right:56px; }
.product-name{ font-size:13.5px; font-weight:800; line-height:1.25; }
.product-weight{ font-size:11px; color:var(--ink-soft); margin-top:2px; font-weight:600; }
.product-sku{ font-size:10px; color:#B9ABA5; margin-top:1px; font-weight:700; }
.price-row{ display:flex; align-items:baseline; gap:6px; margin-top:6px; flex-wrap:wrap; }
.price-now{ font-size:15px; font-weight:800; color:var(--green-dark); }
.price-mrp{ font-size:11.5px; color:var(--ink-soft); text-decoration:line-through; }
.save-tag{ font-size:10px; color:var(--red); font-weight:700; margin-top:1px; }
.product-actions{ position:absolute; right:10px; bottom:10px; display:flex; align-items:center; gap:8px; }
.add-btn{ background:var(--white); color:var(--green-dark); border:1.5px solid var(--green); font-weight:800; font-size:12px;
  padding:6px 16px; border-radius:10px; cursor:pointer; }



/* Cart bar */
.cart-bar{ position:sticky; bottom:14px; left:0; right:0; margin:14px 12px 0; background:var(--ink); border-radius:16px;
  padding:12px 14px; display:flex; align-items:center; justify-content:space-between; color:#fff; text-decoration:none;
  box-shadow:0 10px 24px rgba(0,0,0,.3); }
.cart-bar .count{ font-size:10.5px; color:#D9C9C2; font-weight:700; }
.cart-bar .amount{ font-family:'Fredoka'; font-size:16px; font-weight:600; }
.cart-bar .view-btn{ background:var(--gold); color:var(--ink); font-weight:800; font-size:13px; padding:9px 18px; border-radius:11px; }

/* PDP */
.pdp-hero{ width:100%; aspect-ratio:1/1; background:#F3E8E2; position:relative; }
.pdp-hero img{ width:100%; height:100%; object-fit:contain; display:block; }
.pdp-gallery{ display:flex; gap:8px; padding:10px 16px; overflow-x:auto; }
.pdp-thumb{ width:56px; height:56px; border-radius:10px; overflow:hidden; border:2px solid transparent; flex-shrink:0; }
.pdp-thumb.active{ border-color:var(--red); }
.pdp-thumb img{ width:100%; height:100%; object-fit:cover; }
.pdp-body{ padding:6px 16px 100px; }
.pdp-name{ font-family:'Fredoka'; font-weight:600; font-size:19px; }
.pdp-price-row{ display:flex; align-items:baseline; gap:10px; margin:12px 0 2px; }
.pdp-price-now{ font-size:24px; font-weight:800; color:var(--green-dark); }
.pdp-price-mrp{ font-size:15px; color:var(--ink-soft); text-decoration:line-through; }

/* ============================================================
   DESKTOP STOREFRONT (≥900px only) — mobile styles above are
   completely untouched. This is an additive layer on top.
   ============================================================ */
@media (min-width: 900px){
  body{ background:#F7EFEA; }
  .app-shell{ max-width:1240px; box-shadow:0 0 40px rgba(0,0,0,.05); background:var(--bg); }

  .hero-banner{ display:block; margin:24px 40px 8px; border-radius:24px; overflow:hidden;
    background:linear-gradient(120deg, #155541 0%, #1F6F54 55%, #F2B705 130%); position:relative; }
  .hero-banner-content{ padding:56px 56px 40px; max-width:600px; position:relative; z-index:1; }
  .hero-eyebrow{ color:#F2B705; font-size:12.5px; font-weight:800; letter-spacing:1.5px; text-transform:uppercase; margin-bottom:14px; }
  .hero-title{ font-family:'Fredoka',sans-serif; font-weight:600; font-size:38px; line-height:1.18; color:#fff; margin:0 0 16px; }
  .hero-sub{ color:rgba(255,255,255,.85); font-size:14.5px; font-weight:600; line-height:1.6; margin:0 0 26px; max-width:460px; }
  .hero-cta{ display:inline-block; background:#D62839; color:#fff; font-weight:800; font-size:14px; padding:13px 30px;
    border-radius:12px; text-decoration:none; transition:transform .15s ease, box-shadow .15s ease; }
  .hero-cta:hover{ transform:translateY(-2px); box-shadow:0 10px 22px rgba(0,0,0,.18); }
  .hero-banner-strip{ display:flex; gap:0; background:rgba(0,0,0,.16); padding:16px 40px; }
  .hero-badge{ flex:1; text-align:center; color:#fff; font-size:12.5px; font-weight:700; }

  .header{ padding:20px 40px 18px; }
  .header-top{ margin-bottom:16px; }
  .brand-mark{ width:46px; height:46px; }
  .brand-text .name{ font-size:20px; }
  .brand-text .tag{ font-size:10px; }
  .header-icons{ gap:22px; }
  .search{ max-width:520px; margin:0 auto; padding:12px 16px; }

  .categories{ justify-content:center; gap:32px; padding:26px 40px 14px; overflow:visible; flex-wrap:wrap; }
  .cat-icon{ width:74px; height:74px; font-size:32px; }
  .cat-label{ font-size:11.5px; }

  /* Product grid instead of stacked list */
  .section{ display:grid; grid-template-columns:repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap:22px; padding:30px 40px; align-items:start; }
  .section-head{ grid-column:1 / -1; margin-bottom:4px; }
  .ribbon{ font-size:19px; }

  .product{ flex-direction:column; padding:16px; border-radius:18px; transition:transform .15s ease, box-shadow .15s ease; position:relative; }
  .product-link{ flex-direction:column; gap:0; }
  .product:hover{ transform:translateY(-3px); box-shadow:0 14px 28px rgba(0,0,0,.08); }
  .product-img{ width:100%; aspect-ratio:1/1; height:auto; border-radius:14px; }
  .product-info{ padding-right:0; margin-top:12px; width:100%; }
  .product-name{ font-size:14.5px; min-height:38px; }
  .product-actions{ position:static; margin-top:12px; width:100%; display:flex; align-items:center; justify-content:space-between; }
  .add-btn{ padding:8px 22px; }

  /* The real markup uses this class (not .product-actions above) — this was
     missing entirely, so the action row stayed absolute-positioned over the
     vertical desktop card instead of flowing below it like it should. */
  .product-card-actions{ position:static !important; margin-top:12px; width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px; }

  /* Cart bar becomes a floating card, not a full-width sticky bar */
  .cart-bar{ position:fixed; left:auto; right:40px; bottom:28px; width:300px; margin:0; z-index:50; }

  /* Category page grid + tabs spacing */
  .cat-header{ padding:18px 40px; }
  .cat-tabs{ justify-content:flex-start; }

  footer{ padding:36px 40px 40px; }
}

@media (min-width: 1400px){
  .app-shell{ max-width:1360px; }
  .section{ grid-template-columns:repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
}

/* ============================================================
   SCROLL-REVEAL ANIMATIONS (both mobile + desktop)
   Mobile: subtle fade/slide only — no layout changes.
   Desktop: adds a gentle 3D hover tilt on top of the grid layout.
   ============================================================ */
@media (prefers-reduced-motion: no-preference){
  .reveal{ opacity:0; transform:translateY(14px); transition:opacity .5s ease, transform .5s ease; }
  .reveal.reveal-in{ opacity:1; transform:translateY(0); }
}

.offer-card{ transition:transform .25s ease; }
.offer-card:active{ transform:scale(0.98); }

@media (min-width: 900px){
  .product{ transform-style:preserve-3d; will-change:transform; }
  .product:hover{ transform:translateY(-6px) rotateX(2deg) rotateY(-2deg); box-shadow:0 22px 44px rgba(0,0,0,.14); }
  .offer-card:hover{ transform:translateY(-3px) scale(1.01); box-shadow:0 16px 32px rgba(0,0,0,.12); }
  .cat:hover .cat-icon{ transform:scale(1.08); box-shadow:0 8px 20px rgba(0,0,0,.1); }
  .cat-icon{ transition:transform .2s ease, box-shadow .2s ease; }
  .add-btn{ transition:background .2s ease, color .2s ease; }
  .add-btn:hover{ background:var(--green-dark); color:#fff; }
}

/* ============================================================
   Product card actions (Add to Cart + wishlist) — shared across
   home, category, and "You Might Also Like" listings
   ============================================================ */
.product-card-actions{ position:absolute; right:10px; bottom:10px; display:flex; align-items:center; gap:8px; z-index:2; }
.card-wish-btn{ color:#C9B8B2; cursor:pointer; transition:color .15s ease, transform .15s ease; }
.card-wish-btn svg{ width:18px; height:18px; display:block; }
.card-wish-btn.active{ color:var(--red); }
.card-wish-btn.active svg{ fill:var(--red); }
.card-wish-btn:active{ transform:scale(1.15); }
.card-add-btn{ background:var(--white); color:var(--green-dark); border:1.5px solid var(--green); font-weight:800; font-size:12px;
  padding:6px 16px; border-radius:10px; cursor:pointer; }
.card-stepper{ display:none; align-items:center; background:var(--green-dark); border-radius:10px; overflow:hidden; color:#fff; font-weight:800; font-size:13px; }
.card-stepper button{ background:none; border:none; color:#fff; width:26px; height:26px; font-size:15px; cursor:pointer; }
.card-stepper .card-qty-val{ width:20px; text-align:center; display:inline-block; }

/* Wishlist icon on PDP + header shows filled/red when active */
.icon-btn.active, .pdp-wish-btn.active{ color:var(--red); }
.icon-btn.active svg, .pdp-wish-btn.active svg{ fill:var(--red); }
