.product-grid:not(.liste-produits) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.liste-produits .img-produit {
  max-height: 165px;
  margin: auto;
  display: flex;
  justify-content: center;
}

/* Titre des produits des pages catégorie et de recherche : graisse 500. */
.liste-produits .product-card h3 {
  font-weight: 500;
}

/* Pages collection uniquement (la liste de recherche n'a pas d'identifiant de catégorie) : titre en noir. */
.liste-produits[data-category-id] .product-card h3 {
  color: #000;
}

.product-grid:not(.liste-produits) .product-card {
  width: 100%;
  max-width: 100%;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 2.5px solid transparent;

  .border-product {
    flex: 1;
    overflow: hidden;
    border: 1px solid #eee;
    border-radius: 12px;
    &:hover {
      border: 1px solid var(--orange);
      box-shadow: 0px 5px 20px -3px rgba(0, 0, 0, 0.25);
    }
  }

  h3 {
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 40px;
    margin-bottom: 0px;
    font-size: 15px;
    background-color: #f2f2f2;
    line-height: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
  }
  .prix {
    margin-top: 20px;
    justify-content: center;
    small {
      font-size: 15px;
    }
    span {
      margin-left: 5px;
      font-weight: 600;
      font-size: 18px;
      color: var(--orange);
    }
  }

  button {
    margin-top: 15px;
  }
}

.badge-div {
  position: absolute;
  top: 15px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: none;
}

/* Badges : en haut à gauche de l'image produit (positionnement par défaut ci-dessus) ; seul le carrousel
   de suggestions les place en bas de l'image. */
.product-swiper--suggestions .badge-div {
  bottom: 90px;
  top: inherit;
}

.product-card__inner {
  position: relative;
  height: 100%;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 18px;
  padding: 14px;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.product-card__inner:hover {
  transform: translateY(-3px);
  border-color: #ddd;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
}

.product-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.product-card__image-wrapper {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  background: #f7f7f7;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition:
    opacity 0.2s ease,
    transform 0.25s ease;
}

.product-card__image--hover {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.product-card__image-wrapper:hover .product-card__image--main {
  opacity: 0;
  transform: scale(1.03);
}

.product-card__image-wrapper:hover .product-card__image--hover {
  opacity: 1;
  transform: scale(1.03);
}

.product-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-subtle);
}

.product-card__compare-price {
  font-size: 13px;
  color: var(--c-subtle);
  text-decoration: line-through;
}

.product-card__colors {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  margin-top: 12px;
}

.product-card__color {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: inline-block;
}

.product-card__title {
  margin: 10px 0 0;
  min-height: 42px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
  text-align: center;
  color: #333;
}

.product-card__details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.product-card__price {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #f37021;
  white-space: nowrap;
}

.product-card__price small {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 400;
  color: #777;
}

.product-card__compare {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border: 1px solid #eee;
  cursor: pointer;
}

.product-card__compare img {
  width: 18px;
  height: 18px;
  display: block;
}

@media (max-width: 575px) {
  .product-grid:not(.liste-produits) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .product-card__inner {
    padding: 10px;
    border-radius: 14px;
  }

  .product-card__title {
    font-size: 13px;
    min-height: 36px;
  }

  .product-card__price {
    font-size: 14px;
  }
}

/* Collection — en-tête de catégorie : photo, fil d'Ariane, titre et texte en blanc, texte long dépliable. */
.entete-categorie {
  padding: 10px 0 25px;
  color: #fff;
  background-size: cover;
  background-position: center;
  h1 {
    color: #fff;
    font-size: 25px;
    font-weight: 700;
  }
  .breadcrumb__link,
  .breadcrumb__sep,
  .breadcrumb__current {
    color: #fff;
  }
  .texte {
    max-height: 62px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.4;
    text-align: justify;
    a {
      color: var(--orange);
      font-weight: 700;
    }
    p {
      margin-bottom: 10px;
    }
  }
  .voir-plus {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 400;
    .moins {
      display: none;
    }
  }
  .voir-plus-check:checked ~ .texte {
    max-height: none;
  }
  .voir-plus-check:checked ~ .text-center .voir-plus {
    .plus {
      display: none;
    }
    .moins {
      display: inline;
    }
  }
  .voir-plus-check:focus-visible ~ .text-center .voir-plus {
    outline: 2px solid #fff;
    outline-offset: 2px;
  }
}
/* Pages catégorie uniquement : le fil d'Ariane colle en haut du bandeau. */
.entete-collection .breadcrumb {
  padding-top: 0;
}
/* Description de la catégorie : graisse moyenne (500). */
.entete-collection .texte,
.entete-collection .texte p {
  font-weight: 500;
}
/* Bandeau sans photo (page de recherche) : fond gris clair et textes foncés. */
.entete-categorie:not([style]) {
  color: var(--noir);
  h1,
  .breadcrumb__link,
  .breadcrumb__sep,
  .breadcrumb__current {
    color: var(--noir);
  }
}

/* Collection — bannière de catégorie (image/texte par catégorie via dict.category_banners) */
.category-header {
  height: 460px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

.category-header__title {
  margin-bottom: var(--s-3);
  color: var(--orange);
  font-weight: bold;
  font-size: 28px;
  text-transform: uppercase;
}

.product-list-page {
  padding-block: var(--s-8);
}

@media (max-width: 640px) {
  .category-header {
    padding-block: var(--s-6);
  }
}

/* Couleur sans produit dans la sélection (reste cochée pour pouvoir la décocher). */
.facet-empty {
  opacity: 0.4;
}
.color-swatch--none {
  background: conic-gradient(
    #e63946,
    #f4a261,
    #e9c46a,
    #2a9d8f,
    #457b9d,
    #9b5de5,
    #e63946
  );
}
/* Pastille « Transparent » : damier gris et blanc, à la place du dégradé multicolore des couleurs sans code. */
.color-swatch--transparent {
  background-color: #fff;
  background-image:
    linear-gradient(
      45deg,
      #cfcfcf 25%,
      transparent 25%,
      transparent 75%,
      #cfcfcf 75%
    ),
    linear-gradient(
      45deg,
      #cfcfcf 25%,
      transparent 25%,
      transparent 75%,
      #cfcfcf 75%
    );
  background-position:
    0 0,
    5px 5px;
  background-size: 10px 10px;
}

/* Catégories */
.collection-sidebar h2,
.titre-categorie {
  font-size: 20px;
  border-bottom: 3px solid var(--orange);
  font-weight: 700;
  padding-bottom: 10px;
  color: black;
}
.titre-categorie {
  margin-bottom: 15px;
}
.collection-sidebar {
  /* Icône « filtres » (SVG) colorée en orange via un masque */
  .right-caret {
    display: inline-block;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-right: 6px;
    background-color: var(--orange);
    -webkit-mask: url("https://static3.promotool.net/Org/filtering.535037x1688E7.svg") center / contain no-repeat;
    mask: url("https://static3.promotool.net/Org/filtering.535037x1688E7.svg") center / contain no-repeat;
  }
  input,
  select {
    font-size: 14px;
  }
  .collection-sidebar__header {
    display: block;
    width: 100%;
    border: none;
    background: none;
    padding: 0;
    text-align: left;
    cursor: default;
    pointer-events: none;
  }

  .collection-sidebar__chevron {
    display: none;
  }

  .size-swatch-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .size-swatch-label {
    cursor: pointer;

    input {
      position: absolute;
      opacity: 0;
      width: 0;
      height: 0;
    }
  }

  .size-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 40px;
    border: 1.5px solid var(--c-border);
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
  }

  .size-chip:hover {
    border-color: var(--c-fg);
  }

  .size-swatch-label input:checked + .size-chip {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
  }

  .color-swatch-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
  }

  .color-swatch-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }

  .color-swatch {
    display: block;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid #dadada;
    cursor: pointer;
    transition: transform 0.2s;
  }

  .color-swatch:hover {
    transform: scale(1.15);
  }

  .color-swatch-label input:checked + .color-swatch {
    border: 2px solid var(--orange);
  }
}

/* Accordéon filtres — mobile et tablette (sous 992 px, là où la colonne passe en pleine largeur), desktop inchangé */
@media (max-width: 991.98px) {
  .collection-sidebar {
    .collection-sidebar__header {
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      pointer-events: auto;
      padding: 7px;
      background-color: #ddd;
      color: white;
      border-bottom: 1px solid #dcdcdc;
      border-radius: 5px;

      h2 {
        margin: 0;
        padding: 0;
        color: #333;
        border: 0;
        font-size: 15px;
        display: flex;
        align-items: center;
      }
    }

    .collection-sidebar__chevron {
      display: block;
      flex-shrink: 0;
      transition: transform 0.2s ease;
      color: #333;
    }

    .collection-sidebar__header[aria-expanded="true"]
      .collection-sidebar__chevron {
      transform: rotate(180deg);
    }

    .collection-sidebar__body.collapse:not(.show) {
      display: none;
    }

    .collection-sidebar__body.collapsing {
      height: 0;
      overflow: hidden;
      transition: height 0.35s ease;
    }
  }
}

.collection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 14px;
}
.collection-toolbar__count {
  display: flex;
  align-items: baseline;
  justify-content: end;
  gap: 5px;
  font-size: 15px;
  strong {
    font-weight: bold;
    color: #3c3c3c;
  }
}
.filter-form {
  flex-direction: column;
  align-items: flex-start;

  .btn {
    width: 100%;
    padding: 10px 30px;
    border-radius: 5px;
  }
}

.filter-group {
  padding-block: 15px 0;
  width: 100%;
  p {
    width: 100%;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--orange);
    font-size: 15px;
  }
}
.filter-group:last-child {
  border-bottom: none;
}
.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: var(--s-1) 0;
}
.filter-option__inner {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.filter-option__check {
  width: 18px;
  height: 18px;
  border: 1.5px solid #ced4da;
  border-radius: 50%;
  flex-shrink: 0;
  transition:
    background var(--t),
    border-color var(--t);
}
.filter-option input:checked + .filter-option__check,
.filter-option.is-active .filter-option__check {
  position: relative;
  border-color: var(--orange);
  /* Coche orange à l'intérieur du rond */
  &::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4px;
    height: 8px;
    border: solid var(--orange);
    border-width: 0 2px 2px 0;
    /* Centrée dans le rond, légèrement remontée pour compenser la rotation */
    transform: translate(-50%, -60%) rotate(45deg);
  }
}
.filter-option__icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}
.filter-option__label {
  font-size: 15px;
  color: #3e3f43;
  text-transform: capitalize;
  font-weight: 400;
}

.filter-select {
  width: 100%;
}
/* Tri au-dessus de la liste : sans bordure. */
.collection-toolbar .filter-select {
  border: 0;
}
.filter-price-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.filter-price-sep {
  color: var(--c-muted);
}
/* Fabrication puis Couleur : l'espace de fin de liste est sous les couleurs, pas sous Fabrication. */
.filter-group--couleurs {
  margin-bottom: var(--s-5);
}

.color-swatch--white {
  background: #fff;
}
.color-swatch--black {
  background: #1a1a1a;
}
.color-swatch--gray {
  background: #9ca3af;
}
.color-swatch--red {
  background: #dc2626;
}
.color-swatch--orange {
  background: #f97316;
}
.color-swatch--yellow {
  background: #facc15;
}
.color-swatch--green {
  background: #16a34a;
}
.color-swatch--blue {
  background: #2563eb;
}
.color-swatch--navy {
  background: #0f172a;
}
.color-swatch--purple {
  background: #7c3aed;
}
.color-swatch--pink {
  background: #ec4899;
}
.color-swatch--brown {
  background: #78350f;
}
.color-swatch--beige {
  background: #d4b896;
}
.color-swatch--gold {
  background: #d4af37;
}
.color-swatch--silver {
  background: #c0c0c0;
}
.color-swatch--turquoise {
  background: #0891b2;
}

/* Pied de catégorie : guide d'achat replié sur 546 px, fondu vers le fond bleu très clair. */
.catFooter {
  margin-bottom: 30px;
  padding-top: 15px;
  padding-bottom: 50px;
  background-color: #f5fcfe;
  img {
    max-width: 175px;
  }
  .texte {
    position: relative;
    max-height: 546px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.4;
    text-align: justify;
    background-color: transparent;
    transition: max-height 0.5s ease;
  }
  .fade {
    position: relative;
    height: 100px;
    margin-top: -100px;
    background: linear-gradient(to bottom, #f5fcfe00 0%, #f5fcfe 75%);
    opacity: 1;
  }
  .category-title {
    font-size: 19px;
    margin: 15px 0 8px;
    color: black;
  }
  .category-title:first-child {
    margin-top: 0;
  }
  .footer-plus {
    margin-top: 10px;
    font-size: 16px;
    line-height: 25px;
    padding: 0;
    background-color: transparent;
    border: 0;
    color: var(--orange);
    font-weight: 400;
    text-align: left;
    .moins {
      display: none;
    }
  }
  .footer-plus-check:checked ~ .texte {
    max-height: 5000px;
  }
  .footer-plus-check:checked ~ .fade {
    display: none;
  }
  .footer-plus-check:checked ~ div .footer-plus {
    .plus {
      display: none;
    }
    .moins {
      display: inline;
    }
  }
  .footer-plus-check:focus-visible ~ div .footer-plus {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
  }
}

/* Pastilles de catégories suggérées (sous l'en-tête de catégorie) */
.suggestions {
  position: relative;
  .suggestions__liste {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0 0 8px;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    padding-inline: 2px;
  }
  .suggestions__pastille {
    display: block;
    padding: 10px 28px;
    border: 1px solid #e3e3e3;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    color: black;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }
  .suggestions__liste::-webkit-scrollbar {
    display: none;
  }
  .suggestions__fleche {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #e3e3e3;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    color: black;
  }
  .suggestions__fleche[hidden] {
    display: none;
  }
  .suggestions__fleche:hover,
  .suggestions__fleche:focus-visible {
    color: var(--orange);
  }
  .suggestions__fleche--prev {
    left: 0;
  }
  .suggestions__fleche--next {
    right: 0;
  }
  .suggestions__pastille:hover,
  .suggestions__pastille:focus-visible {
    border-color: var(--orange);
    color: var(--orange);
  }
}
