/* ==========================================================================
   Products page and product detail pages (/products, /products/:slug and French)
   Loaded only on this page, AFTER /css/style.css (shared styles, colours,
   motion system). Rules used on more than one page belong in style.css.
   ========================================================================== */


/* ---- Products ------------------------------------------------------------ */
.check-list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.6rem; }
.check-list li { display: flex; align-items: flex-start; gap: 0.6rem; }
.check-list .icon { color: var(--ember); margin-top: 0.2rem; }

/* ---- Export -------------------------------------------------------------- */
.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.doc-list li {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--surface); border-radius: var(--radius); padding: 1rem 1.1rem;
  border: 1px solid var(--line); font-weight: 500;
}
.doc-list .icon { color: var(--ember-text); }
/* ---- Product detail page -------------------------------------------------- */
.product-hero { padding: 1.5rem 0 var(--section-y); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 1.75rem; display: flex; flex-wrap: wrap; gap: 0.35rem; font-size: 0.9rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 0.35rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ember-text); }
.breadcrumb [aria-current] { color: var(--charcoal); font-weight: 600; }
.product-hero-grid { display: grid; gap: 2rem; }
.product-gallery-thumbs { list-style: none; padding: 0; margin: 0.9rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0.6rem; }
.product-gallery-thumb { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: 0 0 0 1px var(--line); opacity: 0.75; transition: opacity 0.25s ease, box-shadow 0.25s ease; }
.product-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery-thumb picture { display: contents; }
.product-gallery-thumb:hover, .product-gallery-thumb.is-active { opacity: 1; box-shadow: 0 0 0 2px var(--ember); }
.product-summary h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 0.75rem; }
.product-description p { font-size: 1.08rem; color: var(--muted); }

/* ==========================================================================
   Breakpoints (mobile-first)
   ========================================================================== */
@media (min-width: 600px) {
  .doc-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .product-hero-grid { grid-template-columns: 1.1fr 1fr; gap: 3.5rem; align-items: start; }
  .doc-list { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   Part 02 — Products page, product detail page, credits, markets fixes
   ========================================================================== */
.btn-sm { min-height: 40px; padding: 0.45rem 1rem; font-size: 0.9rem; }
/* ---- Product filters ------------------------------------------------------ */
.product-filters {
  display: grid; gap: 1rem; margin-bottom: 1rem;
  padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
}
.filter-group { display: grid; gap: 0.5rem; min-width: 0; }
.filter-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.filter-select { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.filter-select select {
  min-height: 44px; min-width: 12rem; padding: 0.5rem 2.4rem 0.5rem 0.9rem;
  font: 500 0.95rem/1.3 var(--font-body); color: var(--charcoal);
  border: 1.5px solid #b9ada0; border-radius: 999px; background: var(--off-white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231E1B18' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center;
}
.filter-count { margin: 0 0 1.5rem; font-size: 0.92rem; color: var(--muted); }
.filter-empty { text-align: center; padding: 2.5rem 1rem; border: 1.5px dashed var(--line); border-radius: var(--radius-lg); }
/* ---- Compare species ------------------------------------------------------ */
.compare-table-wrap { display: none; }
.compare-table { min-width: 0; }
.compare-table th, .compare-table td { vertical-align: top; }
.compare-table .th-unit { display: block; font-weight: 400; font-size: 0.78rem; opacity: 0.8; }
.compare-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.compare-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem 1.25rem 0.75rem; }
.compare-card h3 { margin-bottom: 0.4rem; }
.compare-card-heat { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.92rem; }
.heat-value { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--charcoal); }
.heat-bar {
  position: relative; display: block; height: 8px; margin: 0.4rem 0 0.75rem; min-width: 120px;
  border-radius: 999px; background: linear-gradient(90deg, rgba(232, 116, 42, 0.12), rgba(232, 116, 42, 0.22));
}
.heat-bar > span { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #f4a66d, var(--ember)); }
.trait-list { margin: 0; font-size: 0.92rem; }
.trait-list div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.75rem; padding: 0.45rem 0; border-top: 1px solid var(--line); }
.trait-list dt { font-weight: 600; }
.trait-list dd { margin: 0; color: var(--muted); }
.compare-note { display: flex; gap: 0.5rem; align-items: flex-start; margin: 1.25rem 0 0; font-size: 0.88rem; color: var(--muted); max-width: 75ch; }
.compare-note .icon { color: var(--ember-text); margin-top: 0.2rem; }
/* ---- How to choose -------------------------------------------------------- */
.guide-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.guide-card {
  display: flex; flex-direction: column; gap: 0.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease, border-color 0.35s ease;
}
.guide-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: rgba(232, 116, 42, 0.35); }
.guide-card h3 { margin-bottom: 0.35rem; }
.guide-card p { color: var(--muted); }
.guide-card .link-arrow { margin-top: auto; }
/* ---- Packaging (compact cards) -------------------------------------------- */
.pack-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.pack-card {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem;
}
.pack-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 12px; background: var(--beige); color: var(--ember-text);
}
.pack-card h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.pack-card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.6rem; }
.pack-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pack-facts li { font-size: 0.8rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--beige-soft); }
.pack-facts span { font-weight: 400; color: var(--muted); }
.pack-loads-label { margin: 0.9rem 0 0.35rem !important; font-size: 0.78rem !important; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.pack-loads { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
.pack-loads div { background: var(--beige-soft); border-radius: 10px; padding: 0.45rem 0.55rem; text-align: center; }
.pack-loads dt { font-size: 0.72rem; color: var(--muted); }
.pack-loads dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
/* ---- Product detail: hero ------------------------------------------------- */
.product-gallery-main { position: relative; display: block; border-radius: 20px; cursor: zoom-in; }
.product-gallery-main .photo { box-shadow: var(--shadow); border-radius: 20px; }
.product-gallery-main img { transition: opacity 0.18s ease; }
.product-gallery-main img.is-fading { opacity: 0; }
.product-gallery-zoom {
  position: absolute; right: 0.9rem; bottom: 0.9rem; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: rgba(30, 27, 24, 0.72); color: var(--off-white);
  transition: transform 0.25s var(--ease-out), background-color 0.25s ease;
}
.product-gallery-main:hover .product-gallery-zoom { transform: scale(1.08); background: var(--ember); color: var(--charcoal); }
.product-highlights { margin: 0 0 1.5rem; }
.keyfacts-row {
  display: grid; gap: 0; margin: 0 0 1.75rem;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
}
.keyfacts-row div { padding: 0.85rem 1rem; border-top: 1px solid var(--line); }
.keyfacts-row div:first-child { border-top: 0; }
.keyfacts-row dt { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.keyfacts-row dt .icon { color: var(--ember-text); }
.keyfacts-row dd { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.95rem; }
.product-ctas { flex-wrap: wrap; }
.product-ctas .btn { flex: 1 1 14rem; }
.price-block { margin: 0 0 1.5rem; padding: 1rem 1.25rem; border-radius: var(--radius-lg); background: var(--beige-soft); border: 1px solid var(--line); }
.price-block-label { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ember-text); }
.price-block-value { margin: 0.2rem 0; font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; }
.price-block-value span { font-family: var(--font-body); font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.price-block-note { margin: 0; font-size: 0.85rem; color: var(--muted); }
/* ---- Sticky section nav --------------------------------------------------- */
.section-nav {
  position: sticky; top: var(--sticky-top, 108px); z-index: 50;
  background: rgba(250, 247, 242, 0.96); backdrop-filter: saturate(1.2) blur(6px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.section-nav ul {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.section-nav ul::-webkit-scrollbar { display: none; }
.section-nav a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 0.85rem; white-space: nowrap;
  color: var(--muted); font-weight: 600; font-size: 0.92rem; text-decoration: none;
  box-shadow: inset 0 -2px 0 transparent; transition: color 0.2s ease, box-shadow 0.2s ease;
}
.section-nav a:hover { color: var(--charcoal); }
.section-nav a[aria-current="true"] { color: var(--ember-text); box-shadow: inset 0 -3px 0 var(--ember); }
.product-section { scroll-margin-top: calc(var(--sticky-top, 108px) + 56px); }
/* ---- Product detail: sections --------------------------------------------- */
.product-overview { display: grid; gap: 2rem; align-items: start; }
.product-lists { display: grid; gap: 1rem; }
.list-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; }
.list-card h3 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.1rem; }
.list-card h3 .icon { color: var(--ember-text); }
.list-card .check-list { margin-top: 0.75rem; }
.list-card .check-list .icon { color: var(--ember-text); }
.product-highlights .icon { color: var(--ember-text); }
.spec-table-wrap { overflow: hidden; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { padding: 0.85rem 1.1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.spec-table tr:last-child > * { border-bottom: 0; }
.spec-table th { width: 38%; font-weight: 600; font-size: 0.95rem; background: rgba(234, 219, 200, 0.35); }
.spec-table td { color: var(--muted); }
@media (max-width: 599px) {
  .spec-table, .spec-table tbody, .spec-table tr, .spec-table th, .spec-table td { display: block; width: auto; }
  .spec-table th { border-bottom: 0; padding-bottom: 0.15rem; background: none; font-size: 0.85rem; }
  .spec-table td { padding-top: 0; }
}
.species-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.species-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; }
.species-card > p { color: var(--muted); }
.species-heat { margin: 0.75rem 0 0.5rem; }
.species-heat-label { margin: 0; font-size: 0.9rem; color: var(--muted); }
.species-note { margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--muted); font-style: italic; }
.compliance-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.compliance-card { background: rgba(250, 247, 242, 0.05); border: 1px solid var(--line-light); border-radius: 20px; padding: 1.5rem; }
.compliance-head { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1rem; }
.compliance-head h3 { margin: 0; font-size: 1.1rem; }
.section--dark .compliance-authority { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--ember); font-weight: 600; }
.compliance-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0 0 1rem; }
.compliance-figures div { background: rgba(250, 247, 242, 0.06); border-radius: 12px; padding: 0.7rem 0.8rem; }
.compliance-figures dt { font-size: 0.75rem; color: var(--muted-light); text-transform: uppercase; letter-spacing: 0.08em; }
.compliance-figures dd { margin: 0.15rem 0 0; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--off-white); }
.compliance-figures dd span { font-family: var(--font-body); font-size: 0.85rem; font-weight: 400; color: var(--muted-light); }
.section--dark .compliance-applies { font-size: 0.9rem; margin: 0; }
.section--dark .compliance-applies strong { color: var(--off-white); }
.compliance-docs { margin-top: 2.25rem; }
.compliance-docs h3 { font-size: 1.1rem; }
.doc-list--dark li { background: rgba(250, 247, 242, 0.05); border-color: var(--line-light); color: var(--off-white); }
.doc-list--dark .icon { color: var(--ember); }
.section--dark .compliance-source { margin: 1.5rem 0 0; font-size: 0.85rem; max-width: 80ch; }
/* ---- Mobile sticky quote bar (product pages) ------------------------------ */
.product-sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  display: flex; gap: 0.6rem; align-items: center;
  padding: 0.65rem var(--gutter) calc(0.65rem + env(safe-area-inset-bottom));
  background: rgba(250, 247, 242, 0.97); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -12px rgba(30, 27, 24, 0.35);
}
.product-sticky-bar .btn-primary { flex: 1; }
.product-sticky-wa { width: 48px; padding: 0; flex: 0 0 48px; }
.has-sticky-bar .footer-bottom { padding-bottom: calc(76px + 1.5rem); }
@media (min-width: 900px) {
  .product-sticky-bar { display: none; }
  .has-sticky-bar .footer-bottom { padding-bottom: 1.5rem; }
}

/* ---- Markets page: balanced grid + full-width "Other markets" band -------- */
@media (min-width: 600px) {
  .product-filters { grid-template-columns: 1fr auto; align-items: end; padding: 1.1rem 1.25rem; }
  .compare-cards { grid-template-columns: repeat(2, 1fr); }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .pack-grid { grid-template-columns: repeat(2, 1fr); }
  .species-grid { grid-template-columns: repeat(2, 1fr); }
  .compliance-grid { grid-template-columns: repeat(2, 1fr); }
  .keyfacts-row { grid-template-columns: 1fr 1fr; }
  .keyfacts-row div:nth-child(2) { border-top: 0; border-left: 1px solid var(--line); }
  .keyfacts-row div:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line); }
}
@media (min-width: 900px) {
  .compare-table-wrap { display: block; }
  .compare-cards { display: none; }
  .guide-grid { grid-template-columns: repeat(4, 1fr); }
  .pack-grid { grid-template-columns: repeat(3, 1fr); }
  .species-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .compliance-grid { grid-template-columns: repeat(3, 1fr); }
  .product-overview { grid-template-columns: 1.2fr 1fr; gap: 3.5rem; }
  .keyfacts-row { grid-template-columns: 1fr; }
  .keyfacts-row div, .keyfacts-row div:nth-child(2) { border-left: 0; border-top: 1px solid var(--line); }
  .keyfacts-row div:first-child { border-top: 0; }
}
@media (min-width: 1180px) {
  .keyfacts-row { grid-template-columns: 1fr 1fr; }
  .keyfacts-row div:nth-child(2) { border-top: 0; border-left: 1px solid var(--line); }
  .keyfacts-row div:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; }
}
/* ---- Product page CTAs (Step 0.5): one line each from 1024 px, stacked below */
.product-ctas { flex-direction: column; flex-wrap: nowrap; }
.product-ctas .btn { width: 100%; white-space: nowrap; flex: none; }
@media (min-width: 1024px) {
  .product-ctas { flex-direction: row; }
  .product-ctas .btn { width: auto; flex: 1 1 auto; padding-left: 1.3rem; padding-right: 1.3rem; }
}
.product-sticky-bar .btn-primary { white-space: nowrap; }

/* ---- Dry wood + gauge --------------------------------------------------- */
.gauge-note { margin: 0.75rem 0 0; font-size: 0.82rem; }

/* ==========================================================================
   Part 07 — Catalogue cards: 2 per row from 768 px, larger and richer
   (views/partials/product-card.ejs with rich: true). The compact card on Home
   and "Other products" keeps the base .product-card rules in style.css.
   ========================================================================== */
.product-grid--catalog { grid-template-columns: 1fr; gap: 2rem; align-items: stretch; }
.product-card--rich { border-radius: 24px; box-shadow: 0 1px 2px rgba(30, 27, 24, 0.05), 0 18px 40px -26px rgba(30, 27, 24, 0.35); }
.product-card--rich:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.product-card--rich .product-card-category { left: 1.1rem; top: 1.1rem; font-size: 0.75rem; padding: 0.35rem 0.8rem; }
.product-card--rich .product-card-body { padding: 1.75rem 1.75rem 1.6rem; gap: 0; }
.product-card--rich .product-card-title { font-size: clamp(1.4rem, 2.2vw, 1.7rem); margin-bottom: 0.35rem; }
.product-card--rich .product-card-tagline { margin-bottom: 0.6rem; font-weight: 500; color: var(--charcoal); }
.product-card-summary {
  margin: 0 0 1.25rem; color: var(--muted); font-size: 0.98rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card-specs { margin: 0 0 1.25rem; display: grid; gap: 0.75rem; }
.product-card-specs > div { display: grid; gap: 0.35rem; }
.product-card-specs dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.product-card-specs dd { margin: 0; }
.tag--ember { background: rgba(232, 116, 42, 0.12); color: var(--charcoal); }
.pack-icons { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; }
.pack-icons li { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--charcoal); }
.pack-icons-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 8px; background: var(--beige); color: var(--ember-text);
}
.product-card-facts {
  margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--beige-soft);
}
.product-card-facts div { padding: 0.7rem 0.9rem; border-left: 1px solid var(--line); }
.product-card-facts div:first-child { border-left: 0; }
.product-card-facts dt { display: flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.product-card-facts dt .icon { color: var(--ember-text); }
.product-card-facts dd { margin: 0.2rem 0 0; font-weight: 600; font-size: 0.95rem; }
.product-card-facts dd span { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.product-card-actions {
  margin-top: auto; padding-top: 1.1rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.product-card--rich .product-card-cta { margin-top: 0; }
/* The quote button sits above the card-wide link (.stretched-link::after) */
.product-card-quote { position: relative; z-index: 1; }
@media (max-width: 479px) {
  .product-card--rich .product-card-body { padding: 1.35rem 1.25rem 1.35rem; }
  .product-card-facts div { border-left: 0; border-top: 1px solid var(--line); }
  .product-card-facts div:first-child { border-top: 0; }
}
/* Part 08: equal columns (3 with every fact shown) from 480 px (no auto-fit wrap, so "Origin"
   stays on one line) with even 1 px dividers between them */
@media (min-width: 480px) {
  .product-card-facts { grid-template-columns: repeat(var(--facts, 3), minmax(0, 1fr)); }
  .product-card-facts div { min-width: 0; padding: 0.7rem 0.75rem; border-top: 0; border-left: 1px solid var(--line); }
  .product-card-facts div:first-child { border-left: 0; }
  .product-card-facts dt { white-space: nowrap; letter-spacing: 0.06em; }
}
@media (min-width: 768px) {
  .product-grid--catalog { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1180px) {
  .product-grid--catalog { gap: 2.25rem; }
  .product-card--rich .product-card-body { padding: 2rem 2rem 1.75rem; }
}
