/* ================================================================
   1 Million Boxes India — main.css  (Amazon-style product grid)
   ================================================================ */

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ── PRODUCT GRID — Amazon-style ─────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
@media (max-width:1024px) { .product-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
@media (max-width:640px)  { .product-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; } }
@media (max-width:360px)  { .product-grid { grid-template-columns: repeat(2, 1fr); gap: .4rem; } }

/* ── PRODUCT CARD ─────────────────────────────────────────────── */
.pcard {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #e7e7e7;
  transition: box-shadow .18s, transform .18s;
  display: flex;
  flex-direction: column;
  position: relative;
}
.pcard:hover {
  box-shadow: 0 6px 32px rgba(0,0,0,.14);
  transform: translateY(-2px);
}

/* Image container - square, like Amazon */
.pcard-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f7f7f7;
  overflow: hidden;
  flex-shrink: 0;
}
.pcard-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
}

/* Sponsor badge */
.badge-sponsor {
  position: absolute; top: 8px; left: 8px;
  background: #fe9800; color: #fff;
  font-size: .62rem; font-weight: 700;
  padding: 2px 7px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: .04em;
}
/* Best seller badge */
.badge-bestseller {
  position: absolute; top: 8px; left: 8px;
  background: #e47911; color: #fff;
  font-size: .62rem; font-weight: 700;
  padding: 2px 7px; border-radius: 3px;
}
/* New badge */
.badge-new {
  position: absolute; top: 8px; right: 8px;
  background: #067d62; color: #fff;
  font-size: .6rem; font-weight: 700;
  padding: 2px 6px; border-radius: 3px;
}

/* Card body */
.pcard-body {
  padding: .7rem .75rem .85rem;
  flex: 1; display: flex; flex-direction: column;
}

/* Product name — Amazon clamps to 2 lines */
.pcard-name {
  font-size: .83rem;
  font-weight: 500;
  color: #0f1111;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: .3rem;
  min-height: 2.2em;
}

/* Stars — Amazon orange */
.star-row {
  display: flex; align-items: center; gap: .25rem;
  margin-bottom: .3rem;
}
.stars { color: #fe9800; font-size: .8rem; letter-spacing: -.5px; }
.star-count { font-size: .72rem; color: #007185; }

/* Price */
.pcard-price {
  display: flex; align-items: baseline; gap: .3rem;
  margin-bottom: .3rem;
}
.price-symbol { font-size: .75rem; color: #0f1111; vertical-align: top; line-height: 1.8; }
.price-main   { font-size: 1.35rem; font-weight: 700; color: #0f1111; line-height: 1; }
.price-decimal{ font-size: .75rem; color: #0f1111; }

/* Seller / Store name */
.pcard-seller {
  font-size: .72rem; color: #007185;
  margin-bottom: .25rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pcard-seller strong { color: #007185; }

/* Location */
.pcard-location {
  font-size: .68rem; color: #6b7280;
  display: flex; align-items: center; gap: .2rem;
}

/* WA quick-button (appears on hover) */
.pcard-wa {
  display: none;
  position: absolute; bottom: 0; left: 0; right: 0;
  background: #25d366;
  color: #fff;
  font-size: .78rem; font-weight: 700;
  padding: .45rem;
  text-align: center; text-decoration: none;
  align-items: center; justify-content: center; gap: .35rem;
}
.pcard:hover .pcard-wa { display: flex; }
.pcard-body { padding-bottom: 2.2rem; } /* space for WA bar */

/* ── SEARCH AUTOCOMPLETE ─────────────────────────────────────── */
.search-suggest-box {
  position: absolute;
  top: calc(100% + 2px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #d5d9d9;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,.18);
  z-index: 1000;
  max-height: 420px;
  overflow-y: auto;
}
.search-suggest-box.hidden { display: none; }
.suggest-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f3f3f3;
  transition: background .1s;
}
.suggest-item:hover { background: #f7f7f7; }
.suggest-item mark { background: #fff7d6; color: #111; border-radius: 2px; }
.suggest-item:last-child { border-bottom: none; }

/* ── TOAST ───────────────────────────────────────────────────── */
.toast-el {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  background: #0f1111; color: #fff;
  padding: 10px 22px; border-radius: 4px;
  font-size: .82rem; opacity: 0;
  transition: opacity .25s; pointer-events: none;
  z-index: 9999; max-width: 90vw; text-align: center;
}
.toast-el.show { opacity: 1; }

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 400;
  align-items: flex-start; justify-content: center;
  padding: 1rem; overflow-y: auto;
}
.modal-bg.on { display: flex; }

/* ── SELLER BADGE ────────────────────────────────────────────── */
.verified-badge {
  display: inline-flex; align-items: center; gap: .2rem;
  background: #e6f4ea; color: #1a7f37;
  font-size: .65rem; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
  border: 1px solid #b5dfc1;
}

/* ── RATING BARS (product page) ─────────────────────────────── */
.rating-bar-wrap { display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem; }
.rating-bar-track { flex: 1; height: 8px; background: #e7e7e7; border-radius: 4px; overflow: hidden; }
.rating-bar-fill  { height: 100%; background: #fe9800; border-radius: 4px; }

/* ── SCROLLBAR ───────────────────────────────────────────────── */
.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; }

/* ── SPIN ANIMATION ──────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; display: inline-block; }

/* ── MOBILE NAV FIXES ────────────────────────────────────────── */
/* Prevent horizontal overflow from nav bar */
html, body { overflow-x: hidden; max-width: 100vw; }

/* Hide webkit scrollbar on category strip */
.cat-strip::-webkit-scrollbar { display: none; }

/* Hide right nav items on mobile — only show logo + search + hamburger */
@media (max-width: 767px) {
  #nav-right    { display: none !important; }
  #loc-trigger  { display: none !important; }
  /* Compact search on mobile */
  #cat-select   { display: none !important; }
}
@media (min-width: 768px) {
  #mob-btn      { display: none !important; }
  #loc-trigger  { display: flex !important; }
}

/* Location dropdown always visible when open, above everything */
#loc-dropdown { z-index: 200 !important; }

/* Product card WhatsApp hover bar — ensure it's within card bounds */
.pcard { position: relative; }
.pcard-wa { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; }

/* ── STORE LOGO IN PRODUCT CARDS ─────────────────────────────── */
.pcard-seller {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  color: #007185;
  margin-bottom: .25rem;
  min-height: 22px;
}
.pcard-seller strong { color: #007185; }

/* Circular store logo on cards */
.card-store-logo {
  width: 18px; height: 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e7e7e7;
  flex-shrink: 0;
}
/* Letter avatar fallback */
.card-store-initial {
  background: #131921;
  color: #fe9800;
  font-size: .6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(254,152,0,.3);
}
