/* ---------------------------------------------------------------------------
   Galerie de la fiche produit : les vignettes etaient posees en grille de six
   colonnes, ce qui donnait 713 px de haut sur un produit a 36 photos. Reference
   client (macoque) : une seule ligne qui defile, avec deux fleches.
--------------------------------------------------------------------------- */
.product__thumbnails {
  position: relative;
  padding: 0 2.5rem;
}

.product__thumbnails-list {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  grid-template-columns: none !important;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  padding: 2px 0;
  /* la barre de defilement est remplacee par les fleches */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.product__thumbnails-list::-webkit-scrollbar {
  display: none;
}

.product__thumbnail {
  flex: 0 0 auto;
  width: 78px;
  scroll-snap-align: start;
}

.product__thumbnail-image {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
}

/* ---- Fleches ------------------------------------------------------------- */
.achyll-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid #e3e3e6;
  border-radius: 50%;
  background: rgba(255, 255, 255, .96);
  color: #111;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.achyll-gallery-nav:hover {
  border-color: #b9b9be;
  background: #fff;
}

.achyll-gallery-nav[hidden] {
  display: none;
}

.achyll-gallery-nav--prev { left: 0; }
.achyll-gallery-nav--next { right: 0; }

.achyll-gallery-nav svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 767.98px) {
  .product__thumbnails { padding: 0 2rem; }
  .product__thumbnail,
  .product__thumbnail-image { width: 64px; }
  .product__thumbnail-image { height: 64px; }
  .achyll-gallery-nav { width: 30px; height: 30px; }
}

/* ---- Pastilles de coloris de la fiche produit ------------------------------
   Le theme les pose carrees ; la reference client les veut rondes, comme celles
   des cartes produit. Le liseret de selection suit le rayon. */
.product-variant__colors .input-color__label,
.product-variant__colors .input-color__label .color,
.product-variant__colors .input-color__label::before,
.product-variant__colors .input-color__label::after {
  border-radius: 50% !important;
}

.product-variant__colors .input-color__label {
  overflow: hidden;
}

/* ---- Mention « TTC » sous le prix, retiree a la demande du client ---------- */
.product__tax-infos {
  display: none;
}

/* ---- Description repliee --------------------------------------------------
   ⚠️ Volontairement sans effet sur le referencement : le texte reste ENTIER
   dans le HTML, il est seulement ecrete par une hauteur maximale en CSS.
   Rien n'est en display:none, rien n'est injecte par JavaScript, et la classe
   qui replie est posee PAR le JavaScript : sans JS, le texte s'affiche en
   entier. Google rend le CSS et indexe la totalite du contenu. */
.achyll-repliable {
  position: relative;
  max-height: 152px;  /* doit correspondre a HAUTEUR_REPLIEE dans le script */
  overflow: hidden;
}

.achyll-repliable::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4rem;
  content: "";
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 88%);
  pointer-events: none;
}

.achyll-repliable--ouvert {
  max-height: none;
}

.achyll-repliable--ouvert::after {
  display: none;
}

.achyll-voir-plus {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.6rem 0 1.25rem;
  padding: 0;
  border: 0;
  background: none;
  color: #111;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.achyll-voir-plus:hover { color: #444; }

.achyll-voir-plus svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .15s ease;
}

.achyll-voir-plus[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---- Bloc « Détails du produit » retire a la demande du client -------------
   Il n'affichait que la reference fournisseur et le stock exact. Les deux ont
   interet a ne pas etre publics : la reference se recherche telle quelle chez
   le fournisseur, et le stock renseigne la concurrence. */
#product_details {
  display: none;
}

.achyll-voir-plus[hidden] { display: none; }

/* ---- Galerie : rail de vignettes vertical, a gauche du visuel --------------
   Maquette retenue (version 2). Le gabarit du theme pose les vignettes SOUS le
   visuel : on inverse en CSS plutot que de toucher au balisage. */
.product__images {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.product__carousel {
  flex: 1 1 auto;
  min-width: 0;
}

.product__thumbnails {
  order: -1;                 /* le rail passe a gauche */
  flex: 0 0 84px;
  width: 84px;
  padding: 2.25rem 0;        /* place pour les fleches haut et bas */
}

.product__thumbnails-list {
  flex-direction: column;
  max-height: 520px;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y proximity;
}

.product__thumbnail,
.product__thumbnail-image {
  width: 76px;
}

.product__thumbnail-image {
  height: 76px;
}

/* Les fleches passent en haut et en bas. */
.product__thumbnails .achyll-gallery-nav {
  top: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.product__thumbnails .achyll-gallery-nav--prev { top: 0; }
.product__thumbnails .achyll-gallery-nav--next { bottom: 0; }

.product__thumbnails .achyll-gallery-nav svg { transform: rotate(90deg); }

/* Compteur « 1 / 6 » sous le rail. */
.achyll-gallery-compteur {
  display: block;
  margin-top: 0.4rem;
  color: #6e6e73;
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 767.98px) {
  /* Sur mobile le rail revient sous le visuel, a l'horizontale. */
  .product__images { display: block; }
  .product__thumbnails {
    width: auto;
    padding: 0 2rem;
    margin-top: 0.85rem;
  }
  .product__thumbnails-list {
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }
  .product__thumbnail,
  .product__thumbnail-image { width: 64px; }
  .product__thumbnail-image { height: 64px; }
  .product__thumbnails .achyll-gallery-nav {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
  .product__thumbnails .achyll-gallery-nav--prev { left: 0; }
  .product__thumbnails .achyll-gallery-nav--next { left: auto; right: 0; }
  .product__thumbnails .achyll-gallery-nav svg { transform: none; }
  .achyll-gallery-compteur { display: none; }
}
