/* ============================================================
   PAGE PRODUIT DETAIL — EPI Côte d'Ivoire
   ============================================================ */

/* Variables locales */
:root {
  --red: var(--epi-red);
  --red-dark: var(--epi-red-dark);
}

/* ---- Breadcrumb ---- */
.pd-breadcrumb {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.pd-bc-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pd-bc-path {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  flex-wrap: wrap;
}
.pd-bc-path a {
  color: #888;
  text-decoration: none;
  transition: color .2s;
  font-weight: 500;
}
.pd-bc-path a:hover { color: var(--epi-red); }
.pd-bc-path .sep { color: #ccc; font-size: 11px; }
.pd-bc-path .current { color: #222; font-weight: 600; }
.pd-bc-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pd-bc-nav a {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #f4f5f8;
  border: none;
  display: flex; align-items: center; justify-content: center;
  color: #555;
  text-decoration: none;
  font-size: 13px;
  transition: all .2s;
}
.pd-bc-nav a:hover { background: var(--epi-red); color: #fff; }

/* ---- Layout principal produit ---- */
.pd-main {
  padding: 36px 0 56px;
}
.pd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media(max-width:900px) {
  .pd-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---- Galerie images ---- */
.pd-gallery {
  position: sticky;
  top: 80px;
}
.pd-gallery-main {
  border-radius: 20px;
  overflow: hidden;
  background: #f8f9fa;
  aspect-ratio: 1;
  position: relative;
}
.pd-gallery-main img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform .4s ease;
}
.pd-gallery-main:hover img { transform: scale(1.04); }

/* Badges sur l'image */
.pd-gallery-badges {
  position: absolute;
  top: 14px; left: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.pd-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
}
.pd-badge-hot   { background: linear-gradient(135deg,#ff9800,#f57c00); color:#fff; }
.pd-badge-stock { background: linear-gradient(135deg,var(--epi-red),var(--epi-red-dark)); color:#fff; }
.pd-badge-new   { background: linear-gradient(135deg,#2ecc71,#27ae60); color:#fff; }

/* Actions flottantes sur l'image */
.pd-gallery-actions {
  position: absolute;
  top: 14px; right: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.pd-gallery-action-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #444;
  text-decoration: none;
  font-size: 15px;
  transition: all .25s;
  border: 1px solid rgba(0,0,0,.07);
}
.pd-gallery-action-btn:hover { background: var(--epi-red); color: #fff; border-color: transparent; transform: scale(1.08); }

/* Thumbnails */
.pd-gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.pd-gallery-thumbs::-webkit-scrollbar { display: none; }
.pd-thumb {
  width: 72px; height: 72px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: all .25s;
  background: #f4f5f8;
}
.pd-thumb img { width:100%; height:100%; object-fit:cover; }
.pd-thumb:hover, .pd-thumb.active { border-color: var(--epi-red); box-shadow: 0 0 0 3px rgba(227,6,19,.12); }

/* ---- Panel info produit ---- */
.pd-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Section titre */
.pd-title-section { margin-bottom: 16px; }
.pd-category-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--epi-red);
  text-decoration: none;
  margin-bottom: 8px;
}
.pd-category-link i { font-size: 11px; }
.pd-title {
  font-size: clamp(20px,2.5vw,30px);
  font-weight: 900;
  color: #1a1a2e;
  line-height: 1.2;
  margin: 0 0 8px;
}
.pd-ref {
  font-size: 12.5px;
  color: #aaa;
  font-weight: 500;
}
.pd-ref strong { color: #666; }

/* Séparateur */
.pd-divider {
  height: 1px;
  background: linear-gradient(90deg, #f0f0f0, transparent);
  margin: 16px 0;
}

/* ---- Prix ---- */
.pd-price-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.pd-price-main {
  font-size: clamp(24px,3vw,36px);
  font-weight: 900;
  color: var(--epi-red);
  line-height: 1;
}
.pd-price-original {
  font-size: 16px;
  font-weight: 600;
  color: #bbb;
  text-decoration: line-through;
}
.pd-discount-badge {
  background: rgba(227,6,19,.1);
  color: var(--epi-red);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ---- Statut stock ---- */
.pd-stock-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
}
.pd-stock-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pd-blink 2s ease-in-out infinite;
}
.pd-stock-dot.in  { background: #2ecc71; }
.pd-stock-dot.low { background: #f57c00; }
.pd-stock-dot.out { background: #e74c3c; animation: none; }
@keyframes pd-blink {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(.8); }
}
.pd-stock-text.in  { color: #27ae60; }
.pd-stock-text.low { color: #f57c00; }
.pd-stock-text.out { color: #e74c3c; }

/* ---- Viewers live ---- */
.pd-live-viewers {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(227,6,19,.06);
  border: 1px solid rgba(227,6,19,.12);
  border-radius: 30px;
  padding: 6px 14px;
  margin-bottom: 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--epi-red);
}
.pd-live-dot {
  width: 7px; height: 7px;
  background: var(--epi-red);
  border-radius: 50%;
  animation: pd-blink 1.5s ease-in-out infinite;
}

/* ---- Countdown ---- */
.pd-countdown-wrap {
  background: linear-gradient(135deg,#1a1a2e,#0f3460);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.pd-countdown-icon {
  font-size: 1.5rem;
  color: #ff5566;
  flex-shrink: 0;
  animation: pd-shake 1s ease-in-out infinite;
}
@keyframes pd-shake {
  0%,100% { transform: rotate(0); }
  25%  { transform: rotate(-12deg); }
  75%  { transform: rotate(12deg); }
}
.pd-countdown-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 4px;
}
.pd-countdown-timer {
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: .5px;
}

/* ---- Variantes ---- */
.pd-variant-section { margin-bottom: 16px; }
.pd-variant-label {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pd-variant-label span { color: var(--epi-red); font-weight: 600; }

/* ---- Fiche technique ---- */
.pd-fiche-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 2px solid rgba(227,6,19,.3);
  border-radius: 10px;
  color: var(--epi-red);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(227,6,19,.04);
  transition: all .25s;
  margin-bottom: 16px;
}
.pd-fiche-btn:hover {
  background: var(--epi-red);
  color: #fff;
  border-color: var(--epi-red);
  transform: translateY(-1px);
}

/* ---- CTA boutons ---- */
.pd-cta-block { margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.pd-btn-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: all .3s ease;
  cursor: pointer;
  border: none;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.pd-btn-main::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.15),transparent);
  transform: translateX(-100%);
  transition: transform .5s ease;
}
.pd-btn-main:hover::before { transform: translateX(100%); }
.pd-btn-add {
  background: linear-gradient(135deg,var(--epi-red),var(--epi-red-dark));
  color: #fff;
  box-shadow: 0 6px 24px rgba(227,6,19,.3);
}
.pd-btn-add:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(227,6,19,.45);
  color: #fff;
}
.pd-btn-add:active { transform: translateY(0); }
.pd-btn-add:disabled {
  background: #ccc;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.pd-btn-devis {
  background: #fff;
  color: var(--epi-red);
  border: 2px solid var(--epi-red);
}
.pd-btn-devis:hover {
  background: var(--epi-red);
  color: #fff;
  transform: translateY(-2px);
}

/* ---- Infos livraison ---- */
.pd-delivery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
@media(max-width:480px) { .pd-delivery-grid { grid-template-columns: 1fr; } }
.pd-delivery-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #f8f9fc;
  border-radius: 12px;
  border: 1px solid #eee;
  transition: border-color .25s;
}
.pd-delivery-item:hover { border-color: rgba(227,6,19,.2); }
.pd-di-icon {
  width: 36px; height: 36px;
  background: rgba(227,6,19,.08);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--epi-red);
  font-size: 16px;
  flex-shrink: 0;
}
.pd-di-title { font-size: 12px; font-weight: 700; color: #222; margin-bottom: 2px; }
.pd-di-desc  { font-size: 11.5px; color: #888; line-height: 1.45; }

/* ---- Paiement & confiance ---- */
.pd-trust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  background: #f8f9fc;
  border-radius: 12px;
  border: 1px solid #eee;
}
.pd-trust-secure {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #27ae60;
}
.pd-trust-secure i { font-size: 18px; }
.pd-payments {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pd-payments img {
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  filter: grayscale(0.2);
  transition: filter .2s;
}
.pd-payments img:hover { filter: grayscale(0); }

/* ---- Tabs Section ---- */
.pd-tabs-section { padding: 0 0 56px; }
.pd-tabs-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 28px;
  padding-bottom: 0;
}
.pd-tabs-nav::-webkit-scrollbar { display: none; }
.pd-tab-btn {
  flex-shrink: 0;
  padding: 12px 22px;
  font-size: 13.5px;
  font-weight: 600;
  color: #888;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all .25s;
  white-space: nowrap;
}
.pd-tab-btn:hover { color: var(--epi-red); }
.pd-tab-btn.active {
  color: var(--epi-red);
  border-bottom-color: var(--epi-red);
  font-weight: 700;
}
.pd-tab-pane { display: none; animation: pd-fadein .3s ease; }
.pd-tab-pane.active { display: block; }
@keyframes pd-fadein { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* Description */
.pd-description { font-size: 14.5px; line-height: 1.8; color: #444; }
.pd-description h2,.pd-description h3,.pd-description h4 { color: #1a1a2e; margin: 20px 0 10px; }
.pd-description ul { padding-left: 20px; }
.pd-description li { margin-bottom: 6px; }
.pd-description p { margin-bottom: 14px; }

/* Specs table */
.pd-specs-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.pd-specs-table tr:nth-child(even) { background: #f8f9fc; }
.pd-specs-table tr:hover { background: rgba(227,6,19,.04); }
.pd-specs-table .spec-key {
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: #333;
  width: 40%;
  border-bottom: 1px solid #eee;
}
.pd-specs-table .spec-val {
  padding: 12px 16px;
  font-size: 13.5px;
  color: #555;
  border-bottom: 1px solid #eee;
}

/* Avis */
.pd-reviews-empty {
  text-align: center;
  padding: 48px 20px;
  color: #aaa;
}
.pd-reviews-empty i { font-size: 3rem; opacity: .25; display: block; margin-bottom: 12px; }

/* ---- Section produits similaires ---- */
.pd-related-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.pd-related-title {
  font-size: clamp(18px,2.5vw,24px);
  font-weight: 900;
  color: #1a1a2e;
}
.pd-related-title span { color: var(--epi-red); }
.pd-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.pd-tag-red  { background: rgba(227,6,19,.08); color: var(--epi-red); }
.pd-tag-blue { background: rgba(52,152,219,.1); color: #2980b9; }

/* ---- Responsive ---- */
@media(max-width:768px) {
  .pd-main { padding: 20px 0 40px; }
  .pd-gallery { position: static; }
  .pd-title { font-size: 22px; }
  .pd-price-main { font-size: 26px; }
}
