/* ==========================================================================
   Les Encens de Cassou — Page boutique
   En-tête · catégories · barre d'outils · filtres actifs · grille · « Afficher plus »
   · panneau des filtres. Rappel : aucun effet de survol sur les cartes produits.
   ========================================================================== */

.shop [hidden] { display: none !important; }

/* ---- En-tête ---- */
.shop-hero {
  padding-block: clamp(28px, 4vw, 48px) clamp(26px, 3.5vw, 40px);
  background:
    radial-gradient(700px 260px at 85% 0%, rgba(234, 179, 90, .16), transparent 70%),
    linear-gradient(180deg, var(--c-sand), var(--c-cream));
  border-bottom: 1px solid var(--c-line);
}
.shop-hero .breadcrumb { margin-bottom: 22px; }
.shop-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-terracotta);
}
.shop-hero__eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--c-gold); }
.shop-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 4.6vw, 60px);
  font-weight: 600;
  line-height: 1.02;
  color: var(--c-cocoa-900);
  animation: shop-rise .6s var(--ease-out) both;
}
.shop-hero__title em { font-style: italic; color: var(--c-terracotta); }
.shop-hero__text { max-width: 62ch; margin: 14px 0 0; font-size: 16px; color: var(--c-muted); }

.shop-body { padding-block: clamp(24px, 3vw, 36px) clamp(64px, 8vw, 104px); }

/* ---- Catégories ---- */
.shop-cats { margin-bottom: 22px; }
.shop-cats__row { position: relative; }
.shop-cats__track {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 4px 2px 8px;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.shop-cats__track::-webkit-scrollbar { display: none; }
.shop-cats__track > li { flex: none; scroll-snap-align: start; }

.cat-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 8px 18px 8px 8px;
  border: 1px solid var(--c-line);
  border-radius: 16px;
  background: var(--c-paper);
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.cat-chip:hover { border-color: var(--c-gold); }
.cat-chip[aria-current="page"] {
  border-color: var(--c-cocoa-900);
  background: var(--c-cocoa-900);
  box-shadow: 0 12px 26px -18px rgba(43, 26, 18, .8);
}
.cat-chip__thumb {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px; height: 48px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(150deg, #9c5a2c, #3b2519);
  color: var(--c-saffron);
}
.cat-chip__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-chip__thumb svg { width: 22px; height: 22px; }
.cat-chip__letter { font-family: var(--font-display); font-size: 24px; font-style: italic; font-weight: 600; color: #fff8ee; }
.cat-chip--all .cat-chip__thumb { background: var(--c-sand); color: var(--c-terracotta); }
.cat-chip__text { display: flex; flex-direction: column; min-width: 0; }
.cat-chip__name { font-size: 14.5px; font-weight: 500; color: var(--c-cocoa-900); white-space: nowrap; }
.cat-chip__count { font-size: 12px; color: var(--c-muted); }
.cat-chip[aria-current="page"] .cat-chip__name { color: var(--c-cream); }
.cat-chip[aria-current="page"] .cat-chip__count { color: rgba(252, 246, 236, .7); }

.shop-cats__nav {
  position: absolute;
  top: calc(50% - 4px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  background: var(--c-paper);
  color: var(--c-cocoa-900);
  box-shadow: 0 8px 18px -10px rgba(43, 26, 18, .5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity .25s;
}
.shop-cats__nav svg { width: 17px; height: 17px; }
.shop-cats__nav--prev { left: -10px; }
.shop-cats__nav--next { right: -10px; }
.shop-cats__nav.is-visible { opacity: 1; pointer-events: auto; }

.shop-subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.subcat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--c-linen);
  border-radius: 999px;
  background: var(--c-paper);
  font-size: 13.5px;
  color: var(--c-cocoa-800);
  transition: border-color .2s, background .2s, color .2s;
}
.subcat:hover { border-color: var(--c-gold); color: var(--c-terracotta); }
.subcat[aria-current="page"] { border-color: var(--c-terracotta); background: rgba(180, 83, 42, .08); color: var(--c-terracotta); font-weight: 500; }
.subcat__count { font-size: 11.5px; color: var(--c-muted); }

/* ---- Barre d'outils ---- */
.shop-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--c-line);
  border-radius: 18px;
  background: var(--c-paper);
  box-shadow: 0 12px 30px -28px rgba(43, 26, 18, .6);
}
.shop-search { position: relative; display: flex; flex: 1; align-items: center; min-width: 0; }
.shop-search__icon { position: absolute; left: 16px; width: 19px; height: 19px; color: var(--c-muted); pointer-events: none; }
.shop-search__input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 46px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--c-cream);
  font-size: 15px;
  color: var(--c-ink);
  transition: border-color .2s, background .2s;
}
.shop-search__input::placeholder { color: #a8907f; }
.shop-search__input::-webkit-search-cancel-button { display: none; }
.shop-search__input:focus { outline: none; border-color: var(--c-gold); background: #fff; }
.shop-search__clear {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  color: var(--c-muted);
}
.shop-search__clear:hover { background: var(--c-sand); color: var(--c-terracotta); }
.shop-search__clear svg { width: 15px; height: 15px; }

.shop-sort { display: inline-flex; align-items: center; gap: 10px; flex: none; font-size: 13.5px; color: var(--c-muted); }
.shop-sort__select {
  height: 46px;
  padding: 0 40px 0 16px;
  border: 1px solid var(--c-linen);
  border-radius: 12px;
  background: var(--c-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23553525' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px;
  font: inherit;
  font-weight: 500;
  color: var(--c-cocoa-900);
  appearance: none;
  cursor: pointer;
}
.shop-sort__select:focus-visible { outline: 2px solid var(--c-amber); outline-offset: 2px; }

.shop-filters-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--c-cocoa-900);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-cream);
  transition: background .25s;
}
.shop-filters-btn:hover { background: var(--c-terracotta); }
.shop-filters-btn svg { width: 19px; height: 19px; }
.shop-filters-btn__count {
  display: grid;
  place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: linear-gradient(145deg, #eccb86, #c9a063);
  color: var(--c-cocoa-950);
  font-size: 11.5px;
  letter-spacing: 0;
  animation: shop-pop .35s var(--ease-out);
}

/* ---- Compteur et filtres actifs ---- */
.shop-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  min-height: 34px;
  margin: 20px 0 18px;
}
.shop-status__count { margin: 0; font-size: 14px; color: var(--c-muted); }
.shop-status__count strong { font-weight: 600; color: var(--c-cocoa-900); }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.afilter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 14px;
  border: 1px solid var(--c-linen);
  border-radius: 999px;
  background: var(--c-paper);
  font-size: 13px;
  color: var(--c-cocoa-800);
  animation: shop-rise .35s var(--ease-out) both;
  transition: border-color .2s, color .2s;
}
.afilter svg { width: 13px; height: 13px; color: var(--c-muted); transition: transform .3s var(--ease-out), color .2s; }
.afilter:hover { border-color: var(--c-terracotta); color: var(--c-terracotta); }
.afilter:hover svg { color: var(--c-terracotta); transform: rotate(90deg); }
.afilter--clear { border-style: dashed; background: transparent; font-weight: 500; }

/* ---- Grille ---- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: opacity .25s;
}
.shop-grid.is-loading { opacity: .45; pointer-events: none; }
.shop-grid > .pcard:not(.pcard--skeleton) {
  animation: card-in .55s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}

/* ---- État vide ---- */
.shop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(48px, 7vw, 88px) 24px;
  border: 1px dashed var(--c-linen);
  border-radius: 22px;
  background: radial-gradient(500px 200px at 50% 0%, rgba(234, 179, 90, .1), transparent 70%), var(--c-paper);
  text-align: center;
  animation: shop-rise .45s var(--ease-out) both;
}
.shop-empty__icon {
  display: grid;
  place-items: center;
  width: 72px; height: 72px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--c-sand);
  color: var(--c-terracotta);
}
.shop-empty__icon svg { width: 28px; height: 28px; }
.shop-empty__title { margin: 0; font-family: var(--font-display); font-size: clamp(26px, 2.6vw, 32px); font-weight: 600; color: var(--c-cocoa-900); }
.shop-empty__text { max-width: 46ch; margin: 10px 0 0; color: var(--c-muted); }
.shop-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.shop-empty__actions:empty { display: none; }

/* ---- « Afficher plus » ---- */
.shop-more { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 44px; }
.shop-more__progress { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0; font-size: 13px; color: var(--c-muted); }
.shop-more__bar { position: relative; width: 220px; height: 2px; overflow: hidden; border-radius: 2px; background: var(--c-linen); }
.shop-more__bar span {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--c-amber), var(--c-terracotta));
  transition: width .6s var(--ease-out);
}
.shop-more__btn { min-width: 280px; }

/* ==========================================================================
   Panneau des filtres (tiroir droit)
   ========================================================================== */
.filters { position: fixed; inset: 0; z-index: 205; visibility: hidden; transition: visibility 0s linear .5s; }
.filters.is-open { visibility: visible; transition-delay: 0s; }
.filters__overlay {
  position: absolute;
  inset: 0;
  background: rgba(31, 19, 13, .5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .5s var(--ease-out);
}
.filters.is-open .filters__overlay { opacity: 1; }
.filters__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(420px, 94vw);
  background: var(--c-cream);
  box-shadow: var(--shadow-lg);
  transform: translateX(104%);
  transition: transform .55s var(--ease-out);
}
.filters.is-open .filters__panel { transform: none; }
.filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px 16px 24px;
  border-bottom: 1px solid var(--c-line);
}
.filters__title { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--c-cocoa-900); }
.filters__close svg { transition: transform .35s var(--ease-out); }
.filters__close:hover svg { transform: rotate(90deg); }
.filters__body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; }
.filters__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--c-line);
  background: var(--c-sand);
}
.filters__reset {
  padding: 6px 0;
  border-bottom: 1px solid currentColor;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-cocoa-800);
}
.filters__reset:disabled { opacity: .4; cursor: default; }
.filters__apply { flex: 1; max-width: 240px; height: 50px; }

.fgroup { padding: 22px 0; border-bottom: 1px solid var(--c-line); }
.filters.is-open .fgroup { animation: shop-rise .45s var(--ease-out) both; }
.filters.is-open .fgroup:nth-child(2) { animation-delay: 50ms; }
.filters.is-open .fgroup:nth-child(3) { animation-delay: 100ms; }
.fgroup-list .fgroup:last-child { border-bottom: 0; }
.fgroup__title {
  margin: 0 0 14px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-cocoa-900);
}
.fgroup__body { display: grid; gap: 12px; }
.fcount { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--c-muted); }

/* Interrupteur */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14.5px; color: var(--c-cocoa-800); }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch__track { position: relative; flex: none; width: 40px; height: 22px; border-radius: 999px; background: var(--c-linen); transition: background .25s; }
.switch__track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(43, 26, 18, .3);
  transition: transform .3s var(--ease-out);
}
.switch input:checked + .switch__track { background: var(--c-terracotta); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--c-amber); outline-offset: 3px; }

/* Cases à cocher (marques) */
.checklist { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.check { display: flex; align-items: center; gap: 12px; padding: 7px 0; cursor: pointer; font-size: 14.5px; color: var(--c-cocoa-800); }
.check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.check__box {
  display: grid;
  flex: none;
  place-items: center;
  width: 20px; height: 20px;
  border: 1.5px solid var(--c-linen);
  border-radius: 6px;
  background: #fff;
  color: transparent;
  transition: background .2s, border-color .2s, color .2s;
}
.check__box svg { width: 13px; height: 13px; }
.check input:checked + .check__box { border-color: var(--c-terracotta); background: var(--c-terracotta); color: #fff; }
.check input:focus-visible + .check__box { outline: 2px solid var(--c-amber); outline-offset: 2px; }
.check.is-empty { color: var(--c-muted); }

/* Pastilles (senteur, intention) */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--c-linen);
  border-radius: 999px;
  background: var(--c-paper);
  font-size: 13.5px;
  color: var(--c-cocoa-800);
  transition: border-color .2s, background .2s, color .2s;
}
.pill:hover { border-color: var(--c-gold); }
.pill[aria-pressed="true"] { border-color: var(--c-cocoa-900); background: var(--c-cocoa-900); color: var(--c-cream); }
.pill__count { font-size: 11.5px; color: var(--c-muted); }
.pill[aria-pressed="true"] .pill__count { color: rgba(252, 246, 236, .7); }

/* Double curseur de prix */
.range { position: relative; height: 28px; margin: 4px 6px 0; }
.range__track { position: absolute; top: 50%; left: 0; right: 0; height: 4px; border-radius: 2px; background: var(--c-linen); transform: translateY(-50%); }
.range__fill {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--from, 0%);
  right: calc(100% - var(--to, 100%));
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c-amber), var(--c-terracotta));
}
.range__input {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  background: none;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}
.range__input::-webkit-slider-thumb {
  width: 22px; height: 22px;
  border: 2px solid var(--c-terracotta);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px -2px rgba(43, 26, 18, .4);
  cursor: grab;
  pointer-events: auto;
  -webkit-appearance: none;
}
.range__input::-moz-range-thumb {
  width: 18px; height: 18px;
  border: 2px solid var(--c-terracotta);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px -2px rgba(43, 26, 18, .4);
  cursor: grab;
  pointer-events: auto;
}
.range__input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--c-amber); outline-offset: 2px; }
.range__input::-webkit-slider-runnable-track { background: none; }
.range__input::-moz-range-track { background: none; }
.range__values { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--c-cocoa-900); }
.range__values span { color: var(--c-muted); font-weight: 400; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shop-toolbar { flex-wrap: wrap; }
  .shop-search { flex: 1 1 100%; }
  .shop-sort, .shop-filters-btn { flex: 1 1 0; min-width: 0; }
  .shop-sort__label { display: none; }
  .shop-sort__select { width: 100%; padding: 0 32px 0 14px; background-position: right 12px center; font-size: 14px; }
  .shop-filters-btn { justify-content: center; padding: 0 14px; }
  .shop-cats__nav { display: none; }
  .cat-chip { min-width: 0; padding-right: 14px; }
}
@media (max-width: 760px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .shop-cats__track { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .shop-more__btn { min-width: 0; width: 100%; }
}

@keyframes shop-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes shop-pop { from { transform: scale(.4); } to { transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
