/* ============================================
   PRODUITS DANS LA MÊME CATÉGORIE (page produit)
   Scroll horizontal avec 5 produits visibles à la fois
   Option E: "Vous pourriez aussi aimer" avec badge compteur
   ============================================ */

.moxie-category-products {
  background: transparent;
  padding: 48px 0 40px;
  margin-top: 48px;
  border-top: 1px solid var(--moxie-border);
  border-bottom: none;
  border-left: none;
  border-right: none;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

.moxie-category-products .moxie-section__header {
  margin: 0 32px 28px;
}

/* Nouveau titre avec badge compteur - Option E */
.moxie-category-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.moxie-category-title__text {
  font-size: 18px;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0;
}

.moxie-category-title__badge {
  font-size: 13px;
  color: #666;
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Container de scroll horizontal */
.moxie-category-products__grid {
  display: flex !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  gap: 1px !important;
  background: var(--moxie-border) !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
  scrollbar-width: auto;
  scrollbar-color: #999 #f0f0f0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px !important;
}

/* Scrollbar plus visible */
.moxie-category-products__grid::-webkit-scrollbar {
  height: 10px;
}

.moxie-category-products__grid::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 5px;
}

.moxie-category-products__grid::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 5px;
  border: 2px solid #f0f0f0;
}

.moxie-category-products__grid::-webkit-scrollbar-thumb:hover {
  background: #666;
}

/* Indicateur de scroll - gradient fade sur les bords */
.moxie-category-products::before,
.moxie-category-products::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  pointer-events: none;
  z-index: 10;
}

.moxie-category-products::before {
  left: 0;
  background: linear-gradient(to right, rgba(255,255,255,0.9) 0%, transparent 100%);
}

.moxie-category-products::after {
  right: 0;
  background: linear-gradient(to left, rgba(255,255,255,0.9) 0%, transparent 100%);
}

/* Chaque produit : largeur fixe 20% (5 produits visibles) */
.moxie-category-products__grid .product-miniature {
  min-width: 20%;
  max-width: 20%;
  flex-shrink: 0;
  box-sizing: border-box;
  background: var(--moxie-white) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* Fond BLANC sur les images - pas de fond gris */
.moxie-category-products__grid .product-miniature__top,
.moxie-category-products__grid .product-miniature__image-container,
.moxie-category-products__grid .thumbnail-container {
  background: #ffffff !important;
  padding: 16px !important;
  border-radius: 0 !important;
}

.moxie-category-products__grid .product-miniature__image-link {
  background: transparent !important;
}

.moxie-category-products__grid .product-miniature__image {
  max-height: 180px;
  object-fit: contain !important;
  background: transparent !important;
}

/* Activation de l'overlay hover noir */
.moxie-category-products__grid .product-miniature:hover .moxie-card-overlay {
  opacity: .55;
}

/* Bandeau modèle : ZÉRO radius partout */
.moxie-category-products__grid .moxie-model-strip {
  border-radius: 0 !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Corps de carte : fond blanc */
.moxie-category-products__grid .product-miniature__bottom {
  background: var(--moxie-white) !important;
}

/* Responsive 4 produits visibles à 992px */
@media (max-width: 992px) {
  .moxie-category-products {
    padding: 40px 0 32px;
    margin-top: 32px;
    border-radius: 0;
  }
  
  .moxie-category-products .moxie-section__header {
    margin: 0 16px 24px;
  }
  
  .moxie-category-products__grid .product-miniature {
    min-width: 25%;
    max-width: 25%;
  }
  
  .moxie-category-products::before,
  .moxie-category-products::after {
    width: 40px;
  }
}

/* Responsive 3 produits visibles à 768px */
@media (max-width: 768px) {
  .moxie-category-products__grid .product-miniature {
    min-width: 33.333%;
    max-width: 33.333%;
  }
}

/* Mobile : 2 produits visibles à 480px */
@media (max-width: 480px) {
  .moxie-category-products {
    padding: 32px 0 24px;
    margin-top: 24px;
    border-radius: 0;
  }
  
  .moxie-category-products .moxie-section__header {
    margin: 0 12px 20px;
  }
  
  .moxie-category-products__grid .product-miniature {
    min-width: 50%;
    max-width: 50%;
  }
  
  /* Pas de gradients sur mobile pour ne pas masquer les produits */
  .moxie-category-products::before,
  .moxie-category-products::after {
    display: none;
  }
  
  /* Titre plus petit sur mobile */
  .moxie-category-title__text {
    font-size: 16px;
  }
  
  .moxie-category-title__badge {
    font-size: 12px;
  }
}
