/* Shop shell v2 - phone first (phase 2 of docs/UI-PLAN.md).
   Flat: 1px borders, 6-8px radius, no shadows, no gradients. Loaded after header.css, so these rules win.
   Scope: promo strip, top bar, search, bottom bar, home category rail, product card. */

:root {
  --sh-line: #E5E7EB;
  --sh-ink: #111827;
  --sh-mute: #6B7280;
  --sh-soft: #F6F7F9;
}

@media (max-width: 991px) {

  /* ---- promo strip: one slim line, can be dismissed ---- */
  #mobileTopPromo { background: #111827; }
  #mobileTopPromo .promo-banner { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
  #mobileTopPromo .promo-text { flex: 1; min-width: 0; margin: 0; font-size: 12px; font-weight: 500; color: #E5E7EB; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #mobileTopPromo .promo-download-btn { flex: none; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: #fff; font-size: 12px; font-weight: 700; text-decoration: underline; }
  #mobileTopPromo .promo-x { flex: none; width: 32px; height: 32px; margin-right: -6px; border: 0; background: none; color: #9CA3AF; font-size: 13px; display: grid; place-items: center; }

  /* ---- top bar ---- */
  .mobile-header { background: #fff; border-bottom: 1px solid var(--sh-line); box-shadow: none !important; }
  .mobile-top-bar { min-height: 52px; padding: 6px 0 2px; }
  .mobile-header .m-menu-btn { flex: none; width: 40px; height: 40px; margin: 0 2px 0 -8px; padding: 0; border: 0; border-radius: 6px; background: none; display: grid; place-items: center; }
  .mobile-header .m-menu-btn i { color: var(--sh-ink); font-size: 18px; }
  .mobile-logo-wrapper { display: flex; align-items: center; flex: 1; min-width: 0; overflow: hidden; text-decoration: none; }
  .mobile-logo { height: 28px; max-width: 132px; }
  .mobile-logo-text { font-size: 19px; font-weight: 800; color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-top-actions { gap: 0; }
  .mobile-top-icon-btn { width: 40px; height: 40px; padding: 0; border-radius: 6px; background: none; }
  .mobile-top-icon-btn i { color: var(--sh-ink); font-size: 18px; }
  .mobile-top-icon-btn:hover { background: var(--sh-soft); transform: none; }

  /* ---- search: a plain field that opens the search screen ---- */
  .mobile-search-trigger { height: 44px; padding: 0 4px 0 12px; margin: 4px 0 10px; gap: 10px; border: 1px solid #D1D5DB; border-radius: 8px; background: #fff; }
  .mobile-search-trigger:hover { border-color: #9CA3AF; }
  .mobile-search-trigger > i { color: var(--sh-mute); font-size: 15px; }
  .mobile-search-trigger .mst-text { flex: 1; min-width: 0; color: var(--sh-mute); font-size: 14px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-search-trigger .voice-wave { flex: none; width: 36px; height: 36px; display: grid; place-items: center; }
  .mobile-search-trigger .voice-icon { color: var(--sh-ink); font-size: 15px; }

  /* ---- bottom bar ---- */
  .mobile-bottom-nav { background: #fff; border-top: 1px solid var(--sh-line); border-radius: 0; box-shadow: none; }
  .mobile-bottom-nav .nav-container { display: grid; grid-template-columns: repeat(5, 1fr); height: 56px; padding: 0; gap: 0; }
  .mobile-bottom-nav .nav-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; background: none; border-radius: 0; color: var(--sh-mute); }
  .mobile-bottom-nav .nav-icon-container { width: auto; height: auto; background: none !important; border-radius: 0; box-shadow: none; }
  .mobile-bottom-nav .nav-icon { font-size: 19px; color: inherit; }
  .mobile-bottom-nav .nav-text { font-size: 11px; font-weight: 600; color: inherit; }
  .mobile-bottom-nav .nav-item.active { color: var(--primary-dark, #C45A2A); background: none; }
  .mobile-bottom-nav .nav-item.active::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; background: var(--primary); }
  .mobile-bottom-nav .nav-item.active .nav-icon-container { background: none !important; transform: none; }
  .mobile-bottom-nav .cart-badge { top: -6px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px; border: 0; border-radius: 8px; box-shadow: none; background: var(--primary); color: var(--on-primary, #fff); font-size: 10px; line-height: 16px; }

  /* ---- home: section headings and the category rail ---- */
  .section-header h2 { padding-left: 0; border-left: 0; font-size: 16px; font-weight: 700; color: var(--sh-ink); }
  .section-header h2::before, .section-header h2::after { display: none; }
  .categories-section { padding: 14px 0 4px; }
  .categories-section .section-header { margin-bottom: 10px; }
  .categories-scroll { overflow: visible; }
  .categories-track { display: flex; gap: 8px; overflow-x: auto; padding: 2px 12px 8px; margin: 0 -12px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .categories-track::-webkit-scrollbar { display: none; }
  .category-item { flex: none; width: 76px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; scroll-snap-align: start; text-decoration: none; }
  .category-item .category-image { width: 66px; height: 66px; display: grid; place-items: center; border: 1px solid var(--sh-line); border-radius: 8px; background: #F9FAFB; box-shadow: none; overflow: hidden; }
  .category-item .category-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
  .category-item .category-image .fallback { width: 100%; height: 100%; display: grid; place-items: center; background: none; color: var(--primary); font-size: 22px; font-weight: 700; }
  .category-item .category-name { max-width: 76px; font-size: 11.5px; font-weight: 600; line-height: 1.25; color: #374151; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
  .category-item.category-all .category-image { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, #fff); }
  .category-item.category-all .category-image i { color: var(--primary); font-size: 22px; }
}
@media (min-width: 992px) { .category-item.category-all { display: none; } }

/* ---- product card (home, explore, store) ---- */
.product-card { border: 1px solid var(--sh-line); border-radius: 8px; background: #fff; box-shadow: none; overflow: hidden; transform: none; }
.product-card:hover, .product-card:active { box-shadow: none; transform: none; border-color: #CBD5E1; }
.product-card .product-image-container { background: #F6F7F9; border-radius: 0; }
.product-card .product-badge { top: 8px; left: 8px; padding: 2px 6px; border-radius: 4px; background: #111827; color: #fff; font-size: 11px; font-weight: 700; box-shadow: none; }
.product-card .product-title { font-size: 13px; font-weight: 500; line-height: 1.35; color: #1F2937; }
.product-card .current-price { font-size: 15px; font-weight: 700; color: var(--sh-ink); }
.product-card .original-price { font-size: 12px; color: #9CA3AF; }
.product-card .discount-badge { font-size: 12px; font-weight: 600; color: #15803D; background: none; padding: 0; }
@media (prefers-reduced-motion: reduce) { .product-card, .mobile-header, .mobile-top-bar { transition: none; } }
