/* ============================================================
   pdp.css — Fiche produit AgriForeX (Product Detail Page)
   S'appuie sur les jetons --mkt-* de market.css. Le même balisage
   est produit par le pré-rendu SEO (scripts/generate-seo-pages.mjs)
   et par le rendu client (js/share-landing.js) : les deux doivent
   rester visuellement identiques pour éviter tout saut de contenu.
   ============================================================ */

/* ============================================================
   0. RESET SCOPÉ À LA FICHE
   Header / footer du site reposent sur Tailwind CDN + main.css.
   Le reset ne doit donc s'appliquer qu'à .pdp, sinon les partials
   (nav, footer sombre, liens) perdent leur mise en page.
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

body { margin: 0; }

.pdp h1, .pdp h2, .pdp h3, .pdp h4,
.pdp p, .pdp figure, .pdp blockquote, .pdp dl, .pdp dd { margin: 0; }

.pdp ul, .pdp ol { margin: 0; padding: 0; list-style: none; }

.pdp a { color: inherit; text-decoration: inherit; }

.pdp img, .pdp svg, .pdp video, .pdp canvas, .pdp iframe {
  display: block;
  vertical-align: middle;
}

.pdp img, .pdp video { max-width: 100%; height: auto; }

.pdp button, .pdp input, .pdp select, .pdp textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}

.pdp button { background: none; border: 0; cursor: pointer; }

.pdp table { border-collapse: collapse; }

.pdp {
  background: var(--mkt-bg, #f5f8f4);
  padding-bottom: clamp(2rem, 6vw, 4rem);
  min-height: 60vh;
}

.pdp__container {
  width: 100%;
  max-width: 1500px;
  margin-inline: auto;
  padding-inline: clamp(0.75rem, 3vw, 2rem);
}

/* ============================================================
   1. FIL D'ARIANE
   ============================================================ */
.pdp-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  padding: 0.85rem 0 0.75rem;
  font-size: 0.76rem;
  color: var(--mkt-muted-fg, #5c6860);
}
.pdp-crumb a {
  color: var(--mkt-primary-dark, #2d6a04);
  font-weight: 700;
  text-decoration: none;
}
.pdp-crumb a:hover { text-decoration: underline; }
.pdp-crumb__sep { opacity: 0.4; display: inline-flex; }
.pdp-crumb__cur {
  color: var(--mkt-fg, #0d140f);
  font-weight: 600;
  max-width: min(46ch, 60vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   2. BLOC HAUT : galerie + bloc d'achat
   ============================================================ */
.pdp-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .pdp-top { grid-template-columns: minmax(0, 1fr) 390px; gap: 1.4rem; }
}
@media (min-width: 1440px) {
  .pdp-top { grid-template-columns: minmax(0, 1fr) 430px; }
}

.pdp-panel {
  background: var(--mkt-surface, #fff);
  border: 1px solid var(--mkt-border, rgba(0, 43, 2, 0.09));
  border-radius: var(--mkt-radius-lg, 22px);
  box-shadow: var(--mkt-shadow-sm, 0 2px 10px -4px rgba(0, 43, 2, 0.14));
}

/* ============================================================
   3. GALERIE
   ============================================================ */
.pdp-gallery { padding: 0.7rem; }
.pdp-gallery__row { display: flex; gap: 0.65rem; }

.pdp-thumbs {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  width: 68px;
  flex-shrink: 0;
  max-height: 560px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.pdp-thumbs::-webkit-scrollbar { width: 3px; }
.pdp-thumbs::-webkit-scrollbar-thumb { background: var(--mkt-border-strong, rgba(0, 43, 2, 0.14)); border-radius: 9px; }
@media (min-width: 768px) { .pdp-thumbs { display: flex; } }

.pdp-thumb {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: var(--mkt-muted, #eef2ec);
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-thumb:hover { transform: translateY(-1px); border-color: rgba(99, 168, 0, 0.45); }
.pdp-thumb.is-active { border-color: var(--mkt-primary, #63a800); }

/* Scène principale : piste défilante à accrochage (swipe natif sans JS) */
.pdp-stage {
  position: relative;
  flex: 1;
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--mkt-border, rgba(0, 43, 2, 0.09));
}
.pdp-stage__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  max-height: min(560px, 70vh);
}
.pdp-stage__track::-webkit-scrollbar { display: none; }
.pdp-stage__slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 1 / 1;
  max-height: min(560px, 70vh);
  display: grid;
  place-items: center;
  background: #fff;
  cursor: zoom-in;
  margin: 0;
  padding: 0;
  border: 0;
}
.pdp-stage__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.pdp-stage__ph {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #e8f2e2, #eef2ec);
  color: rgba(0, 43, 2, 0.26);
}

.pdp-stage__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--mkt-border, rgba(0, 43, 2, 0.09));
  background: rgba(255, 255, 255, 0.95);
  color: var(--mkt-fg, #0d140f);
  box-shadow: var(--mkt-shadow-md, 0 14px 34px -18px rgba(0, 43, 2, 0.28));
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}
.pdp-stage:hover .pdp-stage__nav,
.pdp-stage:focus-within .pdp-stage__nav {
  opacity: 1;
  pointer-events: auto;
}
@media (min-width: 1024px) {
  .pdp-stage__nav { opacity: 1; pointer-events: auto; }
}
@media (hover: none) {
  .pdp-stage__nav { opacity: 0; pointer-events: none; }
}
.pdp-stage__nav:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.pdp-stage__nav--prev { left: 0.6rem; }
.pdp-stage__nav--next { right: 0.6rem; }

.pdp-stage__flags {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  z-index: 2;
}
.pdp-stage__count {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(0, 43, 2, 0.72);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}
.pdp-stage__zoom {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--mkt-border, rgba(0, 43, 2, 0.09));
  color: var(--mkt-muted-fg, #5c6860);
  font-size: 0.66rem;
  font-weight: 700;
}
@media (min-width: 768px) { .pdp-stage__zoom { display: inline-flex; } }

.pdp-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  padding-top: 0.6rem;
}
@media (min-width: 768px) { .pdp-dots { display: none; } }
.pdp-dots__dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--mkt-border-strong, rgba(0, 43, 2, 0.14));
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}
.pdp-dots__dot.is-active { width: 18px; background: var(--mkt-primary, #63a800); }

/* ============================================================
   4. BLOC D'ACHAT (colonne droite)
   ============================================================ */
.pdp-buy { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 1024px) {
  .pdp-buy { position: sticky; top: calc(var(--mkt-header-h, 128px) + 12px); }
}

.pdp-buy__card { padding: 1rem 1.05rem 1.1rem; }

.pdp-flags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.55rem; }
.pdp-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: var(--mkt-muted, #eef2ec);
  color: var(--mkt-muted-fg, #5c6860);
}
.pdp-flag--type { background: #e6f1da; color: var(--mkt-primary-dark, #2d6a04); }
.pdp-flag--verified { background: #e4f0ff; color: #1668cc; }
.pdp-flag--sold { background: #fde8dd; color: #a83c0c; }
.pdp-flag--neg { background: #fff2d6; color: #8a5c00; }
.pdp-flag--boost { background: var(--mkt-flash, #e0521c); color: #fff; }

.pdp-title {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--mkt-deep, #002b02);
  margin: 0 0 0.5rem;
  word-break: break-word;
}

.pdp-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.8rem;
  font-size: 0.73rem;
  color: var(--mkt-muted-fg, #5c6860);
  margin-bottom: 0.8rem;
}
.pdp-metrics span { display: inline-flex; align-items: center; gap: 0.25rem; }
.pdp-metrics svg { flex-shrink: 0; opacity: 0.75; }

.pdp-stars { display: inline-flex; align-items: center; gap: 1px; color: var(--mkt-star, #f5a623); }
.pdp-stars svg.off { color: var(--mkt-border-strong, rgba(0, 43, 2, 0.14)); }

.pdp-price-box {
  border-radius: 14px;
  background: linear-gradient(135deg, #f2f9ea 0%, #eaf5e0 100%);
  border: 1px solid rgba(99, 168, 0, 0.22);
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.75rem;
}
.pdp-price {
  font-size: clamp(1.5rem, 4vw, 1.95rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--mkt-primary-dark, #2d6a04);
}
.pdp-price.is-sold { color: var(--mkt-muted-fg, #5c6860); text-decoration: line-through; }
.pdp-price__unit { font-size: 0.8rem; font-weight: 700; color: var(--mkt-muted-fg, #5c6860); }
.pdp-avail {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--mkt-primary-dark, #2d6a04);
}
.pdp-avail--sold { color: #a83c0c; }
.pdp-avail__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}

/* Vendeur */
.pdp-seller {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.65rem;
  border: 1px solid var(--mkt-border, rgba(0, 43, 2, 0.09));
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.75rem;
  transition: border-color 0.16s ease, background 0.16s ease;
}
a.pdp-seller:hover { border-color: rgba(99, 168, 0, 0.45); background: #fafcf7; }
.pdp-seller__avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--mkt-muted, #eef2ec);
}
.pdp-seller__avatar--ph {
  display: grid;
  place-items: center;
  background-image: var(--mkt-grad, linear-gradient(135deg, #14520a, #63a800));
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
}
.pdp-seller__meta { min-width: 0; flex: 1; }
.pdp-seller__label {
  display: block;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mkt-muted-fg, #5c6860);
}
.pdp-seller__name {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--mkt-fg, #0d140f);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdp-seller__sub { font-size: 0.7rem; color: var(--mkt-muted-fg, #5c6860); }
.pdp-seller__go {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--mkt-primary-dark, #2d6a04);
}

/* Actions */
.pdp-actions { display: flex; gap: 0.45rem; margin-bottom: 0.7rem; }
.pdp-cta {
  flex: 1;
  min-width: 0;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding-inline: 0.9rem;
  border: 0;
  border-radius: 14px;
  background-image: var(--mkt-grad, linear-gradient(135deg, #14520a, #63a800));
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 26px -14px rgba(45, 106, 4, 0.85);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pdp-cta:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -14px rgba(45, 106, 4, 0.9); }
.pdp-cta:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.pdp-iconbtn {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1.5px solid var(--mkt-border-strong, rgba(0, 43, 2, 0.14));
  background: #fff;
  color: var(--mkt-muted-fg, #5c6860);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.pdp-iconbtn:hover { color: var(--mkt-primary-dark, #2d6a04); border-color: rgba(99, 168, 0, 0.45); }
.pdp-iconbtn.is-on { color: var(--mkt-flash, #e0521c); border-color: rgba(224, 82, 28, 0.4); }

.pdp-secondary {
  width: 100%;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 13px;
  border: 1.5px solid var(--mkt-border-strong, rgba(0, 43, 2, 0.14));
  background: #fff;
  color: var(--mkt-fg, #0d140f);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.pdp-secondary:hover { border-color: rgba(99, 168, 0, 0.45); color: var(--mkt-primary-dark, #2d6a04); }

.pdp-buy__hint {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--mkt-muted-fg, #5c6860);
  text-align: center;
}

.pdp-stock {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.45rem;
  margin-left: 0.85rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--mkt-muted-fg, #5c6860);
}
.pdp-stock svg { opacity: 0.75; }

.pdp-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--mkt-border, rgba(0, 43, 2, 0.09));
}
.pdp-perk {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: #eef6e6;
  color: var(--mkt-primary-dark, #2d6a04);
  font-size: 0.68rem;
  font-weight: 800;
}
.pdp-perk svg { flex-shrink: 0; }

/* ============================================================
   4b. HIGHLIGHTS + ÉTAPES
   ============================================================ */
.pdp-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}
@media (min-width: 900px) {
  .pdp-highlights { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
}
.pdp-highlight {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  background: var(--mkt-surface, #fff);
  border: 1px solid var(--mkt-border, rgba(0, 43, 2, 0.09));
  box-shadow: var(--mkt-shadow-sm, 0 2px 10px -4px rgba(0, 43, 2, 0.14));
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.pdp-highlight:hover {
  border-color: rgba(99, 168, 0, 0.4);
  transform: translateY(-2px);
}
.pdp-highlight__ico {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eef6e6;
  color: var(--mkt-primary-dark, #2d6a04);
}
.pdp-highlight__txt {
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--mkt-muted-fg, #5c6860);
}
.pdp-highlight__txt strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--mkt-fg, #0d140f);
  margin-bottom: 0.1rem;
}

.pdp-steps {
  margin-top: 1.5rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: var(--mkt-radius-lg, 22px);
  background: var(--mkt-surface, #fff);
  border: 1px solid var(--mkt-border, rgba(0, 43, 2, 0.09));
  box-shadow: var(--mkt-shadow-sm, 0 2px 10px -4px rgba(0, 43, 2, 0.14));
}
.pdp-steps__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.pdp-steps__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--mkt-deep, #002b02);
}
.pdp-steps__title svg { color: var(--mkt-primary, #63a800); }
.pdp-steps__track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}
@media (min-width: 900px) {
  .pdp-steps__track { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
}
.pdp-step {
  position: relative;
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: linear-gradient(160deg, #f7fbf3 0%, #eef6e6 100%);
  border: 1px solid rgba(99, 168, 0, 0.14);
}
.pdp-step__n {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background-image: var(--mkt-grad, linear-gradient(135deg, #14520a, #63a800));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}
.pdp-step__t {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--mkt-deep, #002b02);
  letter-spacing: -0.01em;
}
.pdp-step__d {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--mkt-muted-fg, #5c6860);
}

/* ============================================================
   4c. ONGLETS CONTENU
   ============================================================ */
.pdp-tabs { padding: 0; overflow: hidden; }
.pdp-tabs__nav {
  display: flex;
  gap: 0.15rem;
  padding: 0.45rem 0.5rem 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--mkt-border, rgba(0, 43, 2, 0.09));
  background: linear-gradient(180deg, #fafcf7 0%, #fff 100%);
}
.pdp-tabs__nav::-webkit-scrollbar { display: none; }
.pdp-tabs__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.7rem 0.9rem;
  border: 0;
  border-bottom: 2.5px solid transparent;
  background: transparent;
  color: var(--mkt-muted-fg, #5c6860);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.pdp-tabs__btn svg { opacity: 0.7; }
.pdp-tabs__btn:hover { color: var(--mkt-fg, #0d140f); }
.pdp-tabs__btn.is-active {
  color: var(--mkt-primary-dark, #2d6a04);
  border-bottom-color: var(--mkt-primary, #63a800);
}
.pdp-tabs__btn.is-active svg { opacity: 1; color: var(--mkt-primary, #63a800); }
.pdp-tabs__body { padding: 1.1rem 1.15rem 1.25rem; }
.pdp-tabs__panel { display: none; animation: pdpFade 0.25s ease both; }
.pdp-tabs__panel.is-active { display: block; }

/* Réassurance compacte sous les actions (legacy / aside) */
.pdp-assure { display: grid; gap: 0.55rem; margin-top: 0.85rem; }
.pdp-assure__item { display: flex; align-items: flex-start; gap: 0.55rem; }
.pdp-assure__ico {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eef6e6;
  color: var(--mkt-primary-dark, #2d6a04);
}
.pdp-assure__txt { font-size: 0.73rem; line-height: 1.35; color: var(--mkt-muted-fg, #5c6860); }
.pdp-assure__txt strong { display: block; font-size: 0.79rem; font-weight: 800; color: var(--mkt-fg, #0d140f); }

/* ============================================================
   5. CORPS : sections + colonne latérale
   ============================================================ */
.pdp-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  margin-top: 1rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .pdp-body { grid-template-columns: minmax(0, 1fr) 320px; gap: 1.4rem; }
}

.pdp-stack { display: grid; gap: 0.9rem; min-width: 0; }
.pdp-aside { display: grid; gap: 0.9rem; }

.pdp-section { padding: 1.05rem 1.15rem 1.2rem; }
.pdp-section__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.pdp-section__ico {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eef6e6;
  color: var(--mkt-primary-dark, #2d6a04);
}
.pdp-section__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.015em;
  color: var(--mkt-deep, #002b02);
}

.pdp-prose {
  font-size: 0.92rem;
  line-height: 1.72;
  color: #2a332c;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* Caractéristiques */
.pdp-specs { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 1.8rem; }
@media (min-width: 640px) { .pdp-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pdp-spec {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.58rem 0;
  border-bottom: 1px dashed var(--mkt-border, rgba(0, 43, 2, 0.09));
}
.pdp-spec__k { font-size: 0.8rem; color: var(--mkt-muted-fg, #5c6860); }
.pdp-spec__v {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--mkt-fg, #0d140f);
  text-align: right;
  overflow-wrap: anywhere;
}

/* Vidéo */
.pdp-video__wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #0b1a0c;
}
.pdp-video__wrap iframe,
.pdp-video__wrap video { width: 100%; height: 100%; border: 0; display: block; }

/* Conseils de sécurité */
.pdp-tips { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.pdp-tips li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #2a332c;
}
.pdp-tips svg { flex-shrink: 0; margin-top: 2px; color: var(--mkt-primary, #63a800); }

/* Cartes latérales de réassurance */
.pdp-trust { padding: 0.9rem 1rem; display: grid; gap: 0.7rem; }
.pdp-trust__item { display: flex; align-items: flex-start; gap: 0.6rem; }
.pdp-trust__ico {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eef6e6;
  color: var(--mkt-primary-dark, #2d6a04);
}
.pdp-trust__txt { font-size: 0.74rem; line-height: 1.4; color: var(--mkt-muted-fg, #5c6860); }
.pdp-trust__txt strong { display: block; font-size: 0.82rem; font-weight: 800; color: var(--mkt-fg, #0d140f); }

/* Carte application */
.pdp-app {
  padding: 1.1rem 1.15rem 1.2rem;
  border: 0;
  background-image: var(--mkt-grad, linear-gradient(135deg, #14520a, #63a800));
  color: #fff;
}
.pdp-app__title { margin: 0 0 0.35rem; font-size: 1rem; font-weight: 900; letter-spacing: -0.015em; }
.pdp-app__txt { font-size: 0.79rem; line-height: 1.5; color: rgba(255, 255, 255, 0.86); margin: 0 0 0.85rem; }

.pdp-stores { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pdp-store {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #fff;
  text-decoration: none;
  transition: background 0.15s ease;
}
.pdp-store:hover { background: rgba(255, 255, 255, 0.24); }
.pdp-store__txt { display: flex; flex-direction: column; line-height: 1.15; }
.pdp-store__sup { font-size: 0.56rem; opacity: 0.8; letter-spacing: 0.05em; text-transform: uppercase; }
.pdp-store__name { font-size: 0.8rem; font-weight: 800; }

/* Variante claire (bandeau pleine largeur) */
.pdp-cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.1rem 1.3rem;
  border-radius: var(--mkt-radius-lg, 22px);
  background-image: var(--mkt-grad, linear-gradient(135deg, #14520a, #63a800));
  color: #fff;
}
.pdp-cta-band__kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  margin: 0 0 0.2rem;
}
.pdp-cta-band__title { margin: 0; font-size: clamp(1rem, 2.4vw, 1.25rem); font-weight: 900; letter-spacing: -0.02em; }

/* ============================================================
   6. RAILS (carrousels d'annonces)
   ============================================================ */
.pdp-rail { margin-top: 1.6rem; }
.pdp-rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.pdp-rail__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--mkt-deep, #002b02);
}
.pdp-rail__title svg { color: var(--mkt-primary, #63a800); flex-shrink: 0; }
.pdp-rail__tools { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.pdp-rail__all {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--mkt-primary-dark, #2d6a04);
  text-decoration: none;
  white-space: nowrap;
}
.pdp-rail__all:hover { text-decoration: underline; }
.pdp-rail__nav { display: none; gap: 0.3rem; }
@media (min-width: 768px) { .pdp-rail__nav { display: flex; } }
.pdp-rail__btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--mkt-border-strong, rgba(0, 43, 2, 0.14));
  background: #fff;
  color: var(--mkt-fg, #0d140f);
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.pdp-rail__btn:hover:not(:disabled) { background: var(--mkt-muted, #eef2ec); }
.pdp-rail__btn:disabled { opacity: 0.3; cursor: default; }

.pdp-rail__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 47%;
  gap: 0.65rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 0.3rem;
}
.pdp-rail__track::-webkit-scrollbar { display: none; }
.pdp-rail__track > * { scroll-snap-align: start; }
@media (min-width: 640px) { .pdp-rail__track { grid-auto-columns: 31%; } }
@media (min-width: 1024px) { .pdp-rail__track { grid-auto-columns: 22.5%; } }
@media (min-width: 1440px) { .pdp-rail__track { grid-auto-columns: 16.8%; } }

/* ============================================================
   7. VISIONNEUSE PLEIN ÉCRAN
   ============================================================ */
.pdp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  background: rgba(3, 14, 4, 0.94);
  padding: clamp(0.75rem, 4vw, 2.5rem);
}
.pdp-lightbox.is-open { display: grid; }
.pdp-lightbox__img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 10px;
}
.pdp-lightbox__btn {
  position: absolute;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}
.pdp-lightbox__btn:hover { background: rgba(255, 255, 255, 0.24); }
.pdp-lightbox__btn--close { top: clamp(0.75rem, 3vw, 1.5rem); right: clamp(0.75rem, 3vw, 1.5rem); }
.pdp-lightbox__btn--prev { left: clamp(0.5rem, 3vw, 1.5rem); top: 50%; transform: translateY(-50%); }
.pdp-lightbox__btn--next { right: clamp(0.5rem, 3vw, 1.5rem); top: 50%; transform: translateY(-50%); }
.pdp-lightbox__count {
  position: absolute;
  bottom: clamp(0.75rem, 3vw, 1.6rem);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ============================================================
   8. BARRE D'ACHAT FIXE (mobile)
   ============================================================ */
.pdp-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--mkt-border, rgba(0, 43, 2, 0.09));
  box-shadow: 0 -8px 26px -18px rgba(0, 43, 2, 0.5);
  backdrop-filter: blur(8px);
  transform: translateY(110%);
  transition: transform 0.25s ease;
}
.pdp-sticky.is-visible { transform: translateY(0); }
@media (min-width: 1024px) { .pdp-sticky { display: none; } }
.pdp-sticky__price { min-width: 0; flex: 1; }
.pdp-sticky__label {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mkt-muted-fg, #5c6860);
}
.pdp-sticky__value {
  display: block;
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--mkt-primary-dark, #2d6a04);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdp-sticky .pdp-cta { flex: 0 0 auto; height: 44px; }

/* La barre fixe ne doit pas masquer la fin de page ni la nav mobile. */
@media (max-width: 1023px) {
  .pdp { padding-bottom: 96px; }
}

/* ============================================================
   9. SQUELETTE DE CHARGEMENT
   ============================================================ */
.pdp-skel {
  border-radius: 12px;
  background: linear-gradient(90deg, #eef2ec 25%, #f7faf5 50%, #eef2ec 75%);
  background-size: 300% 100%;
  animation: pdpShimmer 1.3s ease-in-out infinite;
}
@keyframes pdpShimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pdp-skel { animation: none; }
  .pdp-stage__track, .pdp-rail__track { scroll-behavior: auto; }
}

.pdp-fadein { animation: pdpFade 0.3s ease both; }
@keyframes pdpFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   10. ÉTAT VIDE / ERREUR
   ============================================================ */
.pdp-empty {
  padding: clamp(2rem, 8vw, 4rem) 1.25rem;
  text-align: center;
}
.pdp-empty__ico {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.9rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #eef6e6;
  color: var(--mkt-primary-dark, #2d6a04);
}
.pdp-empty__title { margin: 0 0 0.4rem; font-size: 1.1rem; font-weight: 900; color: var(--mkt-deep, #002b02); }
.pdp-empty__txt { margin: 0 auto 1.2rem; max-width: 46ch; font-size: 0.88rem; line-height: 1.6; color: var(--mkt-muted-fg, #5c6860); }
