/* ============================================================
   PIXCORE - CMS section styles (storefront)
   ============================================================ */
.cms-prose { font-size:0.98rem; line-height:1.9; color:var(--text); }

/* ---- Page Builder per-section design helpers (render_page.php) ---- */
.sec-styled { position:relative; }
/* ★ v7.113 — the "inherit everything" rule applies ONLY to a section that declares
   a text colour. It used to be `.sec-styled …`, which every home/about section is
   (choosing a text alignment alone adds .sec-styled) — and because this file loads
   after css/style.css, that blanket rule outranked `.sf-hero`'s own `--white` /
   `.sf-hero h1` / `.sf-hero p`. The hero is --dark in BOTH palettes, so its headline
   and body copy printed in the body colour: #1e293b on #0f172a, a 1.22:1
   dark-on-dark that was unreadable in light mode. `ultimate_section_attr()` now adds
   `sec-ink` only when an operator actually sets a section text colour, so a band
   keeps the colours its component defines and a custom colour still cascades. */
.sec-ink, .sec-ink h1, .sec-ink h2, .sec-ink h3, .sec-ink h4,
.sec-ink p, .sec-ink .cms-prose,
.sec-ink figcaption, .sec-ink .product-card-desc, .sec-ink .product-price {
    color:inherit;
}
/* ★ v7.113 — a muted line inside a section with a custom ink FADES that ink
   (currentColor resolves to the inherited value inside the color property) instead
   of inheriting it at full strength. With no custom ink, `.muted` keeps the
   `--gray` from css/style.css. 72% mirrors the 78% fade .sf-topbar applies. */
.sec-ink .muted { color:color-mix(in srgb, currentColor 72%, transparent); }
.sec-styled h1, .sec-styled h2 { font-size:var(--sec-head-fs, inherit); }
.sec-bgimg { background-size:cover; background-position:center; background-repeat:no-repeat; }
.sec-bgimg.sec-overlay::before {
    content:''; position:absolute; inset:0; z-index:0;
    background:color-mix(in srgb, var(--dark) calc(var(--sec-overlay, .3) * 100%), transparent);
}
.sec-overlay > * { position:relative; z-index:1; }
.cms-split {
    display:grid; grid-template-columns:1fr 1fr; gap:44px; align-items:center;
    max-width:1100px; margin:0 auto;
}
.cms-split-img img {
    width:100%; border-radius:var(--radius-lg); box-shadow:var(--shadow-lg);
}
.feat-grid {
    display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:20px;
    max-width:1150px; margin:0 auto;
}
.feat-card { text-align:center; padding:30px 22px; transition:var(--transition); }
.feat-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); }
.feat-icon { font-size:1.7rem; color:var(--primary); margin-bottom:14px; display:block; }
/* Alternate feature-card icons pick up the brand Accent colour */
.feat-grid > .feat-card:nth-child(even):not(.has-list) .feat-icon { color:var(--accent); }
/* ★ v7.113 — THE STOREFRONT BANDS STOP CARRYING THEIR OWN COLOURS.
   Every value in the CTA block was a literal, so none of it could follow the
   white label: `#fff` sat on a band whose gradient is the operator's Primary →
   Primary Hover, the shadow was near-black, and the button's text was
   PRIMARY HOVER on a --surface pill — a colour that means "hover on a dark
   surface", printed permanently on white in light mode (#00BFFF on #fff is
   about 2:1). `--primary-ink` is the token that already means "brand colour
   readable on a light tint": Primary in light mode, Primary Hover in dark,
   because css/theme.php flips it. `--white` replaces #fff and the shadow is
   mixed from --dark exactly like --shadow/--shadow-lg in theme.php, so the CTA
   re-brands with the palette in BOTH modes. */
.sf-cta {
    background:radial-gradient(900px 420px at 12% 115%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 62%),
               linear-gradient(135deg,var(--primary),var(--primary-hover));
    color:var(--white); text-align:center; padding:74px 24px;
}
.sf-cta h2 { color:var(--white); font-size:clamp(1.6rem,3.5vw,2.4rem); margin-bottom:12px; letter-spacing:-.02em; }
.sf-cta p { color:color-mix(in srgb, var(--white) 85%, transparent); max-width:600px; margin:0 auto 24px; }
.sf-cta-btn {
    display:inline-block; background:var(--surface); color:var(--primary-ink);
    padding:13px 34px; border-radius:999px; font-weight:800; transition:var(--transition);
    box-shadow:0 8px 24px color-mix(in srgb, var(--dark) 18%, transparent);
}
.sf-cta-btn:hover { transform:translateY(-2px); color:var(--primary-ink); }
.contact-grid {
    display:grid; grid-template-columns:1fr 1.2fr; gap:22px; max-width:1050px; margin:0 auto;
}
@media (max-width:800px) {
    .cms-split, .contact-grid { grid-template-columns:1fr; }
}

/* ---- Page Builder extras (v3.0): hero buttons, rich-text button, feature links ---- */
.sf-hero-btns {
    display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-top:28px;
}
/* ★ v7.113 — the same rule for the hero buttons and the rich-text button: the
   white pill now takes its ink from `--primary-ink` (readable in light mode),
   the outlined variant is `--white` mixed down instead of literal white on
   alpha, and the lift is mixed from `--dark` like every other shadow here.
   These sit on the hero's --dark gradient in BOTH palettes, which is why the
   white-family values are correct either way. */
.sf-hero-btn {
    display:inline-block; background:var(--surface); color:var(--primary-ink);
    padding:13px 34px; border-radius:999px; font-weight:800; transition:var(--transition);
    box-shadow:0 8px 24px color-mix(in srgb, var(--dark) 18%, transparent);
}
.sf-hero-btn:hover { transform:translateY(-2px); color:var(--primary-ink); }
.sf-hero-btn.alt {
    background:transparent; color:var(--white);
    border:2px solid color-mix(in srgb, var(--white) 65%, transparent); box-shadow:none;
}
.sf-hero-btn.alt:hover { background:color-mix(in srgb, var(--white) 12%, transparent); }
.cms-btn {
    display:inline-block; background:var(--primary); color:var(--white);
    padding:12px 30px; border-radius:999px; font-weight:700; transition:var(--transition);
}
.cms-btn:hover { background:var(--primary-hover); transform:translateY(-2px); color:var(--white); }
.feat-link {
    display:inline-block; margin-top:14px; font-size:.82rem; font-weight:800;
    letter-spacing:.08em; text-transform:uppercase; color:var(--primary); transition:var(--transition);
}
.feat-link:hover { color:var(--primary-hover); }
.feat-link i { margin-left:6px; font-size:.72rem; }

/* ---- Image & Layout (v3.0): per-section media placement ---- */
@media (min-width:801px) {
    .cms-split.media-right > *:first-child { order:2; }   /* image swings right */
    .cms-split.media-right > *:last-child  { order:1; }   /* text slides left   */
}
.cms-split.media-top { display:block; }                   /* stacked: image above */
.cms-split.media-top .cms-split-img { margin-bottom:24px; }

/* Generic engine (v3.0): ANY section inside an Image & Layout split/stack */
.cms-split-body > .sf-section,
.cms-split-body > .sf-hero { padding:10px 0; max-width:none; margin:0; }
.cms-split-body .sf-section-title { text-align:left; }
.cms-split-body .sf-section-title::after { margin-left:0; }
.cms-top-media { max-width:1200px; margin:0 auto 26px; padding:0 24px; }
.cms-top-media img { width:100%; border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); display:block; }
@media (max-width:800px) {
    .cms-split-body > .sf-section,
    .cms-split-body > .sf-hero { padding-top:0; }
}

/* ---- Native hero split (Image & Layout) ---- */
.sf-band { width:100%; padding:72px 30px; }
.sf-band .cms-split { max-width:1200px; margin:0 auto; }
.sf-band.media-right .cms-split > *:first-child { order:2; }
.sf-band.media-right .cms-split > *:last-child  { order:1; }
.sf-band .cms-split.media-top { display:block; }
.cms-split-richtext { text-align:left; align-items:center; }
.cms-split-richtext .cms-split-img img { border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); display:block; }
.cms-split-title { color:inherit; font-size:clamp(1.4rem,3vw,2.1rem); letter-spacing:-.01em; margin-bottom:14px; }
.cms-split-sub { color:inherit; font-weight:600; font-size:1.08rem; margin-bottom:12px; opacity:.9; }
.cms-split-richtext .cms-prose { color:inherit; }
.sf-band.cms-richband .cms-prose { color:inherit; }

/* ---- CMS richtext content styling ---- */
.cms-prose { line-height:1.7; color:var(--text); }
.cms-prose h2 { font-size:1.4rem; font-weight:700; color:var(--heading); margin:28px 0 12px; padding-bottom:8px; border-bottom:1px solid var(--border); }
.cms-prose h2:first-child { margin-top:0; }
.cms-prose p { margin:0 0 14px; }
.cms-prose ul, .cms-prose ol { margin:0 0 14px; padding-left:24px; }
.cms-prose li { margin-bottom:6px; }
.cms-prose strong { color:var(--heading); font-weight:700; }
.cms-prose a { color:var(--primary); text-decoration:underline; }

.sf-hero-split { text-align:left; padding:72px 24px; }
.sf-hero-split .sf-hero-layout {
    max-width:1200px; margin:0 auto; display:grid;
    grid-template-columns:1fr 1fr; gap:48px; align-items:center; text-align:left;
}
.sf-hero-split .sf-hero-media img {
    width:100%; border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); display:block;
}
.sf-hero-split.media-right .sf-hero-layout > *:first-child { order:2; }
.sf-hero-split.media-right .sf-hero-layout > *:last-child  { order:1; }
.sf-hero-split .sf-hero-layout.media-top { display:block; text-align:center; }
.sf-hero-split .sf-hero-layout.media-top .sf-hero-media { margin-bottom:32px; }
/* ★ v7.113 — the split hero sits on the same --dark gradient as .sf-hero, so its
   headline is --white and its copy is white mixed down to 80% — the `#cbd5e1`
   slate this replaces was a literal that could never follow the palette (the
   inline copies in includes/render_page.php were changed with it). */
.sf-hero-split h1 { color:var(--white); font-size:clamp(1.9rem,4.4vw,3rem); letter-spacing:-.03em; margin-bottom:14px; }
.sf-hero-split p { color:color-mix(in srgb, var(--white) 80%, transparent); max-width:600px; margin:0 0 18px; }
.sf-hero-split .sf-hero-media { display:flex; align-items:center; }
@media (max-width:800px) {
    .sf-hero-split .sf-hero-layout { grid-template-columns:1fr; gap:28px; }
    .sf-hero-split.media-right .sf-hero-layout > *:first-child,
    .sf-hero-split.media-right .sf-hero-layout > *:last-child { order:0; }
}

/* ---- Feature cards with bullet lists (v3.1 — e.g. Industries page) ---- */
.feat-card.has-list {
    text-align:left; display:flex; flex-direction:column;
    border-top:4px solid var(--primary);
}
.feat-card.has-list .feat-icon {
    width:55px; height:55px; display:flex; align-items:center; justify-content:center;
    background:color-mix(in srgb, var(--primary) 12%, transparent);
    border-radius:12px; font-size:1.25rem; margin:0 0 16px;
}
.feat-card.has-list h4 { font-size:1.02rem; }
.feat-list { list-style:none; margin:12px 0 6px; padding:0; flex:1; }
.feat-list li {
    display:flex; align-items:center; gap:9px; margin-bottom:7px;
    font-size:.9rem; color:var(--text); line-height:1.4;
}
.feat-list li i { color:var(--primary); font-size:.78rem; flex-shrink:0; }
.feat-card.has-list .feat-link { margin-top:auto; padding-top:12px; }

/* ---- SEO landing pages (v3.4 — seo-page.php) ---- */
.seo-content { max-width:860px; margin:0 auto; }
.seo-content h2 { font-size:1.45rem; margin:30px 0 12px; letter-spacing:-.01em; }
.seo-content h3 { font-size:1.12rem; margin:22px 0 10px; color:var(--heading); }
.seo-content p  { margin:0 0 14px; line-height:1.85; }
.seo-content ul { margin:0 0 16px; padding-left:4px; list-style:none; }
.seo-content ul li {
    position:relative; padding-left:26px; margin-bottom:8px; line-height:1.6;
}
.seo-content ul li::before {
    content:'\f058'; font-family:'Font Awesome 6 Free'; font-weight:900;
    color:var(--primary); position:absolute; left:0; top:1px; font-size:.85rem;
}
.seo-content strong { color:var(--heading); }

/* ---- ★ v7.17 — VIDEO SECTION (page builder) ---------------------------------
   The player is the file the operator uploaded, so it needs no third-party
   embed and nothing to load from another host.

   `aspect-ratio:16/9` with `object-fit:contain` is deliberate: a <video>
   with no metadata yet (or a poster that is a different shape) would
   otherwise collapse to zero height and then jump when the file reports its
   dimensions, and a portrait clip would push the whole section down the
   page. A fixed frame with the video letterboxed inside is the predictable
   version, and the brand's Dark colour (--dark, the same one behind the hero
   band) makes the letterbox look intended. ★ v7.113 — it was the literal
   #0b1220; --dark is dark in both palettes by definition, so this follows the
   operator's palette instead of ignoring it.
   `max-height` stops a tall phone clip from filling an entire screen. */
.cms-video { margin:0; }
.cms-video video {
    width:100%; display:block; aspect-ratio:16 / 9; object-fit:contain;
    max-height:72vh; background:var(--dark);
    border-radius:var(--radius-lg); box-shadow:var(--shadow-lg);
}
.cms-video-full { max-width:1000px; margin:0 auto; }
.cms-video-cell { min-width:0; }
.cms-video-caption {
    text-align:center; color:var(--gray); font-size:.9rem; line-height:1.7; margin-top:12px;
}
.cms-video-copy h2 { margin-bottom:12px; }
.cms-video-sub { font-weight:600; color:var(--primary-hover); font-size:1.02rem; margin-bottom:10px; }
.cms-video-sub-center { text-align:center; margin:-18px 0 22px; }
@media (max-width:640px) {
    .cms-video video { border-radius:12px; max-height:52vh; }
    .cms-video-sub-center { margin:-8px 0 16px; }
}

