/* ================================
   Similar products – CSS optimisé
   Mobile: 2 colonnes · Desktop: 5 colonnes
   ================================ */

/* Tokens (faciles à ajuster) */
:root{
  --sp-gap:16px;
  --sp-radius:12px;
  --sp-shadow:0 1px 3px rgba(0,0,0,.06);
  --sp-shadow-hover:0 6px 18px rgba(0,0,0,.12);
  --sp-text:#111827;
  --sp-muted:#6b7280;
  --sp-bg:#fff;
  --sp-border:#e5e7eb;
  --sp-primary:#111;
  --sp-primary-contrast:#fff;
  --sp-actions-h:84px; /* réserve pour 2 boutons + gap sur desktop */
}
/* ============ PRODUCT GRID ============ */
.similar-products { margin-top: 1rem; }
.similar-products-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (min-width: 768px) {
  .similar-products-content {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}
@media (min-width: 1024px) {
  .similar-products-content {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* ============ CARD ============ */
.similar-product-card{
  background: #fff;
  border: 1px solid #ebeef2;
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,.06);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.similar-product-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16,24,40,.12);
}

/* ============ MEDIA (Carré) ============ */
.similar-product-media{
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  overflow: hidden;
}
.similar-product-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}
/* Fallback anciens navigateurs (si pas "aspect-ratio") */
@supports not (aspect-ratio: 1 / 1){
  .similar-product-media::before{ content:""; display:block; padding-top:100%; }
  .similar-product-media img{ position:absolute; inset:0; width:100%; height:100%; }
}

/* ============ BODY ============ */
.similar-product-body{
  padding: .875rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1 1 auto;
}
.similar-product-title{
  font-size: .95rem;
  line-height: 1.3;
  font-weight: 600;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;          /* 2 lignes max */
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;               /* garde une hauteur stable */
}
.similar-product-price{
  font-weight: 700;
  color: #111827;
}
.similar-product-meta{
  font-size: .85rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: .375rem;
}

/* ============ ACTIONS (Boutons) ============ */
.similar-product-actions{
  margin-top: auto;
  display: flex;
  gap: .5rem;
}
.similar-product-btn{
  appearance: none;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  padding: .5rem .75rem;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .06s ease;
}
.similar-product-btn:active{ transform: translateY(1px); }
.similar-product-btn--primary{
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.similar-product-btn--primary:hover{
  background: #000;
  border-color: #000;
}
.similar-product-btn--ghost{
  background: #fff;
  color: #111827;
}
.similar-product-btn--ghost:hover{
  background: #f9fafb;
}
/* Focus accessible */
.similar-product-btn:focus{
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(59,130,246,.35);
}

/* ============ CATEGORY PANELS (header sticky unifié) ============ */
.cat-header{ position: sticky; top: 0; z-index: 10; background: #fff; padding: .5rem 0; }
.cat-chip{
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  padding: .25rem .5rem;
  display: inline-flex;
  align-items: center;
  gap: .375rem;
}
.cat-chip svg{ width: 1.1rem; height: 1.1rem; }

/* ============ Smooth scroll interne ============ */


/* ============ Réduit les animations si demandé par l’OS ============ */
@media (prefers-reduced-motion: reduce){
  .similar-product-card, .similar-product-btn { transition: none; }
}
/* --- Meta responsive: une ligne par item en mobile, inline en desktop --- */
.similar-product-meta{
  display: flex;
  flex-direction: column;      /* mobile / étroit : empilé */
  align-items: flex-start;
  gap: .25rem;
}
.similar-product-meta .sp-rating{ display: inline-flex; align-items: center; gap: .25rem; }
.similar-product-meta .sp-sales{ font-size: .85rem; color: #6b7280; }

@media (min-width: 768px){
  .similar-product-meta{
    flex-direction: row;       /* desktop : inline */
    align-items: center;
    gap: .375rem;
  }
  .similar-product-meta .sp-sales::before{
    content: "• ";
    color: #6b7280;
  }
  .pdeskp-top{
padding-top:50px;
}
}
@media (max-width: 767px){
  section.py-16.bg-gray-50{
	padding-top: 0px !important;
  }
  .bottom-0-mobile{
	  position:relative;
	  margin-bottom: 0 !important;
  }
.pdeskp-top{
padding-top:unset;
}
  .h3deskop{
display:none;
}
}
#filterSidebar input[type="number"] {
  max-width: 7rem;
}
#mobileFilter input[type="number"] {
  max-width: 9rem;
}
/* Forcer l'état responsive indépendamment de Tailwind/Twinland */
  @media (max-width: 767px){
    #filterSidebar { display: none !important; }
  }
  @media (min-width: 768px){
    #filterSidebar { display: block !important; }
  }
/* Cartes Vue 1 */
.category-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}
.category-card:hover {
  background: #f9f9f9;
  transform: translateY(-2px);
}
.category-card .arrow {
  color: #888;
  font-weight: bold;
  transition: color 0.2s;
}
.category-card:hover .arrow {
  color: #d3031c;
}

/* Bouton retour Vue 2 */
.back-btn {
  padding: 0.4rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  background: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.back-btn:hover {
  background: #f5f5f5;
}

/* Radios modernes */
.custom-radio {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 1.3rem;
  height: 1.3rem;
  border: 2px solid #000;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

/* état coché */
.custom-radio:checked {
  border-color: #d3031c;
  background-color: #d3031c;
}

/* cercle interne visible */
.custom-radio:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.6rem;
  height: 0.6rem;
  background-color: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* hover appliqué sur le label, pas sur l’input */
label:hover {
  background-color: #f9f9f9;
}

.loader {
  width: 2.5rem;   /* 40px */
  height: 2.5rem;
  border: 4px solid rgba(0,0,0,0.1);
  border-top-color: #d3031c; /* rouge */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* Conteneur grid si nécessaire */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* Quand c’est une catégorie */
.is-cat {
  grid-column: span 4; /* équivalent à col-span-4 */
}

/* Quand ce n’est pas une catégorie */
.is-not-cat {
  grid-column: span 3; /* équivalent à col-span-3 */
}

/* Padding top */
.pdeskp-top {
  padding-top: 1rem;
}

/* Responsive si tu veux garder un effet "md:" */
@media (min-width: 768px) {
  .is-cat {
    grid-column: span 4;
  }

  .is-not-cat {
    grid-column: span 3;
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 colonnes par défaut */
  gap: 1.5rem; /* espace entre les items */
  margin-bottom: 2rem;
  text-align: center;
}

/* Responsive : 4 colonnes en desktop */
@media (min-width: 768px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Élément de la galerie */
.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Cercle image */
.cat-thumb {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  margin-bottom: 0.5rem;
}

.cat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Texte sous l'image */
.cat-label {
  font-size: 0.875rem; /* équivalent "text-sm" */
  color: #374151;      /* équivalent "text-gray-700" */
}
/* Isolé par préfixe pour éviter tout conflit */
    .rtg-wrap { display:flex; flex-wrap:wrap; gap:.5rem; }
    .rtg-label { cursor:pointer; }
    .rtg-input { position:absolute; opacity:0; pointer-events:none; }
    .rtg-pill {
      display:inline-flex; align-items:center; justify-content:center;
      padding:.5rem .75rem; border:1px solid #e5e7eb; /* gray-200 */
      border-radius:9999px; font-size:.875rem; line-height:1rem;
      background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.04);
      transition:all .15s ease;
    }
    .rtg-label:hover .rtg-pill { background:#f9fafb; /* gray-50 */ }
    .rtg-input:focus + .rtg-pill { box-shadow:0 0 0 3px rgba(59,130,246,.35); } /* focus ring */
    .rtg-input:checked + .rtg-pill {
      background:#111827; /* gray-900 (look “noir”) */
      color:#fff; border-color:#111827; box-shadow:0 2px 6px rgba(0,0,0,.15);
      transform:translateY(-1px);
    }
	.rtg-wrap { display:block; }                  /* plus de flex */
  .rtg-label { display:block; margin-bottom:.5rem; }
  .rtg-pill { width:100%; text-align:left; }    /* full largeur, texte à gauche */
  .rtg-wrap { display:block; } /* non aligné en grille */
    .rtg-label { display:inline-block; margin:0 .5rem .5rem 0; cursor:pointer; }
    .rtg-input { position:absolute; opacity:0; pointer-events:none; }
    .rtg-pill {
      display:inline-flex; align-items:center; justify-content:center;
      padding:.5rem .75rem; border:1px solid #e5e7eb; border-radius:9999px;
      font-size:.875rem; line-height:1rem; background:#fff;
      box-shadow:0 1px 2px rgba(0,0,0,.04); transition:all .15s ease;
    }
    .rtg-label:hover .rtg-pill { background:#f9fafb; }
    .rtg-input:focus + .rtg-pill { box-shadow:0 0 0 3px rgba(59,130,246,.35); }
    .rtg-input:checked + .rtg-pill {
      background:#111827; color:#fff; border-color:#111827;
      box-shadow:0 2px 6px rgba(0,0,0,.15); transform:translateY(-1px);
    }
	/* ====== Filters UI ====== */
.rf-wrap { display:block; }

.rf-pill {
  display:inline-flex; align-items:center; gap:.5rem; justify-content:center;
  padding:.5rem .75rem; border:1px solid #e5e7eb; border-radius:9999px;
  font-size:.875rem; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:all .15s ease; margin:0 .5rem .5rem 0; text-decoration:none; color:#111827;
}
.rf-pill:hover { background:#f9fafb; }
.rf-pill.selected {
  background:#111827; color:#fff; border-color:#111827;
  box-shadow:0 2px 6px rgba(0,0,0,.15); transform:translateY(-1px);
}

.clr-pill .clr-dot {
  width:.875rem; height:.875rem; border-radius:9999px;
  border:1px solid rgba(0,0,0,.1); display:inline-block;
}
.clr-dot.transparent {
  background-image:repeating-conic-gradient(#ccc 0 25%, transparent 0 50%);
  background-size:8px 8px;
}

/* bouton plus/moins */
.rf-more {
  display:inline-block; padding:.25rem .75rem; border:1px solid #e5e7eb; border-radius:.5rem;
  background:#fff; font-size:.875rem; cursor:pointer;
}
.rf-more:hover { background:#f9fafb; }

/* masquage */
.rfbc-hidden { display:none !important; }

/* ====== Filtres actifs ====== */
.rf-active {
  background:#fff; border:1px solid #e5e7eb; border-radius:.75rem;
  padding:.75rem; margin-bottom:1rem;
}
.rf-active-title { font-weight:600; font-size:.95rem; margin-bottom:.5rem; }
.rf-active-chips { display:flex; flex-wrap:wrap; gap:.5rem; }
.rf-chip {
  display:inline-flex; align-items:center; gap:.5rem; padding:.25rem .5rem;
  background:#111827; color:#fff; border-radius:9999px; font-size:.8rem; text-decoration:none;
}
.rf-chip .rf-chip-x {
  display:inline-flex; align-items:center; justify-content:center; width:1.2rem; height:1.2rem;
  border-radius:50%; background:#fff; color:#111827; text-decoration:none; line-height:1.2rem;
}
.rf-chip .rf-chip-x:hover { opacity:.8; }
.rf-chip.rf-chip-clear { background:#fff; color:#111827; border:1px solid #e5e7eb; }
.rf-chip.rf-chip-clear:hover { background:#f9fafb; }
.rf-chip .rf-chip-x svg { display:block; }








