:root{
    --ink:#142B1E;
    --ink-soft:#3E5347;
    --cream:#FAF7EE;
    --cream-dim:#F1EDDF;
    --card:#FFFFFF;
    --forest:#1F5E3E;
    --forest-deep:#123420;
    --forest-tint:#E6F1E9;
    --mango:#FFB627;
    --mango-deep:#C98A00;
    --tomato:#E4572E;
    --tomato-tint:#FDE7DF;
    --line:#E4E0D2;
    --shadow: 0 10px 28px -14px rgba(18,52,32,.35);
    --radius-lg: 22px;
    --radius-md: 14px;
    --radius-sm: 9px;
  }
  :root:not([data-theme="light"]){
    @media (prefers-color-scheme: dark){
      --ink:#EDF3EC;
      --ink-soft:#B9C6BC;
      --cream:#0E1712;
      --cream-dim:#141F19;
      --card:#182620;
      --forest:#3E9268;
      --forest-deep:#0B1F15;
      --forest-tint:#16281E;
      --mango:#FFC24D;
      --mango-deep:#FFB627;
      --tomato:#FF7A54;
      --tomato-tint:#2A1A15;
      --line:#26372E;
      --shadow: 0 10px 28px -14px rgba(0,0,0,.6);
    }
  }
  :root[data-theme="dark"]{
    --ink:#EDF3EC;
    --ink-soft:#B9C6BC;
    --cream:#0E1712;
    --cream-dim:#141F19;
    --card:#182620;
    --forest:#3E9268;
    --forest-deep:#0B1F15;
    --forest-tint:#16281E;
    --mango:#FFC24D;
    --mango-deep:#FFB627;
    --tomato:#FF7A54;
    --tomato-tint:#2A1A15;
    --line:#26372E;
    --shadow: 0 10px 28px -14px rgba(0,0,0,.6);
  }

  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  body{
    background:var(--cream);
    color:var(--ink);
    font-family:'Work Sans',system-ui,sans-serif;
    -webkit-font-smoothing:antialiased;
    min-height:100vh;
    padding-bottom:90px;
  }
  h1,h2,h3,.display{
    font-family:'Baloo 2',system-ui,sans-serif;
    font-weight:700;
    margin:0;
    color:var(--ink);
  }
  a{color:inherit;}
  button{font-family:inherit;cursor:pointer;}
  img,svg{display:block;}
  ::selection{background:var(--mango);color:var(--forest-deep);}
  :focus-visible{outline:3px solid var(--mango);outline-offset:2px;border-radius:6px;}

  .wrap{max-width:1180px;margin:0 auto;padding:0 18px;}

  /* ---------- HEADER ---------- */
  header.top{
    position:sticky;top:0;z-index:40;
    background:var(--forest-deep);
    color:#fff;
    padding:12px 0 14px;
    box-shadow:var(--shadow);
  }
  .top-row{display:flex;align-items:center;gap:16px;}
  .brand{display:flex;align-items:center;gap:9px;flex-shrink:0;}
  .brand .mark{
    width:38px;height:38px;border-radius:11px;
    background:var(--mango);
    display:flex;align-items:center;justify-content:center;
    font-size:20px;
    box-shadow:0 3px 0 var(--mango-deep);
  }
  .brand .word{font-family:'Baloo 2';font-weight:800;font-size:21px;letter-spacing:-.02em;color:#fff;}
  .brand .word span{color:var(--mango);}

  .locrow{display:none;}
  @media(min-width:720px){
    .locrow{display:flex;flex-direction:column;line-height:1.25;margin-left:6px;padding-left:14px;border-left:1px solid rgba(255,255,255,.22);}
  }
  .locrow .lbl{font-size:11.5px;color:#BFE0CB;display:flex;align-items:center;gap:5px;}
  .locrow .lbl strong{color:var(--mango);font-weight:700;}
  .locrow .addr{font-size:13.5px;font-weight:600;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

  .searchbar{
    flex:1;display:flex;align-items:center;gap:9px;
    background:rgba(255,255,255,.1);
    border:1px solid rgba(255,255,255,.18);
    border-radius:13px;padding:10px 14px;
  }
  .searchbar input{
    background:none;border:none;outline:none;color:#fff;
    font-size:14.5px;width:100%;font-family:inherit;
  }
  .searchbar input::placeholder{color:#B9CCC0;}
  .searchbar svg{flex-shrink:0;opacity:.85;}

  .cart-pill{
    display:flex;align-items:center;gap:7px;
    background:var(--mango);color:var(--forest-deep);
    padding:10px 16px;border-radius:12px;
    font-weight:700;font-size:14px;border:none;
    box-shadow:0 3px 0 var(--mango-deep);
    flex-shrink:0;position:relative;
    transition:transform .12s ease;
  }
  .cart-pill:active{transform:translateY(2px);box-shadow:0 1px 0 var(--mango-deep);}
  .cart-pill .n{
    background:var(--forest-deep);color:#fff;
    min-width:19px;height:19px;border-radius:50%;
    font-size:11px;display:flex;align-items:center;justify-content:center;
    padding:0 4px;
  }
  @media(max-width:560px){ .cart-pill .txt{display:none;} }

  /* mobile location strip */
  .mob-loc{
    display:flex;align-items:center;gap:6px;color:#BFE0CB;font-size:12.5px;margin:9px 0 0;
  }
  .mob-loc strong{color:var(--mango);}
  @media(min-width:720px){ .mob-loc{display:none;} }

  /* ---------- HERO ---------- */
  .hero{
    background:
      radial-gradient(680px 320px at 82% -40%, rgba(255,182,39,.35), transparent 60%),
      linear-gradient(180deg, var(--forest-deep), var(--forest) 130%);
    color:#fff;padding:34px 0 46px;position:relative;overflow:hidden;
  }
  .hero-inner{display:flex;align-items:center;gap:34px;flex-wrap:wrap;}
  .hero-copy{flex:1;min-width:260px;}
  .hero-eyebrow{
    display:inline-flex;align-items:center;gap:7px;
    background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);
    padding:6px 13px;border-radius:99px;font-size:13px;font-weight:600;color:var(--mango);
    margin-bottom:14px;
  }
  .hero h1{
    font-size:clamp(30px,5vw,46px);line-height:1.06;color:#fff;max-width:11ch;
  }
  .hero p{
    color:#CFE4D7;font-size:15.5px;max-width:38ch;margin:14px 0 22px;line-height:1.55;
  }
  .hero-actions{display:flex;gap:12px;flex-wrap:wrap;}
  .btn{
    border:none;border-radius:13px;padding:13px 22px;font-weight:700;font-size:14.5px;
    display:inline-flex;align-items:center;gap:8px;transition:transform .12s ease, box-shadow .12s ease;
  }
  .btn-primary{background:var(--mango);color:var(--forest-deep);box-shadow:0 4px 0 var(--mango-deep);}
  .btn-primary:active{transform:translateY(3px);box-shadow:0 1px 0 var(--mango-deep);}
  .btn-ghost{background:rgba(255,255,255,.08);color:#fff;border:1px solid rgba(255,255,255,.35);}
  .hero-clock{
    flex-shrink:0;
    width:168px;height:168px;border-radius:50%;
    background:var(--card);color:var(--ink);
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    box-shadow:0 20px 40px -16px rgba(0,0,0,.45);
    border:6px solid var(--mango);
  }
  .hero-clock .num{font-family:'Baloo 2';font-size:44px;font-weight:800;line-height:1;color:var(--forest);}
  .hero-clock .lbl{font-size:12px;color:var(--ink-soft);margin-top:4px;font-weight:600;}

  /* ---------- CATEGORY RAIL ---------- */
  .cats{padding:22px 0 6px;}
  .cats h2, .section h2{font-size:20px;margin-bottom:14px;}
  .cat-rail{
    display:flex;gap:12px;overflow-x:auto;padding-bottom:6px;scrollbar-width:none;
  }
  .cat-rail::-webkit-scrollbar{display:none;}
  .cat-chip{
    flex-shrink:0;width:92px;display:flex;flex-direction:column;align-items:center;gap:8px;
    background:none;border:none;color:var(--ink);
  }
  .cat-chip .ic{
    width:72px;height:72px;border-radius:20px;
    display:flex;align-items:center;justify-content:center;font-size:32px;
    background:var(--forest-tint);border:1px solid var(--line);
    transition:transform .12s ease, border-color .12s ease;
  }
  .cat-chip.active .ic{border-color:var(--forest);box-shadow:0 0 0 3px var(--forest-tint) inset, 0 0 0 2px var(--forest);}
  .cat-chip:active .ic{transform:scale(.94);}
  .cat-chip .cn{font-size:12.5px;font-weight:600;text-align:center;line-height:1.25;color:var(--ink-soft);}
  .cat-chip.active .cn{color:var(--forest);font-weight:700;}

  /* ---------- PRODUCT SECTIONS ---------- */
  .section{padding:26px 0 8px;}
  .section-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:14px;}
  .section-head .tag{font-size:13px;color:var(--ink-soft);}
  .grid{
    display:grid;grid-template-columns:repeat(2,1fr);gap:14px;
  }
  @media(min-width:620px){ .grid{grid-template-columns:repeat(3,1fr);} }
  @media(min-width:880px){ .grid{grid-template-columns:repeat(4,1fr);} }
  @media(min-width:1120px){ .grid{grid-template-columns:repeat(5,1fr);} }

  .card{
    background:var(--card);border:1px solid var(--line);border-radius:var(--radius-lg);
    padding:13px;display:flex;flex-direction:column;position:relative;
    transition:box-shadow .15s ease, transform .15s ease;
  }
  .card:hover{box-shadow:var(--shadow);}
  .card .badge{
    position:absolute;top:11px;left:11px;background:var(--tomato-tint);color:var(--tomato);
    font-size:10.5px;font-weight:700;padding:3px 8px;border-radius:7px;
  }
  .card .picture{
    height:88px;border-radius:14px;background:var(--forest-tint);
    display:flex;align-items:center;justify-content:center;font-size:40px;margin-bottom:10px;
  }
  .card .pname{font-size:14px;font-weight:600;line-height:1.3;min-height:36px;}
  .card .punit{font-size:12px;color:var(--ink-soft);margin:3px 0 10px;}
  .card .prow{display:flex;align-items:center;justify-content:space-between;margin-top:auto;gap:6px;}
  .price-block{display:flex;flex-direction:column;line-height:1.15;}
  .price{font-weight:700;font-size:15px;}
  .mrp{font-size:11.5px;color:var(--ink-soft);text-decoration:line-through;}

  .add-btn{
    background:var(--forest);color:#fff;border:none;border-radius:10px;
    padding:8px 14px;font-weight:700;font-size:13px;box-shadow:0 3px 0 var(--forest-deep);
    white-space:nowrap;
  }
  .add-btn:active{transform:translateY(2px);box-shadow:0 1px 0 var(--forest-deep);}
  .stepper{
    display:flex;align-items:center;gap:0;background:var(--forest);border-radius:10px;
    box-shadow:0 3px 0 var(--forest-deep);overflow:hidden;
  }
  .stepper button{
    background:none;border:none;color:#fff;width:30px;height:32px;font-size:16px;font-weight:700;
  }
  .stepper .qv{color:#fff;font-weight:700;font-size:13.5px;min-width:20px;text-align:center;}

  /* ---------- FOOTER ---------- */
  footer{
    margin-top:40px;background:var(--forest-deep);color:#CFE4D7;padding:38px 0 100px;
  }
  footer .fgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:26px;}
  footer h3{color:#fff;font-size:15px;margin-bottom:12px;}
  footer p, footer li{font-size:13px;line-height:1.9;color:#9FC0AC;}
  footer ul{list-style:none;padding:0;margin:0;}
  .fbrand{display:flex;align-items:center;gap:8px;margin-bottom:10px;}
  .fbrand .mark{width:30px;height:30px;border-radius:9px;background:var(--mango);display:flex;align-items:center;justify-content:center;font-size:16px;}
  .fbrand .word{font-family:'Baloo 2';font-weight:800;font-size:17px;color:#fff;}

  /* ---------- STICKY CART BAR ---------- */
  .floatbar{
    position:fixed;left:0;right:0;bottom:16px;z-index:50;
    display:flex;justify-content:center;pointer-events:none;
    transition:transform .25s ease, opacity .25s ease;
  }
  .floatbar.hidden{transform:translateY(120%);opacity:0;}
  .floatbar-inner{
    pointer-events:auto;
    background:var(--forest);color:#fff;border-radius:16px;
    padding:12px 12px 12px 18px;display:flex;align-items:center;gap:18px;
    box-shadow:0 14px 30px -10px rgba(0,0,0,.4);
    width:min(92vw,480px);
  }
  .floatbar .info{flex:1;}
  .floatbar .info .n1{font-size:12.5px;color:#CFE4D7;}
  .floatbar .info .n2{font-weight:700;font-size:15px;}
  .floatbar .go{
    background:var(--mango);color:var(--forest-deep);border:none;border-radius:11px;
    padding:11px 18px;font-weight:700;font-size:14px;display:flex;align-items:center;gap:6px;
  }

  /* ---------- OVERLAY / DRAWER ---------- */
  .overlay{
    position:fixed;inset:0;background:rgba(10,20,14,.55);z-index:60;
    display:flex;justify-content:flex-end;
    opacity:0;pointer-events:none;transition:opacity .22s ease;
  }
  .overlay.show{opacity:1;pointer-events:auto;}
  .panel{
    background:var(--cream);width:min(440px,100%);height:100%;
    display:flex;flex-direction:column;
    transform:translateX(100%);transition:transform .28s ease;
    box-shadow:-16px 0 40px rgba(0,0,0,.25);
  }
  .overlay.show .panel{transform:translateX(0);}
  @media(max-width:560px){
    .overlay{align-items:flex-end;}
    .panel{width:100%;height:88vh;transform:translateY(100%);border-radius:22px 22px 0 0;}
    .overlay.show .panel{transform:translateY(0);}
  }
  .panel-head{
    display:flex;align-items:center;justify-content:space-between;
    padding:18px 20px;border-bottom:1px solid var(--line);background:var(--card);
    border-radius:22px 22px 0 0;
  }
  .panel-head h2{font-size:19px;}
  .icon-btn{
    background:var(--cream-dim);border:none;width:34px;height:34px;border-radius:10px;
    display:flex;align-items:center;justify-content:center;color:var(--ink);
  }
  .panel-body{flex:1;overflow-y:auto;padding:16px 20px;}
  .panel-foot{padding:16px 20px 22px;border-top:1px solid var(--line);background:var(--card);}

  .cart-row{
    display:flex;gap:12px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line);
  }
  .cart-row .picture{
    width:56px;height:56px;border-radius:13px;background:var(--forest-tint);
    display:flex;align-items:center;justify-content:center;font-size:26px;flex-shrink:0;
  }
  .cart-row .meta{flex:1;min-width:0;}
  .cart-row .meta .nm{font-weight:600;font-size:14px;}
  .cart-row .meta .un{font-size:12px;color:var(--ink-soft);}
  .cart-row .lineprice{font-weight:700;font-size:13.5px;width:60px;text-align:right;flex-shrink:0;}

  .empty-state{
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    text-align:center;padding:50px 20px;gap:10px;color:var(--ink-soft);
  }
  .empty-state .big{font-size:52px;}
  .empty-state h3{color:var(--ink);font-size:17px;}

  .bill-row{display:flex;justify-content:space-between;font-size:13.5px;padding:6px 0;color:var(--ink-soft);}
  .bill-row.total{color:var(--ink);font-weight:700;font-size:15.5px;border-top:1px dashed var(--line);margin-top:6px;padding-top:12px;}
  .savings-strip{
    background:var(--forest-tint);color:var(--forest);border-radius:11px;
    padding:9px 12px;font-size:12.5px;font-weight:600;display:flex;align-items:center;gap:7px;margin:10px 0 4px;
  }

  .field{margin-bottom:14px;}
  .field label{display:block;font-size:12.5px;font-weight:600;color:var(--ink-soft);margin-bottom:6px;}
  .field input, .field textarea, .field select{
    width:100%;border:1px solid var(--line);background:var(--card);color:var(--ink);
    border-radius:11px;padding:11px 13px;font-size:14px;font-family:inherit;outline:none;
  }
  .field input:focus, .field textarea:focus{border-color:var(--forest);}
  .field-row{display:flex;gap:10px;}
  .field-row .field{flex:1;}

  .choice{
    display:flex;align-items:center;gap:11px;border:1px solid var(--line);border-radius:13px;
    padding:12px 14px;margin-bottom:10px;background:var(--card);
  }
  .choice input{accent-color:var(--forest);width:17px;height:17px;flex-shrink:0;}
  .choice .cl{flex:1;}
  .choice .cl .t1{font-weight:600;font-size:14px;}
  .choice .cl .t2{font-size:12px;color:var(--ink-soft);}
  .choice.sel{border-color:var(--forest);box-shadow:0 0 0 2px var(--forest-tint) inset;}

  .step-back{display:flex;align-items:center;gap:8px;color:var(--forest);font-weight:600;font-size:13.5px;background:none;border:none;margin-bottom:12px;}

  /* ---------- SUCCESS VIEW ---------- */
  .success{
    position:fixed;inset:0;background:var(--cream);z-index:70;display:none;
    flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:26px;
  }
  .success.show{display:flex;}
  .success .ring{
    width:104px;height:104px;border-radius:50%;background:var(--forest-tint);
    display:flex;align-items:center;justify-content:center;font-size:52px;margin-bottom:20px;
  }
  .success h1{font-size:25px;margin-bottom:8px;}
  .success p{color:var(--ink-soft);font-size:14.5px;max-width:34ch;line-height:1.6;}
  .success .ordno{
    font-family:'Baloo 2';font-weight:700;color:var(--forest);font-size:16px;margin:14px 0 22px;
    background:var(--forest-tint);padding:8px 18px;border-radius:11px;
  }

  .toast{
    position:fixed;bottom:98px;left:50%;transform:translateX(-50%) translateY(20px);
    background:var(--forest-deep);color:#fff;padding:11px 20px;border-radius:11px;font-size:13.5px;
    font-weight:600;opacity:0;pointer-events:none;transition:all .25s ease;z-index:80;
  }
  .toast.show{opacity:1;transform:translateX(-50%) translateY(0);}

  .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);}

  @media (prefers-reduced-motion: reduce){
    *{transition:none !important; animation:none !important;}
  }
