/* ══════════════════════════════════════════════════════════════════════════ */
/* AARAL CAMPUS STORE — ALL PRODUCTS PAGE CSS                                 */
/* ══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 1: CSS VARIABLES & RESET                                           */
/* ─────────────────────────────────────────────────────────────────────────── */

:root {
  --color-primary-yellow: #FFCC33;
  --color-accent-teal: #00897B;
  --color-teal-light: #E6F4F1;
  --color-teal-dark: #00695C;
  --color-bg-main: #F3F4F6;
  --color-card-bg: #FFFFFF;
  --color-text-dark: #1F2937;
  --color-text-muted: #6B7280;
  --color-border: #E5E7EB;
  --color-red: #EF4444;
  --color-red-light: #FEF2F2;
  --color-yellow-light: #FFFBEB;
  --color-nav-bg: rgba(31, 41, 55, 0.88);

  /* Navy border colour shared by all top-bar slots */
  --color-navy-border: #1B2E5E;

  /* Sub-category bar height — update here if padding changes */
  --sub-cat-bar-h: 46px;
  /* Filter/category pill bar height */
  --filter-bar-h: 52px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

html::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--color-text-dark);
  background-color: var(--color-bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Top padding = top-bar only; filter & sub-cat bars are in normal page flow */
  padding-top: calc(82px + 2px);
  padding-bottom: calc(62px + 32px);
  overflow-x: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

body::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* body.has-sub-category-bar no longer needs extra padding — sub-cat bar is in flow */

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 2: TOP BAR                                                         */
/* Three-slot layout: [back-btn] [search-pill] [sort-btn]                    */
/* ─────────────────────────────────────────────────────────────────────────── */

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 60px;
  padding: 0 10px;
  background-color: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-bar.top-bar-hidden {
  transform: translateY(-82px);
}

/* ── Back button ── */
.back-btn {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-navy-border);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.10);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  transition: background-color 0.15s;
}

.back-btn:hover  { background-color: var(--color-bg-main); }
.back-btn:active { transform: scale(0.95); }

/* ── Search pill — grows to fill remaining space ── */
.top-search-pill {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 39px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-navy-border);
  border-radius: 100px;
  padding: 0 10px 0 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.10);
  transition: background-color 0.15s, border-color 0.15s;
}

.top-search-pill:focus-within {
  background-color: var(--color-card-bg);
  border-color: var(--color-accent-teal);
}

.top-search-icon {
  flex-shrink: 0;
  color: var(--color-text-muted);
  pointer-events: none;
}

.top-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text-dark);
  font-size: 13px;
  font-weight: 400;
  font-family: 'DM Sans', sans-serif;
  min-width: 0;
}

.top-search-input::placeholder {
  color: var(--color-text-muted);
}

.top-search-clear {
  display: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--color-border);
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: background-color 0.15s;
}

.top-search-clear.show  { display: flex; }
.top-search-clear:hover { background-color: #D1D5DB; }

/* ── Sort button — light card style to match the now-transparent top-bar ── */
.sort-btn {
  width: 39px;
  height: 39px;
  border-radius: 10px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-navy-border);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.10);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dark);
  padding: 0;
  transition: background-color 0.15s ease,
              border-color     0.15s ease,
              color            0.15s ease,
              transform        0.10s ease;
}

.sort-btn:hover  { background-color: var(--color-bg-main); }
.sort-btn:active { transform: scale(0.95); }

/* Default (no sort active) */
.sort-btn.sort-default {
  border-color: var(--color-navy-border);
  color: var(--color-text-dark);
  background-color: var(--color-card-bg);
}

/* Low → High — teal tint */
.sort-btn.sort-low-high {
  border-color:     var(--color-accent-teal);
  color:            var(--color-teal-dark);
  background-color: var(--color-teal-light);
}

/* High → Low — red tint */
.sort-btn.sort-high-low {
  border-color:     rgba(239, 68, 68, 0.55);
  color:            #EF4444;
  background-color: rgba(239, 68, 68, 0.08);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 2B: SUB-CATEGORY BAR                                               */
/* Fixed just below the top-bar. Visible only when an Aaral category          */
/* is active (not "All Products" or "Local Shops").                           */
/* The filter-tabs-row scrolls up under this bar as the user scrolls.        */
/* ─────────────────────────────────────────────────────────────────────────── */

.sub-category-bar {
  position: static;
  height: var(--sub-cat-bar-h);
  background-color: transparent;
  box-shadow: none;

  display: none;           /* hidden by default; JS adds .active to show it */
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  padding: 0 14px;
  margin-left: -16px;
  margin-right: -16px;
}

.sub-category-bar::-webkit-scrollbar {
  display: none;
}

/* Visible when an Aaral category is selected */
.sub-category-bar.active {
  display: flex;
  pointer-events: auto;
}

/* scroll-hidden has no effect — bar is in normal page flow */
.sub-category-bar.active.scroll-hidden {
  transform: none;
}

/* ── Individual sub-category pill — same look as .filter-tab-pill, just smaller ── */
.sub-cat-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 28px;
  padding: 0 12px;
  border-radius: 100px;
  border: 1.5px solid var(--color-border);
  background-color: var(--color-card-bg);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  outline: none;
  transition: background-color 0.15s ease,
              border-color     0.15s ease,
              color            0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.sub-cat-pill:hover {
  border-color: var(--color-accent-teal);
  color: var(--color-teal-dark);
  background-color: var(--color-teal-light);
}

/* Active / selected sub-category — yellow accent, same as main pills */
.sub-cat-pill.active {
  background-color: var(--color-primary-yellow);
  border-color:     var(--color-primary-yellow);
  color:            var(--color-text-dark);
  font-weight:      700;
}

.sub-cat-pill.active:hover {
  background-color: #f5c200;
  border-color:     #f5c200;
  color:            var(--color-text-dark);
}

.sub-cat-pill:active {
  transform: scale(0.95);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 3: FILTER TAB PILLS ROW                                            */
/* Injected by JS immediately before #active-filters.                         */
/* Horizontally scrollable; no visible scrollbar.                             */
/* This row scrolls with the page — it "slides under" the fixed sub-cat bar  */
/* as the user scrolls down.                                                  */
/* ─────────────────────────────────────────────────────────────────────────── */

.filter-tabs-row {
  position: static;
  background-color: transparent;
  box-shadow: none;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  padding: 3px 16px 8px;
  margin-left: -16px;
  margin-right: -16px;
}

/* scroll-hidden has no effect — bar is in normal page flow */
.filter-tabs-row.scroll-hidden {
  transform: none;
}

/* ── Always-sticky override: category & sub-category bars never hide on scroll ── */
.filter-tabs-row.scroll-hidden,
.sub-category-bar.active.scroll-hidden {
  transform: none;
}

.filter-tabs-row::-webkit-scrollbar {
  display: none;
}

/* ── Individual pill ── */
.filter-tab-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 34px;
  padding: 0 16px;
  border-radius: 100px;
  border: 1.5px solid var(--color-border);
  background-color: var(--color-card-bg);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  outline: none;
  transition: background-color 0.15s ease,
              border-color     0.15s ease,
              color            0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.filter-tab-pill:hover {
  border-color: var(--color-accent-teal);
  color: var(--color-teal-dark);
  background-color: var(--color-teal-light);
}

/* Active / selected state — #FFCC33 fill, dark bold text */
.filter-tab-pill.active {
  background-color: var(--color-primary-yellow);
  border-color:     var(--color-primary-yellow);
  color:            var(--color-text-dark);
  font-weight:      700;
}

.filter-tab-pill.active:hover {
  background-color: #f5c200;
  border-color:     #f5c200;
  color:            var(--color-text-dark);
}

.filter-tab-pill:active {
  transform: scale(0.96);
}

/* "Local Shops" pill: same appearance as any other inactive pill */

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 4: MAIN CONTENT                                                    */
/* ─────────────────────────────────────────────────────────────────────────── */

.main-content {
  background-color: var(--color-bg-main);
  padding: 0 16px;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 5: ACTIVE FILTER PILLS (search + sort chips)                       */
/* ─────────────────────────────────────────────────────────────────────────── */

.active-filters {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 0 8px;
}

.active-filters.show { display: flex; }

.filter-pill {
  background-color: var(--color-teal-light);
  border: 1px solid rgba(0, 137, 123, 0.20);
  border-radius: 100px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-teal-dark);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.filter-pill:hover { background-color: rgba(0, 137, 123, 0.10); }

.pill-close {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: rgba(0, 137, 123, 0.15);
  border: none;
  cursor: pointer;
  color: var(--color-teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  transition: background-color 0.15s;
}

.pill-close:hover { background-color: rgba(0, 137, 123, 0.25); }

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 6: RESULTS LABEL                                                   */
/* ─────────────────────────────────────────────────────────────────────────── */

.results-label {
  display: none;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 7: PRODUCT GRID                                                    */
/* ─────────────────────────────────────────────────────────────────────────── */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 5px 0;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 8: PRODUCT CARD                                                    */
/* ─────────────────────────────────────────────────────────────────────────── */

.product-card {
  background-color: var(--color-card-bg);
  border-radius: 6px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.15s;
  animation: cardIn 0.4s ease-out forwards;
  opacity: 0;
}

.product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-5px);
}

.card-image-area {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background-color: #F9FAFB;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover .card-image-area img {
  transform: scale(1.07);
}

.card-emoji-fallback {
  font-size: 48px;
  line-height: 1;
}

.card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Chac characteristic icons — stack vertically at top-right of image ── */
/* top: 1px — discount badge removed from image corner; icons now sit at top */
/* Shown only for Chac flags that are true: FreD, UrDe, BP, HW (18×18 px each) */
.card-chac-icons {
  position: absolute;
  top: 1px;
  right: 1px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
  user-select: none;
}

.card-chac-icons img {
  width: 22px;
  height: 22px;
  display: block;
}


.badge {
  background-color: var(--color-primary-yellow);
  color: var(--color-text-dark);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
}

.badge.out-of-stock   { background-color: #F3F4F6; color: var(--color-text-muted); }
.badge.low-stock      { background-color: #FFF7ED; color: #C2410C; }

.card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  padding-bottom: 2px;
}

.card-category {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.card-pricing {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
}

/* Wraps price + strikethrough MRP + unit + inline discount pill */
.card-price-group {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

/* Inline discount pill — sits right after the unit in the price row */
.card-discount-inline {
  display: inline-flex;
  align-items: center;
  background-color: rgba(231, 25, 31, 0.10);
  color: #C8151B;
  border: 1px solid rgba(231, 25, 31, 0.28);
  font-size: 9px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.3;
  letter-spacing: 0.2px;
  flex-shrink: 0;
  align-self: center;
}

/* MQ label — minimum quantity, pushed to the far right of the price row */
.card-mq {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-dark);
  font-family: 'DM Mono', monospace;
}

.card-mrp {
  font-size: 12px;
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-family: 'DM Mono', monospace;
}

.card-unit {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ── Image overlay action area ── */
.card-img-action {
  position: absolute;
  bottom: 8px;
  right: 8px;
}

.img-add-plus {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 204, 51, 0.82);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dark);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background-color 0.15s, transform 0.10s;
  -webkit-tap-highlight-color: transparent;
}

.img-add-plus:hover  { background-color: rgba(255, 204, 51, 1); }
.img-add-plus:active { transform: scale(0.90); }

.img-qty-pill {
  display: flex;
  align-items: center;
  background-color: var(--color-accent-teal);
  border-radius: 100px;
  overflow: hidden;
  height: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Max-qty reached: brief red-border flash */
@keyframes maxQtyFlash {
  0%   { box-shadow: 0 0 0 2.5px #EF4444, 0 2px 8px rgba(0,0,0,0.18); }
  65%  { box-shadow: 0 0 0 2.5px #EF4444, 0 2px 8px rgba(0,0,0,0.18); }
  100% { box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
}
.img-qty-pill--max-flash {
  animation: maxQtyFlash 0.55s ease-out forwards;
}

.img-qty-btn {
  width: 28px;
  height: 30px;
  border: none;
  background: transparent;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.10s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.img-qty-btn:hover  { background-color: rgba(255, 255, 255, 0.15); }
.img-qty-btn:active { background-color: rgba(255, 255, 255, 0.25); }

.img-qty-count {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  min-width: 22px;
  text-align: center;
  font-family: 'DM Mono', monospace;
}

/* ── Variants row: color dots + model tags ── */
.card-variants {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.card-colors {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-color-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.card-models {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.card-model-tag {
  font-size: 9px;
  font-weight: 600;
  color: var(--color-teal-dark);
  background-color: var(--color-teal-light);
  border-radius: 4px;
  padding: 2px 5px;
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 9: SKELETON LOADING                                                 */
/* ─────────────────────────────────────────────────────────────────────────── */

.card-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 14px;
  aspect-ratio: 1;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 10: VIRTUAL SCROLL SENTINELS + END MESSAGE                         */
/* ─────────────────────────────────────────────────────────────────────────── */

#top-sentinel,
#bottom-sentinel {
  height: 1px;
  width: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Prevent layout shift during padding transitions */
#product-grid {
  will-change: padding;
}

.end-message {
  display: none;
  text-align: center;
  padding: 20px 16px 8px;
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 11: EMPTY STATE                                                    */
/* ─────────────────────────────────────────────────────────────────────────── */

.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 24px;
}

.empty-state.show { display: flex; }

.empty-emoji  { font-size: 56px; line-height: 1; margin-bottom: 16px; }

.empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 8px;
}

.empty-sub {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 260px;
  margin-bottom: 20px;
}

.empty-btn {
  background-color: var(--color-primary-yellow);
  color: var(--color-text-dark);
  border: none;
  border-radius: 50px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}

.empty-btn:hover { background-color: #F5B800; }

.empty-wish-btn {
  display: inline-block;
  margin-top: 10px;
  background-color: transparent;
  color: var(--color-accent-teal);
  border: 1.5px solid var(--color-accent-teal);
  border-radius: 50px;
  padding: 11px 28px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.empty-wish-btn:hover { background-color: var(--color-teal-light); }

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 12: QUICK-ADD TOAST                                                */
/* ─────────────────────────────────────────────────────────────────────────── */

.quick-toast {
  position: fixed;
  bottom: calc(62px + 16px);
  right: 16px;
  width: auto;
  max-width: 260px;
  background-color: var(--color-text-dark);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.20);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.97);
  transition: all 0.20s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quick-toast.toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent-teal);
  flex-shrink: 0;
}

.toast-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.toast-title        { font-size: 12px; font-weight: 600; color: #FFFFFF; }
.toast-product-name {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.60);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 13: VERIFIED BADGE + VISIT BUTTON                                  */
/* ─────────────────────────────────────────────────────────────────────────── */

.card-verified-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 4px;
  flex-shrink: 0;
}

.img-visit-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(55, 65, 81, 0.82);
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background-color 0.15s, transform 0.10s ease;
  -webkit-tap-highlight-color: transparent;
}

.img-visit-btn:hover  { background-color: rgba(55, 65, 81, 1); }
.img-visit-btn:active { transform: scale(0.90); }

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 13B: BULK OFFER BADGE                                               */
/* Horizontal strip pinned to the bottom of .card-image-area.                 */
/* The gradient fades left → transparent so the right side stays visually     */
/* clear of the .card-img-action button (bottom:8px; right:8px; 32px wide).  */
/* pointer-events: none keeps it click-through — the + / qty pill still works.*/
/* ─────────────────────────────────────────────────────────────────────────── */

.card-bulk-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  width: fit-content;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.64) 0%,
    rgba(0, 0, 0, 0.60) 70%,
    rgba(0, 0, 0, 0.30) 100%
  );
  padding: 5px 14px 6px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
}

/* "Buy 4 @ ৳8.5" text */
.card-bulk-badge-text {
  font-size: 10px;
  font-weight: 600;
  color: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* "/piece" unit in slightly dimmer white */
.card-bulk-badge-unit {
  font-size: 9px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.70);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 14: NAV BADGE OVERFLOW FIX                                         */
/* ─────────────────────────────────────────────────────────────────────────── */

#bottom-nav,
#nav-cart,
.nav-cart-wrap {
  overflow: visible !important;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 15: ANIMATIONS                                                     */
/* ─────────────────────────────────────────────────────────────────────────── */

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 16: RESPONSIVE — TABLET (640px+)                                   */
/* ─────────────────────────────────────────────────────────────────────────── */

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .main-content { padding: 0 24px; }

  .filter-tabs-row {
    padding: 10px 24px 8px;
    margin-left: -24px;
    margin-right: -24px;
  }

  .sub-category-bar {
    margin-left: -24px;
    margin-right: -24px;
  }

  .active-filters { padding: 0 0 8px; }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* SECTION 17: RESPONSIVE — DESKTOP (1024px+)                                 */
/* ─────────────────────────────────────────────────────────────────────────── */

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 8px auto;
    padding: 8px 0;
  }

  .main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
  }

  .filter-tabs-row {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 32px 8px;
  }

  .sub-category-bar {
    margin-left: 0;
    margin-right: 0;
  }

  .empty-state { padding: 80px 32px; }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* MULTI-VARIANT EDIT ICON                                                     */
/* Shown on a product card's image-action slot once a variant of that         */
/* product is already in the cart (replaces the plus icon). Markup pairs      */
/* this class with .img-add-plus (defined above) so the button's              */
/* width/height/border-radius/shadow/tap-target are ALWAYS pixel-identical    */
/* to the plain plus icon — only the accent color is overridden here.         */
/* ─────────────────────────────────────────────────────────────────────────── */

.img-edit-btn {
  background: #00695C;
  color: #fff;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* VARIANT SELECTION POPUP                                                     */
/* Injected by JS (openVariantModal) when a multi-variant product's plus/edit */
/* icon is tapped. Anchored above the floating bottom nav — same positioning  */
/* pattern as #contact-popup in bottom-nav.css, using the shared --nav-h var. */
/* ─────────────────────────────────────────────────────────────────────────── */

.variant-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.45);
}

.variant-modal {
  position: fixed;
  bottom: calc(var(--nav-h, 62px) + 24px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--bg-card, #fff);
  border-radius: 20px;
  border: 1px solid var(--border, #E5E7EB);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.14), 0 8px 32px rgba(0,0,0,0.10);
  padding: 16px;
  box-sizing: border-box;
  z-index: 1001;
  font-family: var(--font, 'DM Sans', sans-serif);
  animation: variant-modal-slide-up .18s ease-out;
}

@keyframes variant-modal-slide-up {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

.variant-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.variant-modal-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--navy, #1F2937);
}

.variant-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--border, #E5E7EB);
  color: var(--grey-muted, #6B7280);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.variant-modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.variant-modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px;
}

/* Wraps each row's control — either a .img-add-plus button or a
   .img-qty-pill, both reused verbatim from the product card so the popup's
   controls always look and behave identically to the card's. */
.variant-modal-control {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.variant-modal-row--oos { opacity: 0.5; }

.variant-modal-label {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--navy, #1F2937);
}

.variant-modal-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.15);
  display: inline-block;
}

.variant-modal-price {
  font-size: 13px;
  color: var(--navy, #1F2937);
  white-space: nowrap;
}

.variant-modal-mrp {
  text-decoration: line-through;
  color: var(--grey-muted, #9CA3AF);
  margin-left: 4px;
}

.variant-modal-discount {
  color: #DC2626;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}

.variant-modal-oos-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--grey-muted, #9CA3AF);
  white-space: nowrap;
  flex-shrink: 0;
}
