/* ===== DESKTOP NAV LINKS (hidden on mobile) ===== */
.nav-links { display: none; }
.nav-link {
  color: rgba(255,255,255,0.8); font-size: 0.9rem; padding: 6px 12px;
  border-radius: 6px; transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,0.15); }

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', sans-serif; background: #f5f5f5; color: #222; padding-bottom: 70px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.hidden { display: none !important; }

/* ===== NAVBAR ===== */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #6c2bd9; padding: 10px 14px; position: sticky; top: 0; z-index: 100;
}
.nav-logo { color: #fff; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.5px; display: flex; align-items: center; gap: 6px; }
.nav-logo span { color: #f0c040; }
.logo-img { height: 32px; width: 32px; object-fit: contain; border-radius: 6px; }
.location-btn {
  background: rgba(255,255,255,0.15); border: none; color: #fff;
  padding: 5px 10px; border-radius: 20px; font-size: 0.82rem; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-cart-icon { position: relative; color: #fff; font-size: 1.2rem; }
.cart-badge {
  position: absolute; top: -6px; right: -8px;
  background: #f0c040; color: #222; font-size: 0.65rem;
  border-radius: 50%; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.nav-profile {
  background: rgba(255,255,255,0.2); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 0.9rem;
}

/* ===== DATE BAR ===== */
.date-bar {
  display: flex; align-items: center; gap: 8px;
  background: #6c2bd9; padding: 8px 14px 12px;
}
.date-input {
  flex: 1; background: #fff; border-radius: 8px;
  padding: 9px 12px; display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: #888; cursor: pointer;
}
.select-btn {
  background: #222; color: #fff; border: none;
  padding: 9px 14px; border-radius: 8px; font-size: 0.82rem;
  cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap;
}

/* ===== CATEGORY TABS ===== */
.category-tabs {
  display: flex; align-items: center;
  background: #6c2bd9; padding: 0 8px 0;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}
.category-tabs.outdoor-active { background: #1a7a3c; }
.category-tabs.entertainment-active { background: #c0392b; }
.tabs-wrapper {
  display: flex; overflow-x: auto; flex: 1; gap: 4px;
  scrollbar-width: none;
}
.tabs-wrapper::-webkit-scrollbar { display: none; }
.tab {
  background: none; border: none; color: rgba(255,255,255,0.7);
  padding: 10px 16px; font-size: 0.88rem; cursor: pointer;
  white-space: nowrap; border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.tab.active { color: #fff; border-bottom-color: #fff; font-weight: 600; }
.prev-tab, .next-tab {
  background: none; border: none; color: rgba(255,255,255,0.7);
  padding: 8px 4px; cursor: pointer; font-size: 0.8rem;
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(135deg, #6c2bd9 0%, #4a1a9e 100%);
  padding: 20px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 160px;
  position: relative;
  overflow: hidden;
  gap: 16px;
}
.hero-outdoor { background: linear-gradient(135deg, #1a7a3c 0%, #0f5228 100%); }
.hero-entertainment { background: linear-gradient(135deg, #c0392b 0%, #8e1a10 100%); }
.hero-content { z-index: 1; min-width: 0; }
.hero-content h1 { color: #fff; font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.hero-content p { color: rgba(255,255,255,0.85); font-size: 0.78rem; line-height: 1.5; }
.hero-brands { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.hero-brands span {
  background: rgba(255,255,255,0.15); color: #fff;
  padding: 3px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 600;
}

/* ===== HERO SLIDER — COVERFLOW ===== */
.hero-slider-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
}
.hero-slider {
  width: 100%;
  height: 200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-card {
  position: absolute;
  background: rgba(255,255,255,0.13);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(.4,0,.2,1),
              opacity 0.45s ease,
              width 0.45s ease,
              height 0.45s ease;
  overflow: hidden;
  backdrop-filter: blur(6px);
  width: 90px; height: 130px;
  padding: 10px 8px 8px;
  opacity: 0.55;
  /* anchor at center of container */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.hero-card.center {
  width: 130px; height: 175px;
  opacity: 1;
  z-index: 3;
  border-color: rgba(255,255,255,0.7);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  padding: 14px 10px 10px;
}
.hero-card.side-1 { z-index: 2; }
.hero-card.side-2 { z-index: 1; opacity: 0.35; }
.hero-card img {
  width: 100%; flex: 1; object-fit: contain;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  min-height: 0;
}
.hero-card-name {
  color: #fff; font-size: 0.6rem; font-weight: 600;
  text-align: center; margin-top: 5px; line-height: 1.3;
  width: 100%;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.hero-card.center .hero-card-name { font-size: 0.7rem; }
.hero-card-price {
  color: rgba(255,255,255,0.85); font-size: 0.58rem; margin-top: 2px; font-weight: 600;
}
.hero-card.center .hero-card-price { font-size: 0.68rem; }
.slider-dots {
  display: flex; gap: 5px; justify-content: center;
}
.slider-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.35); cursor: pointer; transition: all 0.25s;
}
.slider-dot.active { background: #fff; width: 20px; border-radius: 4px; }

/* ===== PRODUCTS SECTION ===== */
.products-section { background: #fff; margin-top: 0; }
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 14px 8px;
}
.section-header h2 { font-size: 1rem; font-weight: 700; }
.item-count { font-size: 0.82rem; color: #888; }

/* ===== LAYOUT ===== */
.products-layout { display: flex; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 68px; min-height: 400px; background: #fff;
  border-right: 1px solid #eee; padding: 8px 4px;
  display: flex; flex-direction: column; gap: 4px; flex-shrink: 0;
}
.sidebar-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 4px; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; transition: all 0.2s;
}
.sidebar-item.active { border-color: #6c2bd9; background: #f3eeff; }
.sidebar-item img, .sidebar-item .sb-icon {
  width: 40px; height: 40px; object-fit: contain; border-radius: 8px;
}
.sidebar-item .sb-icon {
  background: #f0f0f0; display: flex; align-items: center;
  justify-content: center; font-size: 1.2rem;
}
.sidebar-item span { font-size: 0.62rem; text-align: center; margin-top: 4px; color: #444; line-height: 1.2; }
.sidebar-item.active span { color: #6c2bd9; font-weight: 600; }

/* ===== PRODUCTS GRID ===== */
.products-grid {
  flex: 1; display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 10px;
}
.loading-spinner { grid-column: 1/-1; text-align: center; padding: 40px; color: #6c2bd9; font-size: 1.5rem; }

/* ===== PRODUCT CARD ===== */
.product-card {
  background: #fff; border-radius: 12px; border: 1px solid #eee;
  overflow: hidden; position: relative; cursor: pointer;
  transition: box-shadow 0.2s;
}
.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.card-img-wrap {
  position: relative; background: #f8f8f8;
  padding: 12px; min-height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.card-img-wrap img { height: 90px; object-fit: contain; }
.trending-badge {
  position: absolute; top: 8px; left: 8px;
  background: #fff; border: 1.5px solid #ff6b00;
  color: #ff6b00; font-size: 0.65rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
}
.wishlist-btn {
  position: absolute; top: 8px; right: 8px;
  background: none; border: none; cursor: pointer;
  color: #ccc; font-size: 1rem; transition: color 0.2s;
}
.wishlist-btn.active { color: #e74c3c; }
.card-body { padding: 8px 10px 10px; }
.card-title { font-size: 0.82rem; font-weight: 600; line-height: 1.3; margin-bottom: 6px; }
.card-stats { display: flex; align-items: center; gap: 4px; font-size: 0.7rem; color: #27ae60; margin-bottom: 4px; }
.card-stats i { font-size: 0.65rem; }
.card-price { font-size: 0.78rem; color: #888; margin-bottom: 8px; }
.card-price strong { color: #222; font-size: 0.9rem; }
.add-cart-btn {
  width: 100%; background: #fff; border: 1.5px solid #222;
  border-radius: 20px; padding: 7px; font-size: 0.78rem;
  font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.add-cart-btn:hover { background: #222; color: #fff; }
.add-cart-btn.added { background: #6c2bd9; color: #fff; border-color: #6c2bd9; }

/* ===== WHATSAPP FAB ===== */
.whatsapp-fab {
  position: fixed; bottom: 80px; right: 16px;
  background: #25d366; color: #fff; width: 52px; height: 52px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; box-shadow: 0 4px 12px rgba(37,211,102,0.4); z-index: 99;
  transition: transform 0.2s;
}
.whatsapp-fab:hover { transform: scale(1.1); }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid #eee;
  display: flex; z-index: 100;
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 8px 0; font-size: 0.65rem; color: #888; gap: 3px;
}
.bottom-nav a i { font-size: 1.1rem; }
.bottom-nav a.active { color: #6c2bd9; }
.bottom-nav a.active i { color: #6c2bd9; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; z-index: 200;
}
.modal {
  background: #fff; border-radius: 16px; padding: 24px;
  width: 90%; max-width: 360px; display: flex; flex-direction: column; gap: 14px;
}
.modal h3 { font-size: 1rem; font-weight: 700; }
.modal label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; color: #555; }
.modal input[type="date"] {
  border: 1.5px solid #ddd; border-radius: 8px; padding: 8px 10px;
  font-size: 0.88rem; outline: none;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.modal-actions button {
  padding: 8px 18px; border-radius: 8px; border: 1.5px solid #ddd;
  cursor: pointer; font-size: 0.85rem;
}
.btn-primary { background: #6c2bd9 !important; color: #fff !important; border-color: #6c2bd9 !important; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: #222; color: #fff; padding: 10px 20px; border-radius: 20px;
  font-size: 0.82rem; z-index: 300; opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

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

/* Tablet: 600px+ */
@media (min-width: 600px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-content h1 { font-size: 1.8rem; }
  .hero-section { min-height: 200px; padding: 28px 24px; }
  .hero-img { width: 180px; }
  .sidebar { width: 90px; }
  .sidebar-item .sb-icon { width: 50px; height: 50px; font-size: 1.4rem; }
  .sidebar-item span { font-size: 0.68rem; }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }

  /* Show desktop nav links */
  .nav-links { display: flex; gap: 4px; align-items: center; }
  .nav-center { display: none; } /* hide location btn from center, move to nav-right */

  /* Full-width layout wrapper */
  .page-wrapper { max-width: 1280px; margin: 0 auto; }

  /* Navbar */
  .navbar { padding: 12px 40px; }
  .nav-logo { font-size: 1.6rem; }
  .location-btn { font-size: 0.9rem; padding: 7px 14px; }
  .nav-right { gap: 16px; }
  .nav-cart-icon { font-size: 1.4rem; }
  .nav-profile { width: 38px; height: 38px; font-size: 1rem; }

  /* Date bar */
  .date-bar { padding: 10px 40px 14px; gap: 12px; }
  .date-input { max-width: 400px; font-size: 0.95rem; padding: 11px 16px; }
  .select-btn { font-size: 0.9rem; padding: 11px 20px; }

  /* Category tabs */
  .category-tabs { padding: 0 40px; }
  .tab { font-size: 1rem; padding: 12px 24px; }
  .prev-tab, .next-tab { font-size: 1rem; padding: 8px 8px; }

  /* Hero */
  .hero-section { padding: 48px 40px; min-height: 300px; gap: 24px; }
  .hero-content h1 { font-size: 2.4rem; }
  .hero-content p { font-size: 0.95rem; }
  .hero-brands span { font-size: 0.82rem; padding: 4px 12px; }

  /* Hero slider — coverflow, wider on desktop */
  .hero-slider-wrap { flex: 1; }
  .hero-slider { height: 260px; }
  .hero-card { width: 120px; height: 170px; }
  .hero-card.center { width: 180px; height: 240px; }
  .hero-card-name { font-size: 0.65rem; }
  .hero-card.center .hero-card-name { font-size: 0.78rem; }
  .hero-card-price { font-size: 0.62rem; }
  .hero-card.center .hero-card-price { font-size: 0.72rem; }

  /* Section header */
  .section-header { padding: 20px 40px 10px; }
  .section-header h2 { font-size: 1.3rem; }
  .item-count { font-size: 0.95rem; }

  /* Sidebar */
  .sidebar {
    width: 110px; padding: 12px 8px; gap: 6px;
    position: sticky; top: 64px; align-self: flex-start;
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .sidebar-item { padding: 10px 6px; border-radius: 12px; }
  .sidebar-item .sb-icon { width: 52px; height: 52px; font-size: 1.5rem; }
  .sidebar-item span { font-size: 0.72rem; }

  /* Products grid — horizontal scroll row on desktop */
  .products-grid {
    display: flex !important;
    flex-direction: row;
    overflow-x: auto;
    gap: 16px;
    padding: 16px 24px 20px 16px;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
    scroll-snap-type: x mandatory;
  }
  .products-grid::-webkit-scrollbar { height: 4px; }
  .products-grid::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
  .product-card {
    min-width: 200px;
    max-width: 200px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
  .card-img-wrap { min-height: 160px; }
  .card-img-wrap img { height: 130px; }
  .card-title { font-size: 0.88rem; }
  .card-stats { font-size: 0.78rem; }
  .card-price { font-size: 0.82rem; }
  .add-cart-btn { font-size: 0.82rem; padding: 9px; }

  /* Products section wrapper gets padding */
  .products-section { padding: 0 40px; background: #f5f5f5; }
  .products-layout { background: #fff; border-radius: 16px; overflow: hidden; }

  /* Hide bottom nav on desktop */
  .bottom-nav { display: none; }

  /* WhatsApp FAB position */
  .whatsapp-fab { bottom: 32px; right: 32px; width: 60px; height: 60px; font-size: 1.9rem; }

  /* Toast */
  .toast { bottom: 32px; }
}

/* Wide desktop: 1440px+ */
@media (min-width: 1440px) {
  .page-wrapper { max-width: 1440px; }
  .products-grid { grid-template-columns: repeat(5, 1fr); }
  .hero-content h1 { font-size: 2.8rem; }
  .hero-img { width: 340px; }
}
