/* ============================================================
   LA VRAC ATTITUDE — Styles pages produits
   ============================================================ */

/* ── Carrousel ──────────────────────────────────────────── */
.carousel {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
  aspect-ratio: 4/3;
  width: 100%;
  cursor: zoom-in;
}
.carousel--portrait {
  aspect-ratio: 3/4;
  max-width: 420px;
}
.carousel__track {
  display: flex;
  height: 100%;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.carousel__slide {
  flex: 0 0 100%;
  height: 100%;
}
.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 8px;
}

/* ── Miniatures ──────────────────────────────────────────── */
.carousel__thumbs {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.carousel__thumb {
  width: 70px;
  height: 52px;
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: border-color var(--tr);
  background: #fff;
  flex-shrink: 0;
  padding: 0;
}
.carousel--portrait ~ .carousel__thumbs { max-width: 400px; }
.carousel--portrait ~ .carousel__thumbs .carousel__thumb {
  width: 52px;
  height: 70px;
}
.carousel__thumb.active { border-color: var(--green); }
.carousel__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 3px;
}

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.92);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--r-md);
  display: block;
}
.lightbox__close,
.lightbox__btn {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  background: rgba(255,255,255,.85);
  border-radius: 50%;
  border: none;
  transition: background var(--tr);
  font-size: 22px;
  line-height: 1;
}
.lightbox__close:hover,
.lightbox__btn:hover { background: rgba(255,255,255,.35); }
.lightbox__close {
  top: 18px; right: 18px;
  width: 40px; height: 40px;
}
.lightbox__btn {
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
}
.lightbox__btn--prev { left: 18px; }
.lightbox__btn--next { right: 18px; }
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text);
  cursor: pointer;
  transition: all var(--tr);
  z-index: 2;
  box-shadow: var(--shadow-sm);
}
.carousel__btn:hover {
  background: #fff;
  box-shadow: var(--shadow-md);
}
.carousel__btn--prev { left: 10px; }
.carousel__btn--next { right: 10px; }
.carousel__dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  border: 1.5px solid rgba(255,255,255,.8);
  cursor: pointer;
  transition: all var(--tr);
}
.carousel__dot.active {
  background: #fff;
  transform: scale(1.2);
}
.carousel__counter {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: rgba(0,0,0,.4);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  z-index: 2;
  backdrop-filter: blur(4px);
}

/* ── Layout page produit ────────────────────────────────── */
.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2xl);
  align-items: start;
  padding-bottom: var(--sp-2xl);
}
.product-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--sp-sm);
}
.product-eyebrow-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.product-eyebrow-text {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.product-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--green);
  line-height: 1.15;
  margin-bottom: var(--sp-md);
}
.product-intro {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--sp-lg);
}

/* ── Fiche technique ────────────────────────────────────── */
.specs-table {
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin: var(--sp-lg) 0;
}
.specs-table caption {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--green);
  text-align: left;
  padding: 12px 16px 8px;
  background: var(--green-light);
  border-bottom: 1px solid var(--border);
}
.specs-table tr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.specs-table tr:last-child { border-bottom: none; }
.specs-table td {
  padding: 10px 16px;
  font-size: var(--text-sm);
  line-height: 1.4;
}
.specs-table td:first-child {
  color: var(--text-muted);
  font-weight: 500;
  border-right: 1px solid var(--border);
  background: rgba(0,0,0,.015);
}
.specs-table td:last-child {
  color: var(--text);
  font-weight: 400;
}

/* ── Fiche technique — variante avec icônes ─────────────── */
.specs-table--icons tr {
  grid-template-columns: 58px 1fr 2fr;
}
.specs-table--icons td {
  padding: 16px 18px;
}
.specs-table--icons td:first-child {
  padding: 14px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: none;
  background: none;
  color: inherit;
  font-weight: normal;
}
.specs-table--icons td:nth-child(2),
.specs-table--icons th:nth-child(2) {
  color: var(--text-muted);
  font-weight: 500;
  border-right: 1px solid var(--border);
  background: rgba(0,0,0,.015);
  display: flex;
  align-items: center;
  font-size: var(--text-sm);
  padding: 16px 18px;
  text-align: left;
}
.specs-table--icons td:nth-child(3) {
  color: var(--text);
  font-weight: 400;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.specs-table--icons td:nth-child(3) small {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
}
.specs-icon {
  width: 36px;
  height: 36px;
  background: var(--green-light);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.specs-icon img {
  width: 24px;
  height: 24px;
  display: block;
  filter: brightness(0) saturate(100%) invert(40%) sepia(28%) saturate(820%) hue-rotate(62deg) brightness(95%) contrast(92%);
}

/* ── Features liste ─────────────────────────────────────── */
.features-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  margin: var(--sp-lg) 0;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--tr);
}
.feature-item:hover { border-color: var(--green); }
.feature-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.feature-text strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}
.feature-text span {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── CTA produit ────────────────────────────────────────── */
.product-cta {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
  margin-top: var(--sp-xl);
  padding-top: var(--sp-xl);
  border-top: 1px solid var(--border);
}

/* ── Section avantages cards ────────────────────────────── */
.advantage-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  transition: box-shadow var(--tr), transform var(--tr);
}
.advantage-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.advantage-icon {
  width: 48px; height: 48px;
  background: var(--green-light);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-md);
  flex-shrink: 0;
}
.advantage-icon img {
  width: 31px;
  height: 31px;
  display: block;
  filter: brightness(0) saturate(100%) invert(40%) sepia(28%) saturate(820%) hue-rotate(62deg) brightness(95%) contrast(92%);
}
.advantage-title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--green);
  margin-bottom: var(--sp-sm);
}
.advantage-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ── Avis clients ───────────────────────────────────────── */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}
.review-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
}
.review-stars {
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: var(--sp-sm);
}
.review-text {
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: var(--sp-md);
}
.review-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.review-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  flex-shrink: 0;
  overflow: hidden;
}
.review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
}
.review-shop {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--sp-md) 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); transition: color var(--tr); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb span { color: var(--border); }

/* ── Configurations produit ─────────────────────────────── */
.config-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-lg);
  margin-top: var(--sp-xl);
}
.config-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--tr), transform var(--tr);
  display: flex;
  flex-direction: column;
}
.config-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.config-card__img {
  background: var(--white);
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.config-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  display: block;
}
.config-card__body {
  background: var(--green-light);
  padding: var(--sp-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.config-card__name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--green);
}
.config-card__volume {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
}
.config-card__desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* ── Responsive produit ─────────────────────────────────── */
@media (max-width: 860px) {
  .product-hero {
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
  }
  .carousel,
  .carousel__thumbs,
  .carousel--portrait ~ .carousel__thumbs { max-width: 100%; }
  .reviews-grid { grid-template-columns: 1fr; }
  .config-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .config-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .product-title { font-size: var(--text-xl); }
  .specs-table--icons tr {
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
  }
  .specs-table--icons td:first-child {
    grid-row: 1;
    grid-column: 1;
    padding: 14px 6px 4px 10px;
    align-items: flex-start;
    padding-top: 14px;
  }
  .specs-table--icons td:nth-child(2) {
    grid-row: 1;
    grid-column: 2;
    border-right: none;
    padding: 12px 12px 4px 6px;
    background: none;
    font-weight: 600;
    font-size: var(--text-sm);
  }
  .specs-table--icons td:nth-child(3) {
    grid-row: 2;
    grid-column: 1 / -1;
    padding: 2px 12px 14px;
    border-right: none;
  }
}
