/* ======== Structure principale ======== */
.cleon-product-page {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem 0;
  align-items: flex-start;
}

/* ======== Galerie ======== */
.cleon-gallery-column-wrapper {
  display: flex;
  gap: 1.5rem;
  flex: 1 1 500px;
  min-width: 300px;
  align-items: flex-start;
}

/* Colonne d’images secondaires */
.cleon-gallery-column {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 0 0 80px;
  max-height: 500px;
  overflow-y: hidden; /* enlève scrollbar */
  scrollbar-width: none;
}
.cleon-gallery-column::-webkit-scrollbar {
  display: none; /* supprime scrollbar */
}

.cleon-gallery-column .thumb {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  object-fit: cover;
  transition: transform 0.25s ease, border-color 0.25s ease;
  backface-visibility: hidden; /* empêche tremblement */
}

.cleon-gallery-column .thumb:hover {
  border-color: #000;
  transform: scale(1.05);
}

/* ======== Image principale ======== */
.cleon-product-gallery {
  position: relative;
  flex: 1 1 auto;
  max-width: 450px;
  aspect-ratio: 4 / 5; /* fige la hauteur */
  overflow: hidden; /* masque débordement image */
  border-radius: 12px; /* conserve les coins arrondis */
  display: flex;
  align-items: center;
  justify-content: center;
}

.cleon-product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* remplit sans déformer */
  border-radius: inherit; /* hérite du parent */
  transition: opacity 0.5s ease-in-out; /* effet fade */
  display: block;
}


/* ======== Flèches navigation ======== */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: #000;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(5px);
}

.nav-arrow:hover {
  background: rgba(255, 255, 255, 0.4);
}

.nav-arrow.left {
  left: 10px;
}

.nav-arrow.right {
  right: 10px;
}

/* ======== Infos produit ======== */
.cleon-product-info {
  flex: 1 1 400px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.cleon-product-info h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cleon-desc {
  margin-bottom: 1.5rem;
  line-height: 1.6;
  color: #333;
}

.cleon-price-block {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.cleon-price-block .old {
  text-decoration: line-through;
  color: #999;
  margin-right: 0.5rem;
}

.cleon-price-block .promo,
.cleon-price-block .regular {
  color: #000;
  font-weight: bold;
}

/* ======== Bouton ======== */
.cleon-buy-btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  background: #000;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

.cleon-buy-btn:hover {
  background: #111;
  transform: translateY(-2px);
}

/* ======== Responsive ======== */
@media (max-width: 1024px) {
  .nav-arrow.left {
    left: 10px;
  }
  .nav-arrow.right {
    right: 10px;
  }
}

@media (max-width: 768px) {
  .cleon-product-page {
    flex-direction: column;
    align-items: center;
  }

  .cleon-gallery-column-wrapper {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
  }

  .cleon-gallery-column {
    flex-direction: column;
    gap: 0.6rem;
    overflow: hidden;
    max-height: none;
    flex: 0 0 60px;
  }

  .cleon-gallery-column .thumb {
    width: 100%;
    aspect-ratio: 1/1;
  }

  .cleon-product-gallery {
    max-width: 320px;
  }

  .cleon-product-gallery img {
    border-radius: 10px;
  }

  .nav-arrow {
    font-size: 1.2rem;
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.25);
  }
}

#mainProductImage {
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

#mainProductImage.fade-out {
  opacity: 0;
}
