/* ================= VARIABLES ================= */
:root {
  --text-main: #111;
  --text-muted: #6b7280;
  --border-soft: #e5e7eb;
  --bg-soft: #f9fafb;
  --accent: #000;
  --danger: #dc2626;
}

/* ================= PAGE WRAPPER ================= */
.products {
  max-width: 1200px;
  margin: auto;
  padding: 24px 16px;
}

/* ================= GRID ================= */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* Desktop large */
@media (min-width: 1280px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 420px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= CARD ================= */
.product-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 14px;
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0,0,0,.08);
}

/* ================= BADGE ================= */
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ================= IMAGE ================= */
.img-wrap {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.img-wrap img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  display: block;
}

/* ================= TEXT ================= */
.product-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 6px;
}

/* ================= PRICE ================= */
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.deal {
  font-size: 14px;
  color: var(--danger);
  text-decoration: line-through;
}

.price {
  font-size: 15px;
  font-weight: 700;
  color: #077521;
}

/* ================= ACTIONS ================= */
.actions {
  display: flex;
  gap: 8px;
}

/* BUTTON */
.btn {
  flex: 1;
  padding: 10px 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--accent);
  transition: .2s ease;
}

/* CART */
.cart {
  background: #fff;
  color: var(--text-main);
}

.cart:hover {
  background: var(--bg-soft);
}

/* BUY */
.buy {
  background: var(--accent);
  color: #fff;
}

.buy:hover {
  background: #000;
}

/* ================= LINK FIX ================= */
.product-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.actions {
  position: relative;
  z-index: 2;
}
