/* Products section — component styles.
   No template scoping: reuses the theme's global classes (.container, .fs-*, .ft-s,
   .fw-*, .grid-5/.span-*, hr) and adds clean, reusable component classes below. */

/* shared */
.muted { color: #6b6b66; }
.tile-img { background: #111; background-size: cover; background-position: center; display: block; }

/* Grid system — the one layout primitive. Reusable site-wide.
   Usage: <div class="grid-5"><div class="span-2">…</div><div class="span-3">…</div></div> */
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); column-gap: 28px; row-gap: 28px; align-items: start; }
.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }

/* ================= Products landing ================= */
.products-landing-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: start; }
.products-landing-head .lead { padding-top: 18px; }
.products-landing-body { display: grid; grid-template-columns: 220px 1fr; gap: 40px; margin-top: 24px; }
.category-filter { list-style: none; margin: 0; padding: 0; }
.category-filter li { margin: 0 0 12px; padding: 0; }
/* kill the theme's global "+" list marker (ul li:before) on the filter */
.category-filter li:before { content: none; }
.category-filter button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600; color: #111; opacity: .55; }
.category-filter button.is-active, .category-filter button:hover { opacity: 1; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card { position: relative; aspect-ratio: 1 / 1; background: #111; overflow: hidden; text-decoration: none; }
.product-card .tile-img { position: absolute; inset: 0; opacity: .75; transition: opacity .3s, transform .6s; }
.product-card:hover .tile-img { opacity: .9; transform: scale(1.04); }
.product-card-title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; color: #fff; font-weight: 600; font-size: 19px; line-height: 1.25; z-index: 1; }
.product-card.is-hidden { display: none; }

/* ================= Sections =================
   Vertical padding uses the global .pad-* classes; white sections use global .bg-white. */

/* Spectral section heading — ~60px (no framework step here: fs-xl=51px, fs-xxl=76px) */
.section-title { font-size: 3.5rem; line-height: 1.05; margin: 0 0 30px; }
/* breadcrumb + actions share one row */
.actions-row { margin-bottom: 2.5rem; }
.hero-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #8a8881; }
/* every crumb (links, separators, current page) renders at the same size */
.breadcrumb a, .breadcrumb .sep, .breadcrumb .current { font-size: 15px; line-height: 1.4; }
.breadcrumb a { color: inherit; text-decoration: none; margin: 0; }
.breadcrumb a:hover { color: var(--bark, #686058); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .current { color: var(--char, #30261b); }

/* hero — action buttons match the site .btn-border style (1rem, larger padding) */
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.hero-actions a { border: 1px solid #111; border-radius: 1.4rem; padding: 0.75rem 1.3rem; font-size: 1rem; text-decoration: none; color: #111; background: transparent; transition: .5s; }
.hero-actions a:hover { background: #111; color: #fff; border-color: #111; }
/* hide the hero action pills (How to specify / Order samples) on tablet & mobile */
@media (max-width: 768px) { .hero-actions { display: none; } }
.hero-copy { padding-top: 4px; }
.hero-copy h1 { margin: 0 0 22px; }
.hero-intro { color: #3c3c3a; margin: 22px 0 0; }
.hero-figure { aspect-ratio: 16 / 10; border-radius: 2px; }

/* benefits / usp — type/colour come from framework classes in the markup */
.benefits-title { margin: 0; }
.benefits-copy { columns: 2; column-gap: 28px; }
.benefits-copy p { margin: 0 0 1em; }
.benefits-copy p:first-child { margin-top: 0; }

/* ================= Timber, finish & colour swatches ================= */
.swatch-group { margin-bottom: 40px; }
.swatch-group:last-child { margin-bottom: 0; }
.swatch-group-title { margin: 0 0 18px; }
.swatch-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px 28px; }
.swatch { text-align: left; }
.swatch .tile-img { aspect-ratio: 1 / 1; border-radius: 2px; }
/* labels are body copy (sizes come from .fs-* in the markup) */
.swatch .l1 { margin: 10px 0 0; }
.swatch .l2 { margin: 2px 0 0; color: #8a8881; }

/* ================= Profiles ================= */
.profile-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px 28px; }
.profile-card { text-align: left; }
/* trimmed board render, centred on a square light card. --board-scale controls its size. */
.profile-card-img { position: relative; aspect-ratio: 1 / 1; border-radius: 2px; overflow: hidden;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: var(--board-scale, 90%); }
/* lazy-loaded render <img> — replicates the old background (centred, ~90% wide) so cards only
   fetch when near the viewport. Sits beneath .profile-flat / .zoom-btn overlays. */
.profile-card-photo { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: var(--board-scale, 90%); height: auto; display: block; }
/* hover (desktop): reveal the flat profile cross-section, filled in the brand olive */
.profile-flat { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 7%; background: #fff; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.profile-card:hover .profile-flat { opacity: 1; }
/* width scales with the profile's real width (--pw = width / widest); widest fills ~88%, rest smaller */
.profile-flat svg { width: calc(var(--pw, 1) * 88%); height: auto; display: block; }
.profile-flat :is(polygon, path, rect) { fill: #686058; }
.profile-card .l1 { margin: 12px 0 0; }
.profile-card .l2 { margin: 3px 0 0; color: #8a8881; }
.zoom-btn { position: absolute; top: 10px; right: 10px; color: #3c3c3a; display: flex; transition: opacity .2s;
  background: none; border: none; padding: 0; cursor: pointer; line-height: 0; }
.zoom-btn:hover { opacity: .55; }
/* card title links to the profile but keeps the plain card styling */
.profile-card .l1 a { color: inherit; text-decoration: none; }
.profile-card .l1 a:hover { color: var(--bark, #686058); }
.img-downloads { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 6px; }
.img-downloads a { font-size: 11px; letter-spacing: .03em; border: 1px solid #d8d4cd; background: #fff; border-radius: 30px; padding: 3px 12px; text-decoration: none; color: #111; }
.img-downloads a:hover { background: #111; color: #fff; border-color: #111; }

/* ===== Home profile scroller (content-repeater "Profile Slider") ===== */
/* neutralise the legacy slider's 6rem side margin; the inner wrap handles width */
.profile-slider-row > .profile-scroller-section { margin: 0; }
.profile-scroller-section .intro { margin: 0; }
.profile-scroller-section { width: 100%; }
/* restrict the scroller to the site content width (matches .container) and host the side arrows */
.profile-scroller-wrap { position: relative; width: calc(100% - 6rem); max-width: 1500px; margin: 0 auto; }
.profile-scroller { display: flex; gap: 28px; overflow-x: auto; overflow-y: hidden;
  padding: 8px 2px 20px; scroll-snap-type: x proximity; scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: #c9c4bb transparent; }
.profile-scroller::-webkit-scrollbar { height: 8px; }
.profile-scroller::-webkit-scrollbar-thumb { background: #c9c4bb; border-radius: 8px; }
.profile-scroller::-webkit-scrollbar-track { background: transparent; }
/* each card matches the Profiles-page swatch size (5-up grid at the 1500px max) */
.profile-scroller .profile-card { flex: 0 0 clamp(200px, 20vw, 277px); width: clamp(200px, 20vw, 277px);
  scroll-snap-align: start; text-decoration: none; color: inherit; }
.profile-scroller .profile-card .l1 { color: #111; }
/* prev/next arrows — white circle (generous padding), pushed out beside the swatches (off the
   images on normal desktops; half-over is fine on narrow ones). Both stay visible so you can scroll
   either way from the start. */
.ps-arrow { position: absolute; top: calc(8px + clamp(200px, 20vw, 277px) / 2); transform: translateY(-50%);
  z-index: 2; width: 72px; height: 72px; padding: 0; border: none; border-radius: 50%; background: #fff;
  color: #3c3c3a; display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: color .2s, background .2s; }
.ps-arrow svg { width: 30px; height: 30px; }
.ps-arrow:hover { background: var(--bark, #686058); color: #fff; }
.ps-prev { left: -4.5rem; }
.ps-next { right: -4.5rem; }
.ps-arrow.is-disabled { opacity: .4; }   /* end of travel — dimmed but still visible & usable */
/* once the 3rem gutter can't hold the circle (viewport < ~1600px) pull the arrows flush to the
   edge with a slight card overlap, so they're never clipped off the page. */
@media (max-width: 1600px) { .ps-prev { left: -3rem; } .ps-next { right: -3rem; } }
@media (max-width: 768px) { .ps-arrow { width: 56px; height: 56px; } .ps-arrow svg { width: 24px; height: 24px; } .ps-prev { left: -1rem; } .ps-next { right: -1rem; } }
/* scroller card count: 2-up on tablets, single full-width image on phones (arrows re-centred on the
   now-larger square card; card is square so its height == its width) */
@media (max-width: 768px) {
  .profile-scroller .profile-card { flex: 0 0 calc(50% - 14px); width: calc(50% - 14px); }
  .ps-arrow { top: calc(8px + (50vw - 3rem - 14px) / 2); }
}
@media (max-width: 550px) {
  .profile-scroller .profile-card { flex: 0 0 100%; width: 100%; }
  .ps-arrow { top: calc(8px + (100vw - 6rem) / 2); }
}

/* ===== Single profile page ===== */
.intro > .container > .breadcrumb, .intro > .container > .hero-bar { margin-bottom: 2.2rem; }
.profile-single { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.profile-single-media .profile-card-img { aspect-ratio: 1 / 1; }
.profile-single-media .profile-card-img:hover .profile-flat { opacity: 1; }
/* click-through thumbnail strip below the main image (no lightbox takeover) */
.profile-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.profile-thumb { width: 68px; height: 68px; flex: 0 0 auto; padding: 0; cursor: pointer;
  border: 1px solid #e3e0da; border-radius: 2px; background-color: #fff;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: .7; transition: opacity .2s, border-color .2s; }
.profile-thumb:hover { opacity: 1; }
.profile-thumb.is-active { opacity: 1; border-color: #111; }
.profile-single-info h1 { margin: 0 0 6px; }
.profile-single-cat { margin: 0 0 4px; }
.profile-single-name { margin: 0 0 8px; color: #3c3c3a; }
.profile-spec-list { list-style: none; margin: 22px 0; padding: 0; }
.profile-spec-list li:before { content: none; }
.profile-spec-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin: 0; padding: 13px 0; border-top: 1px solid rgba(0,0,0,.1); color: #111; }
.profile-spec-list li span:first-child { color: #8a8881; }
.profile-single-downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.profile-single-downloads a { font-size: 13px; letter-spacing: .03em; border: 1px solid #d8d4cd; background: #fff;
  border-radius: 30px; padding: 9px 20px; text-decoration: none; color: #111; transition: background .2s, color .2s, border-color .2s; }
.profile-single-downloads a:hover { background: #111; color: #fff; border-color: #111; }
/* swatches below use the shared Products-page .swatch / .swatch-grid (5-col) styling — no overrides */
@media (max-width: 768px) { .profile-single { grid-template-columns: 1fr; gap: 28px; } }
/* "More [Category] Profiles" related slider — page background, heading aligned with the cards */
.profile-related .container { text-align: left; }
.profile-related .section-title { margin: 0 0 1.4rem; }

/* ================= Downloads / FAQ / pills ================= */
/* Column header: heading (fs-s fw-600 in markup) at left, optional icon at right */
.resource-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 8px; margin: 0 0 6px; }
.resource-head .resource-ico { display: flex; color: #3c3c3a; }
/* same type as the Downloads column header (fs-s fw-600 in markup) + matching spacing below */
.resource-subhead { color: #111; margin: 34px 0 14px; }
.download-list { list-style: none; margin: 0; padding: 0; }
.download-list li:before { content: none; }
/* margin reset kills the global li indent (0.75rem) + extra row margin so rows match the FAQ column */
.download-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0; padding: 12px 0; border-top: 1px solid rgba(0,0,0,.1); color: #3c3c3a; line-height: 1.2; }
/* resource title: 18px medium (pill keeps its own size/weight) */
.download-list li > span:first-child { font-size: 17px; font-weight: 500; line-height: 1.2; color: #111; }
.pill-group { display: flex; gap: 6px; }
/* margin:0 — the theme's global link rule adds a bottom margin that otherwise inflates the row height */
.pill, .img-downloads a { margin: 0; }
.pill { font-size: 11px; letter-spacing: .03em; border: 1px solid #c9c6c0; border-radius: 30px; padding: 3px 12px; text-decoration: none; color: #111; white-space: nowrap; }
.pill:hover { background: #111; color: #fff; border-color: #111; }
/* small link/download buttons: never underline in any state — only bg + colour change */
.pill, .pill:hover, .pill:focus, .pill:active,
.img-downloads a, .img-downloads a:hover, .img-downloads a:focus, .img-downloads a:active,
.hero-actions a, .hero-actions a:hover, .hero-actions a:focus, .hero-actions a:active { text-decoration: none; }
.faq { border-top: 1px solid rgba(0,0,0,.1); }
.faq:last-of-type { border-bottom: 1px solid rgba(0,0,0,.1); }
.faq summary { cursor: pointer; padding: 15px 0; font-size: 18px; font-weight: 600; line-height: 1.2; color: #111; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .faq-ico { width: 22px; height: 22px; flex: 0 0 auto; border: 1px solid #c9c6c0; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: -1px; transition: .2s; }
.faq summary .faq-ico::after { content: "+"; color: #8a8881; font-size: 14px; line-height: 1; }
.faq[open] summary .faq-ico { background: #111; border-color: #111; }
.faq[open] summary .faq-ico::after { content: "\2013"; color: #fff; }
.faq .a { padding: 0 0 18px; color: #6b6b66; font-size: 1rem; font-weight: 400; line-height: 1.7; max-width: 92%; }

/* ================= Section-builder section blocks =================
   Every block is a full-width <section> (bg + padding via Section Colour/Padding); the global
   .container controls content width. Left-align content like the rest of the product sections. */
.content-section .container { text-align: left; }
.content-section .section-title { margin: 0 0 30px; }

/* Resources: Downloads | FAQs as two columns inside the section's container.
   align-items: stretch (grid default) → the divider on the 2nd column runs the full row and
   stops at the taller column's last row; the section's padding sits outside, so it never bleeds in. */
.resources-cols { display: grid; grid-template-columns: 1fr 1fr; }
.resources-cols > .resources-col:first-child { padding-right: 44px; }
.resources-cols > .resources-col + .resources-col { border-left: 1px solid rgba(0,0,0,.14); padding-left: 44px; }

/* ================= Editorial feature / hero (e.g. Forest Management) ================= */
.feature-cols .container { text-align: left; }
.feature-title { margin: 0 0 22px; }
.feature-intro { color: #3c3c3a; margin: 0 0 30px; }
.feature-cols p { margin: 0 0 1em; }
.feature-cols p:last-child { margin-bottom: 0; }
.feature-body h2, .feature-body h3 { font-size: 1.3rem; font-weight: 600; margin: 26px 0 10px; }
.feature-figure { aspect-ratio: 16 / 10; border-radius: 2px; }
/* image-left variant: swap the grid order (media first) */
.feature-row.img-left .feature-text { order: 2; }
.feature-row.img-left .feature-media { order: 1; }

/* ================= Related products ================= */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.related-card { text-decoration: none; color: inherit; }
.related-card-img { aspect-ratio: 4 / 3; border-radius: 2px; margin-bottom: 16px; transition: opacity .3s; }
.related-card:hover .related-card-img { opacity: .9; }
.related-card-title { line-height: 1.2; }
.related-card-desc { margin: 10px 0 0; }

/* ================= Resources page ================= */
.resource-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.page-eyebrow { font-family: "aktiv-grotesk", sans-serif; font-size: 18px; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: #8a8881; margin: 0 0 8px; }
.resource-controls { display: flex; justify-content: space-between; align-items: center; gap: 20px 30px; flex-wrap: wrap; margin: 0 0 24px; }
.resource-filters { display: flex; gap: 18px; flex-wrap: wrap; margin: 0; }
.resource-filters button { background: none; border: 1px solid #d8d4cd; border-radius: 30px; padding: 7px 16px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; opacity: .6; transition: opacity .15s, border-color .15s, background .15s, color .15s; }
.resource-filters button.is-active, .resource-filters button:hover { opacity: 1; border-color: var(--bark, #686058); }
.resource-filters button.is-active { background: var(--bark, #686058); color: #fff; }
.resource-search { font: inherit; font-size: 14px; padding: 10px 20px; border: 1px solid #d8d4cd; border-radius: 30px; min-width: 260px; background: #fff; color: #111; }
.resource-search::placeholder { font-size: 14px; color: #9a968e; }
.resource-search:focus { outline: none; border-color: var(--bark, #686058); }
/* Resources page groups reuse the product-page .resource-subhead + .download-list + .pill styles */
.resource-group + .resource-group { margin-top: 8px; }
/* SugiSpec — Profile Drawings hierarchy: Main category + sub-category headings */
.pd-main { margin: 32px 0 6px; color: var(--char, #30261b); }
.pd-main-block:first-of-type .pd-main { margin-top: 14px; }
.pd-sub { margin: 16px 0 2px; color: #8a8881; }
/* Order Samples form — sample checkboxes stack vertically (scoped, leaves other CF7 lists inline) */
.samples-check .wpcf7-list-item { display: block; margin: 0 0 6px 0; }

/* ================= Responsive ================= */
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .swatch-grid, .profile-grid { grid-template-columns: repeat(3, 1fr); }
  .products-landing-head, .products-landing-body, .resource-cols { grid-template-columns: 1fr; gap: 28px; }
  .grid-5 { grid-template-columns: 1fr; gap: 28px; }
  .span-1, .span-2, .span-3, .span-4, .span-5 { grid-column: 1 / -1; }
  .benefits-copy { columns: 1; }
  .hero-actions { justify-content: flex-start; }
  .section-title { font-size: 2.4rem; }
  .related-grid { grid-template-columns: 1fr; }
  /* Resources columns stack on mobile */
  .resources-cols { grid-template-columns: 1fr; }
  .resources-cols > .resources-col:first-child { padding-right: 0; }
  .resources-cols > .resources-col + .resources-col { border-left: 0; padding-left: 0; border-top: 1px solid rgba(0,0,0,.14); padding-top: 30px; margin-top: 30px; }
}
@media (max-width: 560px) {
  /* phones: tighten the multi-up grids so cards/swatches stay legible */
  .profile-grid, .swatch-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 16px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .section-title { font-size: 2rem; }
  .profile-single { gap: 22px; }
}

/* =========================================================================
 * Profile lightbox — white, floating-image gallery (opened from .zoom-btn)
 * ========================================================================= */
.zoom-btn { background: none; border: 0; padding: 0; cursor: pointer; }
/* whole image opens the gallery */
.profile-card-img.has-gallery { cursor: pointer; }
.profile-card-img.has-gallery:focus-visible { outline: 2px solid var(--bark, #686058); outline-offset: 2px; }
html.pgallery-lock { overflow: hidden; }

.pgallery { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column;
  background: #fff; opacity: 0; visibility: hidden; transition: opacity .28s ease;
  padding: clamp(16px, 4vw, 40px); }   /* above the fixed site header (z 99999) so it covers the nav */
.pgallery.is-open { opacity: 1; visibility: visible; }
.pgallery[hidden] { display: none; }

.pgallery-close { position: absolute; top: 18px; right: 22px; z-index: 3; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; background: none; border: 0;
  font-size: 30px; line-height: 1; color: var(--bark, #686058); cursor: pointer; transition: opacity .2s; }
.pgallery-close:hover { opacity: .55; }

.pgallery-title { position: absolute; top: 24px; left: 0; right: 0; text-align: center;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--bark, #686058); }
.pgallery-counter { margin-left: 10px; color: #b3aea4; }

.pgallery-frame { flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2vw, 28px); min-height: 0; }
.pgallery-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; height: 100%; }
.pgallery-img { max-width: min(1100px, 100%); max-height: 100%; width: auto; height: auto;
  object-fit: contain; opacity: 0; transition: opacity .25s ease; }
.pgallery-img.is-in { opacity: 1; }

.pgallery-arrow { flex: 0 0 auto; width: 54px; height: 54px; display: flex; align-items: center;
  justify-content: center; background: none; border: 0; border-radius: 50%; cursor: pointer;
  font-size: 38px; line-height: 1; color: var(--bark, #686058); transition: background .2s, opacity .2s; }
.pgallery-arrow:hover { background: rgba(104,96,88,.08); }
.pgallery-arrow[hidden] { display: none; }

.pgallery-thumbs { flex: 0 0 auto; display: flex; justify-content: center; gap: 10px; padding-top: 22px;
  max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.pgallery-thumbs[hidden] { display: none; }
.pgallery-thumb { flex: 0 0 auto; width: 66px; height: 66px; padding: 5px; background: #fff;
  border: 1px solid #e3ded5; border-radius: 3px; cursor: pointer; transition: border-color .2s; }
.pgallery-thumb:hover { border-color: #c8c1b4; }
.pgallery-thumb.is-active { border-color: var(--bark, #686058); }
.pgallery-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }

@media (max-width: 680px) {
  .pgallery-arrow { width: 40px; height: 40px; font-size: 30px; }
  .pgallery-thumb { width: 54px; height: 54px; }
  .pgallery-title { font-size: 11px; }
}
