.product-miniature__variants {
  position: relative;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  min-height: 13px;
}

.product-miniature__variants > a.color,
.product-miniature__variants > a.texture {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(21, 49, 79, 0.22);
}

/* Match the virtual-gallery dots even when the global theme loads afterwards. */
body .product-miniature .product-miniature__variants > a.color,
body .product-miniature .product-miniature__variants > a.texture {
  box-shadow: 0 0 0 1px rgba(21, 49, 79, 0.22);
}

.product-miniature__variant-more {
  position: relative;
  flex: 0 0 auto;
}

.product-miniature__variant-more-trigger {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  height: 13px;
  padding: 0;
  color: #17314d;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  list-style: none;
  cursor: pointer;
  letter-spacing: -0.02em;
  white-space: nowrap;
  background: transparent;
  border: 0;
}

body .product-miniature .product-miniature__variant-more-trigger {
  box-shadow: none;
}

.product-miniature__variant-more-trigger::-webkit-details-marker,
.product-miniature__variant-more-trigger::marker {
  content: "";
  display: none;
}

.product-miniature__variant-more[open] .product-miniature__variant-more-trigger,
.product-miniature__variant-more-trigger:hover,
.product-miniature__variant-more-trigger:focus-visible {
  color: var(--bs-primary);
  outline: none;
}

.product-miniature__variant-more-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.5rem);
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(6, 13px);
  gap: 5px;
  width: max-content;
  max-width: min(17rem, calc(100vw - 2rem));
  padding: 0.75rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-box-shadow-md);
}

.product-miniature__variant-more-list::after {
  position: absolute;
  right: 0.75rem;
  bottom: -0.375rem;
  width: 0.75rem;
  height: 0.75rem;
  content: "";
  background: var(--bs-body-bg);
  border-right: 1px solid var(--bs-border-color);
  border-bottom: 1px solid var(--bs-border-color);
  transform: rotate(45deg);
}

.product-miniature__variant-more-list a {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(21, 49, 79, 0.22);
}

body .product-miniature .product-miniature__variant-more-list a {
  box-shadow: 0 0 0 1px rgba(21, 49, 79, 0.22);
}

/*
 * Autres photos des cartes (injectProductCardViews + popelup-card-views.js).
 * Pastille et points visibles dès l'affichage, en CSS seul ; les photos ne
 * sont demandées qu'à l'interaction. Tout est en position absolue dans
 * l'image : la carte garde exactement sa hauteur (aucun décalage).
 */
.pv-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px 0 8px;
  color: #15314f;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(21, 49, 79, 0.16);
}

.pv-badge::before {
  width: 12px;
  height: 12px;
  content: "";
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%2315314f' stroke-width='1.4'%3E%3Crect x='.7' y='3.2' width='8.1' height='8.1' rx='1.5'/%3E%3Cpath d='M3.2 1.2h6.1a1.5 1.5 0 0 1 1.5 1.5v6.1'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pv-dots {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 2;
  display: flex;
  transform: translateX(-50%);
}

.pv-dots i {
  position: relative;
  width: 14px;
  height: 24px;
  /* Sans cela, le <i> vide fait télécharger la police italique. */
  font-style: normal;
}

.pv-dots i::before {
  position: absolute;
  top: 9px;
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  content: "";
  background: rgba(21, 49, 79, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9);
}

.pv-dots i[aria-current="true"]::before,
.pv-dots i:first-child:not([aria-current])::before {
  background: #15314f;
}

.pv-row {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 3;
  display: flex;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.product-miniature:hover .pv-row,
.product-miniature:focus-within .pv-row {
  opacity: 1;
  pointer-events: auto;
}

.pv-thumb {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #f4f1eb;
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(21, 49, 79, 0.22);
}

.pv-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pv-thumb[aria-current="true"] {
  border-color: #15314f;
}

.pv-thumb:focus-visible {
  outline: 2px solid #15314f;
  outline-offset: 2px;
}

.pv-thumb[data-more]::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  content: attr(data-more);
  background: rgba(21, 49, 79, 0.55);
}

.pv-track {
  display: flex !important;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.pv-track::-webkit-scrollbar {
  display: none;
}

.pv-track > picture,
.pv-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.pv-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* Icône « 3D » des cartes (injectProductCard3DPreview) : bouton de 44 px,
   pastille de 24 px dessinée par ::before, alignée sur « N photos ». */
.p3d {
  position: absolute;
  top: -2px;
  left: 4px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 44px;
  min-width: 44px;
  padding: 0 11px 0 9px;
  color: #15314f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  background: none;
  border: 0;
  isolation: isolate;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.p3d::before {
  position: absolute;
  inset: 10px 0;
  z-index: -1;
  content: "";
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(21, 49, 79, 0.16);
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
}

.p3d::after {
  order: -1;
  width: 15px;
  height: 15px;
  content: "";
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0622a' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16ZM3.3 7l8.7 5 8.7-5M12 22V12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.p3d:hover::before {
  background: #fff;
  box-shadow: 0 2px 10px rgba(21, 49, 79, 0.22);
}

.p3d:focus-visible {
  outline: none;
}

.p3d:focus-visible::before {
  box-shadow: 0 0 0 3px #2f6fd1;
}

/* Carte étroite (2 colonnes sur téléphone) : pastille compacte. */
@container product-miniature (max-width: 240px) {
  .p3d {
    gap: 4px;
    padding: 0 8px 0 7px;
    font-size: 11px;
  }

  .p3d::after {
    width: 13px;
    height: 13px;
  }
}

@media (hover: hover) {
  .product-miniature:hover .pv-badge,
  .product-miniature:hover .pv-dots,
  .product-miniature:focus-within .pv-dots {
    opacity: 0;
  }
}

@media (hover: none) {
  .pv-dots i {
    width: 24px;
  }

  .pv-row {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pv-track {
    scroll-behavior: auto;
  }

  .pv-row,
  .p3d::before {
    transition: none;
  }
}
