/* ==========================================================================
   GRADITECK IT — Page Catalogue Produits
   Galerie filtrable · Cards produits · Mode sombre
   ========================================================================== */

/* ---------- HERO CATALOGUE ---------- */
.catalog-hero {
  padding-top: calc(var(--nav-h) + 60px);
  padding-bottom: 0;
}
.catalog-hero .section-head {
  margin-bottom: 40px;
}

/* ---------- FILTRES ---------- */
.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    transform var(--transition);
  white-space: nowrap;
}
.filter-btn:hover {
  border-color: var(--primary-400);
  color: var(--primary-600);
  transform: translateY(-2px);
}
[data-theme="dark"] .filter-btn:hover {
  color: var(--primary-300);
}
.filter-btn.active {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(8, 145, 178, 0.25);
}
.filter-btn i {
  font-size: 1.1rem;
}

/* ---------- GRILLE PRODUITS ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* ---------- CARD PRODUIT ---------- */
.product-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), 0 8px 24px -8px rgba(6, 182, 212, 0.12);
  border-color: var(--primary-300);
}
[data-theme="dark"] .product-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: var(--shadow-lg), 0 8px 24px -8px rgba(6, 182, 212, 0.2);
}
.product-card.hidden {
  display: none;
}

/* --- Image --- */
.product-img {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: var(--bg-alt);
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.product-card:hover .product-img img {
  transform: scale(1.05);
}
.product-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.18));
  pointer-events: none;
}

/* --- Body --- */
.product-body {
  padding: 24px 24px 28px;
}
.product-ref {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-600);
  background: var(--primary-50);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}
[data-theme="dark"] .product-ref {
  background: rgba(6, 182, 212, 0.12);
  color: var(--primary-300);
}
.product-title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.product-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-specs {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
}
.product-specs li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.product-specs li strong {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.product-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-600);
  background: var(--accent-50);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--accent-100);
}
[data-theme="dark"] .product-badge {
  color: var(--accent-400);
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
}

/* ---------- MESSAGE AUCUN RÉSULTAT ---------- */
.no-results {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-soft);
}
.no-results i {
  font-size: 3rem;
  display: block;
  margin-bottom: 16px;
  opacity: 0.4;
}
.no-results p {
  font-size: 1.1rem;
  font-weight: 600;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}
@media (max-width: 860px) {
  .catalog-filters {
    gap: 8px;
  }
  .filter-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
}
@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .product-img {
    height: 220px;
  }
  .filter-btn {
    padding: 7px 12px;
    font-size: 0.78rem;
  }
  .filter-btn i {
    display: none;
  }
}
