/* =============================================
   SHOP'N MAX — CATEGORY PAGE CSS
   Pages produits dédiées par catégorie
============================================= */

/* ===== CATEGORY HERO ===== */
.cat-hero {
  background: linear-gradient(135deg, var(--brown-dark) 0%, var(--orange-dark) 100%);
  padding: 60px 24px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cat-hero::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  top: -200px; right: -100px;
}
.breadcrumb {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: .78rem; color: rgba(255,255,255,.6);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--brown-pale); transition: var(--trans); }
.breadcrumb a:hover { color: white; }
.cat-hero-emoji { font-size: 3.5rem; margin-bottom: 12px; }
.cat-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800; color: white; margin-bottom: 12px;
}
.cat-hero-desc { color: rgba(255,255,255,.75); font-size: .95rem; margin-bottom: 16px; }
.cat-hero-count {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: white;
  padding: 6px 20px; border-radius: 50px;
  font-size: .8rem; font-weight: 600;
}

/* ===== TOOLBAR ===== */
.catalog-toolbar {
  background: white;
  border-bottom: 2px solid var(--border);
  position: sticky; top: 72px; z-index: 900;
  box-shadow: 0 2px 12px rgba(78,44,16,.07);
}
.toolbar-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px 24px; flex-wrap: wrap;
}
.filter-group {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.filter-label {
  font-size: .78rem; font-weight: 700; color: var(--text-light);
  letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab {
  padding: 7px 16px; border-radius: 50px; border: 2px solid var(--border);
  background: none; cursor: pointer; font-size: .78rem; font-weight: 600;
  color: var(--text-light); transition: var(--trans); white-space: nowrap;
  font-family: 'Montserrat', sans-serif;
}
.filter-tab:hover { border-color: var(--orange); color: var(--orange); }
.filter-tab.active {
  background: var(--orange); border-color: var(--orange);
  color: white;
}
.toolbar-right { display: flex; align-items: center; gap: 12px; }
.sort-select {
  padding: 8px 14px; border: 2px solid var(--border); border-radius: var(--radius);
  font-family: 'Montserrat', sans-serif; font-size: .82rem; font-weight: 600;
  color: var(--text); background: var(--cream); cursor: pointer; outline: none;
  transition: var(--trans);
}
.sort-select:focus { border-color: var(--orange); }
.view-toggle { display: flex; gap: 4px; }
.view-btn {
  width: 36px; height: 36px; border: 2px solid var(--border);
  border-radius: 8px; background: none; cursor: pointer;
  font-size: 1rem; transition: var(--trans); color: var(--text-light);
}
.view-btn.active, .view-btn:hover {
  border-color: var(--orange); color: var(--orange); background: rgba(196,84,10,.07);
}

/* ===== CATALOG LAYOUT ===== */
.catalog-layout {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 260px 1fr;
  gap: 0; padding: 32px 24px; align-items: start;
  min-height: 60vh;
}

/* ===== FILTER SIDEBAR ===== */
.filter-sidebar {
  position: sticky; top: 140px;
  padding-right: 28px;
}
.filter-panel {
  background: white; border-radius: var(--radius); padding: 20px;
  margin-bottom: 16px; box-shadow: var(--shadow);
  border-left: 3px solid var(--orange);
}
.filter-panel h4 {
  font-size: .82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--brown-dark); margin-bottom: 16px;
}
.price-range { display: flex; flex-direction: column; gap: 10px; }
.price-range input[type="range"] {
  -webkit-appearance: none; width: 100%; height: 4px;
  background: var(--brown-pale); border-radius: 2px; outline: none;
}
.price-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  background: var(--orange); border-radius: 50%; cursor: pointer;
  box-shadow: 0 2px 6px rgba(196,84,10,.4);
}
.price-labels { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-light); font-weight: 600; }
.check-label {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: .85rem; color: var(--text-light); margin-bottom: 10px;
  transition: var(--trans);
}
.check-label:hover { color: var(--orange); }
.check-label input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer;
}
.btn-sm { padding: 8px 20px; font-size: .78rem; width: 100%; }

/* ===== CATALOG MAIN ===== */
.catalog-main { min-width: 0; }

/* Filtres actifs */
.active-filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.af-tag {
  display: flex; align-items: center; gap: 6px;
  background: rgba(196,84,10,.1); color: var(--orange);
  padding: 4px 12px; border-radius: 50px; font-size: .75rem; font-weight: 600;
}
.af-tag button {
  background: none; border: none; cursor: pointer; color: var(--orange);
  font-size: .9rem; line-height: 1; padding: 0;
}

/* Vue GRILLE */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

/* Vue LISTE */
.catalog-grid.list-view {
  grid-template-columns: 1fr;
}
.catalog-grid.list-view .product-card {
  display: grid;
  grid-template-columns: 160px 1fr;
}
.catalog-grid.list-view .product-img {
  height: 100%; min-height: 160px; border-radius: 0;
}
.catalog-grid.list-view .product-desc {
  display: block !important;
  -webkit-line-clamp: unset !important;
}

/* ===== NO RESULTS ===== */
.no-results {
  text-align: center; padding: 60px 20px;
  color: var(--text-light);
}
.no-results span { font-size: 3rem; display: block; margin-bottom: 16px; }
.no-results p { font-size: 1rem; margin-bottom: 20px; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; padding: 40px 0 20px;
  flex-wrap: wrap;
}
.page-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--border);
  background: white; cursor: pointer; font-size: .88rem; font-weight: 600;
  color: var(--text); transition: var(--trans); font-family: 'Montserrat', sans-serif;
}
.page-btn:hover { border-color: var(--orange); color: var(--orange); }
.page-btn.active { background: var(--orange); border-color: var(--orange); color: white; }
.page-btn.prev, .page-btn.next {
  width: auto; padding: 0 16px; font-size: .8rem;
}
.page-btn:disabled { opacity: .4; cursor: default; }

/* ===== Highlight nav actif ===== */
.nav-link.current {
  color: var(--orange) !important;
  background: rgba(196,84,10,.08) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .filter-sidebar {
    position: static;
    padding-right: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }
  .filter-sidebar .btn-sm { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  /* Toolbar */
  .catalog-toolbar { position: static; }
  .toolbar-inner { flex-direction: column; align-items: flex-start; padding: 12px 16px; gap: 10px; }
  .filter-tab { padding: 6px 12px; font-size: .72rem; }

  /* Layout */
  .catalog-layout { padding: 16px; }
  .filter-sidebar { grid-template-columns: 1fr 1fr; }

  /* Hero catégorie */
  .cat-hero { padding: 40px 16px 30px; }
  .cat-hero-title { font-size: 1.8rem; }

  /* Grille produits — 1 carte par ligne */
  .catalog-grid { grid-template-columns: 1fr; gap: 14px; }

  /* Carte — 1 par ligne, format vertical */
  .catalog-grid .product-card { display: block; }
  .catalog-grid .product-img { height: 200px; }
  .catalog-grid .product-info { padding: 14px; }
  .catalog-grid .product-name { font-size: .9rem; }
  .catalog-grid .product-desc { display: none; }

  /* Boutons empilés */
  .catalog-grid .product-actions { flex-direction: column; gap: 8px; }
  .catalog-grid .btn-affiliate { width: 100%; font-size: .8rem; padding: 10px; text-align: center; justify-content: center; }
  .catalog-grid .btn-detail { width: 100%; text-align: center; font-size: .8rem; padding: 10px; }

  /* Vue liste */
  .catalog-grid.list-view { grid-template-columns: 1fr; }
  .catalog-grid.list-view .product-card { display: block; }

  /* Pagination */
  .pagination { gap: 4px; padding: 24px 0; }
  .page-btn { width: 34px; height: 34px; font-size: .78rem; }
  .page-btn.prev, .page-btn.next { padding: 0 10px; font-size: .72rem; }
}

@media (max-width: 380px) {
  .filter-sidebar { grid-template-columns: 1fr; }
  .catalog-grid .product-card { grid-template-columns: 110px 1fr; }
  .catalog-grid .product-img { min-height: 150px; }
}