:root {
  --primary-color: #111;
  --bg-color: #fafafa;
  --surface-color: #ffffff;
  --text-primary: #333;
  --text-secondary: #666;
  --accent-color: #000;
  --border-color: #eaeaea;
  --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Header & Nav */
header {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.filters-nav button {
  background: none;
  border: none;
  font-size: 1rem;
  margin: 0 1rem;
  cursor: pointer;
  color: var(--text-secondary);
  position: relative;
  transition: var(--transition);
}

.filters-nav button.active, .filters-nav button:hover {
  color: var(--primary-color);
  font-weight: 600;
}

.cart-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.cart-count {
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  padding: 0.1rem 0.6rem;
  font-size: 0.8rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 6rem 2rem;
  background-color: var(--surface-color);
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Products Grid */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.5rem;
}

.product-card {
  background: var(--surface-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.product-image {
  width: 100%;
  height: 280px;
  object-fit: contain;
  background-color: #f1f1f1;
}

.product-info {
  padding: 1.5rem;
}

.product-category {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  display: block;
}

.product-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.add-to-cart {
  width: 100%;
  padding: 0.8rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.add-to-cart:hover {
  background-color: #333;
}

/* Cart Overlay */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
}

.cart-overlay.active {
  display: flex;
  justify-content: flex-end;
  opacity: 1;
}

.cart-modal {
  width: 400px;
  max-width: 100%;
  background: var(--surface-color);
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-overlay.active .cart-modal {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  font-size: 1.5rem;
}

.close-cart {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.cart-item-price {
  color: var(--text-secondary);
}

.remove-item {
  background: none;
  border: none;
  color: #ff4444;
  cursor: pointer;
  font-size: 0.9rem;
}

.cart-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.checkout-btn {
  width: 100%;
  padding: 1rem;
  background-color: #25D366; /* WhatsApp Green */
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.checkout-btn:hover {
  background-color: #1ebe57;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem;
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container { 
    flex-direction: column; 
    gap: 1.2rem;
    padding: 1rem;
  }
  .filters-nav { 
    display: flex; 
    gap: 1.5rem; 
    overflow-x: auto; 
    padding-bottom: 0.5rem; 
    width: 100%;
    justify-content: center;
  }
  .filters-nav button { 
    margin: 0; 
    white-space: nowrap; 
    font-size: 0.95rem;
  }
  .hero {
    padding: 3rem 1.5rem;
    margin-bottom: 2rem;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1.05rem;
  }
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 400px; /* keeps the single column from stretching too wide on tablets */
    margin: 0 auto;
  }
  .container {
    padding: 0 1rem 3rem;
  }
  .product-image {
    height: 280px; /* Restore proper height for single column */
  }
  .product-info {
    padding: 1.5rem;
  }
  .product-title {
    font-size: 1.2rem;
  }
  .product-price {
    font-size: 1.1rem;
  }
  .cart-modal {
    width: 85%;
    padding: 1.5rem;
  }
}