/* ═══ HARIYALIBASKET v5 R2 — INLINE STYLES SE NIKALI HUI FILE (FOOTER) ═══
   Selectors akshar-akshar wahi jo templates me the — sirf jagah badli hai.
   Source har section ke banner comment me likha hai. */

/* ── [template-parts/cart-drawer.php block 0] ── */
/* Force light premium sheet (overrides old dark cart.css styles) */
#hb-cart-drawer{position:fixed;bottom:0;left:0;right:0;z-index:1010;background:#fdfefd !important;border-radius:var(--radius-24) var(--radius-24) 0 0;box-shadow:0 -12px 48px rgba(13,51,32,.22);max-height:50vh;display:none;flex-direction:column;overflow:hidden;}
#hb-cart-drawer .hb-cd-handle{width:40px;height:4px;background:#d7e3da;border-radius:2px;margin:12px auto 4px;flex-shrink:0;}
#hb-cart-drawer .hb-cd-head{display:flex;align-items:center;gap:10px;padding:8px 18px 12px;border-bottom:1px solid #eef4ef;flex-shrink:0;}
#hb-cart-drawer .hb-cd-head h3{margin:0;flex:1;font-size:17px;font-weight:900;color:var(--green-deep) !important;}
#hb-cart-drawer .hb-cd-close{background:#f0f5f0;color:var(--green-deep);border:none;width:32px;height:32px;border-radius:50%;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
#hb-cart-drawer .hb-cd-clear{background:#fef2f2;color:var(--red-strong);border:1px solid #fecaca;padding:6px 12px;border-radius:var(--radius-10);font-size:12px;font-weight:700;cursor:pointer;}
#hb-cart-items{overflow-y:auto;padding:6px 14px;flex:1;-webkit-overflow-scrolling:touch;}
/* Rows written by cart.js */
#hb-cart-items .hb-cart-row-item{display:flex;align-items:center;gap:12px;padding:12px 6px;border-bottom:1px dashed #eef4ef;background:transparent !important;}
#hb-cart-items .hb-cri-img{width:46px;height:46px;border-radius:var(--radius-12);background:#f0f7f1 !important;display:flex;align-items:center;justify-content:center;font-size:24px;flex-shrink:0;}
#hb-cart-items .hb-cri-info{flex:1;min-width:0;}
#hb-cart-items .hb-cri-name{font-size:13px;font-weight:800;color:var(--green-deep) !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#hb-cart-items .hb-cri-meta{font-size:11px;color:var(--text-muted) !important;margin-top:2px;}
#hb-cart-items .hb-cri-ctrl{display:flex;align-items:center;gap:8px;flex-shrink:0;}
#hb-cart-items .hb-cri-btn{width:28px;height:28px;border-radius:9px;border:none;font-size:15px;font-weight:800;cursor:pointer;display:flex;align-items:center;justify-content:center;}
#hb-cart-items .hb-cri-minus{background:#f0f5f0 !important;color:var(--green-deep) !important;}
#hb-cart-items .hb-cri-plus{background:linear-gradient(135deg,var(--green-success),#0d7a35) !important;color:#fff !important;}
#hb-cart-items .hb-cri-qty{font-size:14px;font-weight:800;color:var(--green-deep) !important;min-width:16px;text-align:center;}
#hb-cart-items .hb-cri-amt{font-size:13px;font-weight:900;color:#d84315 !important;flex-shrink:0;min-width:44px;text-align:right;}
/* Empty state (cart.js writes inline colors for dark theme — neutralize) */
#hb-cart-items > div[style*="text-align:center"]{color:var(--text-muted) !important;}
#hb-cart-items > div[style*="text-align:center"] p{color:var(--green-deep) !important;font-weight:800;}
#hb-cart-items > div[style*="text-align:center"] small{color:#a9b8ae !important;}
/* Sticky footer */
#hb-cart-drawer .hb-cd-foot{display:flex;align-items:center;gap:14px;padding:14px 18px calc(16px + env(safe-area-inset-bottom));border-top:1px solid #eef4ef;background:#fff;flex-shrink:0;}
.hb-cd-total-label{font-size:10px;font-weight:800;color:var(--text-muted);text-transform:uppercase;letter-spacing:.08em;}
.hb-cd-total{font-size:22px;font-weight:900;color:var(--green-deep);line-height:1.1;}
.hb-cd-checkout{flex:1;padding:15px;border:none;border-radius:var(--radius-md);background:linear-gradient(135deg,var(--orange-light),var(--orange));color:#fff;font-size:15px;font-weight:900;cursor:pointer;font-family:inherit;box-shadow:0 8px 20px rgba(255,111,0,.35);transition:transform .12s;}
.hb-cd-checkout:active{transform:scale(.97);}
/* v4.18.25: Desktop par drawer CENTER me — ye inline style sabse baad me aata hai, isliye yahi final */
@media (min-width: 600px){
  #hb-cart-drawer{left:50% !important;right:auto !important;transform:translateX(-50%) !important;max-width:480px !important;width:480px !important;}
}

/* ── [template-parts/nav-drawer.php block 0] ── */
/* FIX: modals.css gives drawer dark green bg — force white so link text (var(--green-deep)) is readable */
#hb-nav-drawer { background: #fff !important; }
#hb-nav-drawer .hb-nd-head { background: #fff !important; border-bottom: 1px solid #e8f0e9; padding: 18px 16px; display: flex; align-items: center; justify-content: space-between; }
#hb-nav-drawer .hb-nd-brand { color: var(--green-deep) !important; font-weight: 900; font-size: 17px; }
#hb-nav-drawer .hb-nd-brand span { color: var(--orange); }
#hb-nav-drawer .hb-nd-head .hb-nd-close { background: #f0f5f0; color: var(--green-deep); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 14px; }
#hb-nav-drawer .hb-nd-links a.hb-nd-link { color: var(--green-deep) !important; }
#hb-nav-drawer .hb-nd-sep { color: #a9b8ae !important; }
.hb-nd-user { padding:22px 20px 20px; background:linear-gradient(135deg,var(--green-deep) 0%,var(--green-pine) 100%); color:#fff; display:flex; align-items:center; gap:14px; }
.hb-nd-avatar { width:52px; height:52px; border-radius:50%; background:linear-gradient(135deg,var(--orange-light),var(--orange)); display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:900; color:#fff; flex-shrink:0; overflow:hidden; border:3px solid rgba(255,255,255,0.25); }
.hb-nd-avatar img { width:100%; height:100%; object-fit:cover; }
.hb-nd-user-info { flex:1; min-width:0; }
.hb-nd-hi { font-size:11px; opacity:0.75; }
.hb-nd-name { font-size:16px; font-weight:800; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hb-nd-user .hb-nd-close { position:static; background:rgba(255,255,255,0.15); color:#fff; border:none; width:32px; height:32px; border-radius:50%; cursor:pointer; flex-shrink:0; font-size:14px; }
.hb-nd-login-cta { display:block; width:calc(100% - 32px); margin:12px 16px 4px; padding:14px; background:linear-gradient(135deg,var(--orange-light),var(--orange)); color:#fff; border:none; border-radius:var(--radius-12); font-size:15px; font-weight:800; cursor:pointer; font-family:inherit; box-shadow:0 6px 16px rgba(255,111,0,0.3); transition:transform 0.15s; }
.hb-nd-login-cta:hover { transform:translateY(-1px); }
.hb-nd-guest-info { padding:4px 20px 12px; font-size:11px; color:var(--text-muted); text-align:center; line-height:1.5; }
.hb-nd-sep { padding:14px 20px 6px; font-size:10px; font-weight:800; color:#a9b8ae; letter-spacing:0.15em; text-transform:uppercase; }
.hb-nd-sep:empty { padding:4px 0; border-top:1px dashed var(--green-mist); margin:6px 20px; }
.hb-nd-links a.hb-nd-link { text-decoration:none; color:var(--green-deep); padding:12px 20px; display:flex; align-items:center; gap:14px; font-size:14px; font-weight:600; transition:background 0.15s, padding-left 0.15s; }
.hb-nd-links a.hb-nd-link:hover { background:#f0f5f0; padding-left:24px; }
.hb-nd-links a.hb-nd-link span { font-size:18px; width:24px; text-align:center; flex-shrink:0; }
.hb-nd-link-hot em { font-style:normal; font-size:9px; font-weight:900; background:var(--red-strong); color:#fff; padding:2px 6px; border-radius:6px; margin-left:auto; }
.hb-nd-wa { color:#128c7e !important; }
.hb-nd-logout { color:var(--red-strong) !important; }
.hb-nd-foot { margin-top:auto; padding:18px 20px; border-top:1px solid var(--green-mist); text-align:center; }
.hb-nd-foot-tag { font-weight:800; color:var(--green-deep); font-size:13px; }
.hb-nd-foot-copy { font-size:10px; color:#a9b8ae; margin-top:4px; }
body.hb-nav-open .bottom-nav, body.hb-nav-open #hb-bottom-nav { visibility:hidden !important; pointer-events:none; }

/* ── [template-parts/zone-popup.php block 0] ── */
.hb-zone-popup { position: fixed; inset: 0; z-index: 10002; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.hb-zone-popup-card { background: #fff; border-radius: 18px; max-width: 340px; width: 100%; padding: 24px 20px 20px; text-align: center; position: relative; box-shadow: 0 12px 40px rgba(0,0,0,0.25); animation: hbZonePop 0.25s ease; }
@keyframes hbZonePop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.hb-zone-popup-close { position: absolute; top: 10px; right: 10px; background: #f0f5f0; border: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 13px; color: var(--green-deep); }
.hb-zone-popup-emoji { font-size: 44px; margin-bottom: 8px; }
.hb-zone-popup-card h3 { color: var(--green-deep); font-size: 17px; font-weight: 800; margin: 0 0 6px; }
.hb-zone-popup-pin { color: var(--green-deep); font-size: 14px; margin: 0 0 8px; }
.hb-zone-popup-sub { color: #5b6e62; font-size: 13px; line-height: 1.5; margin: 0 0 12px; }
#hb-zone-popup-phone { width: 100%; padding: 12px; border: 2px solid #e0e8e1; border-radius: var(--radius-10); font-size: 15px; margin-bottom: 10px; box-sizing: border-box; font-family: inherit; }
#hb-zone-popup-phone:focus { border-color: var(--green-deep); outline: none; }
.hb-zone-popup-btn-notify { display: block; width: 100%; padding: 13px; background: var(--green-deep); color: #fff; border: none; border-radius: var(--radius-10); font-size: 15px; font-weight: 800; cursor: pointer; font-family: inherit; margin-bottom: 8px; }
.hb-zone-popup-btn-notify:disabled { opacity: 0.6; cursor: default; }
.hb-zone-popup-btn-wa { display: block; width: 100%; padding: 13px; background: var(--whatsapp); color: #fff; border-radius: var(--radius-10); font-size: 15px; font-weight: 800; text-decoration: none; box-sizing: border-box; }
.hb-zone-popup-msg { font-size: 13px; font-weight: 700; margin: 10px 0 0; min-height: 18px; color: var(--green-deep); }

/* ── [inc/recently-viewed.php block 0] ── */
.hb-recent-wrap { max-width: 1100px; margin: 24px auto 0; padding: 0 16px; }
.hb-recent-head { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.hb-recent-head h2 { font-size:18px; font-weight:800; color:var(--green-deep); margin:0; }
.hb-recent-head .hb-recent-badge { font-size:11px; background:#f0f5f0; color:var(--green-pine); padding:3px 10px; border-radius:var(--radius-12); font-weight:700; }
.hb-recent-row { display:flex; gap:10px; overflow-x:auto; padding-bottom:8px; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
.hb-recent-row::-webkit-scrollbar { display:none; }
.hb-recent-card {
  flex:0 0 120px; background:#fff; border:1px solid #e8f0e9; border-radius:var(--radius-12);
  overflow:hidden; text-decoration:none; color:inherit; transition:transform .2s, box-shadow .2s;
}
.hb-recent-card:hover { transform:translateY(-3px); box-shadow:0 8px 18px rgba(0,0,0,0.08); }
.hb-recent-card .im { aspect-ratio:1/1; background:#f0f5f0; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.hb-recent-card .im img { width:100%; height:100%; object-fit:cover; }
.hb-recent-card .im .em { font-size:36px; opacity:.4; }
.hb-recent-card .nm { font-size:12px; font-weight:700; color:var(--green-deep); padding:8px 8px 2px; line-height:1.25; height:32px; overflow:hidden; }
.hb-recent-card .pr { font-size:13px; font-weight:800; color:#d84315; padding:0 8px 8px; }

/* ── [inc/ui-refresh.php block 0] ── */
/* ═══ FIX: Mobile horizontal overflow — proper root-cause fix ═══
 * ROOT CAUSES FIXED:
 *   1. layout.css marquee @keyframes used translateX(100vw) → 100% (no scrollbar gap)
 *   2. marquee container gets overflow:hidden (layout.css)
 *   3. Site-wide: html/body clip + no element wider than viewport
 *   4. Premium template's .header::after right:-50px is safe (parent has overflow:hidden)
 *      but non-premium pages need explicit containment
 * This is the safety net — individual fixes above handle root causes. */
html {
  overflow-x: hidden; /* safety net — catches any remaining overflow */
  -webkit-text-size-adjust: 100%; /* prevents iOS font inflation */
}
body {
  overflow-x: hidden;
  position: relative; /* establishes containing block for absolute children */
}
/* Prevent any rogue wide element — img, video, iframe, table, pre */
img, video, iframe, table, pre, canvas, svg {
  max-width: 100%;
  height: auto;
}
/* Marquee text — parent clips, text animates inside */
.hb-marquee { overflow: hidden !important; }

/* ═══ 1. MARQUEE — living gradient ═══ */
.hb-marquee:not(.hb-fest){
  background: linear-gradient(90deg,var(--amber),#f97316,#fb7185,var(--amber)) !important;
  background-size: 300% 100% !important;
  animation: hbMarqueeShift 14s ease infinite;
}
@keyframes hbMarqueeShift{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}

/* ═══ 2. HERO AURORA — premium home first section ═══ */
.section:first-of-type{
  position: relative;
  background:
    radial-gradient(600px 420px at 85% -10%, rgba(45,212,191,.18), transparent 60%),
    radial-gradient(520px 380px at -10% 30%, rgba(251,191,36,.14), transparent 55%),
    linear-gradient(165deg,#0a2a18 0%,var(--green-deep) 45%,#123a24 100%) !important;
}
.section:first-of-type::after{
  content:'';position:absolute;inset:0;pointer-events:none;
  background: radial-gradient(400px 300px at 60% 110%, rgba(255,143,0,.10), transparent 60%);
  animation: hbAuroraDrift 9s ease-in-out infinite alternate;
}
@keyframes hbAuroraDrift{from{opacity:.5;transform:translateX(-4%)}to{opacity:1;transform:translateX(4%)}}

/* ═══ 3. FILTER CHIPS — glass pills ═══ */
.fchip, .hb-fchip{
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,.16) !important;
  transition: transform .15s, box-shadow .15s !important;
}
.fchip:active, .hb-fchip:active{ transform: scale(.95); }
.fchip.on, .hb-fchip.active{
  background: linear-gradient(135deg,var(--green-success),#0d7a35) !important;
  color:#fff !important;
  border-color: transparent !important;
  box-shadow: 0 6px 18px rgba(22,163,74,.4) !important;
}

/* ═══ 4. DEAL / PRODUCT CARDS ═══ */
.pcard, .hb-pcard{
  transition: transform .22s ease, box-shadow .22s ease !important;
  overflow: hidden;
}
.pcard:hover, .hb-pcard:hover{
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(13,51,32,.18) !important;
}
.pcard .pimg img, .hb-pcard img{ transition: transform .35s ease; }
.pcard:hover .pimg img, .hb-pcard:hover img{ transform: scale(1.06); }

/* dashed +Add → solid gradient pill (premium home + products.js grid) */
.add-btn, .hb-add-btn{
  border: none !important;
  background: linear-gradient(135deg,var(--green-success),#0d7a35) !important;
  color: #fff !important;
  font-weight: 800 !important;
  border-radius: var(--radius-12) !important;
  box-shadow: 0 5px 14px rgba(22,163,74,.3) !important;
  transition: transform .12s !important;
}
.add-btn:active, .hb-add-btn:active{ transform: scale(.94) !important; }

/* price pop */
.pcard .sp, .hb-pcard .hb-price-sp{ color:#d84315 !important; font-weight: 900 !important; }

/* ═══ 5. SECTION HEADINGS — amber accent ═══ */
.sh-head, .hb-section-title{ position: relative; }
.sh-head::after, .hb-section-title::after{
  content:'';display:block;width:44px;height:4px;border-radius:2px;margin-top:6px;
  background: linear-gradient(90deg,var(--amber),var(--orange));
}

/* ═══ 6. BOTTOM NAV — active pill glow ═══ */
.bottom-nav .nav-item.active, .hb-bottom-nav .hb-bn-item.active{ position: relative; }
.bottom-nav .nav-item.active::before, .hb-bottom-nav .hb-bn-item.active::before{
  content:'';position:absolute;top:4px;left:50%;transform:translateX(-50%);
  width:34px;height:34px;border-radius:var(--radius-12);
  background: rgba(22,163,74,.12);
  z-index:-1;
}

/* ═══ 7. /fresh/ + CATEGORY pages — distinct soft canvas ═══ */
body.post-type-archive-hb_product, body.tax-hb_category{
  background:
    radial-gradient(500px 300px at 100% 0%, rgba(22,163,74,.06), transparent 55%),
    radial-gradient(400px 260px at 0% 40%, rgba(245,158,11,.05), transparent 50%),
    #f7faf7 !important;
}
body.post-type-archive-hb_product .hb-cat-card,
body.tax-hb_category .hb-cat-card{
  border: 1px solid #e8f0e9;
  transition: transform .2s, box-shadow .2s;
}
body.post-type-archive-hb_product .hb-cat-card:hover,
body.tax-hb_category .hb-cat-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(13,51,32,.12);
}
.hb-cat-title{ position:relative; display:inline-block; }
.hb-cat-title::after{
  content:'';display:block;height:4px;border-radius:2px;margin-top:4px;
  background:linear-gradient(90deg,var(--green-success),var(--amber));
}
