/* ==========================================================================
   Design Système Page Produit - Bch7al (Inspiré de la maquette, sans commande directe)
   ========================================================================== */

.product-page-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #111827;
}

/* --- Fil d'Ariane --- */
.product-breadcrumb-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
  margin-bottom: 24px;
}

.product-breadcrumb-bar a {
  color: #ea580c;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.product-breadcrumb-bar a:hover {
  color: #9a3412;
  text-decoration: underline;
}

.product-breadcrumb-bar .sep {
  color: #9ca3af;
  font-size: 13px;
}

.product-breadcrumb-bar .current {
  color: #4b5563;
  font-weight: 400;
  max-width: 480px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Grille Principale 3 Colonnes --- */
.product-hero-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr) 340px;
  gap: 36px;
  align-items: start;
  margin-bottom: 32px;
}

/* 1. Colonne Gauche : Galerie Images */
.gallery-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-image-viewport {
  width: 100%;
  height: 380px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 8px;
}

.main-image-viewport img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.main-image-viewport:hover img {
  transform: scale(1.02);
}

.product-image-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  color: #9ca3af;
}

.product-image-fallback .fallback-initial {
  font-size: 64px;
  font-weight: 800;
  color: #cbd5e1;
}

/* 2. Colonne Centrale : Informations & Description */
.info-column {
  display: flex;
  flex-direction: column;
}

.badge-capsules-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.badge-capsule {
  display: inline-flex;
  align-items: center;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: #4b5563;
  padding: 4px 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-capsule.brand {
  color: #1f2937;
  background: #f3f4f6;
}

.badge-capsule.warranty {
  text-transform: none;
  font-weight: 600;
}

.product-main-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
  margin: 0 0 16px 0;
}

.product-short-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 24px;
}

.product-short-desc p {
  margin: 0 0 10px 0;
  color: inherit;
}

/* 3. Colonne Droite : Carte Comparateur / Meilleur Prix (sans bouton commande) */
.buy-card-column {
  display: flex;
  flex-direction: column;
}

.buy-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.buy-card-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.buy-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}

.main-price-val {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}

.strikethrough-price {
  font-size: 15px;
  font-weight: 500;
  color: #9ca3af;
  text-decoration: line-through;
}

.deal-merchant-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.verified-tag {
  font-size: 11.5px;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* Bouton Principal : Voir l'offre chez le marchand (CTA comparateur) */
.btn-primary-deal {
  width: 100%;
  background: #ea580c;
  border: 1px solid #ea580c;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 15px;
  height: 46px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  margin-bottom: 10px;
  text-decoration: none;
}

.btn-primary-deal:hover {
  background: #c2410c;
  border-color: #c2410c;
  color: #ffffff !important;
}

.btn-arrow {
  font-size: 16px;
}

/* Lignes d'actions secondaires */
.btn-row-dual {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-row-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.wishlist-form {
  margin: 0;
  width: 100%;
}

.btn-wishlist-action {
  width: 100%;
  height: 42px;
  background: #ffffff;
  border: 1px solid #ea580c;
  color: #ea580c;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-wishlist-action:hover {
  background: #fdf0e7;
}

.btn-wishlist-action.is-active {
  background: #fdf0e7;
  font-weight: 700;
}

.btn-compare-action {
  width: 44px;
  height: 42px;
  background: #ffffff;
  border: 1px solid #ea580c;
  color: #ea580c;
  border-radius: 8px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-compare-action:hover {
  background: #fdf0e7;
}

.btn-quote-action {
  height: 42px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #374151;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  padding: 0 6px;
  text-align: center;
}

.btn-quote-action:hover {
  background: #f9fafb;
  border-color: #ea580c;
  color: #ea580c;
}

.btn-share-action {
  height: 42px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #374151;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  padding: 0 6px;
  text-align: center;
  position: relative;
}

.btn-share-action:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.share-tooltip {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #ffffff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.share-tooltip.show {
  opacity: 1;
  visibility: visible;
}

.delivery-status-note {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.45;
  margin: 0;
}

/* --- Évolution du prix --- */
.price-chart-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-top: 16px;
}

.price-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.price-chart-header h2 {
  font-size: 14px;
  margin: 0;
}

.chart-period-toggle {
  display: flex;
  gap: 4px;
}

.chart-period-btn {
  border: 1px solid #f0c8a8;
  background: #ffffff;
  color: #ea580c;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chart-period-btn:hover:not(.active) {
  border-color: #ea580c;
}

.chart-period-btn.active {
  background: #ea580c;
  border-color: #ea580c;
  color: #ffffff;
}

.price-chart-svg-wrap {
  position: relative;
  width: 100%;
  height: 120px;
}

#price-chart-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.price-chart-line {
  fill: none;
  stroke: #ea580c;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.price-chart-area {
  fill: rgba(234, 88, 12, 0.1);
  stroke: none;
}

.price-chart-dot {
  fill: #ea580c;
}

.price-chart-axis-label {
  font-size: 9px;
  fill: #6b7280;
}

.price-chart-empty {
  margin: 0;
  padding: 40px 0;
  text-align: center;
  color: #6b7280;
  font-size: 12px;
}

/* --- Barre de Réassurance (4 Piliers horizontaux) --- */
.reassurance-grid-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 48px;
}

.reassurance-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0 16px;
}

.reassurance-item:not(:last-child) {
  border-right: 1px solid #e2e8f0;
}

.reassurance-circle-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ea580c;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.reassurance-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reassurance-details strong {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.reassurance-details span {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.35;
}

/* --- Section Comparateur d'offres --- */
.comparator-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 40px;
}

.comparator-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.comparator-section-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.comparator-table {
  width: 100%;
  border-collapse: collapse;
}

.comparator-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #f3f4f6;
}

.comparator-table td {
  padding: 16px 14px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}

.comparator-row-best {
  background: #fefaf7;
}

.comparator-merchant-cell strong {
  display: block;
  font-size: 15px;
  color: #111827;
}

.comparator-merchant-cell small {
  color: #6b7280;
  font-size: 12px;
}

.comparator-price-cell strong {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}

.comparator-price-cell small {
  display: block;
  color: #6b7280;
  font-size: 11px;
}

.comparator-badge-rank {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: #ffedd5;
  color: #c2410c;
  padding: 3px 8px;
  border-radius: 4px;
}

.btn-table-deal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 16px;
  background: #ea580c;
  color: #ffffff !important;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-table-deal:hover {
  background: #c2410c;
}

/* Modale / Section Alerte & Devis */
.quote-modal-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  background: #ffffff;
  margin-bottom: 40px;
}

.quote-modal-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #111827;
}

/* Historique */
.history-collapsible {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 16px 20px;
  margin-bottom: 40px;
}

.history-collapsible summary {
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: #111827;
}

.history-collapsible table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
}

.history-collapsible th,
.history-collapsible td {
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
  text-align: left;
}

/* --- Responsive & Mobile --- */
@media (max-width: 1080px) {
  .product-hero-layout {
    grid-template-columns: 340px minmax(0, 1fr);
  }

  .buy-card-column {
    grid-column: 1 / -1;
  }

  .reassurance-grid-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .reassurance-item:nth-child(2) {
    border-right: none;
  }
}

@media (max-width: 768px) {
  .product-hero-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .main-image-viewport {
    height: 300px;
  }

  .product-main-title {
    font-size: 22px;
  }

  .reassurance-grid-bar {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .reassurance-item {
    border-right: none !important;
    padding: 0;
  }

  .btn-row-equal {
    grid-template-columns: 1fr;
  }
}
