/* =================================================
   PRODUITS – PAGE D’ACCUEIL
================================================= */

.products{
  padding: 18px 0 28px;
}

.products-header{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.products-header h2{
  margin: 0;
  font-size: 18px;
}

.products-header span{
  font-size: 13px;
  color: var(--muted);
}

/* ===== GRID : 3 PRODUITS PAR LIGNE ===== */

.grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

/* ===== CARD PRODUIT ===== */

.product{
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,.04);
  transition: transform .15s ease, box-shadow .15s ease;
}

.product:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,.08);
}

/* ===== IMAGE PRODUIT ===== */

.product-image{
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f3f4f6;
  overflow: hidden;
}

.product-image img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== INFOS PRODUIT ===== */

.product-info{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  gap: 10px;
}

.product-info .name{
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.product-info .qty{
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
}

/* =================================================
   PAGE PRODUIT – DÉTAIL
================================================= */

.product-page h1{
  margin-top: 0;
}

.product-desc{
  color: var(--muted);
  margin-bottom: 14px;
}

.product-details{
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.detail{
  display: flex;
  gap: 8px;
  font-size: 14px;
}

.detail strong{
  min-width: 120px;
  color: var(--text);
}

.not-found{
  text-align: center;
}

/* =================================================
   RESPONSIVE
================================================= */

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

@media (max-width: 560px){
  .grid{
    grid-template-columns: 1fr;
  }

  .product-info{
    flex-direction: column;
    align-items: flex-start;
  }
}

