/* =============================================================================
   Boutique / Catégorie Plein Sud — sidebar filtres + grille (maquette « Soin visage »)
   ============================================================================= */

/* Bannière image Blusho (breadcrumb sur photo) : masquée sur boutique + catégories
   (on a notre propre en-tête + fil d'ariane, comme la maquette). */
.woocommerce-shop .blusho-breadcrumb-wrapper,
.tax-product_cat .blusho-breadcrumb-wrapper,
.post-type-archive-product .blusho-breadcrumb-wrapper { display: none; }

.ps-shop__inner { max-width: var(--ps-content); margin: 0 auto; padding: 28px 20px 64px; box-sizing: border-box; }
.ps-shop__inner * { box-sizing: border-box; }

.ps-shop .ps-breadcrumb { font-size: 13px; color: var(--ps-muted); margin-bottom: 20px; }
.ps-shop .ps-breadcrumb a { color: var(--ps-muted); text-decoration: none; }
.ps-shop .ps-breadcrumb a:hover { color: var(--ps-gold); }
.ps-shop .ps-breadcrumb .sep { margin: 0 8px; color: var(--ps-line); }

.ps-shop__head { margin-bottom: 28px; }
.ps-shop__eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--ps-terracotta); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 10px; }
.ps-shop__eyebrow svg { width: 16px; height: 16px; }
.ps-shop__title { font-family: var(--ps-font-heading); font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; color: var(--ps-ink); margin: 0 0 10px; }
.ps-shop__sub { font-size: 15px; line-height: 1.6; color: var(--ps-muted); max-width: 620px; margin: 0; }

/* Layout : sidebar + grille */
.ps-shop__layout { display: grid; grid-template-columns: 282px 1fr; gap: 40px; align-items: start; }

/* ---------------------------------------------------------------- Sidebar --- */
.ps-filters { border: 1px solid var(--ps-line); border-radius: 16px; padding: 22px 20px; background: #fff; }
.ps-filters__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.ps-filters__head h2 { font-family: var(--ps-font-heading); font-size: 22px; color: var(--ps-ink); margin: 0; }
.ps-filters__clear { font-size: 13px; color: var(--ps-terracotta); text-decoration: none; }
.ps-filters__clear:hover { text-decoration: underline; }

.ps-filters__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.ps-chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: var(--ps-radius-pill); text-decoration: none;
  background: rgba(var(--ps-gold-rgb), .14); color: var(--ps-gold-dark);
}
.ps-chip span { font-size: 14px; line-height: 1; opacity: .7; }
.ps-chip:hover { background: rgba(var(--ps-gold-rgb), .24); }

.ps-fgroup { padding: 20px 0; border-top: 1px solid var(--ps-line); }
.ps-fgroup__title { font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ps-ink); margin: 0 0 15px; }
.ps-fgroup__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }

/* Cases à cocher / radios custom */
.ps-check { display: flex; align-items: center; gap: 11px; font-size: 15px; color: var(--ps-ink); cursor: pointer; }
.ps-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.ps-check__box { width: 21px; height: 21px; flex: 0 0 auto; border: 1.5px solid var(--ps-line); border-radius: 6px; position: relative; transition: border-color .15s, background .15s; }
.ps-check--radio .ps-check__box { border-radius: 50%; }
.ps-check input:checked + .ps-check__box { background: var(--ps-gold); border-color: var(--ps-gold); }
.ps-check input:checked + .ps-check__box::after {
  content: ""; position: absolute; left: 6px; top: 3px; width: 6px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
/* Radio : cercle contour or + point or (pas de fond plein), comme la maquette */
.ps-check--radio input:checked + .ps-check__box { background: #fff; border-color: var(--ps-gold); }
.ps-check--radio input:checked + .ps-check__box::after { left: 50%; top: 50%; width: 11px; height: 11px; border: 0; border-radius: 50%; background: var(--ps-gold); transform: translate(-50%, -50%); }
.ps-check input:focus-visible + .ps-check__box { outline: 2px solid var(--ps-gold); outline-offset: 2px; }
.ps-check__label { flex: 1; display: inline-flex; align-items: center; gap: 6px; }
.ps-check__label .ps-stars { font-size: 14px; }
.ps-check__count { font-size: 14px; color: var(--ps-muted); }

/* Slider prix (double curseur) — les 2 inputs range se superposent à la piste custom,
   piste native transparente, poignées visibles alignées sur la piste. */
.ps-price { position: relative; }
.ps-price__slider { position: relative; height: 20px; margin: 6px 0 14px; }
.ps-price__track { position: absolute; top: 50%; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--ps-line); transform: translateY(-50%); }
.ps-price__fill { position: absolute; top: 0; bottom: 0; background: var(--ps-gold); border-radius: 4px; }
.ps-price__range { position: absolute; top: 0; left: 0; width: 100%; height: 20px; margin: 0; padding: 0; border: 0 !important; box-shadow: none !important; background: transparent !important; outline: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.ps-price__range:focus { outline: none; }
.ps-price__range::-webkit-slider-runnable-track { -webkit-appearance: none; height: 20px; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.ps-price__range::-moz-range-track { height: 20px; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.ps-price__range::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--ps-gold); box-shadow: 0 2px 6px rgba(42,39,36,.18); cursor: pointer; }
.ps-price__range::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--ps-gold); box-shadow: 0 2px 6px rgba(42,39,36,.18); cursor: pointer; }
.ps-price__range--min { z-index: 3; }
.ps-price__range--max { z-index: 4; }
.ps-price__vals { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ps-muted); }

/* Carte conseil (olive) */
.ps-filters__advice { margin-top: 24px; background: var(--ps-olive); color: #fff; border-radius: 16px; padding: 26px 24px; }
.ps-filters__advice h4 { font-family: var(--ps-font-heading); font-size: 20px; font-weight: 400; letter-spacing: .01em; margin: 0 0 10px; color: #fff; }
.ps-filters__advice p { font-size: 14px; line-height: 1.55; color: rgba(255,255,255,.82); margin: 0 0 18px; }
.ps-filters__advice .ps-btn-white {
  display: block; text-align: center; background: #fff; color: var(--ps-ink);
  font-size: 14.5px; font-weight: 600; text-decoration: none; text-transform: none;
  padding: 13px 20px; border-radius: var(--ps-radius-pill); transition: background .15s, color .15s;
}
.ps-filters__advice .ps-btn-white:hover { background: var(--ps-cream); color: var(--ps-gold-dark); }

/* Éléments réservés au mobile (bouton Filtres, fermer, overlay, appliquer) */
.ps-filterbtn, .ps-filters__close, .ps-filters__apply, .ps-filters__overlay { display: none; }

/* ---------------------------------------------------------------- Toolbar --- */
.ps-shop__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.ps-shop__count { font-size: 14px; color: var(--ps-muted); }
.ps-shop__count strong { color: var(--ps-ink); }
.ps-shop__tools { display: flex; align-items: center; gap: 14px; }
.ps-sort { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ps-line); border-radius: var(--ps-radius-pill); padding: 8px 14px; font-size: 13.5px; color: var(--ps-muted); }
.ps-sort__select { border: 0; background: none; font: inherit; color: var(--ps-ink); cursor: pointer; padding-right: 4px; }
.ps-view { display: inline-flex; border: 1px solid var(--ps-line); border-radius: 10px; overflow: hidden; }
.ps-view__btn { width: 40px; height: 40px; border: 0; background: #fff; color: var(--ps-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ps-view__btn svg { width: 18px; height: 18px; fill: none !important; stroke: currentColor !important; }
.ps-view__btn.is-active { background: var(--ps-ink); color: #fff; }

/* ---------------------------------------------------------------- Grille --- */
.ps-shop__main .ps-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ps-products--list { grid-template-columns: 1fr !important; }
.ps-shop__empty { padding: 40px 0; color: var(--ps-muted); font-size: 15px; }

/* Pagination */
.ps-shop__pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.ps-shop__pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--ps-line); border-radius: 10px; text-decoration: none; color: var(--ps-ink); font-size: 14px;
}
.ps-shop__pagination .page-numbers.current { background: var(--ps-gold); border-color: var(--ps-gold); color: #fff; }
.ps-shop__pagination a.page-numbers:hover { border-color: var(--ps-gold); color: var(--ps-gold); }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 991px) {
  /* Résultats en pleine largeur ; filtres dans un tiroir off-canvas */
  .ps-shop__layout { grid-template-columns: 1fr; gap: 0; }

  .ps-filterbtn {
    display: inline-flex; align-items: center; gap: 8px; order: -1;
    border: 1px solid var(--ps-line); border-radius: var(--ps-radius-pill);
    background: #fff; color: var(--ps-ink); font: inherit; font-size: 14px; font-weight: 600;
    padding: 9px 16px; cursor: pointer;
  }
  .ps-filterbtn svg { width: 17px; height: 17px; fill: none !important; stroke: currentColor !important; }
  .ps-filterbtn__badge { font-style: normal; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--ps-gold); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

  /* Tiroir */
  .ps-filters {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 1001;
    width: min(360px, 90vw); max-height: 100vh; overflow-y: auto;
    border: 0; border-radius: 0; padding: 20px 20px 96px;
    transform: translateX(-100%); transition: transform .28s ease; visibility: hidden;
  }
  .ps-filters.is-open { transform: translateX(0); visibility: visible; }

  .ps-filters__overlay { display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(42,39,36,.45); opacity: 0; visibility: hidden; transition: opacity .28s; }
  body.ps-filters-open .ps-filters__overlay { opacity: 1; visibility: visible; }
  body.ps-filters-open { overflow: hidden; }

  .ps-filters__head { position: relative; }
  .ps-filters__close { display: inline-flex; align-items: center; justify-content: center; position: absolute; top: -2px; right: -2px; width: 34px; height: 34px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--ps-muted); cursor: pointer; }
  .ps-filters__clear { margin-right: 36px; }

  /* Barre d'action fixée en bas du tiroir (le transform du tiroir la contient,
     donc elle suit l'ouverture/fermeture et reste toujours visible sans chevauchement). */
  .ps-filters__apply {
    display: block; position: fixed; bottom: 0; left: 0; width: min(360px, 90vw); box-sizing: border-box; margin: 0; z-index: 2;
    border: 0; border-top: 1px solid var(--ps-line); background: var(--ps-gold); color: #fff;
    font: inherit; font-size: 15px; font-weight: 600; padding: 16px; cursor: pointer;
  }

  .ps-shop__main .ps-products { grid-template-columns: repeat(2, 1fr); }
  .ps-shop__toolbar { flex-wrap: wrap; }
}
@media (max-width: 575px) {
  .ps-shop__main .ps-products { grid-template-columns: 1fr; }
  .ps-shop__count { order: 1; }
}
