@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root{
  --bg:#fffafc;
  --surface:#ffffff;
  --surface-2:#fff1f6;
  --ink:#211b24;
  --muted:#817782;
  --line:#eee3e9;
  --pink:#ff5c9a;
  --pink-dark:#e94382;
  --lav:#8f7cff;
  --green:#20a879;
  --danger:#df5b68;
  --shadow:0 14px 40px rgba(45,25,42,.08);
  --shadow-sm:0 6px 20px rgba(45,25,42,.06);
  --display:'Plus Jakarta Sans',sans-serif;
  --body:'DM Sans',sans-serif;
  --max-width:1180px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--body);line-height:1.6;-webkit-font-smoothing:antialiased;overflow-x:hidden}
img{max-width:100%;display:block}
a{color:var(--pink-dark);text-decoration:none}
a:hover{text-decoration:none}
h1,h2,h3{font-family:var(--display);line-height:1.08;letter-spacing:-.035em;margin:0 0 .55em}
h1{font-size:clamp(2.5rem,6vw,5rem);font-weight:800}
h2{font-size:clamp(1.8rem,3.5vw,3rem);font-weight:800}
h3{font-size:1.15rem}
p{margin:0 0 1em}.muted{color:var(--muted)}
.mono{font-family:var(--body);font-weight:700;letter-spacing:.07em;text-transform:uppercase;font-size:.7rem}
.container{max-width:var(--max-width);margin:0 auto;padding:0 24px}

.site-header{position:sticky;top:0;z-index:50;background:rgba(255,250,252,.86);backdrop-filter:blur(18px);border-bottom:1px solid rgba(238,227,233,.8)}
.site-header .container{height:76px;display:flex;align-items:center;justify-content:space-between}
.brand{font-family:var(--display);font-weight:800;font-size:1.18rem;color:var(--ink);display:flex;align-items:center;gap:10px}
.brand:hover{color:var(--pink-dark)}
.brand-mark{height:32px;width:auto;display:block}
.nav-links{display:flex;align-items:center;gap:24px}
.nav-links a{color:var(--muted);font-size:.9rem;font-weight:600}
.nav-links a:hover,.nav-links a.active{color:var(--ink)}
.nav-cart-badge{display:inline-flex;align-items:center;gap:6px}
.cart-count{display:none;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--pink);color:white;font-size:.68rem;align-items:center;justify-content:center}
.mobile-toggle{display:none;background:none;border:0;color:var(--ink);font-size:1.5rem;cursor:pointer}
@media(max-width:800px){
 .nav-links{display:none}.mobile-toggle{display:block}
 .nav-links.open{display:flex;position:absolute;top:76px;left:0;right:0;background:rgba(255,250,252,.98);padding:20px 24px;flex-direction:column;align-items:stretch;gap:16px;border-bottom:1px solid var(--line);box-shadow:var(--shadow)}
}

.hero{padding:70px 0 50px}
.hero-shell{background:linear-gradient(135deg,#fff0f6 0%,#f7f2ff 55%,#fff 100%);border:1px solid #f3dce7;border-radius:34px;padding:clamp(34px,7vw,76px);overflow:hidden;position:relative}
.hero-shell:after{content:"";position:absolute;width:340px;height:340px;border-radius:50%;right:-100px;top:-130px;background:rgba(255,255,255,.55)}
.hero-eyebrow{color:var(--pink-dark);display:inline-flex;align-items:center;gap:8px;margin-bottom:18px}
.hero-eyebrow:before{content:"";width:8px;height:8px;border-radius:50%;background:var(--pink)}
.hero h1{max-width:760px}
.hero-sub{max-width:650px;color:var(--muted);font-size:1.08rem;margin-top:18px}
.hero-ctas{display:flex;gap:12px;margin-top:28px;flex-wrap:wrap}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:13px 21px;border-radius:14px;font-weight:700;font-size:.9rem;cursor:pointer;border:1px solid transparent;transition:.18s ease;min-height:46px}
.btn:hover{transform:translateY(-2px)}
.btn-gold{background:var(--ink);color:white;box-shadow:0 8px 20px rgba(33,27,36,.14)}
.btn-gold:hover{background:#000;color:white}
.btn-outline{background:#fff;color:var(--ink);border-color:var(--line)}
.btn-outline:hover{border-color:#d9c9d2}
.nav-cta{padding:9px 15px;border-radius:12px}

.route-map{margin-top:45px;background:rgba(255,255,255,.65);border:1px solid rgba(255,255,255,.9);border-radius:22px;padding:22px;overflow:auto}
.route-track{display:flex;align-items:flex-start;min-width:620px;position:relative}
.route-line{position:absolute;top:7px;left:8px;right:8px;height:2px;background:linear-gradient(90deg,var(--pink),var(--lav));opacity:.45}
.route-node{flex:1;position:relative;padding-top:23px}
.route-dot{width:15px;height:15px;border-radius:50%;background:white;border:4px solid var(--pink);position:absolute;top:0;left:0}
.route-node .mono{color:var(--pink-dark);display:block;margin-bottom:3px}.route-node .route-label{font-weight:700;font-size:.88rem}.route-node .route-type{font-size:.75rem;color:var(--muted)}

section{padding:76px 0}section.tight{padding:48px 0}.section-border-top{border-top:1px solid var(--line)}
.section-head{max-width:650px;margin-bottom:34px}.section-head .mono{color:var(--pink-dark);display:block;margin-bottom:9px}
.grid{display:grid;gap:22px}.grid-3{grid-template-columns:repeat(3,1fr)}.grid-2{grid-template-columns:repeat(2,1fr)}
@media(max-width:800px){.grid-3,.grid-2{grid-template-columns:1fr}}
.card{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:25px;box-shadow:var(--shadow-sm)}
.card .mono{color:var(--pink-dark)}
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
@media(max-width:900px){.steps{grid-template-columns:repeat(2,1fr)}}@media(max-width:560px){.steps{grid-template-columns:1fr}}
.step{background:#fff;border:1px solid var(--line);border-radius:20px;padding:24px}.step-number{color:var(--pink);font-weight:800;font-size:.8rem;margin-bottom:12px}.step p{color:var(--muted);font-size:.92rem}

.product-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
@media(max-width:1000px){.product-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:700px){.product-grid{grid-template-columns:repeat(2,1fr);gap:12px}}@media(max-width:430px){.product-grid{grid-template-columns:1fr 1fr}}
.product-card{background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden;color:var(--ink);transition:.2s;box-shadow:0 5px 18px rgba(45,25,42,.035)}
.product-card:hover{transform:translateY(-4px);border-color:#e9c8d7;box-shadow:var(--shadow)}
.product-thumb{aspect-ratio:1;background:linear-gradient(145deg,#fff0f5,#f1edff);display:flex;align-items:center;justify-content:center;color:#aaa;font-size:2rem;overflow:hidden}
.product-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .35s}.product-card:hover .product-thumb img{transform:scale(1.04)}
.product-info{padding:14px}.product-info .name{font-weight:700;font-size:.9rem;margin-bottom:5px}.product-info .price{color:var(--pink-dark);font-weight:800;font-size:.92rem}.product-info .oos{color:var(--danger);font-size:.75rem;margin-top:4px}

.shop-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:26px;flex-wrap:wrap}
.search-field{position:relative;flex:1;max-width:520px}.search-field input{padding-left:42px!important}.search-field:before{content:"⌕";position:absolute;left:15px;top:7px;font-size:1.25rem;color:var(--muted);z-index:2}

.field{margin-bottom:18px}.field label{display:block;font-size:.82rem;font-weight:700;color:var(--muted);margin-bottom:7px}
.field input,.field select,.field textarea{width:100%;padding:13px 14px;background:#fff;border:1px solid var(--line);border-radius:13px;color:var(--ink);font:inherit;font-size:.95rem;transition:.15s}
.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:#e7a9c4;box-shadow:0 0 0 4px rgba(255,92,154,.09)}
.field-row{display:flex;gap:12px}.field-row .field{flex:1}
.form-page{max-width:460px;margin:0 auto;background:#fff;border:1px solid var(--line);border-radius:24px;padding:30px;box-shadow:var(--shadow)}
.field-error{color:var(--danger);font-size:.82rem;margin-top:6px;display:none}.field-help{color:var(--muted);font-size:.8rem;margin-top:6px}
button.btn{border:none;font-family:var(--body);cursor:pointer}button.btn:disabled{opacity:.5;cursor:not-allowed}

.cart-table{width:100%;border-collapse:collapse}.cart-table td{padding:16px 8px;border-bottom:1px solid var(--line);vertical-align:middle}
.cart-thumb{width:58px;height:58px;border-radius:14px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:#aaa;overflow:hidden}.cart-thumb img{width:100%;height:100%;object-fit:cover}
.qty-control{display:flex;align-items:center;gap:9px}.qty-control button{width:30px;height:30px;border-radius:9px;border:1px solid var(--line);background:#fff;color:var(--ink);cursor:pointer}.qty-control button:hover{border-color:var(--pink)}
.remove-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:32px;height:32px;border-radius:10px;border:1px solid var(--line);
  background:#fff;color:var(--muted);cursor:pointer;transition:.15s ease;flex-shrink:0;
}
.remove-btn:hover{color:var(--danger);border-color:#f3c2c6;background:#fff5f5}
.summary-row{display:flex;justify-content:space-between;padding:9px 0;font-size:.95rem}.summary-row.total{font-size:1.15rem;font-weight:800;border-top:1px solid var(--line);margin-top:8px;padding-top:16px}

.balance-card{background:linear-gradient(135deg,#241e28,#403345);color:white;border:0;border-radius:24px;padding:30px;box-shadow:var(--shadow)}.balance-card .label{color:#c8bdc9;font-size:.82rem;margin-bottom:8px}.balance-card .amount{font-family:var(--display);font-size:2.35rem;color:white;font-weight:800}.balance-card.warning{border-color:rgba(223,91,104,.5)}.balance-card.warning .amount{color:#ffb2b8}
.activity-row{display:flex;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--line)}.activity-row:last-child{border-bottom:0}.activity-left{display:flex;align-items:center;gap:12px}.activity-icon{width:35px;height:35px;border-radius:12px;display:flex;align-items:center;justify-content:center}.activity-amount.positive{color:var(--green);font-weight:700}.activity-amount.negative{color:var(--danger);font-weight:700}
.order-row{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;background:#fff;border:1px solid var(--line);border-radius:17px;margin-bottom:11px;color:var(--ink);box-shadow:var(--shadow-sm)}.order-row:hover{border-color:#e7bfd0;text-decoration:none;transform:translateY(-1px)}.order-row .order-id{font-weight:800;margin-bottom:3px}.order-row .order-meta{color:var(--muted);font-size:.82rem}
.action-card{display:block;background:#fff;border:1px solid var(--line);border-radius:19px;padding:20px;color:var(--ink);box-shadow:var(--shadow-sm)}.action-card:hover{border-color:#e7bfd0;text-decoration:none;transform:translateY(-2px)}.action-card .icon{color:var(--pink);font-size:1.4rem;margin-bottom:10px}.action-card .title{font-weight:800}
.status-badge{display:inline-block;padding:5px 10px;border-radius:20px;font-size:.74rem;font-weight:800;border:1px solid;white-space:nowrap}
.empty-state{text-align:center;padding:64px 20px;color:var(--muted)}
.spinner{width:23px;height:23px;border:2px solid var(--line);border-top-color:var(--pink);border-radius:50%;animation:spin .7s linear infinite;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}.spinner-center{display:flex;justify-content:center;padding:60px 0}
.chip-group{display:flex;gap:8px}.chip{flex:1;text-align:center;padding:10px;border-radius:11px;border:1px solid var(--line);background:#fff;color:var(--muted);cursor:pointer;font-size:.85rem}.chip.selected{border-color:#f0a9c5;color:var(--pink-dark);background:#fff0f6}
.modal-backdrop{position:fixed;inset:0;background:rgba(33,27,36,.52);display:flex;align-items:center;justify-content:center;z-index:100;padding:20px;opacity:0;visibility:hidden;transition:opacity .22s ease,visibility .22s ease}.modal-backdrop.open{opacity:1;visibility:visible}.modal{background:#fff;border-radius:22px;padding:28px;max-width:420px;width:100%;box-shadow:var(--shadow);transform:scale(.92) translateY(10px);opacity:0;transition:transform .28s cubic-bezier(.34,1.4,.64,1),opacity .22s ease}.modal-backdrop.open .modal{transform:scale(1) translateY(0);opacity:1}.modal-actions{display:flex;gap:10px;margin-top:20px}.modal-actions .btn{flex:1}

.download-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:34px}@media(max-width:760px){.download-grid{grid-template-columns:1fr}}.download-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:30px;box-shadow:var(--shadow-sm)}.download-card .icon-badge{width:46px;height:46px;border-radius:14px;background:#fff0f6;border:1px solid #f1cadb;display:flex;align-items:center;justify-content:center;color:var(--pink);font-size:1.3rem;margin-bottom:18px}.download-card .btn{margin-top:18px;width:100%}.qr-placeholder{width:120px;height:120px;border:1px dashed #d9cbd3;border-radius:15px;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:.72rem;text-align:center;margin:20px auto 0}

.policy-body{max-width:74ch}.policy-body h2{margin-top:2.2em;padding-top:.5em;border-top:1px solid var(--line)}.policy-body h2:first-of-type{margin-top:0;border-top:0;padding-top:0}.policy-body ul{padding-left:1.2em}.policy-body li{margin-bottom:.5em}.policy-meta{color:var(--muted);font-size:.88rem;margin-bottom:40px}.toc{background:#fff;border:1px solid var(--line);border-radius:18px;padding:23px 27px;margin-bottom:44px;box-shadow:var(--shadow-sm)}.toc .mono{color:var(--pink-dark);display:block;margin-bottom:12px}.toc ol{margin:0;padding-left:1.2em}.callout{background:#fff0f6;border:1px solid #f0ccdc;border-radius:15px;padding:18px 20px;margin:20px 0;font-size:.93rem}
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:40px}@media(max-width:760px){.contact-grid{grid-template-columns:1fr}}.contact-item{border-bottom:1px solid var(--line);padding:20px 0}.contact-item .mono{color:var(--pink-dark);display:block;margin-bottom:6px}
.site-footer{border-top:1px solid var(--line);padding:55px 0 35px;margin-top:40px;background:#fff}.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:30px;margin-bottom:40px}@media(max-width:760px){.footer-grid{grid-template-columns:1fr 1fr}}.footer-grid h4{font-size:.75rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:14px}.footer-grid a,.footer-grid p{display:block;color:var(--muted);font-size:.88rem;margin-bottom:10px}.footer-grid a:hover{color:var(--pink-dark)}.footer-bottom{display:flex;justify-content:space-between;align-items:center;padding-top:22px;border-top:1px solid var(--line);color:var(--muted);font-size:.82rem;flex-wrap:wrap;gap:12px}
a:focus-visible,button:focus-visible{outline:3px solid rgba(255,92,154,.35);outline-offset:2px}
#nav-auth-slot{display:contents}
@media(max-width:560px){.container{padding:0 17px}.hero{padding:32px 0}.hero-shell{border-radius:24px;padding:30px 22px}.hero-sub{font-size:1rem}.field-row{flex-direction:column;gap:0}.form-page{padding:22px}.cart-table td{padding:12px 4px}.modal{padding:20px;border-radius:18px}.modal-backdrop{padding:14px}.chip{padding:8px 4px;font-size:.78rem}.download-card{padding:22px}.contact-grid,.footer-grid{gap:20px}.balance-card,.checkout-banner{padding:20px 16px}.store-badge{width:100%;justify-content:center}.action-card{padding:16px}.footer-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}

/* ============================================================
   Additional design layer: order timeline, low-stock badges,
   decorative accents, empty-state icons, footer route strip
   ============================================================ */

/* Cart badge pop when quantity changes: cheap, real feedback */
@keyframes cartPop{0%{transform:scale(1)}35%{transform:scale(1.35)}100%{transform:scale(1)}}
.cart-count.pop{animation:cartPop .35s ease}

/* Reusable soft blob accent: extends the motif already established on
   the homepage hero to a few more high-value surfaces (login/signup,
   wallet balance) so the shape feels like part of the system, not a
   one-off. Purely decorative, sits behind content via z-index. */
.blob-surface{position:relative;overflow:hidden}
.blob-surface:before{content:"";position:absolute;width:220px;height:220px;border-radius:50%;
  right:-70px;top:-90px;background:rgba(255,255,255,.5);z-index:0;pointer-events:none}
.blob-surface>*{position:relative;z-index:1}

/* Order progress timeline: reflects the real order.status, not a
   decorative counter. Hidden entirely for flagged/lost/cancelled orders
   (ORDER_TIMELINE_STEPS in app.js returns '' for those, since a linear
   progress bar doesn't make sense for a broken delivery). */
.order-timeline{display:flex;justify-content:space-between;margin:28px 0;position:relative}
.order-timeline:before{content:"";position:absolute;top:7px;left:20px;right:20px;height:2px;background:var(--line);z-index:0}
.timeline-step{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:8px;flex:1}
.timeline-dot{width:16px;height:16px;border-radius:50%;background:#fff;border:2px solid var(--line);transition:.2s}
.timeline-step.done .timeline-dot{background:var(--pink);border-color:var(--pink)}
.timeline-label{font-size:.72rem;color:var(--muted);text-align:center;font-weight:600}
.timeline-step.done .timeline-label{color:var(--ink)}
@media(max-width:480px){.timeline-label{font-size:.62rem}}

/* Low-stock badge on product cards: driven by the real stock count
   already returned by the API, not a fabricated urgency signal. */
.badge-low-stock{
  position:absolute;top:10px;left:10px;background:#fff;color:var(--pink-dark);
  font-size:.68rem;font-weight:800;padding:5px 10px;border-radius:20px;
  box-shadow:var(--shadow-sm);z-index:2;
}
.product-thumb{position:relative}

/* Empty-state icon wrapper: small illustrative touch instead of bare text */
.empty-state{text-align:center;padding:64px 20px;color:var(--muted)}
.empty-state .empty-icon{
  width:64px;height:64px;margin:0 auto 16px;
  display:flex;align-items:center;justify-content:center;
  color:var(--pink-dark);
}
.empty-state p{margin-bottom:4px;color:var(--ink);font-weight:600}

/* Footer route strip: repeats the hub motif from the homepage hero so
   the same signature element reinforces brand identity site-wide, not
   just on the landing page. */
.footer-routes{
  display:flex;flex-wrap:wrap;gap:8px;margin-top:18px;padding-top:18px;
  border-top:1px solid var(--line);
}
.footer-routes span{
  font-family:var(--body);font-size:.72rem;font-weight:700;letter-spacing:.04em;
  color:var(--muted);background:var(--surface-2);padding:5px 12px;border-radius:20px;
}

/* Wallet balance card: elevated treatment since this is the "money"
   surface; same blob motif as the hero, plus a soft gradient. Overrides
   the base .balance-card's dark-card text colors (white on dark purple)
   since this version is light: text needs to flip to ink, not just
   the background changing. */
.balance-card{
  background:linear-gradient(135deg,#fff0f6 0%,#f7f2ff 100%);
  border:1px solid #f3dce7;
  color:var(--ink);
}
.balance-card .label{color:var(--muted)}
.balance-card .amount{color:var(--pink-dark)}
.balance-card.warning{border-color:rgba(223,91,104,.5)}
.balance-card.warning .amount{color:var(--danger)}
.balance-card.warning .label{color:var(--danger)}

/* Store download badges: recognizable icon + two-line text convention,
   without reproducing Apple/Google's exact trademarked badge artwork. */
.store-badge{
  background:#000;color:#fff;display:inline-flex;align-items:center;gap:12px;
  padding:10px 20px;border-radius:12px;border:none;cursor:pointer;
  min-height:52px;transition:.18s ease;margin-top:18px;
}
.store-badge:hover{background:#1a1a1a;transform:translateY(-2px)}
.store-badge-text{display:flex;flex-direction:column;align-items:flex-start;text-align:left}
.store-badge-text small{font-size:.62rem;letter-spacing:.07em;opacity:.85;font-weight:600}
.store-badge-text strong{font-size:1.08rem;font-family:var(--display);line-height:1.15;font-weight:700}

/* ============================================================
   Wider layouts for wallet & checkout: these previously stayed
   at a fixed ~600px regardless of screen size, wasting most of a
   desktop viewport. Two columns on wide screens, stacked on mobile.
   ============================================================ */

.wallet-layout{display:grid;grid-template-columns:340px 1fr;gap:32px;align-items:start}
.wallet-side{position:sticky;top:96px}
@media(max-width:860px){.wallet-layout{grid-template-columns:1fr}.wallet-side{position:static}}

.checkout-layout{display:grid;grid-template-columns:1fr 380px;gap:32px;align-items:start}
.checkout-side{position:sticky;top:96px}
@media(max-width:860px){.checkout-layout{grid-template-columns:1fr}.checkout-side{position:static}}

.checkout-banner{padding:14px 16px;border-radius:14px;font-size:.92rem;font-weight:600;border:1px solid}
.checkout-banner.sufficient{background:#eafaf3;border-color:#bfe9d4;color:#1a8a63}
.checkout-banner.insufficient{background:#fff0f0;border-color:#f3c2c6;color:#c73e4a}

/* ============================================================
   Cart table on small screens: a 5-column table can't fit a phone
   width even with reduced padding, so it collapses into stacked
   "cards" below this breakpoint instead of scrolling sideways.
   ============================================================ */
@media(max-width:640px){
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td{display:block;width:100%}
  .cart-table tr{
    border:1px solid var(--line);border-radius:16px;padding:14px;margin-bottom:14px;
    display:grid;grid-template-columns:56px 1fr auto;grid-template-rows:auto auto auto;gap:4px 12px;
  }
  .cart-table td{padding:0;border:none}
  .cart-table td:nth-child(1){grid-column:1;grid-row:1/4;align-self:start}
  .cart-table td:nth-child(2){grid-column:2;grid-row:1}
  .cart-table td:nth-child(3){grid-column:2;grid-row:2;margin-top:4px}
  .cart-table td:nth-child(4){grid-column:2;grid-row:3;font-size:.85rem;color:var(--muted)}
  .cart-table td:nth-child(4):before{content:"Subtotal: "}
  .cart-table td:nth-child(5){grid-column:3;grid-row:1/4;align-self:start;justify-self:end}
}

/* Empty cart icon — bigger and decorated with a soft gradient glow,
   since this is the one empty state a shopper is most likely to land
   on early (before their first purchase), worth a bit more presence
   than the plain small line icon used elsewhere. */
.empty-icon.empty-icon-cart{
  width:140px;height:140px;margin:0 auto 20px;border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #fff0f6 0%, #f3ecff 55%, transparent 78%);
  box-shadow:0 0 0 1px #f3dce7 inset, 0 20px 40px -12px rgba(233,67,130,.25);
  color:var(--pink-dark);
  animation:cartBounce 2.6s cubic-bezier(.28,.84,.42,1) infinite;
}
@keyframes cartBounce{
  0%{transform:translateY(0) scale(1,1)}
  8%{transform:translateY(-22px) scale(1,1.06)}
  16%{transform:translateY(-4px) scale(1.07,0.93)}
  22%{transform:translateY(-11px) scale(1,1.04)}
  28%{transform:translateY(0) scale(1.05,0.96)}
  34%{transform:translateY(-3px) scale(1,1.01)}
  40%,100%{transform:translateY(0) scale(1,1)}
}
@media(prefers-reduced-motion:reduce){.empty-icon.empty-icon-cart{animation:none}}

/* ============================================================
   Broader animation pass: toast entrance, card/grid entrance on
   load, and tactile press feedback on interactive elements.
   ============================================================ */

/* Toast entrance — was referencing a keyframe that didn't exist
   anywhere in this file, so it's been appearing with no animation
   at all until now. */
@keyframes fadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

/* Gentle fade-up entrance for card-based content on page load */
@keyframes fadeUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
/* Opacity-only variant for elements that also have their own hover-lift
   transform (product cards, order rows, action cards) — animating
   `transform` here too would leave it permanently overridden by the
   entrance animation's frozen end state once fill-mode holds it, since
   CSS animations take priority over normal hover rules on the same
   property even after finishing. */
@keyframes fadeInOnly{from{opacity:0}to{opacity:1}}

.steps>*,.grid-3>*,.download-grid>*{
  animation:fadeUp .5s cubic-bezier(.2,.7,.3,1) both;
}
.product-grid>*,.order-row,.grid-2>*{
  animation:fadeInOnly .5s ease both;
}
.steps>*:nth-child(1),.grid-3>*:nth-child(1),.download-grid>*:nth-child(1),.product-grid>*:nth-child(1),.grid-2>*:nth-child(1){animation-delay:.02s}
.steps>*:nth-child(2),.grid-3>*:nth-child(2),.download-grid>*:nth-child(2),.product-grid>*:nth-child(2),.grid-2>*:nth-child(2){animation-delay:.07s}
.steps>*:nth-child(3),.grid-3>*:nth-child(3),.product-grid>*:nth-child(3){animation-delay:.12s}
.steps>*:nth-child(4),.grid-3>*:nth-child(4),.product-grid>*:nth-child(4){animation-delay:.17s}
.product-grid>*:nth-child(5){animation-delay:.22s}
.product-grid>*:nth-child(6){animation-delay:.27s}
.product-grid>*:nth-child(7){animation-delay:.32s}
.product-grid>*:nth-child(8){animation-delay:.37s}

/* Hero content settles in slightly after the page paints, so it
   doesn't compete visually with the grid items above */
.hero-shell,.hero h1,.hero-sub,.hero-ctas{animation:fadeUp .6s cubic-bezier(.2,.7,.3,1) both}
.hero h1{animation-delay:.05s}
.hero-sub{animation-delay:.1s}
.hero-ctas{animation-delay:.15s}

/* Tactile press feedback */
.btn:active,.store-badge:active,.chip:active{transform:scale(.96)}
.action-card:active,.product-card:active{transform:scale(.98)}

@media(prefers-reduced-motion:reduce){
  .product-grid>*,.steps>*,.grid-3>*,.grid-2>*,.download-grid>*,.order-row,
  .hero-shell,.hero h1,.hero-sub,.hero-ctas{animation:none}
}

/* ============================================================
   Negotiation chat — "Make an offer" panel on product pages
   ============================================================ */

.chat-thread{
  max-height:340px;overflow-y:auto;padding:18px 20px;
  display:flex;flex-direction:column;gap:10px;background:var(--bg);
}
.chat-bubble{
  max-width:78%;padding:11px 15px;border-radius:16px;font-size:0.92rem;line-height:1.4;
  animation:fadeIn .25s ease;
}
.chat-bubble.customer{
  align-self:flex-end;background:var(--pink);color:#fff;border-bottom-right-radius:4px;
}
.chat-bubble.ai{
  align-self:flex-start;background:#fff;border:1px solid var(--line);color:var(--ink);
  border-bottom-left-radius:4px;
}

.chat-typing{padding:0 20px 4px;background:var(--bg);}
.chat-bubble.typing{
  display:inline-flex;gap:4px;padding:14px 16px;align-items:center;
}
.chat-bubble.typing span{
  width:6px;height:6px;border-radius:50%;background:var(--muted);
  animation:typingDot 1.2s infinite ease-in-out;
}
.chat-bubble.typing span:nth-child(2){animation-delay:.2s}
.chat-bubble.typing span:nth-child(3){animation-delay:.4s}
@keyframes typingDot{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

.offer-input-row{
  display:flex;gap:10px;padding:14px 20px;border-top:1px solid var(--line);background:#fff;
}
.offer-input-row input{
  flex:1;padding:10px 14px;border:1px solid var(--line);border-radius:10px;
  font-family:var(--body);font-size:0.92rem;
}
.offer-input-row input:focus{outline:none;border-color:var(--pink)}
.offer-input-row button{white-space:nowrap;}

@media(prefers-reduced-motion:reduce){
  .chat-bubble{animation:none}
  .chat-bubble.typing span{animation:none;opacity:1}
}

/* Accept/decline buttons shown after the AI counters — a clear, one-tap
   way to take the AI's own price instead of retyping it. */
.counter-actions{
  display:flex;flex-direction:column;gap:8px;padding:14px 20px;border-top:1px solid var(--line);background:#fff;
}
.counter-actions .btn{width:100%;box-sizing:border-box;}

/* Negotiated-price badge on cart rows — makes it visually obvious a
   line reflects an agreed negotiation price, not the catalog price. */
.negotiated-badge{
  display:inline-block;background:var(--pink);color:#fff;font-size:.68rem;font-weight:700;
  padding:2px 8px;border-radius:10px;margin-right:6px;vertical-align:middle;
}
