/* ===== VALMONT GADGETS — COMPLETE MOBILE CSS SYSTEM ===== */

:root {
  --bg-primary: #ffffff;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-navy: #0b1a38;
  --text-primary: #0b1a38;
  --text-secondary: #64748b;
  --accent: #ff8c00;
  --accent-dark: #e67e00;
  --border: #e2e8f0;
  --danger: #ef4444;
  --success: #22c55e;
}

/* ===== BODY PADDING FOR BOTTOM NAV ===== */
body {
  padding-bottom: 80px;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (min-width: 768px) {
  body { padding-bottom: 0; overflow-x: auto; }
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 99;
}
.mobile-header .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 800;
}
.mobile-header .logo span {
  color: var(--accent);
}
.mobile-header .header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}
.mobile-header .header-actions button {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  position: relative;
  padding: 4px;
}

/* ===== MOBILE SEARCH BAR ===== */
.mobile-search {
  position: sticky;
  top: 60px;
  background: var(--bg-primary);
  padding: 12px 16px;
  z-index: 98;
}
.mobile-search-container {
  display: flex;
  gap: 8px;
}
.mobile-search input {
  flex: 1;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}
.mobile-search input::placeholder {
  color: var(--text-secondary);
}
.mobile-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,140,0,0.1);
}
.mobile-search button {
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.mobile-search button:hover {
  background: var(--accent-dark);
}

/* ===== MOBILE CATEGORY FILTERS ===== */
.mobile-categories {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 12px 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-categories::-webkit-scrollbar {
  display: none;
}
.mobile-category-btn {
  white-space: nowrap;
  padding: 10px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
  font-family: inherit;
}
.mobile-category-btn.active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}
.mobile-category-btn:hover {
  border-color: var(--accent);
}

/* ===== MOBILE PRODUCT GRID ===== */
.mobile-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
  padding-bottom: 80px;
}
.mobile-product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}
.mobile-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.mobile-product-image {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
}
.mobile-product-image img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
.mobile-product-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
}
.mobile-product-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mobile-product-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 4px;
}
.mobile-product-compare {
  font-size: 11px;
  color: var(--text-secondary);
  text-decoration: line-through;
}
.mobile-product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 9px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 4px;
}
.mobile-product-wishlist {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  z-index: 2;
}
.mobile-add-to-bag {
  width: 100%;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: 6px;
  padding: 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-top: auto;
  font-family: inherit;
  transition: background 0.2s;
}
.mobile-add-to-bag:hover {
  background: var(--accent-dark);
}

/* ===== FLASH DEALS SECTION ===== */
.flash-deals-section {
  padding: 16px;
}
.flash-deals-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.flash-deals-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  margin: 0;
}
.flash-timer {
  background: var(--accent);
  color: var(--bg-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.flash-deals-scroll {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.flash-deals-scroll::-webkit-scrollbar {
  display: none;
}
.flash-deal-card {
  flex-shrink: 0;
  width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.flash-deal-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-top: 2px solid var(--accent);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  padding: 6px 0;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  box-shadow: 0 -2px 12px rgba(11,26,56,0.1);
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 2px;
  min-width: 0;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
}
.bottom-nav-item > span:not(.icon):not(.badge):not(.account-signed-check) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bottom-nav-item.active {
  color: var(--accent);
}
.bottom-nav-item .icon {
  font-size: 20px;
}

/* Jumia-style payment method rows. */
.checkout-payment-option {
  min-height: 76px;
  background: #fff;
  border-color: #edf0f3;
  box-shadow: 0 2px 8px rgba(11,26,56,.05);
}
.checkout-payment-option:has(input:checked) {
  border-color: #ff8c00;
  background: #fffaf2;
  box-shadow: 0 0 0 1px #ff8c00;
}
.checkout-payment-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #fff0d9;
  color: #ff8c00;
  font-size: 20px;
  font-weight: 900;
}
.checkout-payment-icon.cards { background: #eef3ff; color: #2563eb; font-size: 17px; }

/* Jumia-style full-screen mobile category browser. */
.mobile-category-sheet {
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}
.mobile-category-layout {
  display: flex;
  height: calc(100% - 69px);
  overflow: hidden;
}
.mobile-category-sidebar {
  width: 34%;
  flex: 0 0 34%;
  overflow-y: auto;
  background: #f7f8fa;
  border-right: 1px solid #e5e7eb;
}
.mobile-category-side-item {
  display: block;
  width: 100%;
  min-height: 62px;
  padding: 12px 10px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: #374151;
  font: 700 11px/1.25 Inter, sans-serif;
  text-align: left;
}
.mobile-category-side-item.active {
  border-left-color: #ff8c00;
  background: #fff;
  color: #ff8c00;
}
.mobile-category-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  background: #fff;
}
.mobile-category-content .cat-pill {
  min-height: 82px;
  padding: 14px 8px;
  border: 1px solid #edf0f3;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 2px 8px rgba(11,26,56,.06);
  font-size: 11px;
  white-space: normal;
  text-transform: none;
}
.mobile-category-content .cat-pill:hover,
.mobile-category-content .cat-pill:active {
  border-color: #ff8c00;
  color: #ff8c00;
}

/* Product photos with built-in white margins should still fill their card.
   NOTE: this used to apply `transform: scale(1.24)` to every photo, which
   inside an `overflow-hidden` frame read as the whole site being "zoomed in"
   — stock photos looked blown up and cropped next to our own shop photos,
   which were exempt via `.product-media-local`. Both kinds of photo are now
   shown whole at 1:1, with the same restrained hover lift. */
.product-image-frame img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
  transform-origin: center;
  transition: transform 220ms ease;
}
.product-image-frame img:hover {
  transform: scale(1.04);
}
/* Local uploads (condition-stamped used stock) are shown whole, like a
   normal post, so the condition banners are never cropped or zoomed. */
.product-image-frame img.product-media-local {
  object-fit: contain;
  object-position: center;
  transform: none;
  padding: 6px;
}
.product-image-frame img.product-media-local:hover {
  transform: scale(1.04);
}
.bottom-nav-item .account-signed-check {
  display: none;
}
.bottom-nav-item.signed-in .account-signed-check {
  display: flex;
  position: absolute;
  top: -2px;
  right: 17px;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}
.bottom-nav-item .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 9px;
  font-weight: 900;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-primary);
}
/* Empty state — never show "0" on Saved/Bag like Jumia; the badge only
   appears once there is something in the cart or wishlist. */
.bottom-nav-item .badge.hidden {
  display: none !important;
}

/* ===== FLOATING WHATSAPP BUTTON =====
   Styles now live in assets/css/community.css (shared across all public
   pages): bottom-left placement + red notification dot. Loaded after this
   file on every page. */

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (min-width: 768px) {
  .bottom-nav { display: none; }
  
  .mobile-product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 24px;
    padding-bottom: 24px;
  }
  .mobile-product-image { height: 200px; }
  
  .flash-deal-card { width: 180px; }
}

@media (min-width: 1024px) {
  .mobile-product-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ===== HIDE SCROLLBARS UTILITY ===== */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ===== TOAST NOTIFICATION ===== */
.valmont-toast {
  position: fixed;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  background: var(--bg-navy);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  z-index: 10000;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  border-left: 3px solid var(--accent);
  white-space: nowrap;
  max-width: 90vw;
}
.valmont-toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ===== EXISTING PRODUCT GRID OVERRIDES ===== */
@media (max-width: 768px) {
  #productGrid, .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 12px !important;
    padding-bottom: 80px !important;
  }
  #productGrid > div > .p-3 > div:first-of-type,
  .product-card-image {
    height: 140px !important;
    min-height: 140px !important;
    padding: 12px !important;
  }
  #searchInput {
    min-height: 48px;
    padding: 12px 16px !important;
    font-size: 16px !important;
  }
  #searchBtn {
    min-height: 48px;
    padding: 12px 20px !important;
  }
  .search-container {
    position: sticky !important;
    top: 60px;
    z-index: 98;
  }
  
  /* Fix detail modal on mobile */
  #detailModal {
    inset: 0 !important;
    max-width: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    height: 100dvh;
  }
  #detailModal .h-\\[240px\\] {
    height: 45vh !important;
  }
  #detailModal .grid {
    display: block !important;
  }
  #detailModal .grid > div:last-child {
    padding: 20px !important;
  }
  #detailAddToCart, #detailExpressDelivery {
    width: 100%;
    min-height: 48px;
  }

  /* Cart drawer full width on mobile */
  #cartDrawer {
    max-width: 100% !important;
  }
}

@media (max-width: 480px) {
  #productGrid, .product-grid {
    gap: 8px !important;
    padding: 8px !important;
  }
  #productGrid > div > .p-3 > div:first-of-type,
  .product-card-image {
    height: 120px !important;
    min-height: 120px !important;
  }
  .mobile-product-image {
    height: 130px;
  }
}

/* ===== CART PULSE ANIMATION ===== */
@keyframes cartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); filter: drop-shadow(0 0 6px #ff8c00); }
  100% { transform: scale(1); }
}
.cart-icon.pulse {
  animation: cartPulse 0.3s ease;
}

/* ===== QUICK VIEW MODAL ===== */
.quick-view-modal {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 1000;
  overflow-y: auto;
  display: none;
}
.quick-view-modal.active {
  display: block;
}
.quick-view-image {
  width: 100%;
  height: 50vh;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.quick-view-image img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}
.quick-view-details {
  padding: 24px;
}
.quick-view-sticky {
  position: sticky;
  bottom: 0;
  background: var(--bg-primary);
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}
.quick-view-sticky button {
  flex: 1;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
}

/* ===== FREE DELIVERY BADGE ===== */
.card-free-delivery {
  font-size: 10px;
  color: var(--success);
  font-weight: 700;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-free-delivery::before {
  content: "✓";
  font-size: 12px;
}


/* ===== BRAND CTA COLOR: everything matches the search button =====
 * Brand direction: the storefront accent is gold-orange #ff8c00 (the header
 * search button). All primary CTAs — "Add To Bag" on product cards, the
 * product-detail "Add to Bag", checkout, wishlist add-all, etc. — must use
 * the exact same color so the whole site matches the search button.
 *
 * Previously these fills were darkened to #ad5900 for WCAG AA contrast, which
 * made the Add To Bag buttons look like a different, muddy brown next to the
 * bright orange search button. Per brand direction we now pin every
 * white-on-orange CTA to #ff8c00 with the same #e67e00 hover as the search
 * button, so everything reads as one consistent gold-orange.
 *
 * Scoped CSS override only. No HTML/JS changed.
 */

/* 1. Header search submit button — the reference gold-orange. */
#searchBtn {
  background-color: #ff8c00 !important;
}
#searchBtn:hover {
  background-color: #e67e00 !important;
}

/* 2. Any filled-orange + white-text <button> or <a> that is NOT inside a
 *    navy-chrome container. [class*=] substring matching avoids escaping
 *    Tailwind arbitrary-value class names like bg-[#ff8c00].
 *    Matched to #searchBtn exactly (fill + hover). */
button[class*="bg-[#ff8c00]"][class*="text-white"],
a[class*="bg-[#ff8c00]"][class*="text-white"] {
  background-color: #ff8c00 !important;
}
button[class*="bg-[#ff8c00]"][class*="hover:bg-orange-600"]:hover,
a[class*="bg-[#ff8c00]"][class*="hover:bg-orange-600"]:hover {
  background-color: #e67e00 !important;
}

/* 3. Restore brand orange for white-on-orange fills that live inside the
 *    navy-gradient flash-deal banner (#flash-clock timer chip). It's an
 *    11px numeric badge, not body copy; the surrounding surface is dark
 *    (from-[#0b1a38] to-[#1e355c]) so brand orange reads fine there and
 *    scores 7.08:1 against #0b1a38 as text. No other navy container in the
 *    page carries a white-on-orange filled CTA. */
#flash-clock {
  background-color: #ff8c00 !important;
}

/* ===== PREMIUM MOBILE PRODUCT REFINEMENTS ===== */
@media (max-width: 767px) {
  body { padding-bottom: 96px; }
  .mobile-header { background: #0b1a38; border-bottom-color: #1e293b; }
  .mobile-product-image { height: 180px; }
  .mobile-product-body { padding: 14px; gap: 6px; }
  .mobile-product-title { line-height: 1.35; }
  .mobile-product-badge { top: 6px; left: 6px; background: rgba(11,26,56,.85); color: #fff; font-weight: 900; padding: 2px 5px; border-radius: 3px; border: 1px solid rgba(255,255,255,.2); }
  .bottom-nav-item .icon { display:flex; align-items:center; justify-content:center; height:22px; }
}
@keyframes flipRotate { 0%,100% { transform: rotateY(0deg); } 50% { transform: rotateY(180deg); } }
.animate-flip { animation: flipRotate 8s infinite ease-in-out; transform-style: preserve-3d; }

/* ===== PREMIUM MOBILE UPGRADES — WHITE HEADER (JUMIA-STYLE) ===== */

/* 1. Mobile Header — white like Jumia with dark icons */
@media (max-width: 767px) {
  body { padding-bottom: 92px; }

  /* Header styling — white background with dark text */
  header.sticky, header.bg-white.sticky {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
  }

  /* Header text/icons dark on white */
  header.sticky button, header.sticky a:not(.search-container) {
    color: #0b1a38 !important;
  }
  header.sticky button:hover, header.sticky a:hover {
    color: #ff8c00 !important;
  }

  /* Search bar on white header */
  header.sticky .search-container {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
  }
  header.sticky #searchInput {
    background: transparent !important;
    color: #0b1a38 !important;
    font-size: 15px !important;
  }
  header.sticky #searchInput::placeholder {
    color: #94a3b8 !important;
  }
  header.sticky .search-container svg {
    color: #0b1a38 !important;
  }
  header.sticky #searchBtn {
    background: #ff8c00 !important;
    color: #ffffff !important;
  }
  header.sticky #searchBtn:hover {
    background: #e67e00 !important;
  }

  /* Hamburger menu on mobile */
  header.sticky button[aria-label="Menu"] {
    color: #0b1a38 !important;
  }

  /* Mobile account icon in header */
  header.sticky a[aria-label="My Account"] {
    color: #0b1a38 !important;
  }

  /* Wishlist/cart icons in header */
  header.sticky .flex.items-center.gap-2 button {
    color: #0b1a38 !important;
  }

  /* Active bottom nav item indicator bar */
  .bottom-nav-item.active {
    position: relative;
  }
  .bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: #ff8c00;
    border-radius: 0 0 4px 4px;
  }

  /* Bottom nav hover/active states */
  .bottom-nav-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .bottom-nav-item:active {
    transform: scale(0.9);
  }

  /* Categories modal proper safe area */
  #mobileCategoriesModal {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  #mobileCategoriesModal h3 {
    color: #0b1a38 !important;
  }
  #mobileCategoriesModal button {
    color: #64748b !important;
    border-color: #e2e8f0 !important;
    font-weight: 600 !important;
  }
  #mobileCategoriesModal button:hover {
    border-color: #ff8c00 !important;
    color: #0b1a38 !important;
  }
  #mobileCategoryGrid button {
    background: #f8fafc !important;
  }

  /* Cart drawer full width with rounded top */
  #cartDrawer {
    border-radius: 20px 20px 0 0 !important;
  }

  /* All modal z-index fixes — ensure they show above bottom nav */
  #paystackModal, #paystackOverlay,
  #dealerModal, #dealerOverlay,
  #detailModal, #detailOverlay,
  #wishlistModal, #wishlistOverlay,
  #loginModal, #loginOverlay,
  #cartDrawer, #cartOverlay,
  #mobileMenuModal, #mobileMenuOverlay,
  #pwaInstallBanner,
  #pwaInstructionsModal, #pwaInstructionsOverlay,
  #valmontToast {
    z-index: 10000 !important;
  }
  #mobileCategoriesOverlay { z-index: 9990 !important; }
  #mobileCategoriesModal { z-index: 9991 !important; }

  /* WhatsApp float: positioned above the bottom nav via
     assets/css/community.css (bottom-left, no overlap with nav items). */

  /* PWA install banner above bottom nav */
  #pwaInstallBanner {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Toast above bottom nav */
  #valmontToast {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* PWA install banner — fix WhatsApp-green button to brand orange */
  #pwaInstallBanner #pwaInstallBtn {
    background: #ff8c00 !important;
  }
  #pwaInstallBanner #pwaInstallBtn:hover {
    background: #e67e00 !important;
  }

  /* Cart drawer proper padding for safe area */
  #cartDrawer {
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  /* Mobile menu drawer proper styling */
  #mobileMenuModal {
    background: #0b1a38 !important;
    color: #ffffff !important;
    border-right: 2px solid #ff8c00 !important;
  }
  #mobileMenuModal .border-gray-800 { border-color: #1e355c !important; }
  #mobileMenuModal a, #mobileMenuModal button { color: #ffffff !important; }
  #mobileMenuModal a:hover, #mobileMenuModal button:hover {
    color: #ff8c00 !important;
    background: #13264a !important;
  }
  #mobileMenuModal .text-gray-400 { color: #cbd5e1 !important; }
  #mobileMenuModal .bg\[\#0b1a38\] { background: #13264a !important; }

  /* Improve touch targets on mobile */
  button, a, [role="button"] {
    -webkit-tap-highlight-color: transparent;
  }

  /* Footer padding for bottom nav */
  footer {
    padding-bottom: 80px !important;
  }

  /* Modal overlay navy tint instead of black */
  .fixed.inset-0.bg-black\/60 {
    background: rgba(11,26,56,0.5) !important;
  }

  /* Category filter pills on mobile */
  .category-filters {
    padding: 8px 12px !important;
  }

  /* Improve product card shadow on mobile */
  #productGrid > div > .p-3 > div:first-of-type {
    box-shadow: 0 1px 4px rgba(11,26,56,0.06) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }
}

/* Reference mobile storefront: compact white header, category tabs and a
 * three-column catalogue. */
@media (max-width: 767px) {
  header, header.sticky, header.bg-white.sticky {
    min-height: 62px;
    padding: 9px 12px !important;
    background: #ffffff !important;
    border: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
  }
  header > div { flex-wrap: wrap !important; align-items: center !important; gap: 8px 0 !important; }
  header > div > :first-child { flex: 1 1 auto; order: 1; }
  header > div > :last-child { display: flex !important; order: 2; margin-left: auto; gap: 2px; }
  header .desktop-logo { display: none !important; }
  .mobile-wordmark { display: block; color: #0b1a38; font-size: 17px; line-height: .9; font-weight: 900; letter-spacing: -.6px; }
  .mobile-wordmark span, .mobile-wordmark strong { display: block; }
  .mobile-wordmark strong { color: #ff8c00; }
  header > div > :first-child > button { display: block !important; color: #0b1a38 !important; }
  /* Search bar sits on its own full-width row below the logo/account row. */
  header .search-container { order: 3; flex: 0 0 100% !important; max-width: 100% !important; min-width: 0; width: 100% !important; margin: 0 !important; border: 0 !important; border-radius: 999px !important; background: #f1f5f9 !important; }
  header .search-container #searchInput { min-height: 44px; font-size: 16px !important; }
  /* Keep a tappable round search button inside the pill so mobile shoppers
     can submit a search by tapping instead of only via the keyboard. */
  header .search-container #searchBtn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 5px;
    padding: 0 !important;
    border-radius: 999px !important;
    background-color: #ff8c00 !important;
    color: #fff !important;
    flex-shrink: 0;
  }
  header .search-container #searchBtn svg { width: 16px; height: 16px; }
  header .search-container #searchBtn:hover { background-color: #e67e00 !important; }
  header .search-container > div { color: #0b1a38 !important; padding-left: 14px !important; }
  header .search-container::after { display: none; }

  .category-filters { gap: 28px !important; padding: 14px 16px 0 !important; margin: 0 !important; height: 58px; background: #fff !important; border-bottom: 1px solid #e5e7eb !important; }
  .category-filters .mobile-chip { display: none !important; padding: 0 0 14px !important; font-size: 14px !important; color: #111827 !important; }
  .category-filters .mobile-chip:nth-child(-n+5) { display: block !important; }
  .category-filters .mobile-chip:first-child { color: #0b1a38 !important; border-bottom: 3px solid #0b1a38 !important; }

  /* Show the same featured Flash Deals selected for desktop; swipe sideways
     to browse them without squeezing the mobile product grid. */
  #customer-store-view > .bg-gradient-to-r { display: block !important; margin: 0 !important; border-radius: 0 !important; }
  #flashProductsRow { display: flex !important; grid-template-columns: none !important; overflow-x: auto !important; gap: 10px !important; padding: 0 2px 6px !important; scroll-snap-type: x proximity; }
  #flashProductsRow > div { flex: 0 0 150px !important; width: 150px !important; padding: 9px !important; scroll-snap-align: start; }
  #flashProductsRow > div > div:first-of-type { height: 108px !important; }
  #flashProductsRow h5 { white-space: normal !important; min-height: 30px; font-size: 11px !important; }
  #store-feed { padding: 12px 8px 96px !important; }
  #productGrid, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  #productGrid > div { border-radius: 14px !important; box-shadow: 0 1px 5px rgba(11,26,56,.15) !important; }
  #productGrid > div > .p-3 { padding: 9px !important; }
  #productGrid > div .h-\[140px\] { height: 132px !important; margin-bottom: 7px !important; }
  #productGrid h4 { min-height: 38px !important; font-size: 11px !important; font-weight: 700 !important; }
  #productGrid .text-\[14px\] { font-size: 13px !important; }
  #productGrid .text-\[11px\] { display: none !important; }
  #productGrid > div > .px-3 { padding: 0 8px 9px !important; }
  #productGrid > div > .px-3 button { min-height: 38px; padding: 7px 2px !important; border-radius: 999px !important; font-size: 10px !important; }
}
/* Signed-in account state in the mobile header turns the person icon and
   label orange, just like Jumia highlights the logged-in shopper. */
@media (max-width: 767px) {
  #mobileHeaderAccountBtn.signed-in {
    color: #ff8c00 !important;
  }
  #mobileHeaderAccountBtn.signed-in #mobileHeaderAccountLabel {
    color: #ff8c00 !important;
  }
}

/* Navy hamburger drawer brand mark. */
.mobile-drawer-wordmark {
  display: flex;
  flex-direction: column;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: .88;
  letter-spacing: -.5px;
}
.mobile-drawer-wordmark strong { color: #ff8c00; }

/* ===== ZOOM / HUGE FIX — 2026-09-10 =====
 * Edge/Chrome remembers per-site zoom. iOS zooms any <16px input on focus.
 * Old builds had scale(1.24) on product photos inside overflow-hidden,
 * which read as "whole site zoomed in". This patch locks the base size,
 * forces 16px on all mobile form fields, and prevents horizontal overflow
 * that makes the layout look blown up.
 */
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
  overflow-x: hidden;
  max-width: 100vw;
}
body {
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (max-width: 767px) {
  input,
  select,
  textarea,
  input[type=\"text\"],
  input[type=\"email\"],
  input[type=\"tel\"],
  input[type=\"password\"],
  input[type=\"number\"],
  input[type=\"search\"] {
    font-size: 16px !important;
  }
  html,
  body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
  }
  img {
    max-width: 100%;
    height: auto;
  }
  /* Bottom nav should never push viewport wider */
  .bottom-nav {
    max-width: 100vw;
    left: 0;
    right: 0;
  }
}
