/* Horizon Technologies — product page ("hz_oferta" single) stylesheet.
   Loaded ONLY on single-hz_oferta.php (see functions.php), on top of
   main.css — reuses main.css's tokens, .wrap/.icon/.eyebrow/.display/
   .btn*/.reveal/.header/.feature-grid/.feature-card/.process-rail/.step/
   .placeholder-photo/.cta/.footer as-is rather than redefining them, so a
   product page always stays visually identical to the rest of the site
   wherever it reuses a component. Only the genuinely new, product-page-
   specific pieces (breadcrumb, hero, sticky sub-nav, layer diagram,
   variant cards, application tiles, spec sheet) live here. */

/* breadcrumb */
.crumb-bar { background: var(--bg-light); border-bottom: 1px solid var(--border-light); }
.crumb { display: flex; align-items: center; gap: 8px; padding-top: 14px; padding-bottom: 14px; font-size: 0.84rem; color: var(--fg-on-light-muted); flex-wrap: wrap; }
.crumb a { color: var(--fg-on-light-muted); }
.crumb a:hover { color: var(--ink); }
.crumb span.sep { color: var(--border-light); }
.crumb span.current { color: var(--ink); font-weight: 600; }

/* product hero — same dark/mesh treatment as .hero and .cta, laid out as
   a 2-column intro (copy + photo) instead of the homepage's single column
   + floating circular photo, since here there is exactly one real product
   to introduce rather than a rotating set. */
.p-hero { position: relative; background: var(--bg-dark); color: var(--fg-on-dark); overflow: clip; }
.p-hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; padding-top: clamp(44px, 6vw, 72px); padding-bottom: clamp(48px, 7vw, 84px); }
.p-hero-eyebrow { color: var(--accent); margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
/* The dot span stays in the markup (template-parts/product/hero.php) but is
   hidden, replaced by the same "+" registration mark main.css draws on every
   .eyebrow (this element doesn't carry the .eyebrow class, so the marker is
   re-declared here rather than inherited). */
.p-hero-eyebrow .dot { display: none; }
.p-hero-eyebrow::before { content: ""; flex: none; width: 11px; height: 11px; background:
  linear-gradient(currentColor, currentColor) center / 11px 1.5px no-repeat,
  linear-gradient(currentColor, currentColor) center / 1.5px 11px no-repeat; }
.p-hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.6rem); font-weight: 700; line-height: 1.04; letter-spacing: -0.03em; margin: 0 0 20px 0; max-width: 18ch; }
.p-hero p.lead { font-size: 1.08rem; color: var(--fg-on-dark-muted); max-width: 50ch; margin: 0 0 32px 0; }
.p-hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.p-hero-meta { display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.p-hero-meta div { display: flex; flex-direction: column; gap: 4px; }
.p-hero-meta strong { font-family: 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--white); }
.p-hero-meta span { font-size: 0.78rem; color: var(--muted-on-dark); }

/* hero — product photo slot. Reuses the Featured Image already set for
   the homepage tile; honest dashed-border placeholder (same convention
   as .placeholder-photo on "O firmie", adapted for a dark background)
   when no Featured Image has been set yet. */
.hero-photo-slot { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; }
.hero-photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo-slot.is-empty { border: 1.5px dashed rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.03); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted-on-dark); }
.hero-photo-slot.is-empty .icon { width: 30px; height: 30px; }
.hero-photo-slot.is-empty span { font-size: 0.8rem; text-align: center; max-width: 26ch; }

/* rotating section background — every other block (odd position, see
   single-hz_oferta.php's $index % 2) swaps from the default white to the
   site's existing pale-sage "rhythm" tint, the same alternation the
   homepage already uses between its own sections (content-home.php),
   so a product page with several blocks stacked never reads as one long
   unbroken white page. */
/* ".section-pad.section-alt" (two classes) rather than plain ".section-alt"
   — needed to out-specificity main.css's "section.light" (element + class)
   which three of the eight block types (layers/bento/process) already
   carry; a single-class selector would silently lose to it and those three
   types would never actually alternate. */
.section-pad.section-alt { background: var(--bg-light-2); }

/* optional intro copy (see hz_render_block_text()) under a block's own
   eyebrow/title/lead — now usable in every block type, not just
   "text + photo" (.text-photo-grid below has its own, near-identical
   rules for that type's 2-column layout). Only takes effect when a block
   actually has body text; a bare eyebrow/title/lead is unaffected since
   ".section-head p" already carried margin:0 for the single-lead case. */
.section-head p { margin: 0 0 14px 0; }
.section-head ul, .section-head ol { color: var(--fg-on-light-muted); margin: 0 0 14px 0; padding-left: 20px; }
.section-head ul li, .section-head ol li { margin-bottom: 6px; }
.section-head > :last-child { margin-bottom: 0; }

/* "++double-plus++" spans inside block body text (see
   hz_render_inline_formatting()) — a single word/phrase picked out in the
   site's orange accent colour, for when bold isn't quite enough emphasis. */
.hz-accent-text { color: var(--accent); font-weight: 600; }

/* sticky sub-nav — sits directly under .header (which is itself sticky at
   top:0), listing only the sections that actually rendered (see
   single-hz_oferta.php) so there is never a dead anchor link. */
.subnav { position: sticky; top: var(--site-header-height, 84px); z-index: 25; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-light); }
.subnav-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav a { position: relative; display: block; padding: 16px 18px; font-size: 0.88rem; font-weight: 600; color: var(--fg-on-light-muted); white-space: nowrap; }
.subnav a:hover { color: var(--ink); }
.subnav a.is-active { color: var(--ink); }
.subnav a.is-active::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
[id] { scroll-margin-top: calc(var(--site-header-height, 84px) + var(--site-subnav-height, 56px) + 24px); }

/* "text + photo" block — the basic, general-purpose block type: heading +
   paragraph(s) on the left, optional photo on the right. Reusable on its
   own or stacked more than once in a row to break up a longer story. */
.text-photo-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.text-photo-grid.no-photo { grid-template-columns: 1fr; max-width: 760px; }
.text-photo-lead { font-size: 1.06rem; color: var(--fg-on-light-muted); margin: 0 0 14px 0; }
.text-photo-grid p { color: var(--fg-on-light-muted); margin: 0 0 14px 0; }
.text-photo-grid ul, .text-photo-grid ol { color: var(--fg-on-light-muted); margin: 0 0 14px 0; padding-left: 20px; }
.text-photo-grid ul li, .text-photo-grid ol li { margin-bottom: 6px; }
.text-photo-grid > div > :last-child { margin-bottom: 0; }
.text-photo-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.text-photo-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* dynamic column count for the two section types whose item count varies
   per product (2–6 slots) — PHP sets --cols to min(count, 4) so a short
   list doesn't stretch into overly wide cards, and a full 5–6 item list
   wraps to a second row instead of squeezing into one. */
.prod-feat-grid { grid-template-columns: repeat(var(--cols, 4), 1fr); }
.prod-process-rail { grid-template-columns: repeat(var(--cols, 5), 1fr); }

/* budowa — numbered layer rows with a connecting vertical rail, distinct
   from the horizontal .process-rail so the two "numbered list" sections
   on one page don't read as the same component repeated. */
.layer-rows { position: relative; max-width: 860px; }
.layer-rows::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 1px; background: var(--border-light); }
.layer-row { position: relative; display: flex; gap: 22px; padding-bottom: 30px; }
.layer-row:last-child { padding-bottom: 0; }
.layer-num { position: relative; z-index: 1; flex: none; width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem; font-weight: 600; color: var(--white); box-shadow: 0 0 0 6px var(--bg-light); }
.layer-swatch { flex: none; width: 30px; height: 30px; border-radius: 8px; margin-top: 5px; border: 1px solid var(--border-light); }
.layer-body h3 { margin: 0 0 6px 0; font-size: 1.02rem; font-weight: 600; }
.layer-body p { margin: 0; color: var(--fg-on-light-muted); font-size: 0.92rem; max-width: 56ch; }

/* warianty */
.variant-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.variant-card { border: 1.5px dashed var(--border-light); border-radius: var(--radius); background: var(--bg-light-2); overflow: hidden; display: flex; flex-direction: column; }
.variant-card.has-photo { border-style: solid; border-color: var(--border-light); background: var(--bg-light); }
.variant-swatch { aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--fg-on-light-muted); }
.variant-swatch .icon { width: 26px; height: 26px; }
.variant-swatch span { font-size: 0.74rem; text-align: center; max-width: 22ch; }
.variant-swatch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.variant-label { padding: 14px 16px 18px; background: var(--bg-light); border-top: 1px solid var(--border-light); }
.variant-label strong { display: block; font-size: 0.92rem; font-weight: 600; margin-bottom: 3px; }
.variant-label span { font-size: 0.8rem; color: var(--fg-on-light-muted); }

/* "galeria zdjęć z podpisem" — a row of photos, each with its own optional
   caption above it, no card chrome (unlike .variant-card). Migrated-content
   friendly: a caption + orange accent divider sits above the photo, and the
   photo itself lifts gently on hover — the same soft, unobtrusive touch of
   motion already used on .app-tile/.related-card/.o-tile elsewhere on the
   site, so this reads as part of the same family rather than a one-off. */
.photo-row-grid { display: grid; gap: 32px; }
.photo-row-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
/* fixed-height slot, always present even when an item has no caption — so
   every photo in the row still lines up at the same top edge instead of
   the caption-less ones floating upward. */
.photo-row-caption-slot { display: flex; flex-direction: column; justify-content: flex-end; min-height: 54px; }
.photo-row-caption { display: block; font-size: 0.94rem; font-weight: 600; color: var(--fg-on-light); margin: 0 0 16px 0; }
.photo-row-divider { display: block; width: 28px; height: 2px; margin: 9px auto 0; background: var(--accent); border-radius: 2px; }
.photo-row-photo { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 26px rgba(51, 81, 80, 0.10); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.photo-row-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* "Zmieść całe zdjęcie" (contain) — for a technical diagram/pinout drawing
   where cropping to fill the 4:3 frame would cut off part of what the image
   is meant to show. A neutral tint fills the letterboxed space instead of
   the image's own background, matching how .placeholder-photo elsewhere
   uses the same token for an empty-space fill. */
.photo-row-photo.is-contain { background: var(--bg-light-2); }
.photo-row-photo.is-contain img { object-fit: contain; }
.photo-row-item:hover .photo-row-photo { transform: translateY(-5px); box-shadow: 0 20px 38px rgba(51, 81, 80, 0.16); }
.prod-photo-row-grid { grid-template-columns: repeat(var(--cols, 3), 1fr); }

/* zastosowania — tinted bento (no stock photography implied) */
.app-bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.app-tile { position: relative; border-radius: var(--radius); padding: 26px; min-height: 168px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; color: var(--white); background: var(--ink); background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.2px, transparent 1.2px); background-size: 16px 16px; background-position: -6px -6px; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.app-tile:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(51, 81, 80, 0.18); }
.app-tile .icon { width: 26px; height: 26px; color: var(--accent); }
.app-tile h3 { margin: 0; font-size: 1.02rem; font-weight: 600; }
.app-tile:nth-child(3n+2) { background-color: var(--hero-bg); }
.app-tile:nth-child(3n+3) { background-color: var(--hero-panel); }

/* dane techniczne */
.spec-card { background: var(--bg-light-2); border: 1px solid var(--border-light); border-radius: var(--radius); padding: clamp(20px, 3vw, 36px); }
.spec-note { display: flex; align-items: center; gap: 8px; margin: 0 0 22px 0; font-size: 0.82rem; color: var(--fg-on-light-muted); }
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border-light); border-radius: 10px; overflow: hidden; }
.spec-row { background: var(--bg-light); padding: 18px 22px; display: flex; align-items: center; gap: 14px; }
.spec-row .icon { color: var(--accent-strong); flex: none; }
.spec-row div { display: flex; flex-direction: column; gap: 2px; }
.spec-row strong { font-size: 0.92rem; font-weight: 600; }
.spec-row span { font-size: 0.84rem; color: var(--fg-on-light-muted); }

/* powiązane — reuses the site's icon-chip language (value row, footer
   logo) rather than inventing a new card pattern */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--bg-light); border: 1px solid var(--border-light); border-radius: var(--radius); transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.related-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(51, 81, 80, 0.10); border-color: var(--sage); }
.related-card .icon-chip { width: 42px; height: 42px; border-radius: 10px; background: var(--ink); display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden; }
.related-card .icon-chip .icon { width: 20px; height: 20px; color: var(--accent); }
.related-card .icon-chip img { width: 100%; height: 100%; object-fit: cover; }
.related-card strong { display: block; font-size: 0.92rem; font-weight: 600; color: var(--fg-on-light); margin-bottom: 2px; }
.related-card span { font-size: 0.8rem; color: var(--fg-on-light-muted); }

@media (max-width: 980px) {
  .p-hero-inner { grid-template-columns: 1fr; }
  .text-photo-grid { grid-template-columns: 1fr; }
  .prod-feat-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-process-rail { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .prod-process-rail::before { display: none; }
  .variant-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-photo-row-grid { grid-template-columns: repeat(2, 1fr); }
  .app-bento { grid-template-columns: 1fr 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .prod-feat-grid { grid-template-columns: 1fr; }
  .prod-process-rail { grid-template-columns: 1fr; }
  .variant-grid { grid-template-columns: 1fr; }
  .prod-photo-row-grid { grid-template-columns: 1fr; }
  .app-bento { grid-template-columns: 1fr; }
}
