/* ───────────────────────────────────────────────
   BOUTIQUE WooCommerce — look de la maquette catalogue.
   Chargé sur is_shop() / is_product_category().
   Reprend la structure du prototype (catalogue-produits)
   avec les tokens globaux (shared.css + site.css).
   ─────────────────────────────────────────────── */

/* Masque les éléments WC par défaut qu'on remplace */
.pep-shop .woocommerce-products-header,
.pep-shop .woocommerce-result-count,
.pep-shop .woocommerce-ordering { display: none; }

/* ─── Hero compact ─── */
.pep-shop-hero {
  background: var(--cream, #fff);
  border-bottom: 1px solid var(--rule);
  padding: 22px 24px 40px; /* maquette : ~20px sous la nav fixe */
}
.pep-shop-hero-inner { max-width: 1400px; margin: 0 auto; }
.pep-shop-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 1.4px; margin-bottom: 16px;
}
.pep-shop-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green-v2);
}
.pep-shop-hero h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(30px, 4vw, 46px); font-weight: 800;
  color: var(--ink); letter-spacing: -0.02em; line-height: 1.05; margin: 0 0 14px;
}
.pep-shop-hero h1 em {
  font-family: 'Newsreader', serif; font-style: italic; font-weight: 500;
  color: var(--green-v2);
}
/* Maquette .hero-intro : sous-titre en Newsreader italique (retour client 23/07 ;
   pour revenir au style droit uniforme, retirer font-family/font-style). */
.pep-shop-hero p {
  font-family: 'Newsreader', serif; font-style: italic;
  font-size: clamp(16px, 1.25vw, 19px); color: var(--ink-soft); line-height: 1.55;
  max-width: 640px; margin: 0;
}

/* ─── Layout ─── */
.pep-shop .shop-layout {
  max-width: 1400px; margin: 0 auto; padding: 40px 24px;
  display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start;
}

/* ─── Sidebar ─── */
.pep-shop .sidebar { position: sticky; top: 88px; }
.admin-bar .pep-shop .sidebar { top: 120px; }
.pep-shop .sidebar-section { margin-bottom: 32px; }
.pep-shop .sidebar-section h4 {
  font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 14px;
}
.pep-shop .filter-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 14px; border-radius: 14px; border: none; background: none;
  cursor: pointer; text-align: left; font-size: 14px; font-weight: 500;
  color: var(--ink-soft); text-decoration: none; transition: all 0.2s; margin-bottom: 2px;
}
.pep-shop .filter-btn:hover { background: var(--cream-2, #f6f6f4); color: var(--ink); }
.pep-shop .filter-btn.active { background: var(--ink); color: #fff; font-weight: 700; }
.pep-shop .filter-btn .count { margin-left: auto; font-size: 12px; color: var(--ink-mute); }
.pep-shop .filter-btn.active .count { color: oklch(78% 0.02 250); }
.pep-shop .filter-thumb {
  width: 28px; height: 28px; border-radius: 6px; background: #fff;
  object-fit: contain; padding: 2px; flex-shrink: 0; border: 1px solid var(--rule);
}
.pep-shop .filter-thumb-all {
  width: 28px; height: 28px; border-radius: 6px; background: var(--green-v2); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.pep-shop .sidebar-divider { height: 1px; background: var(--rule); margin: 20px 0; }
.pep-shop .sidebar-note { font-size: 13px; color: var(--ink-mute); line-height: 1.6; }
.pep-shop .sidebar-cta {
  display: inline-flex; justify-content: center; width: 100%; margin-top: 12px;
  background: var(--green-v2); color: #fff; text-decoration: none;
  padding: 12px 16px; border-radius: 100px; font-size: 14px; font-weight: 600;
}
.pep-shop .sidebar-cta:hover { opacity: .92; }

/* ─── Toolbar ─── */
.pep-shop .shop-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.pep-shop .results-count {
  font-size: 12px; color: var(--ink-mute); text-transform: uppercase;
  letter-spacing: 1.6px; font-weight: 700;
}

/* ─── Grille produits ─── */
.pep-shop .products-grid-shop {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.pep-shop .product-card-shop {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--rule);
  box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
}
.pep-shop .product-card-shop:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.pep-shop .pcard-img {
  height: 200px; background: #fafaf8; position: relative; overflow: hidden; display: block;
}
.pep-shop .pcard-img img { width: 100%; height: 100%; object-fit: contain; padding: 20px; display: block; }
.pep-shop .pcard-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 5px 10px; border-radius: 100px; background: #f1efea; color: var(--ink-soft);
}
.pep-shop .pcard-new {
  position: absolute; top: 14px; right: 50px; z-index: 2;
  background: var(--green-v2); color: #fff; font-size: 10px; font-weight: 700;
  padding: 4px 9px; border-radius: 100px; white-space: nowrap;
}
.pep-shop .fave-btn {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 32px; height: 32px; border-radius: 50%; background: #fff; border: none;
  cursor: pointer; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center; transition: transform .2s;
  color: var(--ink-mute); padding: 0;
}
.pep-shop .fave-btn svg { width: 16px; height: 16px; }
.pep-shop .fave-btn:hover { transform: scale(1.15); }
.pep-shop .fave-btn.active { color: var(--terra); }
.pep-shop .fave-btn.active svg { fill: var(--terra); stroke: var(--terra); }

.pep-shop .pcard-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.pep-shop .pcard-cat {
  font-size: 11px; font-weight: 600; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px;
}
.pep-shop a.pcard-title {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 17px; font-weight: 800;
  color: var(--ink); margin-bottom: 8px; letter-spacing: -0.3px; text-decoration: none;
  display: block; line-height: 1.25;
}
.pep-shop a.pcard-title:hover { color: var(--green-v2); }
.pep-shop .pcard-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.6; flex: 1; }
.pep-shop .pcard-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pep-shop .pcard-tag {
  font-size: 11px; font-weight: 600; letter-spacing: -0.01em;
  background: #fff; border: 1px solid var(--rule); color: var(--ink-mute);
  padding: 4px 10px; border-radius: 100px; line-height: 1.3;
}

.pep-shop .pcard-footer {
  padding: 16px 20px; border-top: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.pep-shop .pcard-price {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; font-weight: 800;
  color: var(--ink); letter-spacing: -0.5px;
}
.pep-shop .pcard-price .amount,
.pep-shop .pcard-price .woocommerce-Price-amount,
.pep-shop .pcard-price bdi { font-weight: 800; color: var(--ink); }
.pep-shop .pcard-price small, .pep-shop .pcard-price .pcard-unit {
  font-size: 13px; font-weight: 500; color: var(--ink-mute);
}
.pep-shop .pcard-price del { font-size: 14px; color: var(--ink-mute); font-weight: 500; margin-right: 4px; }

/* Bouton ajouter au panier (WooCommerce AJAX) restylé */
.pep-shop .pcard-footer .button,
.pep-shop .pcard-footer .add_to_cart_button {
  background: var(--ink); color: #fff; border: none; border-radius: 100px;
  padding: 9px 16px; font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.2;
  display: inline-flex; align-items: center; transition: background .2s;
}
.pep-shop .pcard-footer .button:hover,
.pep-shop .pcard-footer .add_to_cart_button:hover { background: oklch(28% 0.04 250); color: #fff; }
.pep-shop .pcard-footer .added_to_cart { display: none; } /* on ouvre le drawer à la place */
.pep-shop .pcard-footer .add_to_cart_button.loading { opacity: .6; }

/* ─── Pagination ─── */
.pep-shop .woocommerce-pagination { margin-top: 36px; text-align: center; }
.pep-shop .woocommerce-pagination ul { display: inline-flex; gap: 6px; list-style: none; padding: 0; border: none; }
.pep-shop .woocommerce-pagination a, .pep-shop .woocommerce-pagination span {
  display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px;
  border: 1px solid var(--rule); border-radius: 10px; color: var(--ink); text-decoration: none;
}
.pep-shop .woocommerce-pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .pep-shop .products-grid-shop { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .pep-shop .shop-layout { grid-template-columns: 1fr; gap: 24px; }
  .pep-shop .sidebar { position: static; }
  /* Maquette mobile : les blocs Informations & Garanties restent visibles
     entre les filtres de catégories et les produits (retour client 23/07). */
}
@media (max-width: 560px) {
  /* Maquette mobile : un seul produit par ligne (retour client 23/07). */
  .pep-shop .products-grid-shop { grid-template-columns: 1fr; gap: 12px; }
  .pep-shop .pcard-body { padding: 14px; }
  .pep-shop .pcard-footer { padding: 12px 14px; flex-direction: column; align-items: stretch; gap: 10px; }
}
