/* =========================
   PAGE PRODUIT – LAYOUT
========================= */

.product-page {
  display: flex;
  gap: 40px;
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
  align-items: flex-start;
  flex-wrap: wrap;
  color: #111;
}

/* =========================
   GALERIE IMAGES (GAUCHE)
========================= */

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.main-image img {
  width: 420px;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid #ddd;
}

/* Miniatures */
.thumbnails {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.thumbnails img {
  width: 75px;
  height: auto;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 6px;
  transition: 0.2s ease;
}

.thumbnails img:hover,
.thumbnails img.active {
  border-color: #000;
}

/* =========================
   INFOS PRODUIT (DROITE)
========================= */

.product-info {
  flex: 1;
  min-width: 280px;
  max-width: 500px;
}

.product-info h1 {
  font-size: 26px;
  margin-bottom: 10px;
  color: #111;
}

.product-info p {
  margin: 10px 0;
  color: #222;
  line-height: 1.5;
}

/* =========================
   TABLEAU DES PRIX
========================= */

.option-table {
  width: 90%;
  max-width: 420px;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 14px;
}

.option-table th,
.option-table td {
  border: 1px solid #bbb;
  padding: 6px 8px;
  text-align: center;
  color: #111;
}

.option-table th {
  background-color: #eaeaea;
  font-weight: 600;
}

/* =========================
   OPTIONS (BOUTONS / INPUT)
========================= */

.option-buttons {
  display: flex;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.option-buttons button {
  padding: 7px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
}

.option-buttons button:hover,
.option-buttons button.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Quantité */
.product-options input[type="number"] {
  width: 90px;
  padding: 6px;
  font-size: 15px;
  margin-bottom: 10px;
}

/* =========================
   PRIX & ACTION
========================= */

.price {
  font-size: 20px;
  font-weight: bold;
  margin-top: 10px;
  color: #000;
}

.buy-btn {
  margin-top: 20px;
  padding: 12px 22px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
}

.buy-btn:hover {
  background: #333;
}

/* =========================
   LIEN RETOUR
========================= */

.back-link {
  display: inline-block;
  margin: 20px;
  text-decoration: none;
  color: #000;
  font-weight: 500;
}

/* =========================
   RESPONSIVE
========================= */

@media screen and (max-width: 900px) {
  .product-page {
    flex-direction: column;
    align-items: center;
  }

  .product-info {
    max-width: 100%;
  }

  .main-image img {
    width: 100%;
    max-width: 500px;
  }

  .thumbnails {
    justify-content: center;
  }

  .option-table {
    width: 100%;
    max-width: 100%;
    font-size: 13px;
  }
}

