/* ============================================================
   EAZYMART PREMIUM - Core Component Styles
   Universal styles that work on ALL pages
============================================================ */

/* ==================== LAYOUT CONTAINERS ==================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.main-content {
  min-height: calc(100vh - 200px);
  padding-top: 70px; /* Account for fixed header */
}

/* ==================== HERO BANNER (for index.html) ==================== */

.hero-banner {
  background: linear-gradient(135deg, var(--brand-blue) 0%, #0a3d6b 100%);
  color: white;
  padding: 48px 24px;
  border-radius: var(--radius-2xl);
  margin: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.hero-banner h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
}

.hero-banner p {
  font-size: 16px;
  opacity: 0.95;
  margin-bottom: 32px;
}

/* ==================== CATEGORY STRIP (works everywhere) ==================== */

.category-strip {
  display: flex;
  gap: 16px;
  padding: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-icon-item {
  flex: 0 0 auto;
  width: 72px;
  text-align: center;
  cursor: pointer;
}

.category-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 8px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
}

.category-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* ==================== PRODUCT CARDS (works everywhere) ==================== */

.product-card,
.product-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover,
.product-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card-image-container,
.product-image-container {
  height: 140px;
  width: 100%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  position: relative;
}

.product-card-image,
.product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-card-body,
.product-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-title,
.product-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-unit,
.product-unit {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.product-price {
  font-weight: 700;
  color: var(--brand-blue);
  font-size: 16px;
  margin-bottom: 8px;
}

/* Add to cart button */
.btn-add-cart,
.add-to-cart-btn {
  background: var(--brand-gold);
  color: var(--brand-blue);
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-add-cart:hover,
.add-to-cart-btn:hover {
  background: #e6c230;
  transform: scale(1.02);
}

/* ==================== PRODUCT GRID (for shopping.html) ==================== */

#productGrid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 16px;
}

@media (min-width: 768px) {
  #productGrid,
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
}

/* ==================== SIDEBAR (for shopping.html) ==================== */

.sidebar {
  width: 280px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-light);
  padding: 24px 16px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

@media (max-width: 767px) {
  .sidebar {
    display: none;
  }
}

.sidebar h2,
.sidebar h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.sidebar li {
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
}

.sidebar li:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.sidebar li.active {
  background: var(--brand-gold);
  color: var(--brand-blue);
  font-weight: 600;
}

/* ==================== SHOPPING CONTAINER ==================== */

.shopping-container {
  display: flex;
  min-height: calc(100vh - 200px);
}

.shopping-container .main-content {
  flex: 1;
  padding: 24px 16px;
}

/* ==================== BUTTONS ==================== */

.btn-primary {
  background: var(--brand-gold);
  color: var(--brand-blue);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #e6c230;
  transform: translateY(-2px);
}

/* ==================== DARK MODE ==================== */

[data-theme="dark"] .hero-banner {
  background: linear-gradient(135deg, #021b36 0%, #042853 100%);
}

[data-theme="dark"] .product-card,
[data-theme="dark"] .product-item {
  background: var(--bg-primary);
  border-color: var(--border-dark);
}

[data-theme="dark"] .product-price {
  color: var(--brand-gold);
}

[data-theme="dark"] .sidebar {
  background: var(--bg-primary);
  border-color: var(--border-dark);
}
/* Bottom nav – enforce visible icons in light mode */
.bottom-nav {
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
}

.bottom-nav a {
  color: #64748b !important;
}

.bottom-nav a i {
  font-size: 1.5rem;
  color: #64748b !important;
}

.bottom-nav a span {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b !important;
}

.bottom-nav a.nav-item-active i,
.bottom-nav a.nav-item-active span {
  color: #042853 !important;
}
