/* NDOLI — fiche produit (maquette mobile « Details » + déclinaison desktop). */

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: start;
}
@media (min-width: 900px) {
  .product-layout { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); }
  .gallery { position: sticky; top: calc(var(--header-h) + 64px); }
}

/* ---------- Galerie ---------- */
.gallery { display: grid; gap: var(--sp-3); min-width: 0; }
.gallery__stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, var(--nd-lavender-soft) 0%, var(--nd-lavender) 100%);
}
.gallery__viewport {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery__viewport::-webkit-scrollbar { display: none; }
.gallery__slide {
  display: grid;
  flex: 0 0 100%;
  place-items: center;
  aspect-ratio: 5 / 4;
  margin: 0;
  scroll-snap-align: start;
}
.gallery__slide picture,
.gallery__img { width: 100%; height: 100%; }
.gallery__img { object-fit: contain; mix-blend-mode: multiply; }
.gallery__slide--empty { color: var(--nd-primary); }
.gallery__slide--empty .icon { width: 48px; height: 48px; }
.gallery__badge { top: 16px; left: 16px; font-size: var(--fs-sm); }
.gallery__fav { top: 14px; right: 14px; width: 46px; height: 46px; }

.gallery__thumbs { display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; padding: 2px; }
.gallery__thumb {
  flex: 0 0 76px;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--nd-lavender-soft);
  opacity: .72;
  transition: opacity var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { opacity: 1; }
.gallery__thumb[aria-current="true"] { border-color: var(--nd-primary); opacity: 1; }
.gallery__count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--nd-surface-card);
  color: var(--nd-primary-deep);
  font-size: var(--fs-xs);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}
.gallery__credit { color: var(--nd-text-muted); font-size: var(--fs-xs); }
.gallery__credit a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Bloc d'achat ---------- */
.buy-box { display: grid; gap: var(--sp-4); align-content: start; min-width: 0; }
.buy-box__store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  min-height: 36px;
  padding: 0 14px 0 10px;
  border-radius: var(--radius-pill);
  background: var(--nd-lavender-soft);
  color: var(--nd-primary-ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: background-color var(--dur-fast) ease;
}
.buy-box__store:hover { background: var(--nd-lavender); }
.buy-box__store .icon { width: 18px; height: 18px; }
.buy-box__verified { fill: var(--nd-primary); stroke: var(--nd-white); }
.buy-box__title {
  color: var(--nd-primary-deep);
  font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}
.buy-box__lead { color: var(--nd-text-soft); font-size: var(--fs-md); }
.buy-box__price { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }

.buy-form {
  display: grid;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border: 1px solid var(--nd-border);
  border-radius: var(--radius-lg);
  background: var(--nd-white);
  box-shadow: var(--shadow-soft);
}
.buy-form__qty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); font-weight: 600; }
.buy-form__actions { display: grid; gap: var(--sp-3); }
@media (min-width: 480px) { .buy-form__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.buy-form__actions .btn { width: 100%; padding-inline: 16px; }

.assurances { display: grid; gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.assurances li { display: flex; gap: var(--sp-3); color: var(--nd-text-soft); font-size: var(--fs-sm); line-height: 1.5; }
.assurances .icon { width: 22px; height: 22px; margin-top: 1px; color: var(--nd-primary); stroke-width: 1.8; }
.assurances strong { display: block; color: var(--nd-text); font-weight: 600; }

/* Vendeur */
.seller-card__link { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); border-radius: var(--radius-md); }
.seller-card__text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.seller-card__meta { display: inline-flex; align-items: center; gap: 4px; color: var(--nd-text-muted); font-size: var(--fs-xs); }
.seller-card__meta .icon { width: 14px; height: 14px; }
.seller-card__cta { display: inline-flex; align-items: center; gap: 4px; color: var(--nd-primary); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.seller-card__cta .icon { width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease-out); }
.seller-card__link:hover .seller-card__cta .icon { transform: translateX(3px); }

/* ---------- Barre d'achat mobile (remplace la navigation inférieure sur cette page) ---------- */
.buy-bar { display: none; }
@media (max-width: 1023px) {
  .page-product .bottom-nav { display: none; }
  .buy-bar {
    position: fixed;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: var(--z-bottom-nav);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    width: min(520px, calc(100% - 24px));
    padding: 8px 8px 8px 20px;
    border-radius: var(--radius-pill);
    background: var(--nd-white);
    box-shadow: var(--shadow-float);
    transform: translateX(-50%);
  }
  .buy-bar__price { color: var(--nd-primary); font-size: var(--fs-lg); font-weight: 700; white-space: nowrap; }
  .buy-bar__btn { min-height: 48px; }
}
@media (max-width: 359px) {
  .buy-bar__btn span { display: none; }
}

@media (max-width: 767px) {
  .gallery__stage { border-radius: var(--radius-lg); margin-inline: calc(var(--gutter) * -0.5); }
  .gallery__thumbs { display: none; }
  .buy-form { padding: var(--sp-4); box-shadow: none; }
}
