/* ==========================================================================
   PRODUIT.CSS — Styles propres à la page catalogue produits
   (le reset, les variables et l'en-tête/nav/footer viennent de base.css)
   ========================================================================== */

* {
  font-family: 'Montserrat', sans-serif !important;
}

body {
  background-color: #ffffff;
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.6;
}

/* --- BREADCRUMB --- */
.breadcrumb-wrap {
  background-color: #fafbfb;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}

.breadcrumb {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 20px;
  list-style: none;
  display: flex;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--brand-green);
  text-decoration: none;
}

/* --- HERO BANNIÈRE CATALOGUE --- */
.catalog-hero {
  background: linear-gradient(rgba(13, 110, 56, 0.22), rgba(7, 72, 35, 0.32)), url('/static/img/image1.jpg') center/cover no-repeat;
  color: #ffffff;
  padding: 60px 20px 70px 20px;
  text-align: center;
  position: relative;
}

.catalog-hero h1 {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.catalog-hero p {
  font-size: 1.05rem;
  font-weight: 500;
  max-width: 700px;
  margin: 0 auto;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* --- FILTRES & CATÉGORIES --- */
.filter-wrapper {
  max-width: 1250px;
  margin: -25px auto 30px auto;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.filter-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.search-box {
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 12px 18px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--brand-green);
}

.category-scroll-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.nav-arrow {
  background: var(--brand-green);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  transition: background 0.2s;
}

.nav-arrow:hover {
  background: var(--brand-green-dark);
}

.category-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  white-space: nowrap;
  padding: 4px 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.btn-pill {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-dark);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.btn-pill.active, .btn-pill:hover {
  background: var(--brand-green);
  color: #ffffff;
  border-color: var(--brand-green);
}

/* --- CATALOGUE PRINCIPAL --- */
.catalog-container {
  max-width: 1250px;
  margin: 0 auto 60px auto;
  padding: 0 20px;
}

.products-count {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 20px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 25px;
}

.product-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
}

.product-img-box {
  height: 190px;
  width: 100%;
  position: relative;
  background: #f8faf9;
}

.product-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--brand-green);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  z-index: 2;
}

.btn-cart-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-green);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}

.btn-cart-icon svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-cart-icon:hover {
  background: var(--brand-green-dark);
  transform: scale(1.08);
}

.product-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-green-dark);
  margin-bottom: 8px;
}

.product-qty {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-teal);
}

.product-qty span {
  color: var(--text-dark);
  font-weight: 700;
}

.product-price-line {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 4px;
}

.product-price-line span {
  color: var(--brand-orange);
  font-weight: 900;
  font-size: 1.05rem;
}

.product-price-rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-price-rating-row .product-price-line { margin-top: 0; }

.product-rating-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-dark);
  white-space: nowrap;
}

.product-rating-badge .star-icon { color: var(--gold-star); }

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 0;
  color: var(--text-muted);
  display: none;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .catalog-hero { padding: 45px 20px 55px 20px; }
  .catalog-hero h1 { font-size: 1.6rem; }
  .products-grid { grid-template-columns: 1fr; }
}
