/* ============================================================
   SHOP.CSS — JBEE STORE · MNUC MARKET
   SHOP.CSS — JBEE STORE · MNUC MARKET
   Premium mobile-first · Airbnb-grade · Brand-strict
   ============================================================ */

/* ===== ROOT FALLBACKS (won't override global style.css) ===== */
:where(:root) {
  --mnuc-navy: #0E2040;
  --mnuc-gold: #C9A227;
  --mnuc-blue: #0052FF;
  --mnuc-green: #059669;
  --white: #FFFFFF;
  --surface: #F7F8FA;
  --card: #FFFFFF;
  --text: #0E2040;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --bg: #F7F8FA;
  --border-strong: #D1D5DB;
  --wa: #25D366;
  --wa-dark: #075E54;
  --shadow-card: 0 2px 12px rgba(14, 32, 64, 0.07);
  --shadow-modal: 0 24px 80px rgba(14, 32, 64, 0.22);
  --ff-head: 'Bricolage Grotesque', sans-serif;
  --ff-body: 'Plus Jakarta Sans', sans-serif;
}

/* ===== BASE ===== */
.shop-page {
  background: var(--surface);
  color: var(--text);
  font-family: var(--ff-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============================================================
   HERO
   ============================================================ */
.jbee-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 72px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 68px;
  background: linear-gradient(135deg, #0E2040 0%, #001233 60%, #0a1628 100%);
}
/* Dot-grid texture */
.jbee-hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(201, 162, 39, 0.12) 1px, transparent 1.4px);
  background-size: 24px 24px;
}
/* Radial glows — felt, not seen */
.jbee-hero-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 80% at 10% 50%, rgba(201, 162, 39, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 60% at 90% 20%, rgba(0, 82, 255, 0.14), transparent 50%);
}
.jbee-hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  max-width: 640px; width: 100%;
}

/* Greeting line */
.jbee-greeting {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 8px;
  min-height: 20px;
}
.jbee-greeting:empty { margin: 0; min-height: 0; }
.jbee-greeting strong {
  color: var(--mnuc-gold);
  font-weight: 700;
}

/* H1 */
.jbee-h1 {
  font-family: var(--ff-head);
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 0 0 28px;
}

/* ============================================================
   HERO SEARCH BAR (Airbnb-style pill)
   ============================================================ */
.jbee-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 500px;
  background: var(--white);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
  padding: 6px 6px 6px 20px;
  transition: box-shadow 200ms ease;
}
.jbee-search-bar:focus-within {
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.32), 0 0 0 3px rgba(201, 162, 39, 0.3);
}
.jbee-search-ic {
  color: var(--mnuc-navy);
  flex-shrink: 0;
  opacity: 0.45;
}
.jbee-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--mnuc-navy);
  font-family: var(--ff-body);
  font-size: 1rem;
  padding: 12px 0;
  min-width: 0;
}
.jbee-search-bar input::placeholder {
  color: var(--text-muted);
}
.jbee-search-bar button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mnuc-navy);
  color: var(--mnuc-gold);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, background 200ms ease;
}
.jbee-search-bar button:hover {
  background: #0a1830;
  transform: scale(1.05);
}
.jbee-search-bar button:active {
  transform: scale(0.92);
}

/* ============================================================
   STICKY SEARCH (appears when hero scrolls away)
   ============================================================ */
.jbee-sticky-search {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: none;
  align-items: center;
}
.jbee-sticky-search.visible {
  display: flex;
}
.jbee-sticky-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  border: 1.5px solid transparent;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.jbee-sticky-bar:focus-within {
  border-color: var(--mnuc-navy);
  box-shadow: 0 0 0 3px rgba(14, 32, 64, 0.08);
  background: var(--white);
}
.jbee-sticky-ic {
  color: var(--mnuc-navy);
  flex-shrink: 0;
  opacity: 0.45;
}
.jbee-sticky-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--mnuc-navy);
  font-family: var(--ff-body);
  padding: 10px 0;
  min-width: 0;
}
.jbee-sticky-btn {
  border-radius: 999px;
  background: var(--mnuc-navy);
  color: var(--mnuc-gold);
  border: none;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform 90ms ease, background 200ms ease;
}
.jbee-sticky-btn:active {
  transform: scale(0.95);
}

/* ============================================================
   SELLER BAR
   ============================================================ */
.seller-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.seller-inner {
  width: min(calc(100% - 48px), 1280px);
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.seller-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0E2040 0%, #0052FF 100%);
  display: grid;
  place-items: center;
  font-family: var(--ff-head);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--mnuc-gold);
}
.seller-info {
  flex: 1;
  min-width: 0;
}
.seller-name {
  font-family: var(--ff-head);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--mnuc-navy);
}
.seller-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 4px;
}
.seller-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.seller-stat svg {
  color: var(--mnuc-gold);
  flex-shrink: 0;
}
.seller-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: var(--white);
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--ff-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, transform 0.2s ease;
}
.seller-wa-btn:hover {
  background: #1da851;
  transform: scale(1.02);
}
.seller-wa-btn:active {
  transform: scale(0.97);
}

/* ============================================================
   FILTER BAR (sticky)
   ============================================================ */
.filter-bar {
  position: sticky;
  top: 68px;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
}
.filter-bar-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.jbee-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  height: 100%;
  align-items: center;
}
.jbee-tabs::-webkit-scrollbar {
  display: none;
}
.jbee-tab {
  flex: 0 0 auto;
  padding: 8px 18px;
  border-radius: 999px;
  white-space: nowrap;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.jbee-tab:hover {
  border-color: var(--mnuc-navy);
  color: var(--mnuc-navy);
}
.jbee-tab.active {
  background: var(--mnuc-navy);
  color: var(--mnuc-gold);
  border-color: var(--mnuc-navy);
  box-shadow: 0 4px 14px rgba(14, 32, 64, 0.2);
}
.jbee-tab:active {
  transform: scale(0.96);
}
.jbee-sort {
  min-width: 130px;
  border-radius: 999px;
  padding: 8px 36px 8px 16px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--mnuc-navy);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230E2040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  flex-shrink: 0;
  transition: border-color 0.18s ease;
}
.jbee-sort:hover,
.jbee-sort:focus {
  border-color: var(--mnuc-navy);
  outline: none;
}

/* ============================================================
   PRODUCT SHELL
   ============================================================ */
.jbee-shell {
  width: min(calc(100% - 48px), 1280px);
  margin: 0 auto;
  padding: 32px 0 100px;
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.jbee-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* ============================================================
   PRODUCT CARD (Airbnb-style — no border, no body shadow)
   ============================================================ */
.jbee-card {
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: cardFadeIn 0.35s ease both;
}
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.jbee-card:nth-child(1) { animation-delay: 0s; }
.jbee-card:nth-child(2) { animation-delay: 0.04s; }
.jbee-card:nth-child(3) { animation-delay: 0.08s; }
.jbee-card:nth-child(4) { animation-delay: 0.12s; }
.jbee-card:nth-child(5) { animation-delay: 0.16s; }
.jbee-card:nth-child(6) { animation-delay: 0.20s; }
.jbee-card:nth-child(7) { animation-delay: 0.24s; }
.jbee-card:nth-child(8) { animation-delay: 0.28s; }

.jbee-card:hover .jbee-card-img img {
  transform: scale(1.04);
}
.jbee-card:hover .card-name {
  color: var(--mnuc-blue);
}

.jbee-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(14, 32, 64, 0.06);
}
.jbee-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
.card-img-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  color: var(--text-muted);
}

/* Badges */
.card-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 2;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.badge-hot     { background: rgba(255, 59, 48, 0.9); color: var(--white); }
.badge-new     { background: rgba(0, 82, 255, 0.9); color: var(--white); }
.badge-pick    { background: rgba(201, 162, 39, 0.92); color: var(--mnuc-navy); }
.badge-limited { background: rgba(255, 149, 0, 0.9); color: var(--white); }

/* Sold out overlay */
.sold-overlay {
  position: absolute; inset: 0;
  background: rgba(14, 32, 64, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 3;
}
.sold-overlay span {
  padding: 8px 18px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Card body */
.jbee-card-body {
  padding: 10px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}
.card-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
}
.card-price {
  font-family: var(--ff-head);
  font-size: 1rem;
  font-weight: 800;
  color: var(--mnuc-navy);
}
.card-stock {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}
.stock-ok   { background: rgba(5, 150, 105, 0.1); color: #059669; }
.stock-low  { background: rgba(255, 149, 0, 0.1); color: #FF9500; }
.stock-out  { background: rgba(220, 38, 38, 0.1); color: #DC2626; }

/* ============================================================
   SKELETONS + EMPTY STATE
   ============================================================ */
.jbee-skel {
  border-radius: 16px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--border) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  aspect-ratio: 1 / 1;
}
@keyframes shimmer {
  to { background-position: -200% 0; }
}
.jbee-empty {
  grid-column: 1 / -1;
  padding: 64px 24px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-muted);
}
.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px; height: 80px;
  background: var(--surface);
  border-radius: 50%;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ============================================================
   MODAL OVERLAYS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(14, 32, 64, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  padding: 16px;
  box-sizing: border-box;
  overflow: hidden;
  animation: overlayFade 0.25s ease;
}
.modal-overlay.hidden {
  display: none !important;
}
.modal-overlay.open {
  display: grid !important;
}
@keyframes overlayFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-modal);
  max-height: 90vh;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlide {
  from { transform: translateY(20px); opacity: 0.6; }
  to   { transform: translateY(0); opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 24px 0;
}
.modal-title {
  font-family: var(--ff-head);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--mnuc-navy);
}
.modal-close {
  background: var(--surface);
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.18s ease, color 0.18s ease, transform 90ms ease;
}
.modal-close:hover {
  background: var(--border);
  color: var(--text);
}
.modal-close:active {
  transform: scale(0.92);
}

/* ============================================================
   ORDER MODAL
   ============================================================ */
.order-modal {
  width: 100%;
  max-width: 460px;
  padding: 0 24px 24px;
  overflow-y: auto;
  max-height: 90vh;
  box-sizing: border-box;
}
.order-product-row {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  margin-top: 20px;
  align-items: center;
}
.order-product-img {
  width: 64px; height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--border);
  flex-shrink: 0;
}
.order-product-name {
  font-family: var(--ff-head);
  font-size: 1rem;
  font-weight: 800;
  color: var(--mnuc-navy);
}
.order-product-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--mnuc-blue);
  margin-top: 4px;
}

/* Quantity */
.qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.qty-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  flex: 1;
}
.qty-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: 999px;
  padding: 4px;
}
.qty-btn {
  width: 32px; height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--mnuc-navy);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 180ms ease, color 180ms ease, transform 90ms ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.qty-btn:hover {
  background: var(--mnuc-navy);
  color: var(--white);
}
.qty-btn:active {
  transform: scale(0.9);
}
.qty-val {
  font-family: var(--ff-head);
  font-size: 1rem;
  font-weight: 800;
  color: var(--mnuc-navy);
  min-width: 24px;
  text-align: center;
}

/* Form inputs */
.order-form-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.order-form-grid .form-input {
  width: 100%;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  padding: 12px 16px;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--mnuc-navy);
  background: var(--white);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.order-form-grid .form-input:focus {
  border-color: var(--mnuc-navy);
  box-shadow: 0 0 0 3px rgba(14, 32, 64, 0.08);
}
.order-form-grid .form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--mnuc-navy);
  margin-bottom: 4px;
}

/* Payment methods */
.pay-methods-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--mnuc-navy);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pay-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.pay-method {
  padding: 14px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--white);
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
}
.pay-method:hover {
  border-color: var(--mnuc-navy);
}
.pay-method.active {
  border-color: var(--mnuc-navy);
  background: rgba(14, 32, 64, 0.03);
  box-shadow: 0 4px 12px rgba(14, 32, 64, 0.05);
}
.pay-method:active {
  transform: scale(0.97);
}
.pay-method-icon {
  color: var(--mnuc-navy);
  display: flex;
}
.pay-method-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--mnuc-navy);
}
/* WhatsApp payment method (full-width) */
.pay-wa-method {
  padding: 14px;
  border-radius: 12px;
  border: 2px solid rgba(37, 211, 102, 0.35);
  background: rgba(37, 211, 102, 0.05);
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
}
.pay-wa-method:hover,
.pay-wa-method.active {
  border-color: #25D366;
  background: rgba(37, 211, 102, 0.1);
}
.pay-wa-method:active {
  transform: scale(0.97);
}
.pay-wa-method .pay-method-icon {
  color: #25D366;
}
.pay-wa-method .pay-method-label {
  color: var(--wa-dark);
}

/* M-Pesa deep link box */
.mpesa-deeplink-box {
  padding: 18px;
  border-radius: 14px;
  background: rgba(5, 150, 105, 0.06);
  border: 1px solid rgba(5, 150, 105, 0.2);
  margin-bottom: 20px;
  display: none;
  flex-direction: column;
  gap: 12px;
}
.mpesa-deeplink-box.show {
  display: flex;
}
.mpesa-title {
  font-family: var(--ff-head);
  font-size: 1rem;
  font-weight: 800;
  color: #065f46;
}
.mpesa-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}
.mpesa-sub strong {
  color: #059669;
}
.mpesa-deeplinks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn-mpesa-app {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #00a651;
  color: var(--white);
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-mpesa-app:hover {
  opacity: 0.9;
}
.btn-mpesa-app:active {
  transform: scale(0.97);
}
.btn-mpesa-ussd {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--mnuc-navy);
  color: var(--mnuc-gold);
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-mpesa-ussd:hover {
  opacity: 0.9;
}
.btn-mpesa-ussd:active {
  transform: scale(0.97);
}
.mpesa-code-input-wrap {
  margin-top: 4px;
}
.mpesa-code-input-wrap .form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--mnuc-navy);
  margin-bottom: 4px;
}
.mpesa-code {
  width: 100%;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  padding: 12px 16px;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--mnuc-navy);
  background: var(--white);
  outline: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.mpesa-code:focus {
  border-color: var(--mnuc-navy);
  box-shadow: 0 0 0 3px rgba(14, 32, 64, 0.08);
}

/* Total row */
.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.order-total-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}
.order-total-val {
  font-family: var(--ff-head);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--mnuc-navy);
}

/* Submit button */
#order-submit-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, transform 90ms ease;
}
#order-submit-btn.btn-primary {
  background: var(--mnuc-navy);
  color: var(--mnuc-gold);
}
#order-submit-btn.btn-primary:hover {
  background: #0d1c3a;
}
#order-submit-btn.btn-wa {
  background: #25D366;
  color: var(--white);
}
#order-submit-btn.btn-wa:hover {
  background: #1da851;
}
#order-submit-btn:active {
  transform: scale(0.98);
}
#order-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================================
   PRODUCT DETAIL MODAL (FIXED — flex, not grid)
   ============================================================ */
.prod-modal {
  max-width: min(860px, 96vw);
  padding: 0 !important;
  overflow: hidden;
  width: 100%;
}
.prod-modal-grid {
  display: flex;
  flex-direction: row;
  overflow: hidden;
  max-height: 88vh;
  width: 100%;
  min-width: 0;
}

/* Left panel — image + thumbnails */
.prod-left {
  flex: 0 0 42%;
  max-width: 42%;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.prod-main-img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: top center;
  background: var(--bg);
  display: block;
  flex: 1;
}
.prod-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: var(--white);
  border-top: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}
.prod-thumbs::-webkit-scrollbar {
  display: none;
}
.prod-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: border-color 180ms ease;
}
.prod-thumb.active,
.prod-thumb:hover {
  border-color: var(--mnuc-navy);
}

/* Right panel — copy + reviews */
.prod-right {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--white);
  min-width: 0;
}
.prod-copy {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--white);
}
.prod-cat-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mnuc-gold);
}
.prod-name {
  font-family: var(--ff-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--mnuc-navy);
  line-height: 1.15;
}
.prod-price {
  font-family: var(--ff-head);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--mnuc-blue);
}
.prod-desc {
  font-family: var(--ff-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}
.prod-delivery {
  font-size: 0.82rem;
  font-weight: 700;
  color: #059669;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(5, 150, 105, 0.08);
  padding: 8px 12px;
  border-radius: 8px;
}
.prod-stock-label {
  font-size: 0.85rem;
  font-weight: 700;
}
.prod-stock-label.stock-ok   { color: #059669; }
.prod-stock-label.stock-low  { color: #FF9500; }
.prod-stock-label.stock-out { color: #DC2626; }

.prod-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
.prod-actions .btn {
  width: 100%;
  border-radius: 12px;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, transform 90ms ease;
}
.prod-actions .btn-wa {
  background: #25D366;
  color: var(--white);
  border: none;
}
.prod-actions .btn-wa:hover {
  background: #1da851;
}
.prod-actions .btn-ghost {
  background: transparent;
  color: var(--mnuc-navy);
  border: 1.5px solid var(--mnuc-navy);
}
.prod-actions .btn-ghost:hover {
  background: rgba(14, 32, 64, 0.04);
}
.prod-actions .btn:active {
  transform: scale(0.98);
}
.prod-actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Close button */
.prod-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--mnuc-navy);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s ease, transform 90ms ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.prod-close:hover {
  background: var(--white);
  transform: scale(1.05);
}
.prod-close:active {
  transform: scale(0.92);
}

/* ============================================================
   REVIEWS
   ============================================================ */
.reviews-section {
  padding: 0 28px 24px;
  background: var(--white);
}
.rv-loading {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 16px 0;
}
.rv-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.rv-title {
  font-family: var(--ff-head);
  font-size: 1rem;
  font-weight: 800;
  color: var(--mnuc-navy);
}
.rv-stars {
  display: flex;
  gap: 1px;
}
.reviews-list {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}
.review-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.review-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 99px;
  background: var(--mnuc-navy);
  color: var(--mnuc-gold);
  display: grid;
  place-items: center;
  font-family: var(--ff-head);
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}
.review-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--mnuc-navy);
}
.review-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: auto;
}
.review-stars {
  display: flex;
  gap: 1px;
}
.review-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
}
.review-form {
  padding: 18px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.review-form h4 {
  font-family: var(--ff-head);
  font-size: 1rem;
  font-weight: 800;
  color: var(--mnuc-navy);
  margin: 0 0 14px;
}
.star-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--border-strong);
  transition: color 180ms ease, transform 90ms ease;
  padding: 0;
  display: flex;
  -webkit-tap-highlight-color: transparent;
}
.star-btn:active {
  transform: scale(0.88);
}
.review-form-grid {
  display: grid;
  gap: 10px;
}
.review-form-grid .form-input {
  width: 100%;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  padding: 12px 16px;
  font-family: var(--ff-body);
  font-size: 0.92rem;
  color: var(--mnuc-navy);
  background: var(--white);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.review-form-grid .form-input:focus {
  border-color: var(--mnuc-navy);
  box-shadow: 0 0 0 3px rgba(14, 32, 64, 0.08);
}
.review-form-grid .btn {
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
  background: var(--mnuc-navy);
  color: var(--mnuc-gold);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease, transform 90ms ease;
}
.review-form-grid .btn:active {
  transform: scale(0.98);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (min-width: 481px) {
  .jbee-grid {
    gap: 16px;
  }
}

@media (min-width: 768px) {
  .jbee-hero {
    padding: 80px 32px 96px;
  }
  .filter-bar {
    padding: 0 24px;
  }
  .jbee-shell {
    width: min(calc(100% - 64px), 1280px);
    padding: 40px 0 100px;
  }
  .jbee-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
  .prod-copy {
    padding: 32px;
  }
  .reviews-section {
    padding: 0 32px 28px;
  }
}

@media (min-width: 901px) {
  .jbee-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 20px;
  }
}

/* Product modal — mobile bottom sheet */
@media (max-width: 700px) {
  #prod-overlay {
    align-items: flex-end;
    padding: 0;
  }
  #prod-overlay .modal {
    animation: sheetSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
  }
  @keyframes sheetSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .prod-modal-grid {
    flex-direction: column;
    max-height: 92vh;
  }
  .prod-left {
    flex: none;
    width: 100%;
    max-width: 100%;
    height: 260px;
    flex-shrink: 0;
  }
  .prod-main-img {
    height: 100%;
    min-height: 260px;
  }
  .prod-right {
    flex: 1;
    overflow-y: auto;
  }
  .prod-copy {
    padding: 20px;
  }
  .reviews-section {
    padding: 0 20px 20px;
  }
  .prod-close {
    top: 10px;
    right: 10px;
  }
}

/* Order modal — mobile */
@media (max-width: 480px) {
  .order-modal {
    padding: 0 16px 20px;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
  }
  #order-overlay {
    align-items: flex-end;
    padding: 0;
  }
  #order-overlay .modal {
    animation: sheetSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .modal-header {
    padding: 16px 16px 0;
  }
  .pay-methods {
    grid-template-columns: 1fr;
  }
  .mpesa-deeplinks {
    grid-template-columns: 1fr;
  }
  .jbee-hero {
    padding: 56px 20px 64px;
  }
  .jbee-h1 {
    font-size: 2rem;
  }
  .seller-inner {
    gap: 12px;
  }
  .seller-wa-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
  .filter-bar {
    top: 60px;
  }
  .filter-bar-inner {
    height: 52px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .jbee-card,
  .modal-overlay,
  .modal,
  #prod-overlay .modal {
    animation: none !important;
  }
  .jbee-card-img img,
  .jbee-tab,
  .jbee-search-bar button,
  .modal-close,
  .prod-close,
  .qty-btn,
  .pay-method,
  .pay-wa-method,
  .prod-thumb,
  .star-btn,
  .seller-wa-btn,
  .btn-mpesa-app,
  .btn-mpesa-ussd,
  #order-submit-btn,
  .prod-actions .btn,
  .review-form-grid .btn,
  .jbee-sticky-btn {
    transition: none !important;
  }
}
/* ── PROD MODAL: FIXED HEIGHT LAYOUT ── */
#prod-overlay {
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#prod-overlay > .prod-modal {
  height: min(88vh, 680px);
  max-height: 88vh;
  max-width: min(860px, calc(100vw - 32px));
  width: calc(100vw - 32px);
  padding: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

#prod-overlay > .prod-modal > .prod-modal-grid {
  display: flex;
  flex-direction: row;
  flex: 1 1 0%;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

#prod-overlay > .prod-modal > .prod-modal-grid > .prod-left {
  flex: 0 0 42%;
  max-width: 42%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

#prod-overlay > .prod-modal > .prod-modal-grid > .prod-left .prod-main-img {
  flex: 1 1 0%;
  width: 100%;
  min-height: 0;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

#prod-overlay > .prod-modal > .prod-modal-grid > .prod-right {
  flex: 1 1 0%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

/* ── MOBILE: bottom sheet ── */
@media (max-width: 700px) {
  #prod-overlay {
    align-items: flex-end;
    padding: 0;
  }

  #prod-overlay > .prod-modal {
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    height: auto;
    max-height: 92vh;
  }

  #prod-overlay > .prod-modal > .prod-modal-grid {
    flex-direction: column;
    max-height: 92vh;
    overflow: hidden;
  }

  #prod-overlay > .prod-modal > .prod-modal-grid > .prod-left {
    flex: none;
    width: 100%;
    max-width: 100%;
    height: 260px;
    min-height: unset;
  }

  #prod-overlay > .prod-modal > .prod-modal-grid > .prod-left .prod-main-img {
    height: 100%;
    min-height: unset;
  }

  #prod-overlay > .prod-modal > .prod-modal-grid > .prod-right {
    flex: 1;
    overflow-y: auto;
  }
}