/**
 * product_detail.css
 * Styles spécifiques pour la page détail produit avec espacements uniformisés
 */


/* Variable pour l'espacement horizontal uniforme */
:root {
  --container-padding: 60px;
}
/* Conteneur commun pour toutes les sections */
.page-container {
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Top Navigation Bar */
.top-bar {
  width: 100%;
  box-sizing: border-box;
}

/* Amélioration du bouton retour */
.back-link {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  padding: 10px 0;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--primary-color);
}

.back-icon {
  margin-right: 5px;
  font-style: normal;
}

.top-actions {
  display: flex;
  gap: 20px;
}

.action-link {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
  text-decoration: none;
}

.action-icon {
  margin-left: 5px;
}

/* Product Detail Section */
.product-detail {
  display: flex;
  position: relative;
  padding: 60px 0 30px;
  max-width: 100%;
  gap: 60px;
  border-bottom: none;
  background: #f5f5f5;
  border-radius: 0;
  min-height: 70vh;
}

.product-info {
  flex: 1;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  max-width: 450px;
}

.product-info .back-link {
  color: #666;
  font-size: 14px;
  margin-bottom: 30px;
  display: inline-block;
  text-decoration: none;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-title {
  color: #e74c3c;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
}

.product-subtitle {
  text-transform: uppercase;
  color: #333;
  font-size: 16px;
  margin-bottom: 40px;
  font-weight: 400;
  letter-spacing: 2px;
}

.product-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
  color: #333;
  font-size: 14px;
  line-height: 1.8;
}

.product-features-list li {
  font-weight: 500;
}

.product-info hr {
  margin: 10px 0;
  border: none;
  border-top: 1px solid #050505f7;
  width: 100%;
}

/* Tableau des caractéristiques techniques */
.product-specs-table {
  width: 100%;
  display: table;
  margin-bottom: 0;
  margin-top: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border: none;
  overflow: visible;
}

.specs-row {
  display: table-row;
  border-bottom: none;
}

.specs-row:last-child {
  border-bottom: none;
}

.specs-label, .specs-value {
  display: table-cell;
  font-size: 14px;
  vertical-align: top;
  border: none;
}


.specs-label {
  color: #666;
  font-weight: 400;
  width: 40%;
  background: transparent;
  text-align: left;
  border-right: none;
  text-transform: none;
  letter-spacing: 0;
  padding-right: 20px;
}

.specs-value {
  color: #333;
  font-weight: 600;
  width: 60%;
  background: transparent;
  text-align: right;
  word-break: break-word;
}

@media (max-width: 768px) {
  .product-specs-table {
    font-size: 14px;
  }
  .specs-label, .specs-value {
    padding: 8px 8px;
    font-size: 14px;
  }
}

.product-description {
  margin-bottom: 15px;
  line-height: 1.5;
  font-size: 15px;
  color: #fff;
}

.product-codes {
  margin: 20px 0;
  line-height: 1.5;
  font-size: 14px;
  color: var(--text-color);
}

.product-finishing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid #eee;
  font-size: 14px;
  color: var(--text-color);
}

.product-finishing span:first-child {
  font-weight: 500;
}

.product-image-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-image {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}

.product-image img {
  width: 100%;
  height: auto;
  display: block;
}

.three-d-button {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background-color: var(--primary-color);
  color: white;
  padding: 8px 15px;
  border: none;
  border-radius: 0;
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
}

.nav-buttons {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.nav-button {
  background-color: transparent;
  border: none;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.nav-button.prev {
  margin-left: -20px;
}

.nav-button.next {
  margin-right: -20px;
}

/* Mise à jour du style des thumbnails */
.thumbnail-slider {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  margin-top: 0;
  padding: 0;
}

.thumbnail {
  width: 80px;
  height: 60px;
  border: 1px solid #eee;
  cursor: pointer;
  object-fit: cover;
  transition: border-color 0.3s ease;
}

.thumbnail:hover {
  border-color: #ccc;
}

.thumbnail.active {
  border: 2px solid var(--primary-color, #e67e22);
}

/* Responsive pour les miniatures */
@media (max-width: 768px) {
  .thumbnail-slider {
    justify-content: center;
    flex-wrap: wrap;
  }

  .thumbnail {
    width: 70px;
    height: 50px;
  }
}

@media (max-width: 576px) {
  .thumbnail {
    width: 60px;
    height: 45px;
  }
}

/* Styles pour la section d'achat */
.product-purchase-section {
  margin: 30px 0 0 0; /* Supprimé la marge du bas */
  padding: 25px;
  background-color: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 8px; /* Ajout d'un border-radius */
}

.product-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.price-label {
  font-weight: 500;
  color: #333;
  text-transform: uppercase;
  font-size: 14px;
}

.price-amount {
  font-size: 22px;
  color: var(--primary-color, #e67e22);
  font-weight: 500;
}

.product-quantity {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.quantity-label {
  font-weight: 500;
  color: #333;
  text-transform: uppercase;
  font-size: 14px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  height: 40px;
}

.quantity-btn {
  width: 40px;
  height: 40px;
  border: none;
  background-color: #f0f0f0;
  color: #333;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.quantity-btn:hover {
  background-color: #e0e0e0;
}

.quantity-input {
  width: 50px;
  height: 38px;
  border: none;
  text-align: center;
  font-size: 16px;
  color: #333;
  -moz-appearance: textfield; /* Firefox */
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-actions {
  display: flex;
  justify-content: center; /* Centre le bouton */
  margin-top: 25px;
}

.product-order-line {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.quantity-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity-label {
  font-weight: 500;
  color: #333;
  font-size: 14px;
  min-width: 30px;
}

/* Bouton d'ajout au panier avec largeur réduite */
.add-to-cart-btn {
  padding: 10px 20px;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: var(--primary-color, #e67e22);
  color: white;
  border-radius: 4px;
  white-space: nowrap;
  flex: 1.5; /* Largeur réduite par rapport à flex: 2 */
  min-width: 150px;
  max-width: 200px;
}

.add-to-cart-btn:hover {
  background-color: #C90C0F;
}

/* Section pour le bouton de téléchargement de brochure */
.download-brochure-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-start;
}

.download-brochure-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background-color: #333;
  border: 1px solid #333;
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  border-radius: 4px;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(51, 51, 51, 0.2);
}

.download-brochure-btn:hover {
  background-color: #666;
  border-color: #666;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(51, 51, 51, 0.3);
}

.download-brochure-btn i {
  font-size: 12px;
}

/* Responsive */
@media (max-width: 576px) {
  .product-actions {
    flex-direction: column;
    gap: 10px;
  }

  .product-order-line {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .quantity-section {
    justify-content: center;
  }

  .add-to-cart-btn {
    width: 100%;
    max-width: none;
  }

  .download-brochure-section {
    justify-content: center;
  }
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 20px;
  letter-spacing: 1px;
  position: relative;
  padding-left: 0;
}

.section-title::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: calc(100% - 250px);
  height: 1px;
  background: white;
}

/* Related Products Section */
.related-products-section {
  margin-bottom: var(--spacing-large);
  padding: var(--spacing-medium) 0;
  width: 100%;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-medium);
}

.product-card {
  background-color: var(--tertiary-color);
  padding: var(--spacing-small);
  text-align: center;
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card img {
  width: 100%;
  height: auto;
}

.product-card-title {
  font-size: var(--font-size-small);
  text-transform: uppercase;
  margin: var(--spacing-small) 0;
  padding-top: var(--spacing-small);
  border-top: 1px solid var(--border-color);
}

.product-card-subtitle {
  opacity: 0.7;
  font-size: var(--font-size-small);
  text-transform: uppercase;
}

/* Overlay pour le bouton "Voir Détail" */
.product-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.product-card:hover .product-card-overlay {
  opacity: 1;
  pointer-events: auto;
}

.view-details-link {
  background-color: var(--primary-color, #e67e22);
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-block;
}

.view-details-link:hover {
  background-color: #d35400;
  color: white;
}

/* Responsive */
@media (max-width: 992px) {
  :root {
    --container-padding: 40px;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 20px;
  }

  .product-detail {
    flex-direction: column;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .specs-columns {
    flex-direction: column;
  }

  .downloads-content {
    flex-direction: column;
  }

  .features-icons {
    flex-wrap: wrap;
    gap: var(--spacing-medium);
    justify-content: center;
  }

  .feature-item {
    width: calc(50% - var(--spacing-medium));
  }
}

@media (max-width: 576px) {
  :root {
    --container-padding: 15px;
  }
}

/* --- Card blanche variantes produit --- */
.product-variants-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  padding: 32px 28px 24px 28px;
  margin-top: 36px;
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
}
.variants-title {
  color: var(--primary-color);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.variants-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  background: transparent;
  table-layout: fixed;
}
.variants-table th, .variants-table td {
  padding: 8px 0;
  vertical-align: top;
}
.variants-table th {
  color: #222;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid #eee;
  text-align: left;
  width: 35%;
}
.variants-table td.variant-name {
  font-weight: 500;
  color: var(--primary-color);
  min-width: 120px;
  max-width: 180px;
  padding-right: 18px;
  word-break: break-word;
}
.variants-table td.variant-values {
  width: 65%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: flex-start;
  word-break: break-word;
}
.variants-table .variant-value {
  background: #f7f7f7;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 14px;
  color: #b00;
  margin-bottom: 4px;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .product-variants-card {
    padding: 18px 8px 12px 8px;
  }
  .variants-title {
    font-size: 18px;
  }
  .variants-table th, .variants-table td {
    font-size: 13px;
  }
  .variant-value {
    font-size: 12px;
    padding: 3px 8px;
  }
}

/* Séparateur horizontal entre caractéristiques et variantes */
.product-info-separator {
  border: none;
  border-top: 2px solid #222;
  margin: 32px 0 24px 0;
  width: 100%;
}

.main-product-image {
  width: 100%;
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
  margin: 40px auto 0 auto;
  background: #fff;
}

.product-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  justify-content: flex-start;
}

.thumbnail-product {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border: 1px solid #eee;
  cursor: pointer;
  transition: border-color 0.3s;
}

.thumbnail-product:hover {
  border-color: var(--primary-color, #e67e22);
}

.thumbnail-product.active {
  border: 2px solid var(--primary-color, #e67e22);
}

/* Styles pour les prix masqués */
.price-hidden {
  color: #666 !important;
  font-style: italic;
  font-weight: 500;
}

.price-note {
  margin-top: 8px;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-left: 3px solid #17a2b8;
  border-radius: 4px;
}

.price-note small {
  color: #6c757d;
  font-size: 12px;
  line-height: 1.4;
}

/* Animation pour les prix masqués */
.price-hidden {
  animation: fadeInUp 0.3s ease-out;
}

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