/* Pages produit — complément category-pages.css */

/* Fiches produit — .product-hero ne doit jamais être sticky (cf. #site-header) */
html:has(body.page-product) {
  scroll-padding-top: var(--header-sub-total, 142px);
}

.product-hero {
  position: static;
  z-index: auto;
  box-shadow: none;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.product-page {
  padding: 16px 0 48px;
}

.product-back { margin: 0 0 12px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  text-decoration: none;
  padding: 8px 0;
}

/* ===== En-tête fiche produit ===== */
.product-hero .breadcrumb {
  padding-top: 0;
  margin-bottom: 0;
}

.product-hero-head {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.product-ref-display {
  margin: 0;
}

.product-ref-badge,
.product-page .product-ref-display .product-ref,
.product-page .product-details-table td .product-ref {
  display: inline-block;
  font-family: ui-monospace, 'Consolas', monospace;
  font-size: clamp(1.45rem, 3.2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.2;
  color: var(--navy-900, #101c2c);
  background: linear-gradient(135deg, var(--surface-muted), var(--surface-card));
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange-500);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.product-hero h1,
.product-page > h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-weight: 700;
  line-height: 1.4;
  color: var(--heading-surface);
  max-width: 52rem;
}

/* Pages existantes : référence encore dans le fil d'Ariane */
.product-page .breadcrumb ol {
  align-items: center;
}

.product-page .breadcrumb [aria-current="page"] {
  font-family: ui-monospace, 'Consolas', monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy-900, #101c2c);
}

.product-page .breadcrumb + h1 {
  margin-top: 20px;
  padding-top: 0;
}

.product-details { margin: 24px 0; }
.product-details-table th {
  width: auto;
  font-weight: 600;
  background: var(--surface-muted);
  vertical-align: top;
}

@media (min-width: 769px) {
  .product-details-table th {
    width: 28%;
  }
}
.product-details-table td { vertical-align: top; }

.product-meta {
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 0 0 20px;
}
.product-page .product-details-table td .product-ref {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  padding: 6px 12px;
  border-left-width: 3px;
}

.product-page .related-link .product-ref {
  font-size: inherit;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  border-left: none;
}

.product-page .related-link {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-family: ui-monospace, 'Consolas', monospace;
  letter-spacing: 0.02em;
}

.product-image img { border-radius: var(--radius-md); width: 100%; max-height: min(320px, 50vh); object-fit: contain; margin: 16px 0; }
.product-image--banner img {
  width: 100%;
  max-height: none;
  height: auto;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.product-description, .equivalences, .compatible-engines, .related-products { margin: 28px 0; }
.compatible-engines ul { margin-left: 1.2rem; }
.site-footer { background: var(--navy-900, #101c2c); color: #fff; padding: 24px 0; margin-top: 40px; }
.site-footer a { color: rgba(255,255,255,0.85); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

:root .product-ref-badge,
:root .product-page .product-ref-display .product-ref,
:root .product-page .product-details-table td .product-ref {
  color: var(--heading-surface);
  background: linear-gradient(135deg, var(--surface-muted), var(--surface-card));
}

:root .product-page .breadcrumb [aria-current="page"] {
  color: var(--heading-surface);
}

:root .product-hero h1,
:root .product-page > h1 {
  color: var(--heading-surface);
}

.product-fiche-actions {
  margin: 0 0 1rem;
}

.btn-fiche-pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 2px solid var(--accent, #3b82f6);
  color: var(--accent, #3b82f6);
}

.btn-fiche-pdf:hover,
.btn-fiche-pdf:focus-visible {
  background: color-mix(in srgb, var(--accent, #3b82f6) 14%, transparent);
}

.product-details-table .fiche-pdf-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.fiche-on-demand {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid color-mix(in srgb, var(--accent, #3b82f6) 35%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent, #3b82f6) 8%, transparent);
}

.fiche-on-demand-text {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #25d366;
  border: 2px solid #25d366;
  color: #fff;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus-visible {
  background: #1ebe5d;
  border-color: #1ebe5d;
  color: #fff;
}

.fiche-on-demand-inline {
  font-style: italic;
  color: var(--text-muted, #64748b);
}
