/* ================================================
   STOREAGLE.CSS — Orange Theme (matches logo #ff6200)
   Primary:  #ff6200  |  Amber: #ff9500
   ================================================ */

/* ---- CSS Variables ---- */
:root {
  --primary:       #ff6200;
  --primary-dark:  #e05500;
  --primary-hover: #ff7a1a;
  --primary-light: #fff4ed;
  --primary-bg:    #fff0e5;

  --orange:        #ff9500;
  --orange-dark:   #e07f00;
  --orange-light:  #fff8f0;

  --success:       #00b86e;
  --warning:       #ffb800;
  --info:          #0095ff;

  --text-primary:  #222222;
  --text-secondary:#666666;
  --text-muted:    #999999;

  --border:        #e8e8e8;
  --bg-page:       #f5f5f5;
  --bg-card:       #ffffff;
  --bg-header:     #ffffff;

  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.10);
  --shadow-hover:  0 8px 24px rgba(0,0,0,0.14);
  --shadow-card:   0 2px 8px rgba(0,0,0,0.06);

  --radius:        4px;
  --radius-md:     6px;
  --radius-lg:     10px;
  --radius-xl:     16px;
  --radius-full:   9999px;

  --transition:    0.2s ease;
  --font:          'Inter', system-ui, -apple-system, sans-serif;
}

/* ---- Dark Mode ---- */
html.dark {
  --primary:       #ff7a30;
  --primary-dark:  #ff6200;
  --primary-light: #2d1800;
  --primary-bg:    #2a1500;
  --orange:        #ff8533;
  --text-primary:  #f0f0f0;
  --text-secondary:#aaaaaa;
  --text-muted:    #666666;
  --border:        #2e2e2e;
  --bg-page:       #111111;
  --bg-card:       #1e1e1e;
  --bg-header:     #1a1a1a;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.4);
  --shadow-card:   0 2px 8px rgba(0,0,0,0.3);
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
img { display: block; max-width: 100%; }

/* ---- Scrollbar (hide utility) ---- */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border-color var(--transition);
}

/* Push main content below fixed header */
body > main {
  padding-top: 96px;
}
@media (min-width: 768px) {
  body > main {
    padding-top: 100px;
  }
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  height: 56px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-text {
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.5px;
  display: none;
}
@media (min-width: 480px) { .logo-text { display: block; } }

.search-bar {
  flex: 1;
  position: relative;
  max-width: 600px;
}
.search-bar input {
  width: 100%;
  height: 38px;
  padding: 0 40px 0 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,98,0,0.15);
}
.search-bar .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}
.search-bar .search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.search-bar .search-btn:hover { background: var(--primary-dark); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.header-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
  position: relative;
  text-decoration: none;
}
.header-btn:hover {
  background: var(--bg-page);
  color: var(--primary);
}
.header-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Whatsapp action btn */
.wa-header-btn {
  background: #25d366 !important;
  color: white !important;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: none;
}
@media (min-width: 540px) { .wa-header-btn { display: flex; } }
.wa-header-btn:hover { background: #1da851 !important; }

/* ---- Mobile search button ---- */
.mobile-search-btn { display: flex; }
@media (min-width: 768px) { .mobile-search-btn { display: none; } }

/* ---- Hide inline search bar on mobile, show on desktop ---- */
@media (max-width: 767px) {
  .desktop-search { display: none !important; }
  .header-top { justify-content: space-between; }
}

/* ---- Search Overlay ---- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  visibility: hidden;
}
.search-overlay.open {
  pointer-events: all;
  visibility: visible;
}

.search-overlay-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-header);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transform: translateY(-110%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}
.search-overlay.open .search-overlay-bar {
  transform: translateY(0);
}

.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.28s ease;
  z-index: 1;
}
.search-overlay.open .search-overlay-backdrop {
  opacity: 1;
}

.search-back-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 16px;
  border-radius: var(--radius-md);
}
.search-back-btn:active { opacity: 0.7; }

.search-overlay-form {
  flex: 1;
  min-width: 0;
}
.search-overlay-input {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0 16px;
  font-size: 15px;
  background: var(--bg-page);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-overlay-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,98,0,0.15);
}

.search-clear-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 12px;
}
.search-clear-btn:active { opacity: 0.7; }

.search-overlay-submit {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  font-size: 15px;
  transition: background var(--transition);
}
.search-overlay-submit:hover { background: var(--primary-dark); }
.search-overlay-submit:active { transform: scale(0.95); }

/* ============================================
   CATEGORY BAR
   ============================================ */
.cat-bar {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
}
.cat-bar-inner {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  overflow-x: auto;
  max-width: 1280px;
  margin: 0 auto;
}
.cat-chip {
  flex-shrink: 0;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.cat-chip:hover { border-color: var(--primary); color: var(--primary); }
.cat-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ============================================
   PRODUCT CARD
   ============================================ */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  cursor: pointer;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: #d0d0d0;
  transform: translateY(-2px);
}
html.dark .product-card:hover { border-color: #444; }

.product-card__img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-page);
}
.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card__img { transform: scale(1.06); }

/* Badges */
.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  color: white;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 18px;
}
.badge-hot        { background: var(--primary); }
.badge-sale       { background: var(--orange); }
.badge-new        { background: var(--success); }
.badge-best_seller{ background: #7c3aed; }

.product-discount {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--primary);
  color: white;
}

/* WhatsApp hover overlay (desktop) */
.product-wa-overlay {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #25d366;
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
@media (hover: hover) {
  .product-wa-overlay { display: flex; }
  .product-card:hover .product-wa-overlay { opacity: 1; transform: scale(1); }
}
.product-wa-overlay:hover { background: #1da851; transform: scale(1.1) !important; }

.product-card__body {
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
  min-height: 36px;
}

.product-stars {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 6px;
}
.star-filled { color: #ffb800; font-size: 11px; }
.star-empty  { color: var(--border); font-size: 11px; }
.star-count  { font-size: 11px; color: var(--text-muted); }

.product-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.price-main {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.price-compare {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card__actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
  padding: 0 12px;
  height: 34px;
  white-space: nowrap;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--primary);
  color: white;
  width: 100%;
}
.btn-primary:hover { background: var(--primary-dark); color: white; }

.btn-orange {
  background: var(--orange);
  color: white;
  flex: 1;
}
.btn-orange:hover { background: var(--orange-dark); color: white; }

.btn-wa {
  background: #25d366;
  color: white;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.btn-wa:hover { background: #1da851; color: white; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0 8px;
}
.btn-ghost:hover { color: var(--primary); background: var(--primary-light); }

/* ============================================
   PRODUCT GRID
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 640px)  { .products-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
@media (min-width: 1280px) { .products-grid { grid-template-columns: repeat(5, 1fr); } }

/* ============================================
   SECTION UTILITIES
   ============================================ */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-top: 20px;
}
.section-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}
.section-link {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-link:hover { color: var(--primary-dark); }

/* ============================================
   HERO BANNER
   ============================================ */
.hero {
  background: linear-gradient(135deg, #ff6200 0%, #ff9500 50%, #ff6200 100%);
  background-size: 200% 200%;
  animation: heroShift 8s ease infinite;
  color: white;
  overflow: hidden;
  position: relative;
}
@keyframes heroShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
html.dark .hero {
  background: linear-gradient(135deg, #2d0a08 0%, #3d1a00 50%, #2d0a08 100%);
  animation: none;
}
.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
@media (min-width: 768px) {
  .hero-inner {
    flex-direction: row;
    text-align: left;
    padding: 48px 16px;
  }
}
.hero-content { flex: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.hero-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 10px;
}
.hero-title span { color: #fde047; }
.hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 20px;
  max-width: 400px;
}
.hero-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
@media (min-width: 768px) { .hero-ctas { justify-content: flex-start; } }
.hero-cta-primary {
  background: #fde047;
  color: #7f1d1d;
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.hero-cta-primary:hover { background: #fef08a; transform: translateY(-1px); }
.hero-cta-wa {
  background: #25d366;
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.hero-cta-wa:hover { background: #1da851; color: white; }

.hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
@media (min-width: 768px) { .hero-stats { justify-content: flex-start; } }
.hero-stat-val {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}
.hero-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  margin-top: 2px;
}
.hero-divider {
  width: 1px;
  background: rgba(255,255,255,0.2);
}

/* Hero illustration */
.hero-illustration {
  display: none;
  flex-shrink: 0;
}
@media (min-width: 768px) { .hero-illustration { display: flex; align-items: center; justify-content: center; } }

/* ============================================
   CATEGORY GRID (home page)
   ============================================ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (min-width: 640px)  { .cat-grid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(12, 1fr); } }

.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  text-align: center;
}
.cat-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.cat-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  flex-shrink: 0;
}
.cat-item-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.2;
}
.cat-item:hover .cat-item-name { color: var(--primary); }

/* ============================================
   FLASH SALE
   ============================================ */
.flash-banner {
  background: linear-gradient(135deg, #ff6200, #ff9500);
  color: white;
  border-radius: var(--radius-xl);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
html.dark .flash-banner {
  background: linear-gradient(135deg, #7f1d1d, #7c2d12);
}
.flash-title {
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 6px;
}
.countdown {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  margin-top: 2px;
}
.countdown-box {
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  text-align: center;
}
.flash-see-all {
  background: white;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-full);
  padding: 7px 16px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.flash-see-all:hover { background: var(--primary); color: white; }

/* Products horizontal scroll on mobile */
.products-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.products-scroll .product-card { flex-shrink: 0; width: 160px; }
@media (min-width: 768px) { .products-scroll { display: grid; } }

/* ============================================
   TRUST BADGES (desktop)
   ============================================ */
.trust-grid {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (min-width: 768px) { .trust-grid { display: grid; } }

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.trust-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.trust-title   { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.trust-sub     { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ============================================
   PRODUCT LISTING PAGE — Filter Sidebar
   ============================================ */
.listing-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.filter-sidebar {
  display: none;
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 120px;
}
@media (min-width: 1024px) { .filter-sidebar { display: block; } }

.filter-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.filter-section:last-child { border-bottom: none; }
.filter-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--transition);
}
.filter-option:hover { color: var(--primary); }
.filter-option input[type="checkbox"] { accent-color: var(--primary); }

.listing-content { flex: 1; min-width: 0; }

/* Sort bar */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.sort-label  { font-size: 13px; color: var(--text-secondary); }
.sort-total  { font-size: 13px; font-weight: 600; color: var(--primary); }
.sort-select {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}
.sort-select:focus { border-color: var(--primary); }

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */
.product-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (min-width: 768px) {
  .product-detail-grid { flex-direction: row; align-items: flex-start; }
}
.product-gallery {
  flex-shrink: 0;
  width: 100%;
}
@media (min-width: 768px) { .product-gallery { width: 420px; } }

.gallery-main {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-page);
  margin-bottom: 10px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.gallery-thumb {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition);
}
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info { flex: 1; min-width: 0; }
.product-info-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 10px;
}
.product-info-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.product-info-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
}
html.dark .product-info-price-row { background: var(--primary-bg); }
.product-info-price {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
}
.product-info-compare {
  font-size: 16px;
  color: var(--text-muted);
  text-decoration: line-through;
}
.product-info-discount {
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
}
.product-info-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  width: fit-content;
  overflow: hidden;
}
.qty-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: background var(--transition);
}
.qty-btn:hover { background: var(--primary-light); color: var(--primary); }
.qty-input {
  width: 48px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  outline: none;
}
.action-row {
  display: flex;
  gap: 8px;
}
.btn-add-cart {
  flex: 1;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-add-cart:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-quick-buy {
  flex: 1;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-quick-buy:hover { background: var(--orange-dark); }
.btn-wa-detail {
  background: #25d366;
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 20px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn-wa-detail:hover { background: #1da851; color: white; }

/* Tabs */
.tabs { border-bottom: 1px solid var(--border); display: flex; gap: 0; }
.tab-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover:not(.active) { color: var(--text-primary); }
.tab-pane { display: none; padding: 16px 0; }
.tab-pane.active { display: block; }

/* ============================================
   CART PAGE
   ============================================ */
.cart-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 768px) {
  .cart-layout { flex-direction: row; align-items: flex-start; }
}

.cart-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.cart-item-price { font-size: 15px; font-weight: 800; color: var(--primary); }
.cart-item-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cart-remove { color: var(--text-muted); font-size: 12px; cursor: pointer; border: none; background: none; transition: color var(--transition); }
.cart-remove:hover { color: var(--primary); }

.order-summary {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 768px) { .order-summary { width: 300px; flex-shrink: 0; position: sticky; top: 120px; } }
.order-summary-header {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
}
.order-summary-body { padding: 16px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.summary-row.total {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 6px;
}
.summary-total-price { color: var(--primary); }

/* ============================================
   FOOTER (desktop)
   ============================================ */
.site-footer {
  background: #1a1a1a;
  color: #aaa;
  padding: 48px 0 0;
  margin-top: 40px;
  display: none;
}
@media (min-width: 768px) { .site-footer { display: block; } }
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand-name { color: white; font-size: 20px; font-weight: 900; margin-bottom: 8px; }
.footer-brand-desc { font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.footer-heading { color: white; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 13px; color: #aaa; transition: color var(--transition); }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid #2e2e2e;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: #666;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-socials { display: flex; gap: 8px; }
.footer-social {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #2e2e2e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 14px;
  transition: all var(--transition);
  text-decoration: none;
}
.footer-social:hover { background: var(--primary); color: white; }

/* ============================================
   MOBILE BOTTOM NAV
   ============================================ */
.mobile-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-header);
  border-top: 1px solid var(--border);
  z-index: 99;
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 768px) { .mobile-nav { display: none; } }
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 56px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  transition: color var(--transition);
  text-decoration: none;
  position: relative;
}
.mobile-nav-item i  { font-size: 18px; transition: color var(--transition); }
.mobile-nav-item.active { color: var(--primary); }
.mobile-nav-item:hover  { color: var(--primary); }

/* WA center button elevated */
.mobile-nav-wa {
  background: #25d366;
  color: white !important;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xl);
  margin: -24px auto 0;
  box-shadow: 0 4px 14px rgba(37,211,102,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  position: relative;
  z-index: 2;
}
.mobile-nav-wa i { font-size: 20px; }
.mobile-nav-wa span { font-size: 9px; font-weight: 700; color: white; }
.mobile-nav-wa:hover { background: #1da851; color: white; }

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast-container {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  transform: translateX(120%);
  transition: transform 0.3s ease;
}
.toast.show { transform: translateX(0); }
.toast-success .toast-icon { color: var(--success); }
.toast-error   .toast-icon { color: var(--primary); }

/* ============================================
   MISC UTILITIES
   ============================================ */
.pb-mobile { padding-bottom: 64px; }
@media (min-width: 768px) { .pb-mobile { padding-bottom: 0; } }

.page-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; color: var(--border); }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state a i {
    font-size: 20px;
    margin-bottom: 0;
    color: var(--border);
}
.load-more-btn {
  display: block;
  width: 100%;
  max-width: 220px;
  margin: 24px auto;
  padding: 12px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-full);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.load-more-btn:hover { background: var(--primary); color: white; }
.load-more-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span.active { color: var(--text-primary); font-weight: 500; }

/* Stock badge */
.stock-in   { color: var(--success); font-size: 12px; font-weight: 600; }
.stock-out  { color: var(--primary); font-size: 12px; font-weight: 600; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.3s ease forwards; }
.logo-size-h {
    width: 160px;
}
html.dark .logo-stor-text { fill: #f0f0f0; }