*{box-sizing:border-box}
html,body{margin:0;height:100%;font-family:Arial,Helvetica,sans-serif;color:#171717;background:#fff}
body{overflow:hidden}
main{height:100vh;max-width:1200px;margin:auto;position:relative;background:#fff}
.top{height:74px;position:fixed;top:0;left:0;right:0;max-width:1200px;margin:auto;background:#fff;z-index:30;padding:9px 20px;border-bottom:1px solid #eee;display:flex;align-items:center;gap:30px}
.brand{display:flex;align-items:center;gap:12px;min-width:245px}
.logo{width:62px;height:44px;border-radius:10px;background:#111;color:#fff;display:grid;place-items:center;font-weight:800;font-size:18px}
.brand h1{font-size:18px;margin:0 0 3px}.brand small{color:#777;font-size:14px}
.search{height:52px;border:1px solid #ddd;border-radius:10px;box-shadow:0 2px 9px #00000012;display:flex;align-items:center;gap:10px;padding:0 15px;font-size:29px;color:#777;flex:1}
.search input{border:0;outline:0;width:100%;font-size:17px;color:#222;background:transparent}

.desktop-menu{position:fixed;top:74px;bottom:48px;width:220px;padding:28px 28px 20px;background:#fff;border-right:1px solid #eee;overflow-y:auto;z-index:20}
.desktop-menu h2{margin:0 0 20px;font-size:22px}
.desktop-menu .menu-item{padding:13px 0;color:#555;font-size:16px;cursor:pointer}
.desktop-menu .menu-item.active{font-weight:700;color:#111}

.product-area{position:absolute;top:74px;left:220px;right:0;bottom:48px;overflow-y:auto;padding:20px 34px 80px}
.category{scroll-margin-top:18px}
.category-title{font-size:21px;margin:8px 0 18px}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:0 38px}
.product{min-height:175px;border-bottom:1px solid #eee;padding:20px 0;display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:16px;position:relative}
.product-info{padding-left:24px;padding-bottom:38px}
.product-info h3{margin:0 0 7px;font-size:18px;line-height:1.25}
.product-info .variant{font-size:14px;color:#777;margin-bottom:10px}
.product-info p{font-size:14px;line-height:1.45;color:#666;margin:0 0 10px}
.price{font-size:15px;color:#555}
.veg{position:absolute;top:21px;left:0;width:14px;height:14px;border:1.5px solid #35a853;border-radius:2px;background:#fff}
.veg:after{content:"";display:block;width:6px;height:6px;background:#35a853;border-radius:50%;margin:2.5px}
.pic{height:125px;background:#e8e8e8;border-radius:8px;display:grid;place-items:center;text-align:center;color:#888;font-size:12px;overflow:hidden}
.pic img{width:100%;height:100%;object-fit:cover}
.add{position:absolute;right:26px;bottom:5px;background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 2px 7px #00000015;padding:9px 34px;color:#999;font-weight:bold}
.qty{position:absolute;right:20px;bottom:5px;display:flex;align-items:center;background:#fff;border:1px solid #ddd;border-radius:8px;overflow:hidden;box-shadow:0 2px 7px #00000015}
.qty button{border:0;background:#f5f5f5;width:36px;height:34px;font-size:18px}.qty span{width:30px;text-align:center;font-weight:bold}

.most-selling {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  margin-bottom: 6px;
  font-size: 13px;
  color: #777;
  font-weight: 500;
}

.most-selling-bar {
  width: 45px;
  height: 7px;
  border-radius: 5px;
  display: inline-block;
  background: linear-gradient(
    to right,
    #22a447 70%,
    #e7eeee 70%
  );
}

/* ==========================================================
   Subcategory chip bar (e.g. Popsicle / Stick / Belgium / Pizza Waffle
   under the "Waffle" category). Add this to style.css.
   ========================================================== */

.subcat-bar{
  display:flex;
  gap:8px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding:4px 2px 14px;
  margin-top:-4px;
  scrollbar-width:none;          /* Firefox: hide scrollbar */
}
.subcat-bar::-webkit-scrollbar{ display:none; } /* Chrome/Safari: hide scrollbar */

.subcat-chip{
  flex:0 0 auto;
  padding:8px 16px;
  border-radius:999px;
  border:1px solid #ddd;
  background:#fff;
  color:#333;
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
  cursor:pointer;
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.subcat-chip:hover{ border-color:#2e7d32; }

.subcat-chip.active{
  background:#2e7d32;   /* matches your veg-dot / highly-reordered green */
  border-color:#2e7d32;
  color:#fff;
}

/* On very small screens, tighten padding slightly so 4+ chips still
   fit comfortably without feeling cramped. */
@media (max-width:380px){
  .subcat-chip{ padding:7px 13px; font-size:12.5px; }
}
.menu-button{display:none}
.cart-bar{position:fixed;left:220px;right:0;bottom:48px;z-index:35;background:#111;color:#fff;padding:10px 22px;display:flex;justify-content:space-between;align-items:center}
.cart-bar div{display:flex;gap:20px;align-items:center}.cart-bar button{border:0;background:#fff;color:#111;padding:11px 15px;border-radius:8px;font-weight:bold}
.hidden{display:none!important}
.overlay{position:fixed;inset:0;background:#0008;z-index:60}
.sheet{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:20px 20px 0 0;padding:22px 28px;max-height:82vh;overflow:auto}
.sheet-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;font-size:17px}.sheet-head button{border:0;background:none;font-size:30px}
.sheet-item{padding:18px 0;border-bottom:1px solid #eee;cursor:pointer;line-height:1.35}
.cart-item{display:flex;justify-content:space-between;padding:13px 0;border-bottom:1px solid #eee}.cart-item small{display:block;color:#777;margin-top:4px}
.checkout-total{display:flex;justify-content:space-between;font-size:20px;padding:18px 0}.checkout{width:100%;border:0;border-radius:10px;background:#111;color:#fff;padding:15px;font-weight:bold;font-size:15px}
.customer{position:fixed;inset:0;z-index:70;max-width:none;margin:0;padding:35px 20px 75px;background:#0009;display:flex;align-items:center;justify-content:center;overflow:auto}
.customer .card{width:min(560px,100%);max-height:calc(100vh - 80px);overflow:auto;position:relative}
.modal-close{position:absolute;right:16px;top:12px;border:0;background:#f4f4f4;width:34px;height:34px;border-radius:50%;font-size:25px;line-height:1;cursor:pointer;color:#555}
.card{background:#fff;border-radius:15px;box-shadow:0 10px 40px #0006;padding:24px}.card label{display:block;font-weight:bold;font-size:13px;margin:14px 0 6px}.card input{width:100%;padding:13px;border:1px solid #ddd;border-radius:9px;font-size:16px}.choices{display:flex;gap:10px}.choices button{flex:1;padding:12px;border:1px solid #ddd;border-radius:9px;background:#fff}.choices .active{background:#111;color:#fff}
#error{color:#b00020}.done{text-align:center;padding:35px}.tick{width:55px;height:55px;margin:auto;border-radius:50%;background:#e5f4e8;display:grid;place-items:center;font-size:30px}.oid{padding:15px;background:#f4f4f4;border-radius:9px;margin:18px 0}
.store-status{position:fixed;bottom:0;left:0;right:0;height:48px;z-index:40;background:#2e9b4f;color:#fff;display:grid;place-items:center;font-size:14px;font-weight:600}
.store-status.closed{background:#888}
@media(max-width:650px){
body{overflow:auto}main{height:auto;min-height:100vh;padding-bottom:48px}.top{height:auto;position:sticky;top:0;display:block;padding:9px 16px}.brand{display:flex;margin-bottom:9px;min-width:0}.logo{width:54px;height:42px}.brand h1{font-size:17px}.brand small{font-size:13px}.search{height:44px;font-size:25px}.search input{font-size:15px}
.desktop-menu{display:none}.product-area{position:relative;top:auto;left:auto;right:auto;bottom:auto;overflow:visible;padding:8px 16px 85px}.grid{display:block}.category-title{font-size:19px;margin:20px 0 8px}.product{min-height:145px;grid-template-columns:minmax(0,1fr) 122px;padding:20px 0}.product-info{padding-left:24px;padding-bottom:32px}.product-info h3{font-size:16px}.product-info p{font-size:13px}.pic{height:98px}.add{right:22px;bottom:7px;padding:8px 28px}.qty{right:16px;bottom:7px}.menu-button{display:block;position:fixed;right:18px;bottom:62px;z-index:45;width:58px;height:58px;border:0;border-radius:50%;background:#111;color:#fff;box-shadow:0 4px 15px #0005;font-weight:bold;font-size:11px}.menu-button span{display:block;font-size:19px}.cart-bar{left:0;right:0;bottom:48px}.store-status{height:48px}.customer{position:fixed;inset:0;margin:0;padding:18px 14px 65px;align-items:flex-end}.customer .card{max-height:calc(100vh - 90px);border-radius:18px}.modal-close{right:12px;top:10px}.sheet{padding:20px 28px}
}

body.modal-open{overflow:hidden!important}

@media(max-width:650px){
  .sheet{padding:24px 28px 28px}
  .sheet-head{margin-bottom:8px}
  .sheet .menu-item{
    padding:19px 0;
    min-height:56px;
    display:flex;
    align-items:center;
    font-size:16px;
    line-height:1.35;
  }
  .sheet .menu-item + .menu-item{border-top:1px solid #eee}
}

.offers-section{padding:4px 0 10px}
.offers-heading{font-size:18px;font-weight:800;margin:4px 0 12px}
.offers-track{display:flex;gap:14px;overflow-x:auto;padding:2px 2px 10px;scrollbar-width:none}
.offers-track::-webkit-scrollbar{display:none}
.offer-card{min-width:300px;flex:1;background:#f7f7f7;border:1px solid #e7e7e7;border-radius:12px;padding:15px;display:flex;gap:13px;align-items:center;cursor:pointer}
.offer-icon{font-size:28px}
.offer-card b{display:block;font-size:15px}
.offer-card small{display:block;color:#555;margin-top:4px}
.offer-card span{display:block;color:#777;font-size:12px;margin-top:7px}
.offers-menu-item{font-weight:700}
.summary-row{display:flex;justify-content:space-between;padding:8px 0;color:#555}
.discount-row{color:#24833d}
.you-save{margin:8px 0;padding:9px;text-align:center;border-radius:8px;background:#eaf7ed;color:#24833d;font-weight:800;font-size:13px}
@media(max-width:650px){
  .offers-section{padding-top:6px}
  .offers-heading{font-size:17px;margin:8px 0 10px}
  .offer-card{min-width:285px}
}

.customer-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.customer-head h2{margin:0}
.close-customer{border:0;background:#f2f2f2;width:36px;height:36px;border-radius:50%;font-size:25px;line-height:1;cursor:pointer;color:#333}
.offer-note{font-size:12px;color:#777;text-align:center;margin:4px 0 8px}

.customer{position:fixed;z-index:55;inset:0;max-width:none;margin:0;padding:28px 20px 70px;background:#0008;display:flex;align-items:center;justify-content:center;overflow:auto}
.customer.hidden{display:none!important}
.customer .card{width:min(560px,100%);max-height:calc(100vh - 100px);overflow:auto}
@media(max-width:650px){
  .customer{align-items:flex-end;padding:0 0 48px}
  .customer .card{width:100%;border-radius:20px 20px 0 0;max-height:88vh}
}

#appliedOffer{font-weight:600}

/* V8 API REVIEW styles */
.form-note{font-size:12px;color:#777;margin:6px 0 8px}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.delivery-details{margin-top:8px;padding-top:8px;border-top:1px solid #eee}
.delivery-details h3,.checkout-offers h3{font-size:15px;margin:14px 0 6px}
.delivery-details textarea{width:100%;padding:13px;border:1px solid #ddd;border-radius:9px;font-size:15px;resize:vertical}
.offer-list{display:grid;gap:8px}
.api-offer{border:1px solid #ddd;border-radius:10px;padding:10px;cursor:pointer}
.api-offer.active{border-color:#111;background:#f5f5f5}
.api-offer b{display:block}
.api-offer small{display:block;color:#666;margin-top:4px}
#checkoutStoreMessage{font-size:12px;color:#777}
@media(max-width:650px){
  .two-col{grid-template-columns:1fr}
}
