body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  margin: 0;
  background-color: #111;
  --glow-color: rgb(217, 176, 255);
  color: #ffffff;
  text-shadow: 0 0 .3em var(--glow-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* Ruban promo sur les pages détails */
.promo-ribbon-detail {
  position: fixed;
  top: 18px;
  right: -34px;
  padding: 10px 60px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff3838 100%);
  color: #fff;
  font-weight: bold;
  font-size: 1.1em;
  transform: rotate(45deg);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 1200;
  pointer-events: none;
}

.detail-old-price {
  text-decoration: line-through;
  color: #bbbbbb;
  margin-right: 10px;
  font-weight: normal;
}

.detail-new-price {
  color: #ff4d4d;
  font-weight: bold;
}

header {
  padding: 0.1rem;
  text-align: center;
  background-color: #222;
}

button {
 --glow-color: rgb(217, 176, 255);
 --glow-spread-color: rgba(191, 123, 255, 0.100);
 --enhanced-glow-color: rgb(231, 206, 255);
 --btn-color: rgb(100, 61, 136);
 -webkit-appearance: none;
 -webkit-backface-visibility: hidden;
 backface-visibility: hidden;
 -webkit-tap-highlight-color: transparent;
 left: 1;
 top: 4%;
 border: .25em solid var(--glow-color);
 padding: 0.4rem 0.6rem;
 color: var(--glow-color);
 font-size: 15px;
 font-weight: bold;
 background-color: var(--btn-color);
 border-radius: 1em;
 outline: none;
 box-shadow: 0 0 1em .25em var(--glow-color),
        0 0 4em 1em var(--glow-spread-color),
        inset 0 0 .75em .25em var(--glow-color);
 text-shadow: 0 0 .5em var(--glow-color);
 position: relative;
 transition: all 0.3s;
}

button:hover {
  background-color: rgb(231, 206, 255);
}

.gallery {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

.desc a {
  font-size: 1em;
  line-height: 1.6;
  color: #fa0000;
  max-width: 1200px;
  margin: 0 auto 20px auto;
  text-shadow: 0 0 10px #ff0000;
}

.card {
  background-color: #333;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  max-width: 300px;
}

.card img {
  width: 100%;
  border-radius: 8px;
}

.slider-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.scroll-btn {
  font-size: 2rem;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  padding: 10px;
  margin: 0 20px;
  box-shadow: 0 0 15px 5px rgba(200, 100, 255, 0.4);
  transition: transform 0.2s ease;
}

.scroll-btn:hover {
  transform: scale(1.1);
}


.image-track {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  scroll-behavior: smooth;
  max-width: 80%;
  scrollbar-width: none;
}

.image-track::-webkit-scrollbar {
  display: none;
}


.image-track img {
  height: 300px;
  width: 500px;
  border-radius: 10px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .promo-ribbon-detail {
    top: 14px;
    right: -30px;
    padding: 7px 48px;
    font-size: 0.9em;
  }
}

.bottom-descriptions {
  padding: 30px 20px;
  background-color: #111;
  color: white;
  text-align: center;
}

.bottom-descriptions .desc {
  margin: 10px 0;
  font-size: 1.5rem;
  line-height: 1.6;
}

.bottom-descriptions h2 {
  font-size: 2rem;
  color: var(--glow-color);
  margin-bottom: 10px;
  text-shadow: 0 0 .3em var(--glow-color);
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 5px;
}



.back-btn {
  --glow-color: rgb(217, 176, 255);
  --glow-spread-color: rgba(191, 123, 255, 0.100);
  --enhanced-glow-color: rgb(231, 206, 255);
  --btn-color: rgb(100, 61, 136);
  
  position: absolute;
  top: 10px;
  left: 20px;
  
  padding: 15px 30px;
  font-size: 1.2rem;
  color: var(--glow-color);
  background-color: var(--btn-color);
  box-shadow: 0 0 1em 0.25em var(--glow-color),
              0 0 4em 1em var(--glow-spread-color),
              inset 0 0 0.75em 0.25em var(--glow-color);
  text-shadow: 0 0 0.5em var(--glow-color);
  transition: all 0.3s;
  cursor: pointer;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  header { padding: 0.6rem; }
  .gallery { padding: 1rem; }

  .slider-container { padding: 1rem; }
  .scroll-btn { font-size: 1.4rem; margin: 0 10px; }

  .image-track { max-width: 100%; gap: 0.5rem; }
  .image-track img { width: 100%; height: auto; }

  .bottom-descriptions .desc { font-size: 1.1rem; }
  .bottom-descriptions h2 { font-size: 1.6rem; }

  .back-btn {
    display: none;
  }

  button {
    padding: 0.3rem 0.5rem;
    font-size: 13px;
  }

  .wishlist-star {
    font-size: 24px;
  }

  body {
    padding-bottom: 70px;
  }
}

@media (max-width: 480px) {
  .scroll-btn { font-size: 1.2rem; }
}

/* Lightbox styles */
#lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  justify-content: center;
  align-items: center;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 0 50px rgba(217, 176, 255, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 50px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  text-shadow: 0 0 10px rgba(217, 176, 255, 0.8);
}

.lightbox-close:hover {
  color: rgb(217, 176, 255);
  transform: scale(1.2);
}

.lightbox-nav {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
}

.lightbox-prev,
.lightbox-next {
  font-size: 40px;
  color: #fff;
  background-color: rgba(100, 61, 136, 0.8);
  border: 2px solid rgb(217, 176, 255);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 0 20px rgba(217, 176, 255, 0.5);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: rgb(217, 176, 255);
  color: rgb(100, 61, 136);
  transform: scale(1.1);
}

/* Tablet layout */
@media (min-width: 600px) and (max-width: 1024px) {
  header { padding: 0.6rem; }
  .gallery { padding: 1.4rem; }
  .slider-container { padding: 1.4rem; }

  .scroll-btn { font-size: 1.6rem; margin: 0 14px; }
  .image-track { max-width: 100%; gap: 0.8rem; }
  .image-track img { width: 100%; height: auto; }

  .bottom-descriptions .desc { font-size: 1.25rem; }
  .bottom-descriptions h2 { font-size: 1.8rem; }

  .back-btn { top: 10px; left: 14px; padding: 12px 22px; font-size: 1.1rem; }
  
  .lightbox-close {
    top: 15px;
    right: 25px;
    font-size: 40px;
  }
  
  .lightbox-prev,
  .lightbox-next {
    width: 50px;
    height: 50px;
    font-size: 30px;
  }
}

/* Mobile lightbox adjustments */
@media (max-width: 768px) {
  .lightbox-img {
    max-width: 95%;
    max-height: 80%;
  }
  
  .lightbox-close {
    top: 10px;
    right: 15px;
    font-size: 35px;
  }
  
  .lightbox-prev,
  .lightbox-next {
    width: 45px;
    height: 45px;
    font-size: 25px;
  }
  
  .lightbox-nav {
    padding: 0 10px;
  }
}

/* ========== Optimisations Safari/macOS ========== */

html {
  -webkit-scroll-behavior: smooth;
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(217, 176, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(217, 176, 255, 0.4);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(217, 176, 255, 0.7);
}

input, textarea, select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-size: 16px;
}

/* Optimisation pour MacBook */
@media (min-width: 1440px) {
  .detail-container {
    padding: 40px 60px;
  }

  .gallery-grid {
    gap: 20px;
  }
}

@media (min-width: 1024px) and (max-width: 1440px) {
  .detail-container {
    padding: 30px 40px;
  }
}

