/* ═══ SEARCH ═══ */
.hb-search-section {
  background: var(--green-deep);
  padding: 12px 16px 16px;
  position: relative;
  /* z-index 800 — must beat .hb-filter-bar (700) which sits below it.
     Without this, the absolute-positioned .hb-search-suggest gets clipped
     by the filter-bar because z-index of children is bound by their parent's
     stacking context level (was z-index: 10, lost to filter-bar's 700). */
  z-index: 800;
}
.hb-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 11px 16px;
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  transition: var(--transition);
}
.hb-search-box:focus-within { border-color: var(--green-light); }
.hb-search-box input {
  border: none;
  background: transparent;
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-800);
  outline: none;
  /* BUG FIX: suppress browser native autofill suggestion bubble (mobile Chrome) */
  -webkit-appearance: none;
  appearance: none;
}
/* Hide browser-default search input "x" button (we have our own .hb-clear-btn) */
.hb-search-box input[type="search"]::-webkit-search-cancel-button,
.hb-search-box input[type="search"]::-webkit-search-decoration,
.hb-search-box input[type="search"]::-webkit-search-results-button,
.hb-search-box input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
/* Suppress yellow autofill background (Chrome) — keep our white background */
.hb-search-box input:-webkit-autofill,
.hb-search-box input:-webkit-autofill:hover,
.hb-search-box input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 30px #fff inset !important;
  -webkit-text-fill-color: var(--gray-800) !important;
}
.hb-search-box input::placeholder { color: var(--gray-400); }
.hb-search-icon { font-size: 17px; color: var(--gray-400); }
.hb-clear-btn {
  font-size: 14px;
  color: var(--gray-400);
  cursor: pointer;
  display: none;
  padding: 0;
  border-radius: 50%;
  background: var(--gray-100);
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: none;
}
.hb-clear-btn.show { display: flex; }
/* BULLETPROOF FIX: portal-style — JS will move this element to <body> on init,
   so it bypasses all stacking contexts (filter-bar, products-section, etc.). */
.hb-search-suggest {
  position: fixed;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18), 0 0 0 1px rgba(13,51,32,0.06);
  z-index: 99999; /* effectively top of every stacking context */
  max-height: 280px;
  overflow-y: auto;
  display: none;
  /* Width / top / left set dynamically by JS based on input's viewport rect */
}
.hb-search-suggest.show { display: block; }
.hb-suggest-item {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
  cursor: pointer;
  border-bottom: 1px solid var(--gray-50);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hb-suggest-item:hover { background: var(--off-white); color: var(--green-dark); }

/* ═══ DELIVERY STRIP ═══ */
.hb-delivery-strip {
  background: var(--green-deep);
  padding: 0 16px 14px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.hb-delivery-strip::-webkit-scrollbar { display: none; }
.hb-dstrip-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-full);
  padding: 7px 13px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: var(--transition);
}
.hb-dstrip-pill.active,
.hb-dstrip-pill:hover {
  background: rgba(77,218,133,.2);
  border-color: var(--green-glow);
}
.hb-dstrip-pill span {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
}

/* ═══ FILTER BAR ═══ */
.hb-filter-bar {
  background: #fff;
  padding: 10px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 68px;
  z-index: 700;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--gray-100);
}
.hb-filter-bar::-webkit-scrollbar { display: none; }
.hb-fchip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  border: 2px solid var(--gray-200);
  background: #fff;
  color: var(--gray-600);
  transition: var(--transition);
  flex-shrink: 0;
}
.hb-fchip:hover { border-color: var(--green-mid); color: var(--green-mid); }
.hb-fchip.active {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
}

/* ═══ PRODUCTS SECTION ═══ */
.hb-products-section { background: #fff; }

/* ═══ PRODUCT GRID ═══ */
#hb-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 8px 12px 200px;
}

/* ═══ PRODUCT CARD ═══ */
.hb-pcard {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 13px 12px 12px;
  position: relative;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--gray-100);
  transition: var(--transition);
  overflow: hidden;
}
.hb-pcard::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(56,178,106,.04), transparent);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}
.hb-pcard:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--green-light);
}
.hb-pcard:hover::before { opacity: 1; }
.hb-pcard.hb-out-stock { opacity: 0.65; }
.hb-pcard.hb-out-stock .hb-pcard-add,
.hb-pcard.hb-out-stock .hb-qty-ctrl { display: none !important; }

/* badges */
.hb-badge {
  position: absolute;
  top: 9px;
  font-size: 9px;
  font-weight: 900;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.3px;
  z-index: 2;
}
.hb-badge-disc {
  left: 9px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}
.hb-badge-fresh {
  right: 9px;
  background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
  color: var(--green-glow);
}
.hb-badge-soon {
  left: 9px;
  background: var(--gray-400);
  color: #fff;
}
.hb-badge-wish {
  position: absolute;
  top: 9px;
  right: 9px;
  background: rgba(255,255,255,.9);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: var(--shadow-sm);
}

/* image / emoji */
.hb-p-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 6px;
  background: #f0f8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hb-p-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hb-p-emoji {
  font-size: 42px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.1));
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.hb-pcard:hover .hb-p-emoji {
  transform: scale(1.12) rotate(-3deg);
}

.hb-p-name {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--gray-800);
  line-height: 1.3;
  min-height: 32px;
}
.hb-p-uom {
  font-size: 9.5px;
  color: var(--gray-400);
  font-weight: 700;
  margin-top: 2px;
}

/* variant chips */
.hb-var-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 7px 0 4px;
}
.hb-vchip {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  border: 1.5px solid var(--gray-200);
  background: #fff;
  color: var(--gray-600);
  transition: var(--transition);
}
.hb-vchip.active {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
}

/* price */
.hb-p-price-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 5px 0 8px;
}
.hb-p-mrp {
  font-size: 10px;
  color: var(--gray-400);
  text-decoration: line-through;
  font-weight: 700;
}
.hb-p-sp {
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 900;
  color: var(--green-dark);
}

/* qty ctrl */
.hb-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hb-qty-btn {
  width: 30px; height: 30px;
  border-radius: 9px;
  border: none;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--spring);
}
.hb-qty-btn:active { transform: scale(0.82); }
.hb-qty-minus { background: var(--gray-100); color: var(--gray-600); }
.hb-qty-plus {
  background: var(--green-dark);
  color: #fff;
  box-shadow: 0 3px 10px rgba(26,92,56,.35);
}
.hb-qty-plus:hover { background: var(--green-mid); }
.hb-qty-num {
  min-width: 22px;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--gray-800);
}

/* add btn */
.hb-pcard-add {
  width: 100%;
  padding: 9px;
  border-radius: 10px;
  border: 2px dashed var(--green-light);
  background: rgba(56,178,106,.06);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}
.hb-pcard-add:hover {
  background: rgba(56,178,106,.12);
  border-style: solid;
}

/* "Coming Soon" for out-of-stock */
.hb-soon-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.55);
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12px;
}
.hb-soon-overlay span {
  background: #ff6b35;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}
