/* En-tête et filtres */
.mockup-header-container {
  width: 100%;
  box-sizing: border-box;
  max-width: 1300px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.catalogue-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
  color: #222;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

/* Boutons filtres: nuance vert-bleu */
.category-btn {
  background: #2c8c99; /* bleu-vert */
  color: white;
  border: none;
  padding: 0.5rem 1.4rem;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  user-select: none;
  font-size: 1rem;
  min-width: 90px;
  text-align: center;
}

.category-btn:hover,
.category-btn.active {
  background-color: #1a5e66; /* plus foncé au hover */
  transform: scale(1.05);
}

.category-btn.category-btn--all {
  background-color: #16504e;
}

/* Section catégorie : fond légèrement coloré et coins arrondis */
.category-section {
  padding: 15px 10px;
  border-radius: 12px;
  margin-bottom: 2.5rem;
  transition: background-color 0.3s ease;
}

/* Grille CSS pour items (remplace masonry) */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  align-items: start;
}

/* Cartes de taille variable */
.small-card {
  min-height: 110px;
}

.large-card {
  min-height: 220px;
  grid-row: span 2; /* Occupe 2 lignes dans la grille */
}

/* Cartes produit */
.product-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.12);
  border: 3px solid transparent;
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  vertical-align: top;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
}

.product-card:hover,
.product-card:focus-within {
  box-shadow: 0 20px 40px rgb(0 0 0 / 0.3);
  transform: translateY(-6px);
  border-color: var(--cat-color);
}

/* Hauteur image réduite */
.product-image-link {
  display: block;
  width: 100%;
  height: 110px;
  overflow: hidden;
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
  background-color: #f0f0f0;
  position: relative;
  flex-shrink: 0;
}

.product-image-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
}

.product-card:hover .product-image-link img,
.product-card:focus-within .product-image-link img {
  transform: scale(1.05);
}

/* Colonne verticale des infos produit */
.product-info-column {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.6rem 1rem;
  flex-grow: 1;
}

.product-title-container,
.product-price-container,
.product-stock-container {
  overflow: hidden;
}

.product-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0;
  color: #111;

  display: -webkit-box;
  -webkit-line-clamp: 2;       /* limite à 2 lignes */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  min-height: 2.4em; /* hauteur fixe pour uniformité */
}

.product-price {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--cat-color);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.old-price {
  text-decoration: line-through;
  color: #999;
  font-weight: 400;
  font-size: 0.75rem;
}

.product-stock {
  font-size: 0.7rem;
  font-weight: 600;
  color: #4caf50;
  margin-bottom: 0.4rem;
}

.product-stock.low-stock {
  color: #d97706;
}

.product-stock .out-of-stock {
  color: #b91c1c;
  font-weight: 700;
}

/* Formulaire d'ajout au panier */
.add-cart-form {
  margin: 0;
  display: inline;
  justify-content: center;
}

/* Conteneur des boutons alignés verticalement */
.product-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  text-align: center;
  margin-top: auto;
}

/* Boutons généraux en nuance vert-bleu */
.btn {
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  padding: 0.4rem 1rem;
  user-select: none;
  border: none;
  font-size: 0.85rem;
  transition: background-color 0.3s ease;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background-color: #2c8c99;
  color: white;
}

.btn-primary:hover {
  background-color: #1a5e66;
}

.btn-secondary {
  background-color: #d3e4e6;
  color: #16504e;
  padding: 0.4rem 0.8rem;
  border: 2px solid #1a5e66;
}

.btn-secondary:hover {
  background-color: #b0c9cb;
  color: #133d3f;
}

/* Responsive */
@media (max-width: 1024px) {
  .masonry-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .small-card {
    min-height: 105px;
  }
  .large-card {
    min-height: 150px;
    grid-row: span 2;
  }
  .product-image-link {
    height: 90px;
  }
  .large-card .product-image-link {
    height: 140px;
  }
}

@media (max-width: 640px) {
  .masonry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .small-card,
  .large-card {
    min-height: auto;
    width: 100%;
  }
  .product-image-link {
    height: 80px;
  }
  .large-card .product-image-link {
    height: 120px;
  }
  .category-nav {
    justify-content: center;
    gap: 0.5rem;
  }
  .category-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
    min-width: 70px;
  }
}
