/* ═══════════════════════════════════════════════════════════
   PAGE COLLECTION — HOME ZA · « Horticole moderne »
   Deep pine green + warm sage paper + vivid lime accent.
   Headings: Bricolage Grotesque · Body: Schibsted Grotesk.
   V10 : add-to-cart CTA TOUJOURS visible sur chaque carte.
   ═══════════════════════════════════════════════════════════ */

:root{
  --paper:#edefe6; --paper-2:#e4e7db; --white:#fff;
  --ink:#0e1711; --pine:#163a28; --pine-2:#1e4a33;
  --grass:#3f8a4a; --lime:#c4e83f; --lime-2:#d4f06a;
  --muted:#5b6b5e; --line:rgba(14,23,17,.14);
  --rdj-d:"Bricolage Grotesque",system-ui,sans-serif;
  --rdj-t:"Schibsted Grotesk",system-ui,sans-serif;
}

/* ─── BLINDAGE SVG : tailles cohérentes, jamais déformés ─── */
.wood-collection svg,
.wc-card svg,
.wc-toolbar svg,
.wc-value-prop svg,
.wc-empty svg{
  display:inline-block;vertical-align:middle;
  width:20px;height:20px;max-width:100%;max-height:100%;
  flex-shrink:0;fill:none;
}
.wc-card__badges svg,.wc-card__badge svg{width:12px;height:12px;}
.wc-card__wish svg{width:16px;height:16px;}
.wc-card__trust svg{width:13px;height:13px;}
.wc-card__cta svg{width:18px;height:18px;}
.wc-value-prop__icon svg{width:22px;height:22px;}

/* ─── RESET LOCAL ─── */
.wood-collection,
.wood-collection *,
.wood-collection *::before,
.wood-collection *::after{box-sizing:border-box;}
.wood-collection img{max-width:100%;display:block;}
html:has(.wood-collection),
body:has(.wood-collection){overflow-x:hidden;}

/* ═══════════════════════════════════════════
   WRAPPER
   ═══════════════════════════════════════════ */
.wood-collection{
  max-width:1320px;
  margin:0 auto;
  padding:clamp(20px,4vw,48px) clamp(16px,4vw,40px) 72px;
  font-family:var(--rdj-t);
  color:var(--ink);
  background:var(--paper);
  -webkit-font-smoothing:antialiased;
  line-height:1.5;
}

/* ═══════════════════════════════════════════
   HEADER COLLECTION
   ═══════════════════════════════════════════ */
.wc-collhead{
  margin-bottom:clamp(20px,3vw,32px);
}
.wc-collhead__title{
  font-family:var(--rdj-d);
  font-weight:800;
  letter-spacing:-.02em;
  line-height:1.04;
  color:var(--pine);
  font-size:clamp(2rem,5vw,3.4rem);
  margin:0 0 .35em;
}
.wc-collhead__sub{
  font-family:var(--rdj-t);
  color:var(--muted);
  font-size:clamp(1rem,1.6vw,1.18rem);
  line-height:1.6;
  max-width:62ch;
  margin:0;
}

/* ═══════════════════════════════════════════
   TOOLBAR + CHIPS DE TRI
   ═══════════════════════════════════════════ */
.wc-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:16px;
  padding:18px 0;
  margin-bottom:24px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.wc-toolbar__count{
  font-family:var(--rdj-t);
  color:var(--muted);
  font-size:.95rem;
}
.wc-toolbar__count strong{
  color:var(--ink);
  font-weight:700;
}

.wc-chips{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin:0;
  padding:0;
  list-style:none;
}
.wc-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:var(--rdj-t);
  font-weight:600;
  font-size:.9rem;
  line-height:1;
  color:var(--ink);
  background:var(--white);
  border:1px solid var(--line);
  border-radius:100px;
  padding:10px 16px;
  text-decoration:none;
  cursor:pointer;
  transition:background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease;
}
.wc-chip:hover{
  background:var(--paper-2);
  border-color:rgba(14,23,17,.26);
  transform:translateY(-1px);
}
.wc-chip.is-active,
.wc-chip[aria-current="true"]{
  background:var(--pine);
  color:#fff;
  border-color:var(--pine);
}
.wc-chip.is-active:hover{
  background:var(--pine-2);
  border-color:var(--pine-2);
}

/* ═══════════════════════════════════════════
   GRILLE PRODUITS
   ═══════════════════════════════════════════ */
/* Grille FORCÉE — le parent Shoptimizer impose float/width plus spécifiques */
.wood-collection .wc-grid.products,
.wood-collection ul.products,
body.tax-product_cat ul.products,
body.post-type-archive-product ul.products,
body.tax-product_tag ul.products{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:18px !important;
  margin:0 !important;
  padding:0 !important;
  list-style:none !important;
  width:auto !important;
  float:none !important;
}
.wood-collection ul.products::before,
.wood-collection ul.products::after{display:none !important;content:none !important;}

/* Cartes : annule le float/width du thème parent (sinon mise en page cassée) */
.wood-collection li.product,
li.product.wc-card{
  float:none !important;
  width:auto !important;
  min-width:0 !important;
  margin:0 !important;
  clear:none !important;
}

/* Masque le tri + compteur + titre WooCommerce PAR DÉFAUT (nos puces/titre les remplacent) */
.woocommerce-ordering,
.woocommerce-result-count,
.woocommerce-products-header__title,
.woocommerce-products-header .page-title{display:none !important;}

/* ═══════════════════════════════════════════
   CARTE PRODUIT
   ═══════════════════════════════════════════ */
.wc-card{
  display:flex;
  flex-direction:column;
  position:relative;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  list-style:none;
  margin:0;
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease;
}
.wc-card::before,
.wc-card::after{display:none;} /* neutralise pseudos du thème parent */
.wc-card:hover{
  transform:translateY(-4px);
  box-shadow:0 14px 30px -16px rgba(14,23,17,.32);
  border-color:rgba(14,23,17,.2);
}

.wc-card__link{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  color:inherit;
  text-decoration:none;
}

/* ── Média ── */
.wc-card__media{
  position:relative;
  aspect-ratio:1/1;
  overflow:hidden;
  background:var(--paper-2);
}
.wc-card__img,
.wc-card__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .5s cubic-bezier(.2,.7,.2,1);
}
.wc-card:hover .wc-card__img,
.wc-card:hover .wc-card__media img{
  transform:scale(1.05);
}

/* ── Badges ── */
.wc-card__badges{
  position:absolute;
  top:10px;
  left:10px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  z-index:2;
}
.wc-card__badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-family:var(--rdj-d);
  font-weight:700;
  font-size:.74rem;
  letter-spacing:-.01em;
  line-height:1;
  color:#fff;
  background:var(--pine);
  border-radius:6px;
  padding:6px 9px;
}
.wc-card__badge--promo{
  background:var(--lime);
  color:var(--ink);
  font-weight:800;
}

/* ── Wishlist (optionnel) ── */
.wc-card__wish{
  position:absolute;
  top:10px;
  right:10px;
  z-index:3;
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:rgba(255,255,255,.92);
  border:1px solid var(--line);
  color:var(--ink);
  cursor:pointer;
  transition:background .18s ease,color .18s ease,transform .18s ease;
}
.wc-card__wish:hover{transform:scale(1.08);}
.wc-card__wish.is-active{
  background:var(--lime);
  color:#c0392b;
  border-color:var(--lime);
}

/* ── Corps ── */
.wc-card__body{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:16px;
  flex:1 1 auto;
}
.wc-card__cat{
  font-family:var(--rdj-t);
  font-size:.7rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.09em;
  color:var(--grass);
}
.wc-card__title{
  font-family:var(--rdj-d);
  font-weight:700;
  letter-spacing:-.02em;
  font-size:1.05rem;
  line-height:1.28;
  color:var(--ink);
  margin:0;
  display:-webkit-box;
  -webkit-line-clamp:2;
  line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* ── Notation / étoiles ── */
.wc-card__rating{
  display:flex;
  align-items:center;
  gap:6px;
}
.wc-card__stars{
  display:inline-flex;
  align-items:center;
  color:var(--grass);
  line-height:1;
  font-size:.95rem;
  letter-spacing:.02em;
}
.wc-card__stars svg{color:var(--grass);}
.wc-card__rating-meta{
  font-family:var(--rdj-t);
  font-size:.82rem;
  color:var(--muted);
}

/* ── Prix ── */
.wc-card__price-row{
  display:flex;
  flex-direction:column;
  gap:3px;
  margin-top:2px;
}
.wc-card__price{
  font-family:var(--rdj-d);
  font-weight:700;
  letter-spacing:-.02em;
  font-size:1.18rem;
  color:var(--ink);
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:8px;
}
/* WooCommerce génère ins = prix actuel, del = ancien prix */
.wc-card__price .price{
  display:inline-flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:8px;
}
.wc-card__price ins,
.wc-card__price ins .amount{
  text-decoration:none;
  font-weight:700;
  color:var(--ink);
  background:transparent;
}
.wc-card__price del,
.wc-card__price del .amount{
  font-family:var(--rdj-t);
  font-weight:500;
  font-size:.9rem;
  color:var(--muted);
  text-decoration:line-through;
  opacity:1;
}
.wc-card__price .amount{font-family:var(--rdj-d);}
.wc-card__save{
  font-family:var(--rdj-t);
  font-size:.8rem;
  font-weight:700;
  color:var(--grass);
}
.wc-card__save .amount{font-weight:700;}

/* ── Mini ligne confiance ── */
.wc-card__trust{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:auto;
  padding-top:4px;
  font-family:var(--rdj-t);
  font-size:.78rem;
  color:var(--muted);
}
.wc-card__trust svg{color:var(--grass);}

/* ═══════════════════════════════════════════
   CTA AJOUTER AU PANIER — TOUJOURS VISIBLE (V10)
   ═══════════════════════════════════════════ */
.wc-card__cta,
.wc-card__cta.button{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:calc(100% - 32px);
  margin:auto 16px 16px;
  min-height:46px;
  padding:12px 16px;
  font-family:var(--rdj-d);
  font-weight:700;
  font-size:.94rem;
  letter-spacing:-.01em;
  line-height:1;
  color:var(--paper);
  background:var(--ink);
  border:none;
  border-radius:8px;
  text-decoration:none;
  cursor:pointer;
  transition:background .18s ease,transform .18s ease,box-shadow .18s ease;
}
.wc-card__cta:hover,
.wc-card__cta.button:hover{
  background:var(--pine);
  color:var(--paper);
  transform:translateY(-1px);
  box-shadow:0 8px 18px -10px rgba(14,23,17,.6);
}
.wc-card__cta:active{transform:translateY(0);}
.wc-card__cta svg{
  color:currentColor;
  stroke:currentColor;
}
.wc-card__cta span{display:inline-block;}
.wc-card__cta-arrow{
  display:inline-flex;
  align-items:center;
  transition:transform .18s ease;
}
.wc-card__cta:hover .wc-card__cta-arrow{transform:translateX(3px);}

/* État confirmé (ajout AJAX) */
.wc-card__cta.added,
.wc-card__cta.button.added{
  background:var(--grass);
  color:#fff;
}
.wc-card__cta.added:hover{
  background:var(--pine-2);
  color:#fff;
}
/* Lien « voir le panier » que Woo injecte après .added : masqué */
.wc-card__cta.added + .added_to_cart,
.wc-card .added_to_cart{display:none;}
/* État de chargement AJAX */
.wc-card__cta.loading{opacity:.75;pointer-events:none;}

/* ═══════════════════════════════════════════
   VALUE PROPS (bandeau confiance)
   ═══════════════════════════════════════════ */
.wc-value-props{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-top:48px;
  padding-top:40px;
  border-top:1px solid var(--line);
}
.wc-value-prop{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:12px;
}
.wc-value-prop__icon{
  flex:0 0 auto;
  width:46px;
  height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:var(--pine);
  color:var(--lime);
}
.wc-value-prop__icon svg{color:var(--lime);stroke:currentColor;}
.wc-value-prop__txt{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.wc-value-prop__txt strong{
  font-family:var(--rdj-d);
  font-weight:700;
  letter-spacing:-.01em;
  font-size:.98rem;
  color:var(--ink);
}
.wc-value-prop__txt span{
  font-family:var(--rdj-t);
  font-size:.82rem;
  line-height:1.4;
  color:var(--muted);
}

/* ═══════════════════════════════════════════
   ÉTAT VIDE
   ═══════════════════════════════════════════ */
.wc-empty{
  text-align:center;
  padding:64px 20px;
  color:var(--muted);
  font-family:var(--rdj-t);
}
.wc-empty svg{
  width:42px;height:42px;
  color:var(--grass);
  margin-bottom:12px;
}
.wc-empty h2,
.wc-empty p:first-of-type{
  font-family:var(--rdj-d);
  font-weight:700;
  letter-spacing:-.02em;
  color:var(--ink);
  font-size:1.3rem;
  margin:0 0 8px;
}
.wc-empty p{margin:0 0 14px;}
.wc-empty .wc-chip{justify-content:center;}

/* ═══════════════════════════════════════════
   BULLES — NEUTRALISÉES (aucun effet animé)
   ═══════════════════════════════════════════ */
.wc-bubbles,
.wc-bubble{display:none !important;}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
/* 700–1099 : 3 colonnes */
@media (max-width:1099px){
  .wood-collection .wc-grid.products,
  .wood-collection ul.products,
  body.tax-product_cat ul.products,
  body.post-type-archive-product ul.products,
  body.tax-product_tag ul.products{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
}

/* ≤699 : 2 colonnes */
@media (max-width:699px){
  .wood-collection{padding-bottom:56px;}
  .wood-collection .wc-grid.products,
  .wood-collection ul.products,
  body.tax-product_cat ul.products,
  body.post-type-archive-product ul.products,
  body.tax-product_tag ul.products{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:12px !important;}

  .wc-card__body{padding:12px;gap:6px;}
  .wc-card__title{font-size:.96rem;}
  .wc-card__price{font-size:1.06rem;}

  /* CTA reste visible et tappable */
  .wc-card__cta,
  .wc-card__cta.button{
    width:calc(100% - 24px);
    margin:auto 12px 12px;
    min-height:44px;
    font-size:.86rem;
    padding:11px 12px;
    gap:6px;
  }

  .wc-toolbar{padding:14px 0;margin-bottom:18px;}
  .wc-chip{font-size:.84rem;padding:9px 13px;}

  /* Value props : 2 colonnes */
  .wc-value-props{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    margin-top:36px;
    padding-top:28px;
  }
  .wc-value-prop{padding:14px;gap:10px;}
  .wc-value-prop__icon{width:40px;height:40px;}
}

/* Très petits écrans : value props sur 1 colonne */
@media (max-width:420px){
  .wc-value-props{grid-template-columns:1fr;}
}

/* Confort tactile : pas d'effets de survol scale */
@media (hover:none){
  .wc-card:hover{transform:none;}
  .wc-card:hover .wc-card__img,
  .wc-card:hover .wc-card__media img{transform:none;}
}

/* ═══════════════════════════════════════════
   FIX ALIGNEMENT — cartes de hauteur égale, CTA aligné en bas,
   bouton cohérent avec la fiche produit (encre, coins 8px)
   ═══════════════════════════════════════════ */
.wood-collection .wc-grid.products,
.wood-collection ul.products,
body.tax-product_cat ul.products,
body.post-type-archive-product ul.products,
body.tax-product_tag ul.products{align-items:stretch !important;}
.wc-card,
li.product.wc-card{height:100% !important;}
.wc-card__link{flex:1 1 auto !important;}

/* CTA — le thème parent Shoptimizer le cache au survol (position/opacity) et
   le désaligne : on le force TOUJOURS visible, en flux, aligné en bas, encre. */
.wc-card__cta,
.wc-card__cta.button,
.wood-collection li.product a.button.add_to_cart_button,
.wood-collection li.product a.button{
  position:static !important;
  opacity:1 !important;
  visibility:visible !important;
  transform:none !important;
  pointer-events:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  width:calc(100% - 28px) !important;
  margin:auto 14px 14px !important;
  min-height:46px !important;
  padding:12px 16px !important;
  background:var(--ink) !important;
  color:var(--paper) !important;
  border:none !important;
  border-radius:8px !important;
  box-shadow:0 6px 16px -10px rgba(14,23,17,.55) !important;
  font-family:var(--rdj-d) !important;
  font-weight:700 !important;
  font-size:.92rem !important;
}
.wc-card__cta:hover,
.wc-card__cta.button:hover,
.wood-collection li.product a.button:hover{background:var(--pine) !important;color:var(--paper) !important;transform:translateY(-1px) !important;}
.wc-card__cta.added,
.wc-card__cta.button.added{background:var(--grass) !important;color:#fff !important;}
.wc-card__cta svg,.wood-collection li.product a.button svg{width:18px !important;height:18px !important;stroke:currentColor;}
/* le lien-carte ne mange pas tout l'espace -> le CTA peut s'aligner en bas */
.wc-card__link{flex:0 1 auto !important;}
.wc-card__body{flex:1 1 auto !important;}

/* Cartes un peu plus larges sur mobile (gouttière + padding réduits) */
@media (max-width:699px){
  .wood-collection{padding-left:12px !important;padding-right:12px !important;}
  .wood-collection .wc-grid.products,
  .wood-collection ul.products,
  body.tax-product_cat ul.products,
  body.post-type-archive-product ul.products{gap:10px !important;}
  .wc-card__cta,.wc-card__cta.button{width:calc(100% - 20px) !important;margin:auto 10px 10px !important;}
}
