/* ============================================================
   AVENUE BELMONT — PAGE MONTRES (ARCHIVE PRODUIT)
   ============================================================ */

.ab-shop {
  padding-bottom: var(--space-24);
}

/* ══════════════════════════════════════════
   HERO PAGE MONTRES — image plein cadre, texte à gauche
══════════════════════════════════════════ */
.ab-shop-hero {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  /* #ab-content a un padding-top de 80px (hauteur du header fixe) : sans en
     tenir compte, 85vh laissait toujours une bande de la section suivante
     visible en bas d'écran (ligne de flottaison "coupée"). */
  height: calc(100vh - 80px);
  min-height: 520px;
  padding: 16px;
  background-color: #000;
  overflow: hidden;
}

/* Calque image dédié : permet de zoomer (transform) le fond indépendamment
   du texte/CTA, sans jamais risquer de bande vide (contrairement à un
   background-size en pourcentage fixe, qui dépend du ratio de l'écran). */
.ab-shop-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-img);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* L'image <img> reste dans le DOM pour le SEO mais n'occupe pas la mise en page */
.ab-shop-hero__img {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Voile dégradé gauche → lisibilité du texte sur l'image */
.ab-shop-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.85) 0%,
    rgba(0,0,0,0.55) 35%,
    rgba(0,0,0,0.15) 60%,
    rgba(0,0,0,0) 100%
  );
  pointer-events: none;
}

.ab-shop-hero__text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 560px;
}

.ab-shop-hero__text .type-h1 {
  color: #fff !important;
  margin: 0;
}

.ab-shop-hero__subtitle {
  color: #fff !important;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.5;
  max-width: 460px;
  margin: 0;
}

/* Deux variantes d'accroche (desktop / mobile) : un seul <p> visible selon la
   largeur d'écran, bascule au même point de rupture que l'image (≤768px). */
.ab-shop-hero__subtitle--mobile { display: none; }

.ab-shop-hero__cta {
  margin-top: 0.5rem;
  align-self: flex-start;
}

/* ══════════════════════════════════════════
   RÉASSURANCE — dans le hero (texte clair, lisible sur l'image).
   Volontairement minimal : seul le titre est visible, souligné pour
   signaler qu'il est cliquable et qu'une info apparaît au survol.
══════════════════════════════════════════ */
.ab-shop-hero__reassurance {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(2rem, 6vh, 4rem);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: var(--space-6) clamp(1rem, 4vw, 2.5rem) var(--space-3);
  /* Voile bas indépendant du dégradé gauche→droite du hero : garantit la
     lisibilité du texte clair quelle que soit la zone de l'image en dessous. */
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);
}

.ab-shop-hero__reassurance-link {
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.ab-shop-hero__reassurance-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.5);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}
.ab-shop-hero__reassurance-link:hover .ab-shop-hero__reassurance-title,
.ab-shop-hero__reassurance-link:focus-visible .ab-shop-hero__reassurance-title {
  text-decoration-color: #fff;
}

.ab-shop-hero__reassurance-proof {
  position: absolute;
  left: 50%;
  bottom: 100%;
  margin-bottom: 8px;
  width: max-content;
  max-width: 220px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}
.ab-shop-hero__reassurance-link:hover .ab-shop-hero__reassurance-proof,
.ab-shop-hero__reassurance-link:focus-visible .ab-shop-hero__reassurance-proof {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Le premier et le dernier point sont proches des bords : on évite que leur
   info ne déborde hors de l'écran. */
.ab-shop-hero__reassurance li:first-child .ab-shop-hero__reassurance-proof {
  left: 0;
  transform: translateY(4px);
}
.ab-shop-hero__reassurance li:first-child .ab-shop-hero__reassurance-link:hover .ab-shop-hero__reassurance-proof,
.ab-shop-hero__reassurance li:first-child .ab-shop-hero__reassurance-link:focus-visible .ab-shop-hero__reassurance-proof {
  transform: translateY(0);
}
.ab-shop-hero__reassurance li:last-child .ab-shop-hero__reassurance-proof {
  left: auto;
  right: 0;
  transform: translateY(4px);
}
.ab-shop-hero__reassurance li:last-child .ab-shop-hero__reassurance-link:hover .ab-shop-hero__reassurance-proof,
.ab-shop-hero__reassurance li:last-child .ab-shop-hero__reassurance-link:focus-visible .ab-shop-hero__reassurance-proof {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .ab-shop-hero__reassurance {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-4) 1.25rem var(--space-2);
    bottom: var(--space-4);
  }
  .ab-shop-hero__reassurance-title { font-size: 0.75rem; }
  /* Pas de survol fiable au tactile : sur mobile, seul le titre reste
     (cliquable), l'info qui apparaît au hover sur desktop est retirée. */
  .ab-shop-hero__reassurance-proof { display: none; }
}

@media (max-width: 400px) {
  .ab-shop-hero__reassurance { gap: var(--space-1); }
  .ab-shop-hero__reassurance-title { font-size: 0.7rem; }
}

/* ══════════════════════════════════════════
   BARRE DE FILTRES
══════════════════════════════════════════ */
.ab-shop__filters {
  /* Reste à sa place dans la page au scroll (pas de sticky) — sur desktop
     comme sur mobile. */
  position: static;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-grey-200);
}

.ab-shop__filters-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-3) clamp(1rem, 4vw, 2.5rem);
  flex-wrap: wrap;
}

.ab-shop__filters-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ── Bouton Filtrer (ouvre le drawer) ── */
.ab-shop__filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-black);
  padding: 0.5rem 0.25rem;
  transition: opacity var(--transition-fast);
}
.ab-shop__filter-toggle:hover { opacity: 0.6; }
.ab-shop__filter-toggle svg { flex-shrink: 0; }

/* Petit séparateur vertical après le bouton Filtrer */
.ab-shop__divider {
  width: 1px;
  height: 22px;
  background: var(--color-grey-300);
  margin: 0 0.4rem;
}

/* ── Flèche animée (Lottie) ── */
.ab-filter__arrow {
  display: inline-flex;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.ab-filter__arrow svg { display: block; width: 100%; height: 100%; }

/* ── Dropdown filtre ── */
.ab-filter {
  position: relative;
}

.ab-filter__btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: 1px solid var(--color-grey-300);
  border-radius: 99px;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-black);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.ab-filter__btn:hover {
  border-color: var(--color-grey-600);
}

.ab-filter.is-open .ab-filter__btn {
  background: #C7C7C7;
  border-color: #C7C7C7;
  color: var(--color-black);
}

/* Filtre actif (une valeur sélectionnée) — reste visible même fermé */
.ab-filter.is-active .ab-filter__btn {
  background: var(--color-black);
  border-color: var(--color-black);
  color: var(--color-white);
  font-weight: 600;
}
/* Si le filtre actif est aussi ouvert, on garde le gris d'ouverture pour distinguer l'état */
.ab-filter.is-active.is-open .ab-filter__btn {
  background: #C7C7C7;
  border-color: #C7C7C7;
  color: var(--color-black);
}

.ab-filter__btn svg {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.ab-filter.is-open .ab-filter__btn svg {
  transform: rotate(180deg);
}

.ab-filter__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: var(--color-white);
  border: 1px solid var(--color-grey-200);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 10;
  max-height: 320px;
  overflow-y: auto;
}

.ab-filter.is-open .ab-filter__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Le panneau du tri (à droite) s'aligne sur le bord droit */
.ab-filter--sort .ab-filter__panel {
  left: auto;
  right: 0;
}

.ab-filter__option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2);
  cursor: pointer;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-grey-800);
  transition: background var(--transition-fast);
}

.ab-filter__option:hover {
  background: var(--color-grey-100);
}

.ab-filter__option input {
  accent-color: var(--color-primary-mid);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.ab-filter__empty {
  font-size: 0.8rem;
  color: var(--color-grey-500);
  padding: var(--space-2);
}

/* ── Reset ── */
.ab-shop__reset {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-primary-mid);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.5rem 0.25rem;
}

.ab-shop__reset:hover { color: var(--color-primary); }

/* ── Droite : compteur + tri ── */
.ab-shop__filters-right {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.ab-shop__count {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-grey-500);
  white-space: nowrap;
}

.ab-shop__sort {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-black);
  background: var(--color-white);
  border: 1px solid var(--color-grey-300);
  border-radius: 99px;
  padding: 0.5rem 2rem 0.5rem 1.1rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%230d0d0d' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.ab-shop__sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.ab-shop__sort-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-grey-500);
  white-space: nowrap;
}

/* ══════════════════════════════════════════
   DRAWER FILTRES (glisse depuis la gauche)
══════════════════════════════════════════ */
.ab-filter-drawer {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-modal, 1000);
  visibility: hidden;
  pointer-events: none;
}
.admin-bar .ab-filter-drawer { top: 112px; }
@media screen and (max-width: 782px) { .admin-bar .ab-filter-drawer { top: 126px; } }
.ab-filter-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.ab-filter-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ab-filter-drawer.is-open .ab-filter-drawer__overlay { opacity: 1; }

.ab-filter-drawer__panel {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: min(360px, 86vw);
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}
.ab-filter-drawer.is-open .ab-filter-drawer__panel { transform: translateX(0); }

.ab-filter-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-5);
  border-bottom: 1px solid var(--color-grey-200);
}
.ab-filter-drawer__title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-black);
}
.ab-filter-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-black);
  display: inline-flex;
  padding: 4px;
}
.ab-filter-drawer__close:hover { opacity: 0.6; }

.ab-filter-drawer__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow-y: auto;
}
/* Dans le drawer, les filtres sont empilés et toujours déployés */
.ab-filter-drawer__body .ab-filter { width: 100%; }
.ab-filter-drawer__body .ab-filter__panel {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  border: none;
  padding: var(--space-2) 0 0;
  min-width: 0;
  max-height: none;
}
.ab-filter-drawer__body .ab-filter__arrow { display: none; }
.ab-filter-drawer__body .ab-filter__btn {
  width: 100%;
  justify-content: space-between;
  border: none;
  border-bottom: 1px solid var(--color-grey-200);
  border-radius: 0;
  padding: 0.6rem 0;
  pointer-events: none;
  font-size: 0.85rem;
}

/* ══════════════════════════════════════════
   GRILLE PRODUITS
══════════════════════════════════════════ */
.ab-shop__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 340px);
  justify-content: center;
  gap: clamp(3rem, 5vw, 4.5rem) clamp(2rem, 3vw, 3rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  transition: opacity 0.25s ease;
  scroll-margin-top: 140px; /* évite que l'ancre #ab-shop-grid s'arrête sous la barre de filtres sticky */
}

/* Cards identiques à la home : largeur fixe 340px */
.ab-shop__grid .ab-product-card {
  width: 340px;
}

/* Le CTA reste contenu dans la card (sinon le padding 81px déborde
   et les boutons de cards voisines se chevauchent) */
.ab-shop__grid .ab-product-card .btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Le badge "Vendu" est dans components/product-card.css (partagé home + shop) */

/* ── État vide ── */
.ab-shop__empty {
  text-align: center;
  padding: clamp(4rem, 8vw, 7rem) 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.ab-shop__empty p.type-h3 { margin: 0; }
.ab-shop__empty p.type-body { margin: 0; color: var(--color-grey-500); max-width: 420px; }

/* ── Charger plus ── */
.ab-shop__load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: clamp(3rem, 6vw, 5rem);
}

/* ══════════════════════════════════════════
   MODÈLE INTROUVABLE ? → RECHERCHE SUR MESURE
   Fond sombre éditorial (même famille que la section "Comment ça
   fonctionne" de /recherche-sur-mesure/) : crée une continuité visuelle
   avec la page vers laquelle on redirige. Toujours visible sous la
   grille — filet de sécurité, pas un état d'erreur.
══════════════════════════════════════════ */
.ab-shop-sourcing-cta {
  background: var(--color-primary, #290B0B);
  padding: clamp(4rem, 8vw, 6rem) clamp(1.5rem, 5vw, 3rem);
  text-align: center;
}

.ab-shop-sourcing-cta__title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin: 0 auto var(--space-4);
  max-width: 640px;
}

.ab-shop-sourcing-cta__text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  max-width: 480px;
  margin: 0 auto clamp(2rem, 4vw, 2.75rem);
}

.ab-shop-sourcing-cta__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

/* CTA fort : blanc plein, contraste maximal sur le fond sombre */
.ab-shop-sourcing-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--color-primary, #290B0B);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 40px;
  border-radius: 3px;
  transition: background 0.25s ease, transform 0.2s ease;
}
.ab-shop-sourcing-cta__btn:hover {
  background: rgba(255,255,255,0.85);
  transform: translateY(-1px);
}

/* Lien discret : simple soulignement animé, pas de bouton */
.ab-shop-sourcing-cta__link {
  position: relative;
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding-bottom: 2px;
}
.ab-shop-sourcing-cta__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.7);
  transform-origin: right;
  transform: scaleX(1);
  transition: transform 0.3s ease;
}
.ab-shop-sourcing-cta__link:hover {
  color: #fff;
}
.ab-shop-sourcing-cta__link:hover::after { transform-origin: left; transform: scaleX(0); }
.ab-shop-sourcing-cta__link .arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}
.ab-shop-sourcing-cta__link:hover .arrow { transform: translateX(3px); }

@media (max-width: 540px) {
  .ab-shop-sourcing-cta__btn { width: 100%; }
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */

/* ── Tablette (≤ 1024px) ── */
@media (max-width: 1024px) {
  .ab-shop-hero {
    height: 70vh;
  }
  /* Grille fluide : autant de colonnes de ≥240px que possible */
  .ab-shop__grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: clamp(2.5rem, 4vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
  }
  .ab-shop__grid .ab-product-card {
    width: 100%;
  }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
  /* Le drawer démarre sous le header mobile (60px) */
  .ab-filter-drawer { top: 60px; }
  .admin-bar .ab-filter-drawer { top: 106px; }

  .ab-shop-hero {
    /* Hero plein écran : la ligne de flottaison tombe exactement en bas de
       section, on ne voit pas la bande de filtres en dessous sans scroller
       (ou cliquer sur le CTA). */
    height: 100svh;
  }

  .ab-shop-hero__bg {
    background-image: var(--hero-img-mobile, var(--hero-img));
    background-size: cover;          /* le bandeau vide en % fixe choquait à l'œil */
    background-position: 34% 38%;    /* décalé vers la gauche : cadran bien dans le cadre */
    /* Zoom très léger au-dessus du cover : le transform s'applique APRÈS que le
       cover ait déjà garanti une couverture complète, donc aucun risque de
       bande vide, quel que soit le ratio de l'écran (contrairement à un
       background-size en % fixe). overflow:hidden sur .ab-shop-hero rogne
       proprement le débord. */
    transform: scale(1.06);
  }

  /* Voile plus marqué sur mobile : le texte doit ressortir nettement sur l'image */
  .ab-shop-hero::before {
    background: linear-gradient(
      100deg,
      rgba(0,0,0,0.94) 0%,
      rgba(0,0,0,0.78) 40%,
      rgba(0,0,0,0.5) 65%,
      rgba(0,0,0,0.28) 100%
    );
  }
  .ab-shop-hero .type-h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }
  .ab-shop-hero__subtitle {
    font-size: 1rem;
  }
  .ab-shop-hero__subtitle--desktop { display: none; }
  .ab-shop-hero__subtitle--mobile  { display: block; }

  /* Bande de filtres : toute la rangée scrolle horizontalement au doigt.
     touch-action: pan-x verrouille le geste à l'axe horizontal (le navigateur
     laisse remonter tout mouvement vertical au scroll de la page au lieu de
     le mélanger avec le scroll de la bande → fin de l'effet "ça part dans
     tous les sens"). overscroll-behavior-x évite en plus l'effet rebond qui
     entraîne la page avec lui en bout de course. */
  .ab-shop__filters-inner {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: var(--space-2);
    padding: var(--space-2) 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    scrollbar-width: none;             /* Firefox */
  }
  .ab-shop__filters-inner::-webkit-scrollbar { display: none; } /* Chrome/Safari */

  .ab-shop__filters-left {
    flex-wrap: nowrap;
    gap: var(--space-2);
    flex-shrink: 0;
  }
  .ab-shop__filters-left .ab-filter,
  .ab-shop__filter-toggle { flex-shrink: 0; }

  .ab-shop__filters-right {
    flex-shrink: 0;
    gap: var(--space-3);
  }
  .ab-shop__count { display: none; } /* compteur masqué pour gagner de la place */

  .ab-filter__btn {
    font-size: 0.78rem;
    padding: 0.45rem 0.95rem;
    white-space: nowrap;
  }

  /* Les panneaux de dropdown ne doivent pas être coupés par l'overflow scroll :
     on les rend non-absolus impossible ici, donc on autorise leur affichage hors-flux */
  .ab-shop__filters-inner { position: relative; }

  /* Grille : 2 colonnes fluides (minmax(0,1fr) → les colonnes rétrécissent sans déborder) */
  .ab-shop__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2rem, 6vw, 3rem) clamp(0.75rem, 3vw, 1.25rem);
    padding-top: clamp(1.5rem, 5vw, 2.5rem);
    scroll-margin-top: 60px; /* header mobile agrandi — la barre de filtres n'est plus sticky */
  }

  /* Le CTA compact dans des cards étroites */
  .ab-shop__grid .ab-product-card .btn {
    width: 100%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.74rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
    text-align: center;
    line-height: 1.3;
    min-height: 40px;
  }
  /* Sur mobile : "Consulter" au lieu de "Consulter cette pièce" */
  .ab-shop__grid .ab-cta-full  { display: none; }
  .ab-shop__grid .ab-cta-short { display: inline; }

  /* Le dropdown du tri s'affiche en feuille fixe (non coupée par le scroll) */
  .ab-filter--sort .ab-filter__panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    border-radius: 12px 12px 0 0;
    padding: var(--space-4) 16px calc(var(--space-5) + env(safe-area-inset-bottom));
    transform: translateY(100%);
    z-index: var(--z-modal, 400);
  }
  .ab-filter--sort.is-open .ab-filter__panel {
    transform: translateY(0);
  }
  .ab-filter--sort .ab-filter__option {
    padding: 0.75rem var(--space-2);
    font-size: 0.95rem;
  }
}

/* ── Petit mobile (≤ 380px) ── */
@media (max-width: 380px) {
  .ab-shop__grid {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin-inline: auto;
  }
}

/* ══════════════════════════════════════════
   MODALE "Recherche sur mesure" — CTA "Modèle
   introuvable ?". Formulaire wfr-* complet (voir
   template-parts/recherche-sur-mesure/form.php),
   ouvert au clic sur desktop uniquement (JS).
══════════════════════════════════════════ */
.ab-modal {
  position: fixed;
  inset: 0;
  /* Doit passer au-dessus du header (#ab-header, z-index: 9999) pour que
     l'overlay le recouvre et le floute au lieu de passer dessous. */
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem) 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
/* SEO/perf : le formulaire complet est dupliqué depuis /recherche-sur-mesure/
   à l'intérieur de cette modale. L'attribut natif [hidden] (posé/retiré en JS)
   le sort réellement du rendu tant qu'elle est fermée — pas seulement invisible
   à l'écran — pour éviter le contenu caché indexable et le DOM inutile au
   premier chargement. La classe .ab-modal ne doit donc jamais forcer un
   display qui prime sur cet état natif. */
.ab-modal[hidden] {
  display: none;
}
.ab-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.ab-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 8, 8, 0.65);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.ab-modal__panel {
  position: relative;
  z-index: 1;
  background: #fff;
  width: min(640px, 100%);
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 6px;
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.5rem);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.19, 1, 0.22, 1);
}
.ab-modal.is-open .ab-modal__panel {
  transform: translateY(0) scale(1);
}

.ab-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--color-primary, #290B0B);
  cursor: pointer;
  transition: background 0.2s ease;
}
.ab-modal__close:hover {
  background: rgba(41, 11, 11, 0.06);
}

/* Le formulaire wfr-* est conçu pour occuper la largeur d'un container ;
   dans la modale, le panneau fournit déjà son propre espace, on retire
   donc le padding vertical dupliqué du composant. */
.ab-modal__body .wfr-wrap {
  padding: 0;
}

@media (max-width: 768px) {
  /* Le CTA renvoie directement vers /recherche-sur-mesure/ sur mobile
     (voir main.js), la modale ne s'ouvre donc jamais ici. */
  .ab-modal { display: none; }
}

/* Petits écrans desktop / laptops bas de gamme (fenêtre peu haute) :
   on réduit la marge autour du panneau plutôt que de le laisser
   déborder ou de trop rogner le formulaire. */
@media (min-width: 769px) and (max-height: 700px) {
  .ab-modal {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .ab-modal__panel {
    max-height: 92vh;
  }
}
