/* =====================================================
   EASY BIO SANTÉ — PAGE PRODUIT
   Galerie principale + miniatures avec animation
   ===================================================== */

/* ---- Fil d'Ariane ---- */
.breadcrumb {
  padding: 16px 0 0;
  font-size: 0.82rem;
  color: var(--text-light);
}
.breadcrumb a { color: var(--green-main); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb__sep { margin: 0 6px; opacity: 0.5; }

/* ---- Layout principal produit ---- */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
  padding: 40px 0 80px;
}

/* =================== GALERIE =================== */
.product-gallery {
  position: sticky;
  top: 100px;
}

/* Image principale */
.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: zoom-in;
}

.gallery-main__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.gallery-main__img.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Badge sur l'image principale */
.gallery-main__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Indicateur de progression auto-play */
.gallery-progress-ring {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  z-index: 3;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.gallery-progress-ring:hover { opacity: 1; }
.gallery-progress-ring circle {
  fill: none;
  stroke: var(--green-main);
  stroke-width: 3;
  stroke-dasharray: 95.5;
  stroke-dashoffset: 95.5;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 0.1s linear;
}
.gallery-progress-ring .bg-circle { stroke: var(--border); stroke-dashoffset: 0; }

/* Flèches navigation galerie */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}
.gallery-arrow:hover { background: var(--white); box-shadow: var(--shadow); }
.gallery-arrow svg { width: 18px; height: 18px; stroke: var(--green-dark); stroke-width: 2; fill: none; }
.gallery-arrow--prev { left: 12px; }
.gallery-arrow--next { right: 12px; }

/* Miniatures */
.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.gallery-thumb {
  width: calc(20% - 8px);
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: var(--white);
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.gallery-thumb:hover {
  border-color: var(--sage);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.gallery-thumb.active {
  border-color: var(--green-main);
  box-shadow: 0 0 0 3px rgba(46,139,87,0.18);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  transition: transform 0.3s ease;
}
.gallery-thumb:hover img { transform: scale(1.06); }

/* Overlay actif sur miniature */
.gallery-thumb.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(46,139,87,0.07);
  border-radius: calc(var(--radius) - 2px);
}

/* =================== INFOS PRODUIT =================== */
.product-info {
  padding-top: 8px;
}

.product-info__brand {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-main);
  margin-bottom: 6px;
}

.product-info__name {
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  color: var(--title);
  line-height: 1.25;
  margin-bottom: 12px;
}

.product-info__tagline {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.55;
}

/* Étoiles */
.product-info__stars {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.stars { color: var(--gold); font-size: 1.05rem; letter-spacing: 2px; }
.rating-count { font-size: 0.82rem; color: var(--text-light); }

/* Prix */
.product-info__price-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.product-info__price {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  color: var(--green-dark);
}
.product-info__price-old {
  font-size: 1.1rem;
  color: var(--text-light);
  text-decoration: line-through;
}
.product-info__price-save {
  font-size: 0.82rem;
  font-weight: 600;
  color: #c0392b;
  background: #fdecea;
  padding: 3px 10px;
  border-radius: 30px;
}

/* Variantes (ex: format, dosage) */
.product-variants {
  margin-bottom: 24px;
}
.product-variants__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.product-variants__options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.variant-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.variant-btn:hover { border-color: var(--green-main); color: var(--green-main); }
.variant-btn.active {
  border-color: var(--green-main);
  background: var(--green-main);
  color: #fff;
}

/* Quantité */
.product-qty {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.product-qty__label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.qty-btn {
  width: 38px;
  height: 38px;
  background: var(--surface);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--green-dark);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: var(--border); }
.qty-input {
  width: 52px;
  height: 38px;
  border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--white);
  color: var(--title);
}
.qty-input:focus { outline: none; }

/* Boutons d'action */
.product-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.btn-wa-full {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  background: var(--wa);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}
.btn-wa-full:hover {
  background: #1ebe5e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
}
.btn-wa-full svg { width: 22px; height: 22px; }
.btn-wishlist {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--rose-dark);
}
.btn-wishlist:hover { border-color: var(--rose-dark); background: #fdf5f5; }
.btn-wishlist svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Infos livraison */
.product-delivery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.delivery-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text);
}
.delivery-item strong { color: var(--green-dark); }

/* Bénéfices clés */
.product-benefits {
  margin-bottom: 28px;
}
.product-benefits__title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 12px;
}
.benefits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
}
.benefit-check {
  width: 20px;
  height: 20px;
  background: var(--green-main);
  border-radius: 50%;
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Partager */
.product-share {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-light);
}
.share-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--white);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s;
  color: var(--text);
  text-decoration: none;
}
.share-btn:hover { border-color: var(--green-main); color: var(--green-main); }

/* =================== ONGLETS DÉTAILS =================== */
.product-tabs {
  margin: 60px 0 80px;
}

.tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 14px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -2px;
}
.tab-btn:hover { color: var(--green-main); }
.tab-btn.active { color: var(--green-dark); border-bottom-color: var(--green-main); }

.tab-panel {
  display: none;
  padding: 36px 0;
  animation: fadeInTab 0.35s ease;
}
.tab-panel.active { display: block; }

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tab-panel h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--title);
  margin-bottom: 14px;
}

.tab-panel p, .tab-panel li {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 10px;
}
.tab-panel ul { padding-left: 18px; }
.tab-panel li { margin-bottom: 6px; }

/* Tableau ingrédients */
.ingredients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 8px;
}
.ingredients-table th,
.ingredients-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.ingredients-table th {
  background: var(--surface);
  font-weight: 600;
  color: var(--title);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ingredients-table tr:last-child td { border-bottom: none; }
.ingredients-table tr:hover td { background: rgba(46,139,87,0.03); }

/* =================== PRODUITS SIMILAIRES =================== */
.related-section {
  padding: 60px 0 80px;
  border-top: 1px solid var(--border);
}
.related-section h2 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--title);
  margin-bottom: 32px;
}

/* =================== RESPONSIVE =================== */
@media (max-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 24px 0 60px;
  }
  .product-gallery { position: static; }
  .gallery-thumb { width: calc(25% - 8px); }
}

@media (max-width: 600px) {
  .gallery-thumb { width: calc(20% - 8px); }
  .product-info__price { font-size: 1.6rem; }
  .btn-wa-full { min-width: 100%; }
  .tab-btn { padding: 12px 16px; font-size: 0.83rem; }
}
