/** Shopify CDN: Minification failed

Line 107:23 Expected identifier but found whitespace
Line 107:25 Unexpected "{"
Line 107:45 Expected ":"
Line 107:48 Expected identifier but found "%"
Line 108:18 Expected identifier but found whitespace
Line 108:20 Unexpected "{"
Line 108:22 Expected identifier but found "100"
Line 108:56 Expected identifier but found "%"
Line 116:18 Expected identifier but found whitespace
Line 116:20 Unexpected "{"
... and 8 more hidden warnings

**/

/* === LAYOUT PRINCIPAL === */
.bd-product-viewer-section {
  width: 100%;
  min-height: 100vh;
  background: #FFFFFF;
  position: relative;
  max-width:calc(100% - 20px);
  margin:30px auto;
}

.bd-viewer-main-wrapper {
  display: flex;
  min-height: calc(100vh - 100px);
  padding: 1rem;
  gap: 0px;
  max-width:1200px;
  margin:auto;
}

/* === LAYOUTS FLEXBOX SELON POSITION SIDEBAR === */
/* Position horizontale : sidebar à gauche ou droite */
.bd-viewer-layout-right,
.bd-viewer-layout-left {
  flex-direction: row;
}

.bd-sidebar.bd-sidebar-left, .bd-sidebar.bd-sidebar-right {
  border:none;
}

.bd-sidebar.bd-sidebar-right {
  border-left: 1px solid var(--bd-groups-border-color, #E5E7EB);
}

.bd-sidebar.bd-sidebar-left {
  border-right: 1px solid var(--bd-groups-border-color, #E5E7EB);
}

.bd-collection-products.bd-collection-products-top {
    border-bottom: 1px solid var(--bd-groups-border-color, #E5E7EB);
}

.bd-collection-products.bd-collection-products-bottom {
    border-top: 1px solid var(--bd-groups-border-color, #E5E7EB);
}

/* Position verticale : sidebar en haut */
.bd-viewer-layout-top {
  flex-direction: column; /* Sidebar en haut */
}

/* Position verticale : sidebar en bas */
.bd-viewer-layout-bottom {
  flex-direction: column-reverse; /* Sidebar en bas */
}

/* === LARGEURS CONFIGURABLES === */
.bd-viewer-product-display {
  flex: 1;
  min-width: 0; /* Important pour éviter le débordement */
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  transition: all 0.3s ease;
}

.bd-sidebar {
  flex: 0 0 auto;
  transition: all 0.3s ease;
  position: sticky;
  z-index: 10;
  border:none !important;
  /* Gestion de la hauteur relative au product display */
  max-height: calc(100vh - 4rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* === VARIABLES CSS DYNAMIQUES === */
/* 
 * Système basé sur CSS Custom Properties pour une gestion flexible des ratios
 * Avantages :
 * - Plus maintenable qu'un système de classes statiques
 * - Permet la modification dynamique via JavaScript
 * - Calculs automatiques pour les valeurs complémentaires
 * - Performance optimisée (pas de recalculs de layout)
 */
.bd-viewer-main-wrapper {
  --main-content-width: {{ main_content_width }}%;
  --sidebar-width: {{ 100 | minus: main_content_width }}%;
  --gap: 1rem;
  gap: var(--gap);
  max-width: calc(100% - var(--gap));
}

/* Variables pour le ratio produit/collection */
.bd-content-layout-wrapper {
  --product-width: {{ product_collection_ratio }}%;
  --collection-width: {{ 100 | minus: product_collection_ratio }}%;
  --gap: 2rem;
}


.bd-collection-products {
  /* Variables CSS calculées (les valeurs dynamiques sont injectées via style inline) */
  --product-width-desktop: calc(100% / var(--products-per-row-desktop));
  --product-width-mobile: calc(100% / var(--products-per-row-mobile));
  --products-gap: 1.5rem;
  --product-base-height: 180px;
}

/* === DEBUG CSS VARIABLES (Optionnel) === */
.bd-viewer-main-wrapper[data-debug="true"]::before {
  content: "Main: " var(--main-content-width) " | Sidebar: " var(--sidebar-width);
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  z-index: 1000;
  border-radius: 0 0 4px 0;
}

.bd-content-layout-wrapper[data-debug="true"]::before {
  content: "Product: " var(--product-width) " | Collection: " var(--collection-width);
  position: absolute;
  top: 2rem;
  left: 0;
  background: rgba(0,100,0,0.8);
  color: white;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  z-index: 1000;
  border-radius: 0 0 4px 0;
}

/* Largeurs dynamiques selon la configuration marchand */
.bd-viewer-layout-right .bd-viewer-product-display,
.bd-viewer-layout-left .bd-viewer-product-display {
  flex: 0 0 calc(var(--main-content-width) - var(--gap) / 2);
}

.bd-viewer-layout-right .bd-sidebar,
.bd-viewer-layout-left .bd-sidebar {
  flex: 0 0 calc(var(--sidebar-width) - var(--gap) / 2);
}

/* Ordre des éléments selon la position */
.bd-viewer-layout-left .bd-sidebar {
  order: 1;
}

.bd-viewer-layout-left .bd-viewer-product-display {
  order: 2;
}

.bd-viewer-layout-right .bd-viewer-product-display {
  order: 1;
}

.bd-viewer-layout-right .bd-sidebar {
  order: 2;
}

/* Layouts verticaux : sidebar en haut ou en bas */
.bd-viewer-layout-top .bd-viewer-product-display,
.bd-viewer-layout-bottom .bd-viewer-product-display {
  flex: 1 1 auto; /* Prend l'espace disponible */
  width: 100%;
}

.bd-viewer-layout-top .bd-sidebar,
.bd-viewer-layout-bottom .bd-sidebar {
  flex: 0 0 auto; /* Taille adaptée au contenu */
  width: 100%;
  max-height: none !important;
  position: relative; /* Pas de sticky en vertical */
}

/* Ordre des éléments pour layout vertical */
.bd-viewer-layout-top .bd-sidebar {
  order: 1; /* En premier (mais avec column-reverse, apparaît en haut) */
}

.bd-viewer-layout-top .bd-viewer-product-display {
  order: 2;
}

.bd-viewer-layout-bottom .bd-sidebar {
  order: 2; /* En dernier (apparaît en bas) */
}

.bd-viewer-layout-bottom .bd-viewer-product-display {
  order: 1;
}

/* === WRAPPER LAYOUT CONTENU (PRODUIT + COLLECTION) === */
/* === SYSTÈME 2: POSITION LISTE PRODUITS (collection_products_position) === */
/* 
 * Contrôle la position de .bd-collection-products par rapport à .bd-product-main-content
 * Options: "top" | "bottom" | "left" | "right"
 * Classes générées: .bd-collection-position-top | .bd-collection-position-bottom | .bd-collection-position-left | .bd-collection-position-right
 * 
 * IMPORTANT: Ce système est DISTINCT du système de position sidebar (groups_interface_position)
 * 
 * Positions disponibles:
 * - top: collection au-dessus (flex-direction: column, collection order: 1)
 * - bottom: collection en dessous (flex-direction: column, collection order: 2) 
 * - left: collection à gauche (flex-direction: row, collection order: 1)
 * - right: collection à droite (flex-direction: row, collection order: 2)
 */
.bd-content-layout-wrapper {
  display: flex;
  gap: 1rem;
  align-items: start;
}

/* Debug mode pour visualiser les zones */
.bd-content-layout-wrapper[data-debug="true"] .bd-product-main-content {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

.bd-content-layout-wrapper[data-debug="true"] .bd-collection-products {
  outline: 2px solid #10B981;
  outline-offset: 2px;
}

.bd-content-layout-wrapper[data-debug="true"]::before {
  content: "Position: " attr(class);
  position: absolute;
  top: -25px;
  left: 0;
  font-size: 12px;
  color: #6B7280;
  font-weight: 500;
}

/* === POSITIONS DE LA LISTE DE PRODUITS === */
/* 
 * LOGIQUE DE DIMENSIONNEMENT :
 * - Positions VERTICALES (top/bottom) : 100% width + flex: 1 1 auto (pas côte à côte)
 * - Positions LATÉRALES (left/right) : largeurs configurables + flex partagé (côte à côte)
 */

/* Position TOP: Collection au-dessus du produit */
.bd-content-layout-wrapper.bd-collection-position-top {
  flex-direction: column;
}

.bd-content-layout-wrapper.bd-collection-position-top .bd-collection-products {
  order: 1; /* Collection en premier */
  width: 100%;
  flex: 1 1 auto;
}

.bd-content-layout-wrapper.bd-collection-position-top .bd-product-main-content {
  order: 2; /* Produit en second */
  width: 100%;
  flex: 1 1 auto;
}

/* Position BOTTOM: Collection en dessous du produit */
.bd-content-layout-wrapper.bd-collection-position-bottom {
  flex-direction: column;
}

.bd-content-layout-wrapper.bd-collection-position-bottom .bd-product-main-content {
  order: 1; /* Produit en premier */
  width: 100%;
  flex: 1 1 auto;
}

.bd-content-layout-wrapper.bd-collection-position-bottom .bd-collection-products {
  order: 2; /* Collection en second */
  width: 100%;
  flex: 1 1 auto;
}

/* Position LEFT: Collection à gauche du produit */
.bd-content-layout-wrapper.bd-collection-position-left {
  flex-direction: row !important;
}

.bd-content-layout-wrapper.bd-collection-position-left .bd-collection-products {
  order: 1; /* Collection en premier (gauche) */
  flex: 0 0 300px; /* Largeur fixe par défaut pour position latérale */
}

.bd-content-layout-wrapper.bd-collection-position-left .bd-product-main-content {
  order: 2; /* Produit en second (droite) */
  flex: 1; /* Prend l'espace restant pour position latérale */
}

/* Position RIGHT: Collection à droite du produit */
.bd-content-layout-wrapper.bd-collection-position-right {
  flex-direction: row;
}

.bd-content-layout-wrapper.bd-collection-position-right .bd-product-main-content {
  order: 1; /* Produit en premier (gauche) */
  flex: 1; /* Prend l'espace restant pour position latérale */
}

.bd-content-layout-wrapper.bd-collection-position-right .bd-collection-products {
  order: 2; /* Collection en second (droite) */
  flex: 0 0 300px; /* Largeur fixe par défaut pour position latérale */
}

/* === LARGEURS CONFIGURABLES POUR POSITIONS LATÉRALES === */
/* Position LEFT avec largeurs variables */
.bd-content-layout-wrapper.bd-collection-position-left.bd-collection-width-narrow .bd-collection-products {
  flex: 0 0 250px;
}

.bd-content-layout-wrapper.bd-collection-position-left.bd-collection-width-medium .bd-collection-products {
  flex: 0 0 300px;
}

.bd-content-layout-wrapper.bd-collection-position-left.bd-collection-width-wide .bd-collection-products {
  flex: 0 0 350px;
}

/* Position RIGHT avec largeurs variables */
.bd-content-layout-wrapper.bd-collection-position-right.bd-collection-width-narrow .bd-collection-products {
  flex: 0 0 250px;
}

.bd-content-layout-wrapper.bd-collection-position-right.bd-collection-width-medium .bd-collection-products {
  flex: 0 0 300px;
}

.bd-content-layout-wrapper.bd-collection-position-right.bd-collection-width-wide .bd-collection-products {
  flex: 0 0 350px;
}

/* === STYLES DE BASE POUR LES ÉLÉMENTS === */
.bd-content-layout-wrapper .bd-product-main-content {
  /* Les dimensions sont gérées par les propriétés flex des parents */
}

.bd-content-layout-wrapper .bd-collection-products {
  /* Les dimensions sont gérées par les propriétés flex des parents */
}

/* === RATIOS DYNAMIQUES PRODUIT/COLLECTION (positions left/right uniquement) === */
/* Les variables sont déjà définies au niveau du .bd-content-layout-wrapper */

/* === RATIOS CUSTOM PROPERTIES POUR POSITIONS LATÉRALES === */
/*
 * IMPORTANT: Ces ratios s'appliquent UNIQUEMENT aux positions left/right
 * Pour les positions top/bottom, les éléments prennent automatiquement 100%
 */

/* Neutralisation des ratios pour positions verticales */
.bd-content-layout-wrapper.bd-collection-position-top,
.bd-content-layout-wrapper.bd-collection-position-bottom {
  --product-width: 100% !important;
  --collection-width: 100% !important;
}

/* Ratios spécifiques selon l'option marchand - Apply aux positions latérales uniquement */
.bd-content-layout-wrapper.bd-collection-position-left.product-ratio-50,
.bd-content-layout-wrapper.bd-collection-position-right.product-ratio-50 {
  --product-width: 50%;
  --collection-width: 50%;
}

.bd-content-layout-wrapper.bd-collection-position-left.product-ratio-55,
.bd-content-layout-wrapper.bd-collection-position-right.product-ratio-55 {
  --product-width: 55%;
  --collection-width: 45%;
}

.bd-content-layout-wrapper.bd-collection-position-left.product-ratio-60,
.bd-content-layout-wrapper.bd-collection-position-right.product-ratio-60 {
  --product-width: 60%;
  --collection-width: 40%;
}

.bd-content-layout-wrapper.bd-collection-position-left.product-ratio-65,
.bd-content-layout-wrapper.bd-collection-position-right.product-ratio-65 {
  --product-width: 65%;
  --collection-width: 35%;
}

.bd-content-layout-wrapper.bd-collection-position-left.product-ratio-70,
.bd-content-layout-wrapper.bd-collection-position-right.product-ratio-70 {
  --product-width: 70%;
  --collection-width: 30%;
}

.bd-content-layout-wrapper.bd-collection-position-left.product-ratio-75,
.bd-content-layout-wrapper.bd-collection-position-right.product-ratio-75 {
  --product-width: 75%;
  --collection-width: 25%;
}

.bd-content-layout-wrapper.bd-collection-position-left.product-ratio-80,
.bd-content-layout-wrapper.bd-collection-position-right.product-ratio-80 {
  --product-width: 80%;
  --collection-width: 20%;
}

.bd-content-layout-wrapper.product-ratio-85 {
  --product-width: 85%;
  --collection-width: 15%;
}

/* Application des ratios avec flexbox */
.bd-content-layout-wrapper.bd-collection-position-left[class*="product-ratio-"],
.bd-content-layout-wrapper.bd-collection-position-right[class*="product-ratio-"] {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
}

.bd-content-layout-wrapper.bd-collection-position-left[class*="product-ratio-"] {
  flex-direction: row-reverse;
}

.bd-content-layout-wrapper.bd-collection-position-right[class*="product-ratio-"] {
  flex-direction: row;
}

/* Application des ratios CSS custom properties - POSITIONS LATÉRALES UNIQUEMENT */
.bd-content-layout-wrapper.bd-collection-position-left[class*="product-ratio-"] .bd-product-main-content,
.bd-content-layout-wrapper.bd-collection-position-right[class*="product-ratio-"] .bd-product-main-content {
  flex: 0 0 calc(var(--product-width) - var(--gap) / 2);
  width: calc(var(--product-width) - var(--gap) / 2);
}

.bd-content-layout-wrapper.bd-collection-position-left[class*="product-ratio-"] .bd-collection-products,
.bd-content-layout-wrapper.bd-collection-position-right[class*="product-ratio-"] .bd-collection-products {
  flex: 0 0 calc(var(--collection-width) - var(--gap) / 2);
  width: calc(var(--collection-width) - var(--gap) / 2);
  position: sticky;
  top: 0;
}

/* === WRAPPER IMAGES + INFOS PRODUIT === */
.bd-product-main-content {
  display: flex;
  gap: 2rem;
  align-items: start;
  width: 100%;
  padding:10px;
}

/* Layouts du wrapper selon la position des infos produit - FLEXBOX */
.bd-product-main-content.bd-layout-right {
  flex-direction: row;
  align-items: flex-start;
}

.bd-product-main-content.bd-layout-left {
  flex-direction: row-reverse;
  align-items: flex-start;
}

.bd-product-main-content.bd-layout-top {
  flex-direction: column-reverse;
  align-items: stretch;
}

.bd-product-main-content.bd-layout-bottom {
  flex-direction: column;
  align-items: stretch;
}

/* Largeurs des zones selon la position */
.bd-product-main-content.bd-layout-right .bd-product-images-zone,
.bd-product-main-content.bd-layout-left .bd-product-images-zone {
  flex: 1;
  min-width: 0; /* Permet la réduction si nécessaire */
  flex: 1;
  aspect-ratio:1;
}

.bd-product-main-content.bd-layout-right .bd-product-info-zone,
.bd-product-main-content.bd-layout-left .bd-product-info-zone {
  flex: 0 0 auto; /* Taille fixe selon la largeur définie */
}

/* Largeurs spécifiques selon l'option marchand */
.bd-product-main-content.bd-layout-right.bd-width-narrow .bd-product-info-zone,
.bd-product-main-content.bd-layout-left.bd-width-narrow .bd-product-info-zone {
  width: 300px;
}

.bd-product-main-content.bd-layout-right.bd-width-medium .bd-product-info-zone,
.bd-product-main-content.bd-layout-left.bd-width-medium .bd-product-info-zone {
  width: 350px;
}

.bd-product-main-content.bd-layout-right.bd-width-wide .bd-product-info-zone,
.bd-product-main-content.bd-layout-left.bd-width-wide .bd-product-info-zone {
  width: 400px;
}

.bd-product-main-content.bd-layout-right.bd-width-extra-wide .bd-product-info-zone,
.bd-product-main-content.bd-layout-left.bd-width-extra-wide .bd-product-info-zone {
  width: 450px;
}

/* Pour les positions top/bottom, les deux zones prennent toute la largeur */
.bd-product-main-content.bd-layout-top .bd-product-images-zone,
.bd-product-main-content.bd-layout-top .bd-product-info-zone,
.bd-product-main-content.bd-layout-bottom .bd-product-images-zone,
.bd-product-main-content.bd-layout-bottom .bd-product-info-zone {
  width: 100%;
  flex: 1 1 auto;
}

/* Zones images et infos produit */
.bd-product-images-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position:sticky;
  top:0;
}

.bd-product-main-content .empty-variants-design-first {
  display:none;
}

/* Configuration de la grid selon la position des miniatures */
.bd-product-images-zone:has(.bd-variant-thumbnails-top) {
  grid-template-rows: auto 1fr;
  grid-template-columns: 1fr;
}

.bd-product-images-zone:has(.bd-variant-thumbnails-bottom) {
  grid-template-rows: 1fr auto;
  grid-template-columns: 1fr;
}

.bd-product-images-zone:has(.bd-variant-thumbnails-left) {
  grid-template-rows: 1fr;
  grid-template-columns: auto 1fr;
}

.bd-product-images-zone:has(.bd-variant-thumbnails-right) {
  grid-template-rows: 1fr;
  grid-template-columns: 1fr auto;
}

/* Fallback pour les navigateurs sans support :has() */
.bd-product-images-zone.has-thumbnails-top {
  grid-template-rows: auto 1fr;
  grid-template-columns: 1fr;
}

.bd-product-images-zone.has-thumbnails-bottom {
  grid-template-rows: 1fr auto;
  grid-template-columns: 1fr;
}

.bd-product-images-zone.has-thumbnails-left {
  grid-template-rows: 1fr;
  grid-template-columns: auto 1fr;
}

.bd-product-images-zone.has-thumbnails-right {
  grid-template-rows: 1fr;
  grid-template-columns: 1fr auto;
}

/* Positionnement des miniatures selon la configuration */
.bd-variant-thumbnails-top {
  grid-row: 1;
  grid-column: 1;
  flex-direction: row;
}

.bd-variant-thumbnails-bottom {
  grid-row: 2;
  grid-column: 1;
  flex-direction: row;
}

.bd-variant-thumbnails-left {
  grid-row: 1;
  grid-column: 1;
  flex-direction: column;
}

.bd-variant-thumbnails-right {
  grid-row: 1;
  grid-column: 2;
  flex-direction: column;
}

/* Positionnement du carrousel selon la position des miniatures */
.bd-variant-thumbnails-top ~ .carousel-images-wrapper {
  grid-row: 2;
  grid-column: 1;
}

.bd-variant-thumbnails-bottom ~ .carousel-images-wrapper {
  grid-row: 1;
  grid-column: 1;
}

.bd-variant-thumbnails-left ~ .carousel-images-wrapper {
  grid-row: 1;
  grid-column: 2;
}

.bd-variant-thumbnails-right ~ .carousel-images-wrapper {
  grid-row: 1;
  grid-column: 1;
}

.bd-variant-thumbnails {
  display: flex;
  gap: 0.5rem;
  position: relative;
  max-height: 600px;
}

/* Largeurs spécifiques pour les miniatures en position gauche/droite */
.bd-variant-thumbnails-left,
.bd-variant-thumbnails-right {
  width: 100px;
  max-width: 100px;
}

/* Hauteurs spécifiques pour les miniatures en position haut/bas */
.bd-variant-thumbnails-top,
.bd-variant-thumbnails-bottom {
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
  scroll-behavior: smooth;
  scrollbar-width: none;
  max-height:95px;
}

.bd-thumbnails-hidden {
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.bd-thumbnails-hidden.totally-hidden {
  display:none !important;
}

.bd-thumbnails-hidden .bd-thumbnails-toggle {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 10;
}

.bd-thumbnails-toggle {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
  display:none !important;
}

.bd-thumbnails-toggle:hover {
  background: #F9FAFB;
  transform: scale(1.05);
}

.bd-variant-thumbnails-top .bd-showcase-thumbnails-container,
.bd-variant-thumbnails-bottom .bd-showcase-thumbnails-container {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.bd-variant-thumbnails-left .bd-showcase-thumbnails-container,
.bd-variant-thumbnails-right .bd-showcase-thumbnails-container {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 0.5rem;
}

.bd-showcase-thumbnails-container::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.bd-showcase-thumbnails-container::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 2px;
}

.thumb-img-container {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.thumb-img-container:hover {
  border-color: #9CA3AF;
  transform: scale(1.05);
}

.thumb-img-container.active {
  border-color: #111827;
}

.carousel-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bd-showcase-thumbnails-btn {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.bd-variant-thumbnails-top .bd-showcase-thumbnails-btn,
.bd-variant-thumbnails-bottom .bd-showcase-thumbnails-btn {
  width: 32px;
  height: 80px;
}

.bd-variant-thumbnails-left .bd-showcase-thumbnails-btn,
.bd-variant-thumbnails-right .bd-showcase-thumbnails-btn {
  width: 80px;
  height: 32px;
}

.bd-variant-thumbnails-top .bd-showcase-thumbnails-btn svg,
.bd-variant-thumbnails-bottom .bd-showcase-thumbnails-btn svg {
 transform: rotate(-90deg);
}

.bd-showcase-thumbnails-btn:hover:not(.is-invisible) {
  background: #E5E7EB;
}

.bd-showcase-thumbnails-btn.is-invisible {
  opacity: 0;
  pointer-events: none;
}

/* Styles du carrousel principal */
.carousel-images-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #F9FAFB;
}

.bd-showcase-product-images {
  width: 100%;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}

.main-image-carousel-wrapper {
  height: 100%;
}

.main-image-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
}

.carousel-main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* === NAVIGATION IMAGES === */
.bd-showcase-carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bd-showcase-carousel-button.prev { left: 1rem; }
.bd-showcase-carousel-button.next { right: 1rem; }

.bd-showcase-carousel-button:hover:not(.is-invisible) {
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-50%) scale(1.1);
}

.bd-showcase-carousel-button.is-invisible {
  opacity: 0;
  pointer-events: none;
}

.main-image-counter {
  top:1rem;
  bottom: auto;
}

.bd-product-viewer-section .carousel-dots-generic-wrapper .carousel-dots {
  pointer-events: auto;
}

/* === BOUTON MOBILE SCROLL VERS PANIER === */
.bd-mobile-scroll-to-cart {
  display: none; /* Masqué par défaut sur desktop */
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 50;
  border: none;
  border-radius: 50px;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  background: #FFF;
  color: #000;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.bd-mobile-scroll-to-cart::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bd-mobile-scroll-to-cart:hover::before {
  opacity: 1;
}

.bd-mobile-scroll-to-cart:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.45), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bd-mobile-scroll-to-cart:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.bd-mobile-scroll-to-cart svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
  flex-shrink: 0;
}

.bd-mobile-cart-text {
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Animation d'apparition */
@keyframes bd-cart-btn-appear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Animation pulse subtile */
@keyframes bd-cart-btn-pulse {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45), 0 2px 10px rgba(0, 0, 0, 0.2);
  }
}

/* Affichage sur mobile uniquement */
@media (max-width: 768px) {
  .bd-product-viewer-section {
     max-width:calc(100% - 5px);
  }
  .bd-products-scroll-container {
    min-height:70px;
  }
  .bd-product-card-mini {
    aspect-ratio:auto !important;
  }
  .bd-mobile-scroll-to-cart {
    display: flex;
    animation: bd-cart-btn-appear 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both,
               bd-cart-btn-pulse 3s ease-in-out 1s infinite;
  }

  .bd-product-viewer-section .carousel-zoom-icon {
    display:none;
}
  
  /* Adapter selon la position des miniatures */
  .bd-product-images-zone.has-thumbnails-bottom .bd-mobile-scroll-to-cart,
  .bd-variant-thumbnails-bottom ~ .carousel-images-wrapper ~ .bd-mobile-scroll-to-cart {
    bottom: 0; /* Éviter les miniatures en bas */
    right:0;
  }
}

/* === INFO PRODUIT === */
.bd-product-info-zone {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  max-height: 100%; /* Ne pas dépasser la hauteur du parent */
  overflow: visible; /* Permet le scroll interne */
}

/* Anciens styles de positionnement remplacés par le wrapper bd-product-main-content */

.bd-product-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.bd-product-price-wrapper {
  margin-bottom: 1rem;
}

.bd-product-price {
  font-size: 1.75rem;
  font-weight: 600;
  color: #111827;
}

/* === BOUTON WISHLIST MODERNE === */
.bd-wishlist-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.25rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
  border: 1.5px solid #E5E7EB;
  border-radius: 12px;
  color: #374151;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-top:10px;
  justify-content: center;
}

/* Harmonisation largeur/style sur mobile: bouton plein largeur comme les autres CTA si c’est le cas */
@media (max-width: 768px) {
  .bd-wishlist-btn {
    width: 100%;
    justify-content: center;
  }
  .bd-mobile-groups-toggle {
    top: 80% !important;
    transform: translate(-50%, 0%) !important;
  }
  .bd-collection-products {
    margin:0 !important;
    border-bottom: 1px solid var(--bd-groups-border-color, #E5E7EB);
  }
  .bd-product-images-zone {
    position:unset !important;
  }
  .bd-product-main-content, 
  .bd-product-images-zone,
  .bd-viewer-main-wrapper,
  .bd-content-layout-wrapper {
    gap:0 !important;
  }
  .bd-sidebar {
    padding:0 !important;
    border:none !important;
    border-radius:0px !important;
    border-bottom: 1px solid var(--bd-groups-border-color, #E5E7EB);
  }
  .bd-content-layout-wrapper {
   background: #F9FAFB;
  }
}

.bd-wishlist-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.bd-wishlist-btn:hover::before {
  left: 100%;
}

.bd-wishlist-btn:hover {);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.bd-wishlist-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.1);
}

.bd-wishlist-btn.active {
  border-color: #EF4444;
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.bd-wishlist-btn.active:hover {
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.bd-wishlist-btn.active .bd-wishlist-icon svg path {
  fill: currentColor;
}

.bd-wishlist-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.bd-wishlist-icon svg {
  width: 1.5em;
  height: 1.5em;
  fill: none;
  stroke: currentColor;
  stroke-width: 8;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bd-wishlist-btn:hover .bd-wishlist-icon svg {
  transform: scale(1.1);
  filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.2));
}

.bd-wishlist-btn.active .bd-wishlist-icon svg {
  fill: currentColor;
  stroke: none;
  animation: bd-heart-beat 0.6s ease;
}

@keyframes bd-heart-beat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(0.95); }
  75% { transform: scale(1.1); }
}

.bd-wishlist-text {
  position: relative;
  z-index: 1;
}

/* === DROPDOWN INFORMATIONS DE LIVRAISON MODERNE === */
.bd-delivery-info-dropdown {
  margin-bottom: 1.5rem;
}

.bd-delivery-toggle-btn, .bd-description-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: none;
    border: none;
    border-radius:none !important;
}

.bd-delivery-toggle-btn:hover::before {
  width: 8px;
}

.bd-delivery-toggle-btn:hover {
  transform: translateX(2px);
}

.bd-delivery-toggle-btn:active {
  transform: translateX(1px);
}

.bd-delivery-toggle-btn[aria-expanded="true"] {

}

.bd-delivery-toggle-btn[aria-expanded="true"]::before {
}

.bd-delivery-toggle-text {
  flex: 1;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bd-delivery-toggle-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bd-delivery-toggle-btn[aria-expanded="true"] .bd-delivery-toggle-icon {
  transform: rotate(180deg);
}

.bd-delivery-info-content {
  animation: bd-delivery-slide-down 0.3s ease;
}

@keyframes bd-delivery-slide-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === DESCRIPTION DU PRODUIT === */
.bd-product-short-description {
  margin: 1rem 0 1.5rem;
  padding: 0.75rem 1rem;
  background: #F9FAFB;
  border-left: 3px solid #333;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #374151;
  position: relative;
}

/* Bouton "Découvrir davantage" dans la short description */
.bd-discover-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  color:#ccc;
  transition: opacity 0.3s ease, transform 0.3s ease, gap 0.2s ease, color 0.2s ease;
}

.bd-discover-more-btn:hover {
  color: #000;
  gap: 0.6rem;
}

.bd-discover-more-icon {
  transition: transform 0.3s ease;
}

.bd-discover-more-btn:hover .bd-discover-more-icon {
  transform: translateY(2px);
}

.bd-discover-more-btn:active {
  transform: scale(0.98);
}

/* Skeleton loaders */
.bd-product-short-description-skeleton {
  margin: 1rem 0 1.5rem;
  padding: 0.75rem 1rem;
  background: #F9FAFB;
  border-left: 3px solid #E5E7EB;
  border-radius: 8px;
}

.bd-skeleton-line {
  height: 16px;
  background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
  background-size: 200% 100%;
  animation: bd-skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}

.bd-skeleton-line:last-child {
  margin-bottom: 0;
}

.bd-product-description-skeleton {
  margin-top: 1.5rem;
}

.bd-skeleton-btn {
  height: 48px;
  background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
  background-size: 200% 100%;
  animation: bd-skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 12px;
}

@keyframes bd-skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.bd-product-description-container {
  margin-top: 1.5rem;
}

.bd-description-toggle-btn {
  /*
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  max-height: 100px;
  overflow: hidden;
  background:none;
  */
}

/* État masqué initial */
.bd-description-toggle-btn-hidden {
  opacity: 0;
  max-height: 0;
  padding: 0 1.25rem;
  margin: 0;
  pointer-events: none;
}

/* Animation de révélation */
.bd-description-toggle-btn-revealed {
  animation: bd-reveal-button 0.4s ease forwards;
}

@keyframes bd-reveal-button {
  from {
    opacity: 0;
    max-height: 0;
    padding: 0 1.25rem;
    margin-top: 0;
  }
  to {
    opacity: 1;
    max-height: 100px;
    padding: 0.875rem 1.25rem;
    margin-top: 0;
  }
}

.bd-description-toggle-btn:hover {
  transform: translateY(-2px);
  cursor:pointer;
}

.bd-description-toggle-btn:active {
  transform: translateY(0);
}

.bd-description-toggle-btn[aria-expanded="true"] {
}

.bd-description-toggle-btn[aria-expanded="true"]:hover {
}

.bd-description-toggle-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.bd-description-toggle-btn[aria-expanded="true"] .bd-description-toggle-icon {
  transform: rotate(180deg);
}

.bd-product-description-full {
  margin-top: 1rem;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #374151;
  position: relative;
  min-height: 200px; /* Hauteur minimale pour le contenu */
  max-height: 60vh; /* S'adapte à la hauteur de l'écran */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              margin-top 0.3s ease;
      margin-left: 5px;
    background: #F8F8F8;
}

/* État fermé */
.bd-product-description-full[style*="display: none"] {
  min-height: 0;
  max-height: 0;
  margin-top: 0;
  border: none;
}

.bd-description-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  /* Custom scrollbar */
  scrollbar-width: none;
  scrollbar-color: #CBD5E1 #F1F5F9;
}

.bd-description-content::-webkit-scrollbar {
  width: 8px;
}

.bd-description-content::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 4px;
}

.bd-description-content::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
  transition: background 0.2s;
}

.bd-description-content::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.bd-product-description-full[data-animation="fast"] {
  transition-duration: 0.2s;
}

.bd-product-description-full[data-animation="instant"] {
  transition-duration: 0s;
}

/* Styles pour le contenu de la description */
.bd-product-description-full h1,
.bd-product-description-full h2,
.bd-product-description-full h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.bd-product-description-full h1 { font-size: 1.5rem; color: #111827; }
.bd-product-description-full h2 { font-size: 1.25rem; color: #1F2937; }
.bd-product-description-full h3 { font-size: 1.1rem; color: #374151; }

.bd-product-description-full p {
  margin-bottom: 1rem;
}

.bd-product-description-full ul,
.bd-product-description-full ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.bd-product-description-full li {
  margin-bottom: 0.5rem;
}

.bd-product-description-full a {
  color: #3B82F6;
  text-decoration: underline;
}

.bd-product-description-full a:hover {
  color: #2563EB;
}

.bd-product-description-full img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Sous-accordéons pour les sections H2/H3 */
.bd-description-section {
  margin-bottom: 1rem;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
}

.bd-description-section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #F9FAFB;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
  transition: background 0.2s ease;
}

.bd-description-section-header:hover {
  background: #F3F4F6;
}

.bd-description-section-header[aria-expanded="true"] {
  background: #EFF6FF;
  color: #2563EB;
}

.bd-description-section-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: #6B7280;
}

.bd-description-section-header[aria-expanded="true"] .bd-description-section-icon {
  transform: rotate(180deg);
  color: #2563EB;
}

.bd-description-section-content {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.3s ease;
}

.bd-description-section-content[aria-hidden="false"] {
  padding: 1rem 1.25rem;
  max-height: 2000px; /* Valeur suffisamment grande pour tout contenu */
}

/* Flèches de scroll pour la description */
.bd-description-scroll-arrow {
   /* position: absolute;
    left: 50%;
    transform: translateX(-50%);
    right: 0;
    left: auto;
    top: 50%;
    */
    width: 30px;
    height: 30px;
    border: none;
    color:#333;
    background:#FFF;
    border:solid #ccc 1px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
}

.btn-description-scroll {
    position: absolute;
    transform: translateY(-50%);
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    right: 0;
    left: auto;
    top: 50%;
    flex-direction: column;
}

.bd-description-scroll-arrow.visible {
  opacity: 1;
  pointer-events: auto;
}

.bd-description-scroll-arrow:hover {
  transform: translateX(-50%) scale(1.1);
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px, rgb(51, 51, 51) 0px 0px 0px 3px;
}

.bd-description-scroll-arrow:active {
  transform: translateX(-50%) scale(0.95);
}

.bd-description-scroll-arrow svg {
  width: 20px;
  height: 20px;
}

/* Animation des flèches */
.bd-description-scroll-up.visible {
  animation: bd-bounce-up 2s ease-in-out infinite;
}

.bd-description-scroll-down.visible {
  animation: bd-bounce-down 2s ease-in-out infinite;
}

@keyframes bd-bounce-up {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-4px);
  }
}

@keyframes bd-bounce-down {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(4px);
  }
}

/* === LISTE PRODUITS DE LA COLLECTION - Position configurable === */
.bd-collection-products {
  position: relative;
  background: #F9FAFB;
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 200px; /* Hauteur minimale pour éviter le rognage des cartes */
}

/* Anciens styles de positionnement remplacés par le wrapper bd-content-layout-wrapper */

.bd-products-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #E5E7EB;
  flex-shrink: 0;
  gap: 10px;
}

/* Miniature de la collection dans le header */
.bd-collection-header-thumbnail {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  background: #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bd-collection-header-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bd-products-list-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  flex: 1;
  min-width: 0;
}

.bd-products-list-count {
  font-size: 0.875rem;
  color: #6B7280;
  flex-shrink: 0;
}

/* === CONTENEUR SCROLLABLE AVEC FLÈCHES === */
.bd-products-scroll-container {
  position: relative;
  flex: 1;
  overflow: hidden;
  min-height: 150px; /* Hauteur minimale pour éviter le rognage */
}

/* Hauteur dynamique selon la position de la collection */
.bd-collection-position-left .bd-products-scroll-container,
.bd-collection-position-right .bd-products-scroll-container {
  max-height: calc(100vh - 200px); /* Hauteur relative à l'écran pour positions latérales */
  overflow-y: auto;
  overflow-x: hidden;
  max-height:none !important;

}

.bd-collection-position-top .bd-products-scroll-container,
.bd-collection-position-bottom .bd-products-scroll-container {
  max-height: 300px; /* Hauteur fixe pour positions haut/bas */
  overflow-x: auto;
  overflow-y: hidden;
}

.bd-products-grid {
  display: flex;
  gap: 1rem;
  transition: transform 0.3s ease;
  scroll-behavior: smooth;
  min-height: 100px; /* Hauteur minimale pour les cartes produits */
  scrollbar-width: none;
}

/* Direction selon la position */
.bd-collection-position-top .bd-products-grid,
.bd-collection-position-bottom .bd-products-grid {
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  /* Largeur adaptative selon le nombre de produits configuré */
  max-width: calc(var(--products-per-row-desktop) * var(--product-width-desktop) + (var(--products-per-row-desktop) - 1) * var(--products-gap));
}

.bd-collection-position-left .bd-products-grid,
.bd-collection-position-right .bd-products-grid {
  flex-direction: column;
  flex-wrap: nowrap;
  overflow-x: hidden;
  overflow-y: auto;
  /* Hauteur adaptative selon le nombre de produits configuré */
  max-height: calc(var(--products-per-row-desktop) * var(--product-base-height) + (var(--products-per-row-desktop) - 1) * var(--products-gap));
}

/* === LARGEURS ADAPTATIVES PRODUITS === */
/* Desktop - Largeurs calculées selon products_per_row_desktop */
.bd-collection-products .bd-product-card-mini {
  flex: 0 0 calc(var(--product-width-desktop) - var(--products-gap) / var(--products-per-row-desktop));
  width: calc(var(--product-width-desktop) - var(--products-gap) / var(--products-per-row-desktop));
  min-width: calc(var(--product-width-desktop) - var(--products-gap) / var(--products-per-row-desktop));
  max-width: calc(var(--product-width-desktop) - var(--products-gap) / var(--products-per-row-desktop));
}

/* Mode vertical - hauteurs adaptatives pour forcer le défilement */
.bd-collection-position-left .bd-products-grid .bd-product-card-mini,
.bd-collection-position-right .bd-products-grid .bd-product-card-mini {
  flex: 0 0 calc(100% / var(--products-per-row-desktop)); /* Hauteur proportionnelle */
  height: calc(100% / var(--products-per-row-desktop));
  min-height: calc(100% / var(--products-per-row-desktop));
  max-height: calc(100% / var(--products-per-row-desktop));
  width: 100%;
}

/* Largeurs selon le nombre de produits par ligne pour la grille classique */
.bd-products-grid[data-products-per-row="1"] .bd-product-card-mini {
  width: calc(100% - 1.5rem);
}

.bd-products-grid[data-products-per-row="2"] .bd-product-card-mini {
  width: calc(50% - 0.75rem);
}

.bd-products-grid[data-products-per-row="3"] .bd-product-card-mini {
  width: calc(33.333% - 1rem);
}

.bd-products-grid[data-products-per-row="4"] .bd-product-card-mini {
  width: calc(25% - 1.125rem);
}

.bd-products-grid[data-products-per-row="5"] .bd-product-card-mini {
  width: calc(20% - 1.2rem);
}

.bd-products-grid[data-products-per-row="6"] .bd-product-card-mini {
  width: calc(16.666% - 1.25rem);
}

.bd-products-grid[data-products-per-row="7"] .bd-product-card-mini {
  width: calc(14.285% - 1.285rem);
}

.bd-products-grid[data-products-per-row="8"] .bd-product-card-mini {
  width: calc(12.5% - 1.3125rem);
}

/* Direction horizontale pour top/bottom */
.bd-collection-products-top .bd-products-grid,
.bd-collection-products-bottom .bd-products-grid {
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.5rem;
  flex-wrap: nowrap;
  /* Largeur adaptative selon le nombre de produits configuré */
  max-width: calc(var(--products-per-row-desktop) * var(--product-width-desktop) + (var(--products-per-row-desktop) - 1) * var(--products-gap));
  width: 100%;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Direction verticale pour left/right */
.bd-collection-products-left .bd-products-grid,
.bd-collection-products-right .bd-products-grid {
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0.5rem;
  flex-wrap: nowrap;
  /* Hauteur limitée pour forcer le défilement - affiche exactement 3 produits pour forcer scroll */
  max-height: calc(3 * 200px + 2 * 1.5rem);
  height: 100%;
}

/* Ajustement des cartes en mode vertical */
.bd-collection-position-left .bd-product-card-mini,
.bd-collection-position-right .bd-product-card-mini {
  width: 100%;
  max-width: none;
  flex-shrink: 0;
  margin-bottom: 1rem;
}

.bd-collection-position-left .bd-product-card-mini:last-child,
.bd-collection-position-right .bd-product-card-mini:last-child {
  margin-bottom: 0;
}

/* === FLÈCHES DE NAVIGATION PRODUITS === */
.bd-products-nav-arrows {
  position: absolute;
  z-index: 20;
  display: flex;
  pointer-events: none;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Flèches horizontales (top/bottom) */
.bd-collection-products-top .bd-products-nav-arrows,
.bd-collection-products-bottom .bd-products-nav-arrows {
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: auto;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.5rem;
}

/* Flèches verticales (left/right) */
.bd-collection-products-left .bd-products-nav-arrows,
.bd-collection-products-right .bd-products-nav-arrows {
    transform: translateX(-50%);
    width: auto;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    right: 10px;
    left: auto;
    transform: translateY(-50%);
    top: 50%;
    bottom: auto;
    gap:10px;
}

.bd-products-nav-arrow {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #E5E7EB;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(4px);
}

.bd-products-nav-arrow:hover:not(.disabled) {
  background: #FFFFFF;
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  border-color: #D1D5DB;
}

.bd-products-nav-arrow.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.7);
}

.bd-products-nav-arrow svg {
  width: 18px;
  height: 18px;
  color: #374151;
  transition: color 0.2s ease;
}

.bd-products-nav-arrow:hover:not(.disabled) svg {
  color: #111827;
}

/* === ORIENTATION DES FLÈCHES SELON LE DÉFILEMENT === */
/* Par défaut, cacher toutes les flèches */
.bd-products-nav-arrow .bd-arrow-horizontal,
.bd-products-nav-arrow .bd-arrow-vertical {
  display: none;
}

/* Affichage horizontal pour positions top/bottom */
.bd-collection-products-top .bd-products-nav-arrow .bd-arrow-horizontal,
.bd-collection-products-bottom .bd-products-nav-arrow .bd-arrow-horizontal {
  display: block;
}

/* Affichage vertical pour positions left/right */
.bd-collection-products-left .bd-products-nav-arrow .bd-arrow-vertical,
.bd-collection-products-right .bd-products-nav-arrow .bd-arrow-vertical {
  display: block;
}

/* === SCROLLBARS PERSONNALISÉES === */
.bd-products-grid::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.bd-products-grid::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 3px;
}

.bd-products-grid::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

.bd-products-grid::-webkit-scrollbar-track {
  background: #F3F4F6;
  border-radius: 3px;
}

/* === CARTE PRODUIT MINI === */
.bd-product-card-mini {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

/* Ratios pour les cartes produits */
.bd-product-card-mini.ratio-square {
  aspect-ratio: 1/1;
}

.bd-product-card-mini.ratio-portrait {
  aspect-ratio: 3/4;
}

.bd-product-card-mini.ratio-landscape {
  aspect-ratio: 4/3;
}

.bd-product-card-mini.ratio-wide {
  aspect-ratio: 16/9;
}

.bd-product-card-mini.ratio-tall {
  aspect-ratio: 2/3;
}

.bd-product-card-mini.ratio-circle {
  aspect-ratio: 1/1;
  border-radius: 50%;
}

.bd-product-card-mini.ratio-circle .bd-product-card-mini-image {
  border-radius: 50%;
}

.bd-product-card-mini:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border-color: #E5E7EB;
}

.bd-product-card-mini.active {
  border-color: #111827;
}

.bd-product-card-mini-image {
  width: 100%;
  object-fit: cover;
  display: block;
}

/* Ajustement de l'image selon le ratio */
.bd-product-card-mini.ratio-square .bd-product-card-mini-image,
.bd-product-card-mini.ratio-circle .bd-product-card-mini-image {
  height: 70%;
}

.bd-product-card-mini.ratio-portrait .bd-product-card-mini-image,
.bd-product-card-mini.ratio-tall .bd-product-card-mini-image {
  height: 75%;
}

.bd-product-card-mini.ratio-landscape .bd-product-card-mini-image,
.bd-product-card-mini.ratio-wide .bd-product-card-mini-image {
  height: 65%;
}

.bd-product-card-mini-title {
  padding: 0.5rem 0.75rem 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  text-align: center;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Wrapper des prix (contient prix barré + prix actuel) */
.bd-product-card-mini-price-wrapper {
  padding: 0.25rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

/* Prix normal (pas de promo) */
.bd-product-card-mini-price {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  text-align: center;
  line-height: 1;
}

/* Prix barré (compare_at_price) */
.bd-product-card-mini-price-compare {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #9CA3AF;
  text-decoration: line-through;
  text-align: center;
  line-height: 1;
}

/* Prix en promotion (rouge) */
.bd-product-card-mini-price-sale {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #DC2626;
  text-align: center;
  line-height: 1;
}

/* Badge "Promo" */
.bd-product-card-mini-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #FFFFFF;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
  z-index: 10;
  animation: bd-badge-appear 0.3s ease-out, bd-badge-pulse 2s ease-in-out 0.5s infinite;
}

@keyframes bd-badge-appear {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes bd-badge-pulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
  }
  50% {
    box-shadow: 0 2px 12px rgba(220, 38, 38, 0.5), 0 0 0 2px rgba(220, 38, 38, 0.2);
  }
}

/* Ajustement de la carte pour accueillir titre + prix + badge */
.bd-product-card-mini {
  display: flex;
  flex-direction: column;
  position: relative;
}

.bd-product-card-mini-image {
  flex-shrink: 0;
}

/* === LOAD MORE === */
.bd-load-more-btn {
  margin: 2rem auto 0;
  padding: 1rem 2rem;
  background: #111827;
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  min-width: 200px;
  display:none !important;
}

.bd-load-more-btn:hover {
  background: #000000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.bd-load-more-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === OVERLAY DE CHARGEMENT DES COLLECTIONS === */
.bd-collection-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.bd-collection-loading-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bd-collection-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
}

.bd-collection-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #E5E7EB;
  border-top-color: #3B82F6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.bd-collection-loading-text {
  color: #374151;
  font-size: 0.95rem;
  font-weight: 500;
}

/* État de chargement pour les cartes de collection */
.bd-collection-card.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.bd-collection-card.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  z-index: 10;
}

/* Skeleton loader pour les produits */
.bd-products-skeleton {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.bd-product-skeleton-card {
  background: #F9FAFB;
  border-radius: 12px;
  overflow: hidden;
  animation: pulse 1.5s ease-in-out infinite;
}

.bd-product-skeleton-image {
  width: 100%;
  padding-top: 100%; /* Ratio 1:1 */
  background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.bd-product-skeleton-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bd-product-skeleton-title {
  height: 20px;
  background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 1.5s ease-in-out infinite;
}

.bd-product-skeleton-price {
  height: 16px;
  width: 60%;
  background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 1.5s ease-in-out infinite;
  animation-delay: 0.1s;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* === SIDEBAR (GROUPES) - Position configurable et rétractable === */
.bd-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  transition: all 0.3s ease;
  background: var(--bd-groups-bg-color, #FFFFFF);
  border: 1px solid var(--bd-groups-border-color, #E5E7EB);
  border-radius: 12px;
  padding: 1rem;
  border: none !important;
}

/* === SYSTÈME DE SCROLL INTERNE SIDEBAR === */
.bd-sidebar-scroll-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0; /* Permet au flex child de shrink */
  padding: 5px;
}

.bd-sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-top:0;
  /* Cache les scrollbars natives */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bd-sidebar-content::-webkit-scrollbar {
  display: none;
}

.bd-sidebar-scroll-arrow {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 8px;
  margin: 4px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  backdrop-filter: blur(4px);
  z-index: 2;
  position: relative;
  opacity: 0.8;
  position: absolute;
  left: 50%;
  z-index: 100;
  transform:translateX(-50%);
  visibility: visible;
}

.bd-sidebar-scroll-arrow.bd-sidebar-scroll-up {
  top: 35px;
}
.bd-sidebar-scroll-arrow.bd-sidebar-scroll-down {
  bottom:5px;
}

.bd-sidebar-scroll-arrow:hover {
  background: #F3F4F6;
  color: #374151;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bd-sidebar-scroll-arrow:active {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.bd-sidebar-scroll-arrow.bd-hidden {
  opacity: 0 ;
  pointer-events: none;
  visibility: hidden;
}

.bd-sidebar-top .bd-sidebar-scroll-arrow.bd-hidden,
.bd-sidebar-bottom .bd-sidebar-scroll-arrow.bd-hidden {
  display:none;
}

/* Animation de pulse pour indiquer la scrollabilité */
.bd-sidebar-scroll-container[data-scrollable="true"] .bd-sidebar-scroll-arrow {
  animation: pulse-subtle 2s infinite;
}

@keyframes pulse-subtle {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

.bd-sidebar-right {
  grid-row: 1;
  grid-column: 3;
  padding: 1rem;
  border-radius: 16px;
}

.bd-sidebar-left {
  grid-row: 1;
  grid-column: 1;
  padding: 1rem;
  border-radius: 16px;
}

.bd-sidebar-collapsed {
width: 0px !important;
    flex: 0 0 0px !important;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 0;
}

/* Masquer le contenu de scroll quand la sidebar est collapsed */
.bd-sidebar-collapsed .bd-sidebar-scroll-container {
  display: none;
}

.bd-sidebar-collapsed .bd-sidebar-toggle {
  margin: 0 auto;
}

.bd-sidebar-button-hide, .bd-sidebar-button-show {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.bd-sidebar-collapsed .bd-sidebar-button-hide {
  opacity: 0;
  visibility: hidden;
  width: 0;
  height: 0;
}

.bd-sidebar-collapsed .bd-sidebar-button-show {
  opacity:1 !important;
  visibility:visible !important;
  width: auto !important;
  height: auto !important;
}

/* Adaptation automatique de la zone produit quand sidebar collapsed */
.bd-viewer-main-wrapper:has(.bd-sidebar-collapsed) .bd-viewer-product-display {
  flex: 1 !important;
}

/* Adaptation avec JavaScript pour compatibilité complète */
.bd-viewer-main-wrapper.bd-sidebar-is-collapsed .bd-viewer-product-display {
  flex: 1 !important;
}

.bd-viewer-main-wrapper.bd-sidebar-is-collapsed {
  gap:0;
}

/* Masquer le contenu de la sidebar quand collapsed */
.bd-sidebar-collapsed .bd-collection-groups,
.bd-sidebar-collapsed .bd-group-title,
.bd-sidebar-collapsed .bd-collection-grid {
  display: none;
}

/* Ajustement du bouton toggle en position collapsed */
.bd-sidebar-collapsed .bd-sidebar-toggle {
  right: 50%;
}

/* Assurer que les règles de collapse ne sont actives que sur desktop */
@media (min-width: 769px) {
  .bd-viewer-layout-top .bd-sidebar.bd-sidebar-collapsed, .bd-viewer-layout-bottom .bd-sidebar.bd-sidebar-collapsed {
    width:100% !important;
    flex: 0 0 100% !important;
  }
  
  .bd-viewer-main-wrapper.bd-sidebar-is-collapsed .bd-viewer-product-display {
    flex: 1 !important;
    max-width: 100% !important;
  }
}

.bd-sidebar-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
  padding:0;
}

.bd-sidebar-toggle:hover {
  background: #F9FAFB;
  transform: scale(1.1);
}

.bd-sidebar-left .bd-sidebar-toggle {
  right: 1rem;
  left:auto;
}

.bd-viewer-layout-left  .bd-sidebar-toggle {
    position: absolute;
    z-index: 11;
}

.bd-viewer-layout-left  .bd-sidebar-toggle {
    right: auto;
    left: calc(var(--sidebar-width) - 20px);
}

.bd-viewer-layout-left.bd-sidebar-is-collapsed  .bd-sidebar-toggle {
      right: 0;
      left:auto;
}

.bd-viewer-layout-right .bd-sidebar-toggle {
    left: auto;
    right: calc(var(--sidebar-width) - 20px);
}

.bd-viewer-layout-left.bd-sidebar-is-collapsed  .bd-sidebar-toggle {
    left: 0;
    right:auto;
}

.bd-sidebar-is-collapsed .bd-sidebar-button-hide {
  opacity: 0;
  visibility: hidden;
  width: 0;
  height: 0;
}

.bd-sidebar-is-collapsed .bd-sidebar-button-show {
  opacity:1 !important;
  visibility:visible !important;
  width: auto !important;
  height: auto !important;
}

/* === CAROUSEL DE COLLECTIONS === */
.collections-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
    min-width: 0;
}

.collections-wrapper .carousel-dots {
      justify-content: center;
}

.collections-container {
  width: 100%;
  position: relative;
}

.collections {
  gap: 12px;
  transition: transform 0.3s ease;
  display: flex;
}

/* Mode carousel : flex-row nowrap pour scroll horizontal */
.collections-container[style*="overflow: hidden"] .collections {
  flex-direction: row;
  flex-wrap: nowrap;
}

/* Layout grille avec colonnes : flex-wrap pour retour à la ligne */
.collections.grid-layout {
  display: flex;
  flex-wrap: wrap;
}

.collections.flex-layout {
  display: flex;
  flex-wrap: wrap;
}

/* === NAVIGATION DU CAROUSEL === */
.carousel-navigation {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
  position: absolute;
   top: 50%;
  transform: translate(-0%, -50%);

}

.carousel-arrows-top {
  top: -50px;
}

.carousel-arrows-middle {
  top: 50%;
  transform: translateY(-50%);
}

.carousel-arrows-bottom {
  bottom: -50px;
}

.carousel-arrow {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #E5E7EB;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-arrow:hover:not(:disabled) {
  background: #FFFFFF;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
  color: #374151;
}


/* === RESPONSIVE POUR LES CAROUSELS === */
@media (max-width: 768px) {
  .carousel-arrow {
    width: 36px;
    height: 36px;
  }
  
  .carousel-arrow svg {
    width: 18px;
    height: 18px;
  }
  
  .carousel-arrows-top {
    top: -40px;
  }
  
  .carousel-arrows-bottom {
    bottom: -40px;
  }
  
  /* === LARGEURS PRODUITS ADAPTATIFS MOBILE === */
  .bd-collection-products .bd-product-card-mini {
    flex: 0 0 calc(var(--product-width-mobile) - var(--products-gap) / var(--products-per-row-mobile)) !important;
    width: calc(var(--product-width-mobile) - var(--products-gap) / var(--products-per-row-mobile)) !important;
    min-width: calc(var(--product-width-mobile) - var(--products-gap) / var(--products-per-row-mobile)) !important;
    max-width: calc(var(--product-width-mobile) - var(--products-gap) / var(--products-per-row-mobile)) !important;
  }
  
  /* Ajustement des conteneurs pour mobile */
  .bd-collection-position-top .bd-products-grid,
  .bd-collection-position-bottom .bd-products-grid {
    max-width: calc(var(--products-per-row-mobile) * var(--product-width-mobile) + (var(--products-per-row-mobile) - 1) * var(--products-gap)) !important;
  }
  
  .bd-collection-position-left .bd-products-grid,
  .bd-collection-position-right .bd-products-grid {
    max-height: calc(var(--products-per-row-mobile) * var(--product-base-height) + (var(--products-per-row-mobile) - 1) * var(--products-gap)) !important;
  }
}

/* === ANIMATION TACTILE === */
.collections-container {
  touch-action: pan-y;
}

.collections {
  will-change: transform;
}

/* === CAROUSEL D'IMAGES DE COLLECTIONS === */
.collection-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.collection-carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.collection-carousel-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.collection-carousel-image.active {
  opacity: 1;
}

.collection-carousel-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 2;
}

/* === PLACEHOLDERS POUR IMAGES === */
.collection-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 120px;
  background: #F3F4F6;
  color: #6B7280;
  font-size: 12px;
  text-align: center;
  border-radius: 8px;
  border: 1px dashed #D1D5DB;
}

.collection-placeholder.loading {
  background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.collection-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === GROUPES DE COLLECTIONS === */
.bd-collection-groups {
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bd-groups-bg-color, #FFFFFF);
  border-radius: 16px;
  scrollbar-width:none;
}

/* Styles pour les groupes de collections */
:root {
  --bg: #0b0c0f;
  --panel: #11131a;
  --panel-bg:#F9FAFB;
  --muted: #2a2d36;
  --text: #eef2ff;
  --subtle: #a8b0c4;
  --brand: #000;
  --ring: #80b3ff55;
  --card: #141722;
  --radius: 14px;
}

/* === MENU DE NAVIGATION PAR ONGLETS POUR ACCORDÉONS === */
.bd-accordion-tabs-menu {
  position: sticky;
  z-index: 20;
  background: var(--bd-groups-bg-color, #FFFFFF);
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  /* Structure pour les flèches de navigation */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bd-accordion-tabs-menu.bd-accordion-tabs-menu-top {
  top: 0;
}

.bd-accordion-tabs-menu.bd-accordion-tabs-menu-bottom {
  bottom: 0;
  position: sticky;
  border-top: 1px solid var(--bd-groups-border-color, #E5E7EB);
  border-bottom: none;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.bd-accordion-tabs-wrapper {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex: 1;
  min-width: 0;
}

.bd-accordion-tabs-wrapper::-webkit-scrollbar {
  height: 4px;
}

.bd-accordion-tabs-wrapper::-webkit-scrollbar-track {
  background: #F3F4F6;
}

.bd-accordion-tabs-wrapper::-webkit-scrollbar-thumb {
  background: #9CA3AF;
  border-radius: 2px;
}

/* Flèches de navigation pour les onglets accordéons */
.bd-accordion-tabs-scroll-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  /*
  background: var(--bd-groups-header-hover-bg, #F3F4F6);
  border: 1px solid var(--bd-groups-border-color, #E5E7EB);
  */
  background:none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--bd-groups-header-text-color, #111827);
  opacity: 1;
  border: none;
  background: rgba(255, 255, 255, 0.9);
}

.bd-accordion-tabs-scroll-arrow:hover {
  /*
  background: var(--bd-groups-bg-color, #FFFFFF);
  border-color: var(--bd-groups-active-border, #3B82F6);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  */
  color: var(--bd-groups-active-border, #3B82F6);
}

.bd-accordion-tabs-scroll-arrow:active {
  transform: scale(0.95);
}

.bd-accordion-tabs-scroll-arrow.is-invisible {
  opacity: 0;
  pointer-events: none;
}

.bd-accordion-tabs-scroll-arrow svg {
  width: 16px;
  height: 16px;
  display: block;
}

.bd-accordion-tab {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--bd-groups-header-text-color, #111827);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  opacity: 0.6;
}

.bd-accordion-tab:hover {
  opacity: 0.9;
  background: var(--bd-groups-header-hover-bg, #F3F4F6);
  border-radius: 4px 4px 0 0;
}

.bd-accordion-tab.active {
  opacity: 1;
  color: var(--bd-groups-active-border, #3B82F6);
  border-bottom-color: var(--bd-groups-active-border, #3B82F6);
}

/* Icônes dans les onglets du menu sticky */
.bd-accordion-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 6px;
}

.bd-accordion-tab-icon.bd-icon-svg {
  width: 20px;
  height: 20px;
}

.bd-accordion-tab-icon.bd-icon-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bd-accordion-tab-icon.bd-icon-img img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  border-radius: 3px;
}

.bd-accordion-tab-label {
  display: inline-block;
}

/* Icônes et badges pour les en-têtes d'accordéon */
.bd-groups-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bd-groups-header-icon.bd-icon-svg {
  width: 24px;
  height: 24px;
}

.bd-groups-header-icon.bd-icon-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bd-groups-header-icon.bd-icon-img img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.bd-groups-header-content {
  flex: 1;
  min-width: 0;
}

.bd-groups-header-badge {
  flex-shrink: 0;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.bd-collection-groups .groups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bd-collection-groups .group,
.bd-sidebar .group {
  border: 1px solid var(--bd-groups-border-color, #E5E7EB);
  border-radius: 8px;
  background: var(--bd-groups-bg-color, #FFFFFF);
  overflow: clip;
  max-width: 100%;
  min-width: 0;
}

.bd-collection-groups .group-header,
.bd-sidebar .group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: var(--bd-groups-header-bg-color, #F9FAFB);
  color: var(--bd-groups-header-text-color, #111827);
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
  position: relative;
}

/* Icône du header de groupe (Accordion) */
.bd-groups-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bd-groups-header-icon.bd-icon-svg {
  width: 24px;
  height: 24px;
}

.bd-groups-header-icon.bd-icon-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bd-groups-header-icon.bd-icon-img img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

/* Contenu du header (titre + description) */
.bd-groups-header-content {
  min-width: 0;
  flex: 1;
}

/* Badge personnalisé du header de groupe (Accordion) */
.bd-groups-header-badge {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  line-height: 1;
  margin-left: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  flex-shrink: 0;
}


.bd-sidebar .group-header:hover {
  background: var(--bd-groups-header-hover-bg, #F3F4F6);
}

.bd-sidebar .group-header:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bd-groups-active-border, #3B82F6) inset;
}

.bd-sidebar .group-header .chev,
.bd-sidebar .group-header .chev {
  transition: transform .25s ease;
}

.bd-sidebar .group[aria-expanded="true"] .chev,
.bd-sidebar .group[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

/* État fermé de l'accordéon */
.bd-sidebar .group[aria-expanded="false"] .group-panel {
  display: none;
}

/* Support de l'attribut hidden */
.bd-sidebar .group-panel[hidden] {
  display: none !important;
}

.bd-sidebar .group-title,
.bd-sidebar .group-title {
  font-weight: 650;
  letter-spacing: .2px;
}

.bd-sidebar .group-sub,
.bd-sidebar .group-sub {
  color: var(--subtle);
  font-size: 12px;
}

.bd-sidebar .chip,
.bd-sidebar .chip {
  font-size: 12px;
  color: var(--subtle);
  border: 1px solid #21283a;
  background: #0f1425;
  padding: 6px 10px;
  border-radius: 999px;
}

/* Panel content */
.bd-sidebar .group-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 5px;
  background: var(--bd-groups-bg-color, #FFFFFF);
  border-top: 1px solid var(--bd-groups-border-color, #E5E7EB);
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

/* Animation d'ouverture/fermeture */
.bd-sidebar .group[aria-expanded="false"] .group-panel {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top: none;
}

.bd-sidebar .group[aria-expanded="true"] .group-panel {
  max-height: 5000px; /* Valeur arbitraire suffisamment grande */
  opacity: 1;
}

.bd-sidebar .collections {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.bd-sidebar .collections.grid-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding:10px;
}

.bd-sidebar .collections.flex-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Styles responsive pour les cartes de collections basés sur data-attributes */
/* Desktop : 1 colonne */
@media (min-width: 769px) {
  .bd-sidebar .collections[data-desktop-columns="1"] .card {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  /* Desktop : 2 colonnes */
  .bd-sidebar .collections[data-desktop-columns="2"] .card {
    flex: 0 0 calc(50% - 6px);
    max-width: calc(50% - 6px);
  }
  
  /* Desktop : 3 colonnes */
  .bd-sidebar .collections[data-desktop-columns="3"] .card {
    flex: 0 0 calc(33.333% - 8px);
    max-width: calc(33.333% - 8px);
  }
  
  /* Desktop : 4 colonnes */
  .bd-sidebar .collections[data-desktop-columns="4"] .card {
    flex: 0 0 calc(25% - 9px);
    max-width: calc(25% - 9px);
  }
}

/* Mobile : 1 colonne */
@media (max-width: 768px) {
  .bd-sidebar .collections[data-mobile-columns="1"] .card {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  /* Mobile : 2 colonnes */
  .bd-sidebar .collections[data-mobile-columns="2"] .card {
    flex: 0 0 calc(50% - 6px);
    max-width: calc(50% - 6px);
  }
  
  /* Mobile : 3 colonnes */
  .bd-sidebar .collections[data-mobile-columns="3"] .card {
    flex: 0 0 calc(33.333% - 8px);
    max-width: calc(33.333% - 8px);
  }
}


.bd-sidebar .collections.flex-layout .card {
  flex: 1 1 calc(50% - 6px);
  min-width: 120px;
}
/*
.bd-sidebar .card {
  position: relative;
  background: var(--bd-collection-card-bg, #FFFFFF);
  border: 2px solid transparent;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.bd-sidebar .card:hover {
  background: var(--bd-collection-card-hover-bg, #F9FAFB);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bd-sidebar .card.active {
  border-color: var(--bd-collection-card-active-border, #3B82F6);
  background: var(--bd-groups-active-bg, #EFF6FF);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.bd-sidebar .card .media.ratio-square {
  grid-template-rows: 1fr auto;
  aspect-ratio: 1/1;
}

.bd-sidebar .card .media.ratio-portrait {
  grid-template-rows: 1fr auto;
  aspect-ratio: 3/4;
}

.bd-sidebar .card .media.ratio-landscape {
  grid-template-rows: 1fr auto;
  aspect-ratio: 4/3;
}

.bd-sidebar .card .media.ratio-wide {
  grid-template-rows: 1fr auto;
  aspect-ratio: 16/9;
}

.bd-sidebar .card .media.ratio-tall {
  grid-template-rows: 1fr auto;
  aspect-ratio: 2/3;
}

.bd-sidebar .card .media.ratio-circle {
  grid-template-rows: 1fr auto;
  aspect-ratio: 1/1;
  border-radius: 50%;
}

.bd-sidebar .card.ratio-circle .media,
.bd-sidebar .card.ratio-circle img {
  border-radius: 50% 50% 0 0;
}

.bd-sidebar .card .media {
  background: #0e1220;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.bd-sidebar .card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bd-sidebar .card .meta {
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bd-sidebar .card .name {
  font-weight: 600;
  color: var(--bd-collection-card-text-color, #1F2937);
}

.bd-sidebar .card .meta small {
  color: var(--bd-collection-count-color, #6B7280);
  font-size: 0.875rem;
}
*/


.bd-product-viewer-section .card {
  position: relative;
  background: var(--bd-collection-card-bg, #FFFFFF);
  border: 2px solid transparent;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  /*grid-template-rows: 120px auto;*/
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.bd-product-viewer-section .card:hover {
  background: var(--bd-collection-card-hover-bg, #F9FAFB);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bd-product-viewer-section .card.active {
  border-color: var(--bd-collection-card-active-border, #3B82F6);
  background: var(--bd-groups-active-bg, #EFF6FF);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.bd-product-viewer-section .card .media.ratio-square {
  grid-template-rows: 1fr auto;
  aspect-ratio: 1/1;
}

.bd-product-viewer-section .card .media.ratio-portrait {
  grid-template-rows: 1fr auto;
  aspect-ratio: 3/4;
}

.bd-product-viewer-section .card .media.ratio-landscape {
  grid-template-rows: 1fr auto;
  aspect-ratio: 4/3;
}

.bd-product-viewer-section .card .media.ratio-wide {
  grid-template-rows: 1fr auto;
  aspect-ratio: 16/9;
}

.bd-product-viewer-section .card .media.ratio-tall {
  grid-template-rows: 1fr auto;
  aspect-ratio: 2/3;
}

.bd-product-viewer-section .card .media.ratio-circle {
  grid-template-rows: 1fr auto;
  aspect-ratio: 1/1;
  border-radius: 50%;
}

.bd-product-viewer-section .card.ratio-circle .media,
.bd-product-viewer-section .card.ratio-circle img {
  border-radius: 50% 50% 0 0;
}

.bd-product-viewer-section .card .media {
  background: #0e1220;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.bd-product-viewer-section .card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bd-product-viewer-section .card .meta {
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bd-product-viewer-section .card .name {
  font-weight: 600;
  color: var(--bd-collection-card-text-color, #1F2937);
}

.bd-product-viewer-section .card .meta small {
  color: var(--bd-collection-count-color, #6B7280);
  font-size: 0.875rem;
}

.bd-sidebar .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  background: var(--bd-badge-bg-color, #EF4444);
  color: var(--bd-badge-text-color, #FFFFFF);
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Empty state */
.bd-collection-groups .empty {
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--subtle);
  font-size: 14px;
}

.bd-collection-groups .group[hidden] {
  display: none;
}

/* Layout toggle */
.bd-collection-groups .layout-toggle {
  display: none;
  justify-content: flex-end;
}

.bd-collection-groups .layout-toggle button {
  background: transparent;
  border: none;
  color: var(--subtle);
  cursor: pointer;
  padding: 5px;
  display: flex;
}

.bd-collection-groups .layout-toggle button.active {
  color: var(--brand);
}

/* === MOBILE: BARRE D'ONGLETS STICKY === */
.bd-mobile-collection-tabs {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bd-groups-bg-color, #FFFFFF);
  border-top: 1px solid var(--bd-groups-border-color, #E5E7EB);
  padding: 1.75rem 1rem 0.5rem; /* espace haut pour intégrer le bouton au bord supérieur sans gêner le contenu */
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  align-items: center;
  gap: 0.5rem;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 220ms ease, opacity 200ms ease;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  overflow: visible; /* permet au bouton de dépasser visuellement */
  transition: all .3s;
  padding: .5rem 1rem 1rem;
}

body.header-is-visible .bd-mobile-collection-tabs {
 top: var(--header-height);
 bottom:auto;

}

body.header-not-visible .bd-mobile-collection-tabs {
 top: 0;
 bottom:auto;
 z-index: 101;
}

/* Bosse arrondie de la barre pour envelopper le bouton central */
.bd-mobile-collection-tabs::before {
  /*
  content: "";
  position: absolute;
  bottom: -1.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 4rem;
  height: 2.4rem;
  background: #FFFFFF; 
  border-top-left-radius: 999px;
  border-top-right-radius: 999px;
  box-shadow: inset 0 -1px 0 0 #E5E7EB; 
  pointer-events: none;
  z-index: 0;
  */
}
.bd-mobile-collection-tabs.bd-sticky-hidden {
  pointer-events: none;
  transform: translateY(100%);
  opacity: 0;
}
.bd-mobile-collection-tabs:not(.bd-sticky-hidden) {
  transform: translateY(0);
  opacity: 1;
}

.bd-sticky-active-label {
  flex: 0 0 auto;
  max-width: 35%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 600;
  padding-left: 0.25rem;
}

.bd-mobile-tabs-container {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 0.75rem; /* n'encombre plus la droite, le bouton est centré */
}

.bd-mobile-tabs-container::-webkit-scrollbar {
  display: none;
}

.bd-mobile-tab {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  margin: 0 0.125rem;
}

.bd-mobile-tab.active {
  background: #111827;
  color: #FFFFFF;
}

.bd-mobile-groups-toggle {
  position: absolute;
  left: 50%;
  top: 0; /* ancré à l'extrémité haute de la barre */
  transform: translate(-50%, -50%); /* remonte le bouton pour l'encastrer visuellement */
  width: 3rem;
  height: 3rem;
  background: #111827;
  border: 4px solid #FFFFFF; /* anneau pour effet intégré dans la barre */
  border-radius: 9999px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 2; /* au-dessus de la bosse de la barre */
  top:100%;
}

.bd-mobile-groups-toggle:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.bd-mobile-groups-toggle:active {
  transform: translate(-50%, -50%) scale(0.98);
}

/* === MOBILE: MODALE GROUPES === */
.bd-mobile-groups-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  padding: 0;
  overflow: hidden;
}

.bd-mobile-groups-modal[aria-hidden="false"] {
  display: flex;
  align-items: flex-end;
  z-index: 1001;
}

.bd-mobile-groups-modal-content {
  background: var(--bd-groups-bg-color, #FFFFFF);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.bd-mobile-groups-modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--bd-groups-border-color, #E5E7EB);
  background: var(--bd-groups-header-bg-color, #F9FAFB);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bd-mobile-groups-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--bd-groups-header-text-color, #111827);
}

.bd-mobile-groups-modal-close {
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: #6B7280;
  transition: color 0.2s ease;
}

.bd-mobile-groups-modal-close:hover {
  color: #111827;
}

/* Wrapper pour le body avec flèches */
.bd-mobile-groups-modal-body-wrapper {
  position: relative;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bd-mobile-groups-modal-body {
  flex: 1;
  padding: 1rem;
  padding-top:0;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

/* Header tabs sticky dans la modale */
.bd-mobile-groups-modal-body .bd-groups-tabs-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin: -1rem -1rem 1rem -1rem;
  padding: 1rem;
}

/* Flèches de scroll verticales */
.bd-modal-scroll-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #E5E7EB;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bd-modal-scroll-arrow.visible {
  opacity: 1;
  visibility: visible;
}

.bd-modal-scroll-arrow:hover {
  background: #FFFFFF;
  border-color: #111827;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.bd-modal-scroll-arrow:active {
  transform: translateX(-50%) scale(0.95);
}

.bd-modal-scroll-up {
  top: 35px;
  z-index:100;
}

.bd-modal-scroll-down {
  bottom: 8px;
}

.bd-modal-scroll-arrow svg {
  width: 20px;
  height: 20px;
  color: #374151;
}

.bd-modal-scroll-arrow:hover svg {
  color: #111827;
}

/* Animation pulse pour indiquer le scroll */
.bd-modal-scroll-arrow.visible {
  animation: bd-pulse-modal 2s ease-in-out infinite;
}

@keyframes bd-pulse-modal {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  50% {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
  }
}

.bd-product-main-content .bd-product-images-zone .carousel-images-wrapper img {
 max-width: 100%;
height: auto;
display: block;
}

h2.name {
  font-size:13px;
  margin:0;
  text-transform: math-auto;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  /* Sur tablette : passer en layout vertical pour les layouts horizontaux */
  .bd-viewer-layout-right,
  .bd-viewer-layout-left {
    flex-direction: column-reverse;
  }

  h2.name {
  font-size:12px;
}
  
  .bd-viewer-layout-right .bd-viewer-product-display,
  .bd-viewer-layout-left .bd-viewer-product-display {
    flex: 1 !important;
    order: 1 !important;
  }
  
  .bd-viewer-layout-right .bd-sidebar,
  .bd-viewer-layout-left .bd-sidebar {
    flex: 0 0 auto !important;
    order: 2 !important;
    max-height: 400px;
  }
  
  /* Layouts verticaux : ajuster la hauteur max de la sidebar */
  .bd-viewer-layout-top .bd-sidebar,
  .bd-viewer-layout-bottom .bd-sidebar {
    max-height: 400px;
  }
  
  .bd-viewer-product-display {
    gap: 2rem;
  }
  
  /* Adapter le wrapper sur tablette */
  .bd-product-main-content.bd-layout-right,
  .bd-product-main-content.bd-layout-left {
    grid-template-columns: 1fr;
    grid-template-areas: 
      "images"
      "info";
  }
  
  /* Responsive pour le layout wrapper sur tablette */
  .bd-content-layout-wrapper.bd-collection-position-left,
  .bd-content-layout-wrapper.bd-collection-position-right {
    grid-template-columns: 1fr !important;
    grid-template-areas: 
      "product"
      "collection";
  }
  
  .bd-sidebar-right,
  .bd-sidebar-left {
    max-height: 400px;
  }
  
  /* Ajustement pour les produits en position gauche/droite sur tablette */
  .bd-collection-products-left,
  .bd-collection-products-right {
    max-width: none;
    /* max-height retiré pour éviter le rognage des cartes produits */
  }
  
  .bd-collection-products-left .bd-products-grid,
  .bd-collection-products-right .bd-products-grid {
    flex-direction: column;
    overflow-x: auto;
    overflow-y: hidden;
  }
  
  .bd-collection-products-left .bd-products-nav-arrows,
  .bd-collection-products-right .bd-products-nav-arrows {
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 0.5rem;
  }
}

@media (max-width: 768px) {
  /* Sur mobile : tout en layout vertical */

   .bd-sidebar-toggle {
        display:none;
  }


  .bd-viewer-main-wrapper {
    flex-direction: column !important;
    padding: 1rem;
  }
  
  /* Miniature de collection plus petite sur mobile */
  .bd-collection-header-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 6px;
  }
  
  .bd-products-list-title {
    font-size: 1.1rem;
  }
  
  /* Menu d'onglets accordéon plus compact sur mobile */
  .bd-accordion-tabs-menu {
    padding: 0.25rem 0;
  }
  
  .bd-accordion-tab {
    font-size: 12px;
    padding: 0.4rem 0.75rem;
  }
  
  .bd-viewer-layout-right,
  .bd-viewer-layout-left {
    flex-direction: column-reverse !important;
    border-left:none !important;
    border-right:none !important;
  }
  
  .bd-viewer-layout-right .bd-viewer-product-display,
  .bd-viewer-layout-left .bd-viewer-product-display {
    flex: 1 !important;
    order: 1 !important;
  }
  
  .bd-viewer-layout-right .bd-sidebar,
  .bd-viewer-layout-left .bd-sidebar {
    flex: 0 0 auto !important;
    order: 2 !important;
    position: relative !important; /* Désactive le sticky sur mobile */
    max-height: none !important; /* Pas de limitation de hauteur sur mobile */
  }
  
  /* Layouts verticaux sur mobile : même comportement */
  .bd-viewer-layout-top .bd-viewer-product-display,
  .bd-viewer-layout-bottom .bd-viewer-product-display {
    flex: 1 !important;
    width: 100%;
  }
  
  .bd-viewer-layout-top .bd-sidebar,
  .bd-viewer-layout-bottom .bd-sidebar {
    flex: 0 0 auto !important;
    position: relative !important;
    max-height: none !important;
    width: 100%;
  }
  
  /* Masquer les flèches de scroll sur mobile */
  .bd-sidebar-scroll-arrow {
    display: none !important;
  }
  
  /* Le contenu peut défiler normalement sur mobile */
  .bd-sidebar-content {
    max-height: none !important;
    overflow-y: visible !important;
  }
  
  /* Responsive pour le layout wrapper sur mobile */
  .bd-content-layout-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem;
  }
  
  /* Sur mobile, toujours mettre le produit en premier */
  .bd-content-layout-wrapper .bd-product-main-content {
    order: 1 !important;
  }
  
  .bd-content-layout-wrapper .bd-collection-products {
    order: 2 !important;
  }
  
  /* Force tous les wrapper de ratio à redevenir vertical sur mobile */
  .bd-content-layout-wrapper[class*="product-ratio-"] {
    flex-direction: column-reverse !important;
  }
  
  .bd-content-layout-wrapper .bd-product-main-content,
  .bd-content-layout-wrapper .bd-collection-products {
    width: 100% !important;
    flex: 1 1 auto !important;
  }
  
  /* Responsive pour le wrapper principal */
  /* Wrapper principal en flexbox mobile */
  .bd-product-main-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem;
  }
  
  /* Sur mobile, toutes les zones prennent la largeur complète */
  .bd-product-main-content .bd-product-images-zone,
  .bd-product-main-content .bd-product-info-zone {
    width: 100% !important;
    flex: 1 1 auto !important;
  }


  
  /* Ordre mobile selon la préférence desktop */
  .bd-product-main-content.bd-layout-top .bd-product-info-zone {
    order: 1;
  }
  
  .bd-product-main-content.bd-layout-top .bd-product-images-zone {
    order: 2;
  }
  
  .bd-product-main-content.bd-layout-bottom .bd-product-info-zone,
  .bd-product-main-content.bd-layout-left .bd-product-info-zone,
  .bd-product-main-content.bd-layout-right .bd-product-info-zone {
    order: 2;
  }
  
  .bd-product-main-content.bd-layout-bottom .bd-product-images-zone,
  .bd-product-main-content.bd-layout-left .bd-product-images-zone,
  .bd-product-main-content.bd-layout-right .bd-product-images-zone {
    order: 1;
    z-index: 2;
  }
  
  /* Sur mobile, forcer les miniatures en bas */
  .bd-product-images-zone {
    grid-template-rows: 1fr auto !important;
    grid-template-columns: 1fr !important;
  }
  
  /* Option: produits sous les images (espacement) */
  .bd-product-main-content.bd-mobile-products-under-images .bd-collection-products {
    margin-top: 0.75rem;
  }
  
  .bd-variant-thumbnails {
    grid-row: 2 !important;
    grid-column: 1 !important;
    flex-direction: row !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 80px !important;
  }
  
  .carousel-images-wrapper {
    grid-row: 1 !important;
    grid-column: 1 !important;
  }
  
  .bd-product-title {
    font-size: 1.5rem;
  }
  
  .bd-product-price {
    font-size: 1.5rem;
  }
  
  .bd-viewer-main-wrapper {
    padding: 0;
    gap: 1rem;
  }
  
  /* La visibilité est gérée par l'observer via .bd-sticky-hidden */
  html.bd-mobile-modal-tabs-disabled .bd-viewer-main-wrapper {
    padding-bottom: 1rem; /* Retirer l'espace quand modale/onglets désactivés */
  }
  /* Quand la barre sticky est visible, prévoir un espace pour ne pas recouvrir le contenu */
  .bd-mobile-collection-tabs:not(.bd-sticky-hidden) ~ .bd-viewer-main-wrapper,
  body.bd-sticky-tabs-active.bd-sticky-tabs-in-section .bd-viewer-main-wrapper {
    padding-bottom: 4rem; /* espace pour la barre sticky quand elle est visible et que l'utilisateur est dans la section */
  }
  html.bd-mobile-modal-tabs-disabled .bd-sidebar {
    display: flex !important; /* Réafficher la sidebar sur mobile si modale/onglets off */
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Sidebar visible sur mobile; la barre sticky donne un accès alternatif quand hors viewport */
  
  .bd-collection-groups .collections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  /* Configuration spécifique pour mobile */
  .bd-viewer-product-display {
    display: flex;
    flex-direction: column;
  }
  
  .bd-product-images-zone {
    width: 100%;
  }
  
  .bd-collection-products {
    width: 100%;
    /* max-height retiré pour permettre l'affichage complet des cartes produits */
    margin-top: 1rem;
    min-height: 180px; /* Hauteur minimale adaptée au mobile */
  }
  
  /* Forcer direction horizontale sur mobile pour tous les positionnements */
  .bd-collection-products .bd-products-grid {
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
  
  .bd-collection-products .bd-products-nav-arrows {
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 100% !important;
    height: auto !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    padding: 0 0.5rem !important;
  }
  
  /* Force l'affichage des flèches horizontales sur mobile */
  .bd-collection-products .bd-products-nav-arrow .bd-arrow-horizontal {
    display: block !important;
  }
  
  .bd-collection-products .bd-products-nav-arrow .bd-arrow-vertical {
    display: none !important;
  }
  
  .bd-product-info-zone {
    order: 3;
    margin-top: 1rem;
  }
  
  /* === DESCRIPTION RESPONSIVE === */
  .bd-product-short-description {
    font-size: 0.9rem;
    padding: 0.625rem 0.875rem;
    margin: 0;
  }
  
  .bd-product-viewer-section #bd-current-product-variants {
    margin:0;
  }
  .bd-discover-more-btn {
    font-size: 0.85rem;
    margin-top: 0.4rem;
  }
  
  .bd-wishlist-btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    gap: 0.5rem;
  }
  
  .bd-wishlist-icon svg {
    width: 1.35em;
    height: 1.35em;
  }
  
  .bd-wishlist-text {
    font-size: 0.875rem;
  }
  
  .bd-delivery-toggle-btn {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
  }
  
  .bd-delivery-toggle-text {
    font-size: 0.875rem;
  }
  
  .bd-delivery-toggle-text::before {
    font-size: 1.1em;
  }
  
  .bd-delivery-info-content {
    padding: 1rem;
  }
  
  .bd-description-toggle-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .bd-product-description-full {
    max-height: 50vh; /* Réduire sur mobile */
  }
  
  .bd-description-content {
    padding: 1rem;
    font-size: 0.9rem;
  }
  
  .bd-description-section-header {
    padding: 0.875rem 1rem;
    font-size: 1rem;
  }
  
  .bd-description-section-content {
    padding: 0 1rem;
  }
  
  .bd-description-section-content[aria-hidden="false"] {
    padding: 0.875rem 1rem;
  }
  
  .bd-description-scroll-arrow {
    width: 36px;
    height: 36px;
  }
  
  .bd-description-scroll-arrow svg {
    width: 18px;
    height: 18px;
  }
  
  /* === OPTIONS MOBILE SPÉCIFIQUES === */
  
  /* Masquer les miniatures sur mobile si configuré */
  .bd-viewer-mobile-hide-thumbnails .bd-variant-thumbnails {
    display: none !important;
  }
  
  /* Position de la liste des produits: après le produit principal */
  .bd-viewer-mobile-products-after .bd-collection-products {
    order: 10;
  }
  
  /* Position de la liste des produits: avant le produit principal */
  .bd-viewer-mobile-products-before .bd-collection-products {
    order: -1;
  }
  
  /* === BOUTON FLOTTANT COLLECTIONS MOBILE === */
  .bd-mobile-floating-collections-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 64px;
    height: 64px;
    padding: 0.75rem;
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: bd-float-pulse 2s ease-in-out infinite;
  }
  
  @keyframes bd-float-pulse {
    0%, 100% {
      transform: translateY(0) scale(1);
      box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    }
    50% {
      transform: translateY(-4px) scale(1.05);
      box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5);
    }
  }
  
  .bd-mobile-floating-collections-btn:hover {
    background: linear-gradient(135deg, #4F46E5 0%, #4338CA 100%);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 12px 36px rgba(99, 102, 241, 0.6);
    animation: none;
  }
  
  .bd-mobile-floating-collections-btn:active {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
  }
  
  .bd-mobile-floating-collections-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
  }
  
  .bd-mobile-floating-text {
    line-height: 1;
    white-space: nowrap;
  }
}

/* Masquer le bouton flottant sur desktop */
@media (min-width: 769px) {
  .bd-mobile-floating-collections-btn {
    display: none !important;
  }
  .bd-mobile-groups-modal-content {
    max-width: 600px;
    margin-right:auto;
    margin-left:0;
    max-height: calc(100dvh - 0px);
    height: calc(100dvh - 0px);
    margin-top: auto;
    z-index:1000;
  }
  .bd-sidebar.bd-sidebar-right .bd-mobile-groups-modal-content {
    margin-left: auto;
    margin-right: 0;
  }
}

/* === ACCESSIBILITÉ === */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

/* === LOADING STATES === */
.bd-product-loading {
  opacity: 0.6;
  pointer-events: none;
}

.bd_container_img_loading {
  position: relative;
  background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === TABS HORIZONTALES POUR GROUPES === */
.bd-groups-tabs-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.bd-groups-tabs-header-wrapper {
  position: relative;
  flex-shrink: 0;
  margin-bottom: 1rem;
}

.bd-groups-tabs-header {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  gap: 4px;
  padding: 0 40px; /* Espace pour les flèches */
}

.bd-groups-tabs-header::-webkit-scrollbar {
  display: none;
}

.bd-groups-tab-btn {
  flex-shrink: 0;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--bd-groups-header-text-color, #111827);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Icône du bouton de groupe (Tabs) */
.bd-groups-tab-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bd-groups-tab-btn-icon.bd-icon-svg {
  width: 20px;
  height: 20px;
}

.bd-groups-tab-btn-icon.bd-icon-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bd-groups-tab-btn-icon.bd-icon-img img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

/* Texte du bouton */
.bd-groups-tab-btn-text {
  flex: 1;
}

/* Badge personnalisé du bouton de groupe (Tabs) */
.bd-groups-tab-btn-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  line-height: 1;
  z-index: 1;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.bd-groups-tab-btn:hover {
  color: var(--bd-groups-header-text-color, #111827);
  background: var(--bd-groups-header-hover-bg, #F3F4F6);
  opacity: 1;
}

.bd-groups-tab-btn.active {
  color: var(--bd-groups-active-border, #3B82F6);
  border-bottom-color: var(--bd-groups-active-border, #3B82F6);
  background: var(--bd-groups-active-bg, #EFF6FF);
  opacity: 1;
}

.bd-groups-tab-btn .tab-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--bd-collection-card-hover-bg, #F9FAFB);
  border: 1px solid var(--bd-groups-border-color, #E5E7EB);
  border-radius: 12px;
  font-size: 11px;
  color: var(--bd-collection-count-color, #6B7280);
}

.bd-groups-tab-btn.active .tab-badge {
  background: var(--bd-groups-active-border, #3B82F6);
  color: var(--bd-badge-text-color, #FFFFFF);
  border-color: var(--bd-groups-active-border, #3B82F6);
}

/* Flèches de scroll pour les tabs */
.bd-groups-tabs-scroll-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to right, var(--panel) 0%, transparent 100%);
  border: none;
  cursor: pointer;
  z-index: 10;
  color: var(--subtle);
  transition: all 0.2s ease;
  /* opacity contrôlée par attachCarouselEvents via style.opacity */
}

.bd-groups-tabs-scroll-arrow[style*="opacity: 0.1"],
.bd-groups-tabs-scroll-arrow[style*="opacity: 0"] {
  pointer-events: none;
}

.bd-groups-tabs-scroll-arrow[style*="opacity: 1"] {
  pointer-events: all;
}

/* Support pour l'ancienne classe .visible (rétrocompatibilité) */
.bd-groups-tabs-scroll-arrow.visible {
  opacity: 1 !important;
  pointer-events: all;
}

.bd-groups-tabs-scroll-arrow:hover {
  color: var(--text);
  background: linear-gradient(to right, var(--panel) 0%, rgba(17, 19, 26, 0.8) 100%);
}

.bd-groups-tabs-scroll-arrow.left {
  left: -10px;
  color:#333;
  background: linear-gradient(to right, var(--panel-bg) 60%, transparent 100%);
  }

.bd-groups-tabs-scroll-arrow.right {
  right: -10px;
    color:#333;
  background: linear-gradient(to left, var(--panel-bg) 60%, transparent 100%);
  }


.bd-groups-tabs-scroll-arrow svg {
  width: 20px;
  height: 20px;
}

/* Contenu des tabs */
.bd-groups-tabs-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.bd-groups-tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.bd-groups-tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bd-groups-tab-panel-header {
  padding: 16px;
  background: var(--bd-groups-header-bg-color, #F9FAFB);
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--bd-groups-border-color, #E5E7EB);
  display:none;
}

.bd-groups-tab-panel-title {
  font-size: 18px;
  font-weight: 650;
  color: var(--bd-groups-header-text-color, #111827);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.bd-groups-tab-panel-description {
  font-size: 13px;
  color: var(--bd-collection-count-color, #6B7280);
  margin: 0;
  line-height: 1.5;
}

.bd-groups-tab-panel-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--bd-collection-count-color, #6B7280);
  justify-content: space-between;
  margin-top: 8px;
}

.bd-groups-tab-panel-meta .chip {
  font-size: 11px;
  padding: 4px 8px;
  background: var(--bd-collection-card-hover-bg, #F9FAFB);
  border: 1px solid var(--bd-groups-border-color, #E5E7EB);
  border-radius: 6px;
  color: var(--bd-collection-count-color, #6B7280);
}

.header-tabs-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    align-content: center;
    flex-direction: row;
}

/* Responsive tabs */
@media (max-width: 768px) {


/*
  2. Le pseudo-élément ::after (la flèche) avec l'animation.
*/
  :not(.bd-mobile-groups-modal) article.card.has-carousel.active::after {
    content: '';
    position: absolute;
    top: 105%;
    left: 50%;
    margin-top: 12px;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: translateX(-50%) rotate(45deg);
    /* --- NOUVEAU : Animation de pulsation --- */
    animation: 
      fadeInDown 0.5s ease forwards, /* Animation d'apparition initiale */
      pulse 1.5s infinite ease-in-out 0.5s; /* Animation de pulsation après l'apparition */
    margin: auto;
  }

  /* Keyframe pour l'animation d'apparition (inchangé) */
  @keyframes fadeInDown {
    from {
      opacity: 0;
      transform: translateX(-50%) rotate(45deg) translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateX(-50%) rotate(45deg) translateY(0);
    }
  }

  /* --- NOUVEAU : Keyframes pour l'animation de pulsation --- */
  @keyframes pulse {
    0% {
      transform: translateX(-50%) rotate(45deg) scale(1);
      opacity: 1;
    }
    50% {
      transform: translateX(-50%) rotate(45deg) scale(1.15); /* Légèrement plus grande */
      opacity: 0.7; /* Légèrement plus transparente */
    }
    100% {
      transform: translateX(-50%) rotate(45deg) scale(1);
      opacity: 1;
    }
  }

  .bd-groups-tabs-header {
    padding: 0 10px;
  }

  .bd-groups-tabs-container {
        border: 1px solid var(--bd-groups-border-color, #E5E7EB);
        padding:5px;
        background: #FFF;
  }

  .bd-collection-products {
    background: #ffffff;
    padding: 5px;
    max-width: calc(100% - 10px);
    margin: auto !important;
  }

  .bd-sidebar .collections.grid-layout {
    padding-bottom:20px;
  }

  .group.bd-visited-collections-group button {
    background:#FFF;
  }
  
  .bd-groups-tab-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .bd-groups-tabs-scroll-arrow {
    width: 30px;
  }
  
  .bd-groups-tab-panel-header {
    padding: 18px;
  }
  
  .bd-groups-tab-panel-title {
    font-size: 16px;
  }
}
.bd-product-viewer-section .delivery-contain {
font-size:12px;
    margin: auto;
    margin-top: 10px;
    max-width: 95%;
}

.bd-product-viewer-section button.bd-add-to-cart-btn.bd_addtocart {
box-shadow: rgba(255, 255, 255, 0.2) 0px 0px 0px 1px inset, rgba(0, 0, 0, 0.9) 0px 0px 0px 1px;
}
.bd-product-viewer-section #bd-current-product-variants {
margin:20px 0;
}

@media screen and (min-width:769px) and (max-width:1024px) {
      
      .bd-viewer-layout-left {
        flex-direction: row-reverse;
    }
    .bd-viewer-layout-right {
      flex-direction:row;
    }
    .bd-content-layout-wrapper .bd-product-main-content {
    flex-direction: column !important;
    }
      .bd-product-viewer-section {
     max-width:calc(100% - 5px);
  }
  .bd-products-scroll-container {
    min-height:70px;
  }
  .bd-product-card-mini {
    aspect-ratio:auto !important;
  }

  .bd-product-viewer-section .carousel-zoom-icon {
    display:none;
}

.bd-product-info-zone {
      width: 100% !important;
    max-width: 90%;
}
.bd-collection-products {
    position: sticky;
    top: 0;
}
  .bd-viewer-layout-right .bd-sidebar, .bd-viewer-layout-left .bd-sidebar {
        max-height: calc(100dvh - 20px) !important;
        position: sticky;
        top: 10px;
    }
        .bd-viewer-layout-right .bd-viewer-product-display, .bd-viewer-layout-left .bd-viewer-product-display {
        flex: 0 0 calc(var(--main-content-width) - var(--gap) / 2) !important;
        order: 0 !important;
    }
        .bd-viewer-layout-left .bd-viewer-product-display, .bd-viewer-layout-left .bd-viewer-product-display {
        flex: 0 0 calc(var(--main-content-width) - var(--gap) / 2) !important;
        order: 0 !important;
    }
    .bd-viewer-layout-left .bd-sidebar {
    flex: 0 0 calc(var(--sidebar-width) - var(--gap) / 2) !important;
    order: 0 !important
  }
    .bd-viewer-layout-right .bd-sidebar {
    flex: 0 0 calc(var(--sidebar-width) - var(--gap) / 2) !important;
     order 0 !important;
  }
  .bd-viewer-layout-right .bd-sidebar.bd-sidebar-collapsed, .bd-viewer-layout-left .bd-sidebar.bd-sidebar-collapsed {
    flex: 0 0(0px + var(--gap) / 2) !important;
  }
  .bd-product-images-zone {
    position:relative;
  }
  .bd-product-main-content > * {
    z-index:0;
  }
  .bd-groups-tabs-header {
    padding:0;
  }
  .bd-product-main-content.bd-layout-right .bd-product-images-zone,
  .bd-product-main-content.bd-layout-left .bd-product-images-zone {
    min-width: 100%;
    max-width: 100%;
  }
}

.bd-product-viewer-section .abonnements-container,
.bd-sidebar.bd-mode-accordion .bd-collection-groups,
.bd-mobile-groups-modal-body .bd-collection-groups {
    overflow: visible;
}

article .collection-carousel-dots {
  display:none !important
}

/* patch img full height*/
.bd-product-main-content .bd-product-images-zone .carousel-images-wrapper img {
     height: 100%;
}
.bd-product-main-content .bd-product-images-zone .main-image {
    /*min-height: auto;*/
  }

  /* sticky sidebar */
  .bd-sidebar-right, .bd-sidebar-left {
    position:sticky;
    top:0;
  }

  .bd-visited-collections-wrapper h2.name {
    font-size:8px;
    text-transform: math-auto;
  }

  /* === COLLECTIONS VISITÉES === */
    /* Utilise les mêmes styles que les groupes de collections normaux */
    .bd-visited-collections-wrapper {
      margin-bottom: 1rem;
    }
    
    /* Style spécifique pour l'icône emoji */
    .bd-visited-collections-group .bd-groups-header-icon {
      font-size: 1.2rem;
    }
    
    /* === TRI DES PRODUITS === */
    .bd-products-list-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
    }
    
    .bd-products-list-header-left {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex: 1 1 auto;
      flex-wrap: wrap;
    }
    
    .bd-products-sort-container {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex: 0 0 auto;
    }
    
    .bd-products-sort-label {
      font-size: 0.875rem;
      color: #6B7280;
      font-weight: 500;
      white-space: nowrap;
      margin:0;
      border-left: solid 1px;
      padding: 0 10px;
      border-radius: 0px !important;
    }
    
    .bd-products-sort-select-wrapper {
      position: relative;
      display: inline-block;
    }
    
    .bd-products-sort-select {
      appearance: none;
      background-color: white;
      border: 1px solid #D1D5DB;
      border-radius: 0.375rem;
      padding: 0.5rem 2rem 0.5rem 0.75rem;
      font-size: 0.875rem;
      color: #1F2937;
      cursor: pointer;
      transition: all 0.15s ease;
      min-width: 80px;
      margin:0;
      min-height:25px;
    }
    
    .bd-products-sort-select:hover {
      border-color: #9CA3AF;
      background-color: #F9FAFB;
    }
    
    .bd-products-sort-select:focus {
      outline: none;
      border-color: #3B82F6;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    .bd-products-sort-icon {
      position: absolute;
      right: 0.75rem;
      top: 50%;
      transform: translateY(-50%);
      width: 10px;
      height: 6px;
      pointer-events: none;
      color: #6B7280;
      display:none; /*theme en contient une*/
    }
    
    /* Responsive mobile */
    @media (max-width: 640px) {
      .bd-products-list-header {
        flex-direction: column;
        align-items: stretch;
        gap:0;
      }
      
      .bd-products-list-header-left {
        gap: 0.25rem;
      }

      .bd-products-sort-label {
        border-left:none;
      }
      
      .bd-products-sort-container {
        justify-content: flex-end;
        width: 100%;
      }
      
      .bd-products-sort-select-wrapper {
        flex: 1;
        max-width: fit-content;
      }
      
      .bd-products-sort-select {
        width: 100%;
      }
    }