/* produit.css — page produit individuelle (cadrage 0041/CC-4 Lot 2).
   Servi uniquement par les pages sous /parfums/<slug>, jamais par index.html
   (R157 : CSS scopé à sa page, pas de pollution de la vitrine).
   Réutilise les variables --* déjà posées par layout.html.twig (palette du
   tenant), reste donc tenant-agnostique malgré leurs noms hérités Da Zietto.
   La navigation (.pp-topbar/.pp-brand/.pp-breadcrumb), partagée avec le hub
   /parfums, vit dans catalogue-nav.css — pas ici (éviter la duplication). */

.pp-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.pp-media {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Galerie sélectionnable sans JS (radio + :checked). Les inputs radio sont
   masqués visuellement mais restent fonctionnels (cochés au clic sur une
   vignette <label>) ; le CSS ci-dessous mappe le Nième radio coché au
   Nième cadre (positionnel — fonctionne quel que soit le produit/slug,
   jusqu'à 8 photos). */
.pp-gallery-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.pp-gallery-frames {
  position: relative;
}

.pp-gallery-frame {
  display: none;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: var(--shadow);
  /* contain, pas cover : les photos produit n'ont pas toutes le même ratio
     (certaines quasi carrées, d'autres portrait serré sur le flacon) — cover
     zoome/recadre fort sur ces dernières (retour d'usage). contain affiche
     la photo entière, complétée par le fond neutre plutôt que rognée. */
  object-fit: contain;
  aspect-ratio: 1 / 1;
  background: var(--secondary-nacre, #f4f4f4);
}

.pp-gallery-radio:nth-of-type(1):checked ~ .pp-gallery-frames .pp-gallery-frame-0,
.pp-gallery-radio:nth-of-type(2):checked ~ .pp-gallery-frames .pp-gallery-frame-1,
.pp-gallery-radio:nth-of-type(3):checked ~ .pp-gallery-frames .pp-gallery-frame-2,
.pp-gallery-radio:nth-of-type(4):checked ~ .pp-gallery-frames .pp-gallery-frame-3,
.pp-gallery-radio:nth-of-type(5):checked ~ .pp-gallery-frames .pp-gallery-frame-4,
.pp-gallery-radio:nth-of-type(6):checked ~ .pp-gallery-frames .pp-gallery-frame-5,
.pp-gallery-radio:nth-of-type(7):checked ~ .pp-gallery-frames .pp-gallery-frame-6,
.pp-gallery-radio:nth-of-type(8):checked ~ .pp-gallery-frames .pp-gallery-frame-7 {
  display: block;
}

.pp-gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.pp-thumb {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.pp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pp-thumb:hover {
  border-color: var(--border);
}

.pp-gallery-radio:nth-of-type(1):checked ~ .pp-gallery-thumbs .pp-thumb:nth-of-type(1),
.pp-gallery-radio:nth-of-type(2):checked ~ .pp-gallery-thumbs .pp-thumb:nth-of-type(2),
.pp-gallery-radio:nth-of-type(3):checked ~ .pp-gallery-thumbs .pp-thumb:nth-of-type(3),
.pp-gallery-radio:nth-of-type(4):checked ~ .pp-gallery-thumbs .pp-thumb:nth-of-type(4),
.pp-gallery-radio:nth-of-type(5):checked ~ .pp-gallery-thumbs .pp-thumb:nth-of-type(5),
.pp-gallery-radio:nth-of-type(6):checked ~ .pp-gallery-thumbs .pp-thumb:nth-of-type(6),
.pp-gallery-radio:nth-of-type(7):checked ~ .pp-gallery-thumbs .pp-thumb:nth-of-type(7),
.pp-gallery-radio:nth-of-type(8):checked ~ .pp-gallery-thumbs .pp-thumb:nth-of-type(8) {
  border-color: var(--accent-gold, var(--border));
}

.pp-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pp-category {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin: 0;
}

.pp-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin: 0;
  color: var(--text-primary);
}

.pp-price {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent-brown, var(--text-primary));
  margin: 0;
}

.pp-description {
  font-family: var(--font-body);
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-line;
}

.pp-cta {
  display: inline-block;
  align-self: flex-start;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  background: var(--accent-brown, #333);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  margin: 0.5rem 0 1rem;
}

.pp-cta:hover {
  opacity: 0.9;
}

.pp-sections {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pp-accordion {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.25rem 1rem;
}

.pp-accordion-title {
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 0;
  list-style: none;
}

.pp-accordion-title::-webkit-details-marker {
  display: none;
}

.pp-accordion-title::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.15s ease;
}

.pp-accordion[open] .pp-accordion-title::before {
  transform: rotate(90deg);
}

.pp-accordion-body {
  padding: 0 0 1rem;
  color: var(--text-primary);
}

.pp-accordion-body .pp-p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

.pp-ul {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

.pp-ul li {
  margin-bottom: 0.35rem;
}

@media (max-width: 720px) {
  .pp-product {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
