/* ============== PRODUCTS ============== */
.products{
  width:100%;
  max-width:1200px;
  margin:28px auto 8px;
  padding:0 16px;
}

.products .section-title{
  font-size:clamp(18px,3.5vw,28px);
  font-weight:600;
  letter-spacing:.2px;
  margin:4px 0 14px;
  text-align:left;
}

.product-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:16px;
}

@media (max-width: 1024px){
  .product-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 599px){
  .product-grid{ grid-template-columns: 1fr; }
}

/* Card */
.product-card{
  position:relative;
  border-radius: var(--radius);
  border:1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
  overflow:hidden;
  transform-style: preserve-3d;      /* enables the tilt effect */
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    box-shadow 220ms ease,
    background 200ms ease;
  will-change: transform;
}
.product-card:hover{
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}

/* Media */
.product-media{
  position:relative;
  aspect-ratio: 4 / 3;
  overflow:hidden;
  background: #f3f3f3;
}
.product-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition: transform 280ms ease;
  will-change: transform;
}
.product-card:hover .product-media img{ transform: scale(1.06); }

/* Price badge */
.price-badge{
  position:absolute;
  top:12px; right:12px;
  padding:8px 12px;
  border-radius:999px;
  font-weight:700;
  font-size:14px;
  color:#fff;
  background: color-mix(in oklab, var(--accent), #000 10%); /* keeps within your palette */
  border:1px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

/* Optional favourite button (heart) */
.fav{
  position:absolute;
  top:12px; left:12px;
  width:38px; height:38px;
  display:flex; align-items:center; justify-content:center;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  background: var(--card-bg);
  cursor:pointer;
  transition: transform 120ms ease, background 150ms ease, border-color 150ms ease;
}
.fav:hover{ transform: translateY(-1px); background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.28); }
.fav svg{ width:20px; height:20px; display:block; fill: currentColor; color:#777; }
.fav[aria-pressed="true"] svg{ color: #e63946; }

/* Body */
.product-body{
  padding:12px 14px 16px;
}
.product-title{
  font-size:16px;
  font-weight:600;
  margin:0 0 6px;
  line-height:1.25;
  color: var(--text);
  min-height: 2.8em; /* keeps rows even */
}
.product-desc{
  font-size:14px;
  color: var(--muted);
  line-height:1.4;
  display:-webkit-box;
  -webkit-box-orient: vertical;
  overflow:hidden;
  min-height: 9.8em; /* keeps rows even */
}

.product-cta{
  gap:10px;
  align-items:center;
  margin-top:12px;
}
.product-cta .button{ flex:0 0 auto; }
.product-cta .button--primary{
  background: linear-gradient(180deg, rgba(56,189,248,0.22), rgba(56,189,248,0.08));
  border-color: rgba(56,189,248,0.45);
}

/* Small price note next to CTA (mobile-friendly) */
.price-inline{
  margin-left:auto;
  font-weight:700;
  font-size:14px;
  color: var(--text);
  opacity:.9;
}

/* Respect motion prefs */
@media (prefers-reduced-motion: reduce){
  .product-card,
  .product-media img{ transition: none; }
}
