/* ============================= */
/* 1. Global Variables (Modern Zippy Style) */
/* ============================= */

:root {
  --bg-color: #f6f8fb;
  --card-bg: #ffffff;

  --primary-color: #2563eb;     /* Vibrant blue */
  --primary-hover: #1d4ed8;

  --accent-color: #10b981;      /* Fresh green accent */
  --alert-color: #ef4444;

  --text-main: #111827;
  --text-sub: #6b7280;

  --border-color: #e5e7eb;

  --radius-card: 16px;
  --radius-btn: 10px;

  --shadow-sm: 0 2px 6px rgba(0,0,0,0.05);
  --shadow-hover: 0 12px 24px rgba(0,0,0,0.08);
}

/* ============================= */
/* 2. Layout */
/* ============================= */

body {
  background-color: var(--bg-color);
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: var(--text-main);
  margin: 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 30px;
  max-width: 1280px;
  margin: 0 auto;
}

/* ============================= */
/* 3. Product Card */
/* ============================= */

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}

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

/* ============================= */
/* 4. Badge */
/* ============================= */

.product-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary-color);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 50px;
}

.product-badge.sale {
  background: var(--alert-color);
}

/* ============================= */
/* 5. Image */
/* ============================= */

.product-card-image {
  width: 100%;
  height: 170px;
  object-fit: contain;
  margin-bottom: 14px;
  background: #f9fafb;
  border-radius: 12px;
  padding: 10px;
}

/* ============================= */
/* 6. Product Info */
/* ============================= */

.product-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
  min-height: 44px;
}

.product-weight {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 14px;
}

/* ============================= */
/* 7. Pricing */
/* ============================= */

.product-price-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-block {
  display: flex;
  flex-direction: column;
}

.product-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.product-old-price {
  font-size: 12px;
  color: #9ca3af;
  text-decoration: line-through;
}

/* ============================= */
/* 8. CTA Button */
/* ============================= */

.add-to-cart {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-to-cart:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

/* ============================= */
/* 9. Mobile */
/* ============================= */

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 14px;
    gap: 14px;
  }

  .product-card {
    padding: 12px;
  }

  .product-card-image {
    height: 130px;
  }

  .add-to-cart {
    padding: 7px 12px;
    font-size: 11px;
  }
}

