/*
Theme Name: Transformer Blog
Theme URI: https://blog.transninelectric.com
Description: SEO-optimized WordPress blog theme for transformer manufacturers (top-of-funnel traffic). Reuses the proven Schema.org JSON-LD and content-enhancement layer, and adds blog capabilities: sticky TOC with scroll-spy, reading progress bar, reading time, popular-posts, author E-E-A-T box, newsletter / lead-magnet / quote CTAs that funnel to the main product site, and cookie-consent gated analytics.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Author: Transformer
Author URI: https://www.transninelectric.com
License: MIT
License URI: https://opensource.org/licenses/MIT
Text Domain: transformer-export
Tags: blog, custom-colors, custom-logo, custom-menu, editor-style, featured-images, translation-ready, grid-layout, two-columns, footer-widgets, seo
*/

/* =========================================================
   0. Design tokens
   ========================================================= */
:root {
  --c-brand:        #0b2e59;   /* deep industrial blue */
  --c-brand-dark:   #071f3d;
  --c-brand-light:  #16467f;
  --c-accent:       #ff7a1a;   /* amber / safety orange for CTAs */
  --c-accent-dark:  #e9650a;
  --c-ink:          #1c2733;
  --c-body:         #475569;
  --c-muted:        #7c8aa0;
  --c-line:         #e2e8f0;
  --c-bg:           #ffffff;
  --c-bg-soft:      #f4f7fb;
  --c-bg-dark:      #0b2e59;
  --c-ok:           #1f9d55;
  --radius:         14px;
  --radius-sm:      8px;
  --shadow-sm:      0 1px 2px rgba(15,30,55,.06), 0 4px 14px rgba(15,30,55,.06);
  --shadow-md:      0 10px 30px rgba(15,30,55,.12);
  --maxw:           1200px;
  --font:           "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --container-pad:  clamp(16px, 4vw, 40px);
  --section-y:      clamp(48px, 7vw, 96px);
}

/* =========================================================
   1. Reset / base
   ========================================================= */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-body);
  background: var(--c-bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--c-brand-light); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--c-accent); }
h1,h2,h3,h4,h5,h6 { color: var(--c-ink); line-height: 1.2; margin: 0 0 .55em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4vw, 46px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: clamp(18px, 2.2vw, 22px); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--container-pad); }
.section { padding-block: var(--section-y); }
.section--soft { background: var(--c-bg-soft); }
.section--dark { background: var(--c-bg-dark); color: #cdd9e8; }
.section--dark h1,.section--dark h2,.section--dark h3 { color: #fff; }
.section--dark p { color: #aebfd4; }
.text-center { text-align: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 10px; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--c-body); }
.muted { color: var(--c-muted); }

/* =========================================================
   2. Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 2px solid transparent; cursor: pointer; line-height: 1; white-space: nowrap;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); color: #fff; }
.btn--primary { background: var(--c-accent); color: #fff; box-shadow: 0 8px 20px rgba(255,122,26,.28); }
.btn--primary:hover { background: var(--c-accent-dark); }
.btn--ghost { background: transparent; color: var(--c-brand); border-color: var(--c-line); }
.btn--ghost:hover { border-color: var(--c-brand); background: rgba(11,46,89,.04); }
.btn--light { background: #fff; color: var(--c-brand); }
.btn--light:hover { background: #eef3fa; }
.btn--lg { padding: 16px 30px; font-size: 16px; }

/* =========================================================
   3. Header / nav
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--c-ink); font-size: 18px; }
.brand img { height: 38px; width: auto; }
.brand__mark { width: 38px; height: 38px; border-radius: 9px; background: var(--c-brand); color: #fff; display: grid; place-items: center; font-weight: 800; }
.brand__sub { font-size: 11px; font-weight: 600; color: var(--c-muted); letter-spacing: .08em; text-transform: uppercase; display: block; }
.main-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a { padding: 10px 14px; border-radius: 8px; font-weight: 600; color: var(--c-ink); font-size: 15px; }
.main-nav a:hover { background: var(--c-bg-soft); color: var(--c-brand); }
.main-nav .has-children { position: relative; }
.main-nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 230px;
  background: #fff; border: 1px solid var(--c-line); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 8px; display: none; z-index: 50;
}
.main-nav .has-children:hover .sub-menu,
.main-nav .has-children:focus-within .sub-menu { display: block; }
.main-nav .sub-menu a { display: block; padding: 9px 12px; font-weight: 500; }
.header-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-ink); margin: 5px 0; transition: .2s; }

/* =========================================================
   4. Hero
   ========================================================= */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--c-brand-dark); }
.hero::after { content:""; position: absolute; inset: 0; background:
   radial-gradient(900px 400px at 85% -10%, rgba(255,122,26,.25), transparent 60%),
   linear-gradient(180deg, rgba(7,31,61,.2), rgba(7,31,61,.85)); pointer-events: none; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.hero .container { position: relative; z-index: 2; padding-block: clamp(64px, 11vw, 140px); }
.hero h1 { color: #fff; max-width: 18ch; }
.hero p.lead { color: #d7e2f1; max-width: 56ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 40px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.18); }
.hero__badge { display: flex; align-items: center; gap: 10px; color: #cdd9e8; font-size: 14px; }
.hero__badge strong { color: #fff; display: block; font-size: 20px; }

/* =========================================================
   5. Section heading
   ========================================================= */
.section-head { max-width: 720px; margin: 0 auto clamp(28px,4vw,48px); text-align: center; }
.section-head--left { margin-inline: 0; text-align: left; }

/* =========================================================
   6. Cards & grids
   ========================================================= */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cdd9e8; }
.card__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--c-bg-soft); color: var(--c-brand); margin-bottom: 16px; font-size: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--c-body); margin: 0; }
.card a.card__link { color: var(--c-brand-light); font-weight: 600; display: inline-block; margin-top: 12px; }

/* Product card */
.product-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.product-card__media { aspect-ratio: 4/3; background: #fff; position: relative; overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: contain; }
.product-card__media--placeholder { display: grid; place-items: center; color: var(--c-muted); font-size: 13px; }
.product-card__body { padding: 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card__cat { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent); }
.product-card h3 { font-size: 18px; margin: 0; }
.product-card__spec { font-size: 14px; color: var(--c-muted); margin: 0; }
.product-card__foot { margin-top: auto; padding-top: 14px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 20px; }
.stat { text-align: center; }
.stat__num { font-size: clamp(30px, 4vw, 46px); font-weight: 800; color: #fff; line-height: 1; }
.stat__label { color: #aebfd4; font-size: 14px; margin-top: 8px; }

/* =========================================================
   7. Breadcrumbs
   ========================================================= */
.breadcrumbs { font-size: 13px; color: var(--c-muted); padding-block: 16px; }
.breadcrumbs a { color: var(--c-muted); }
.breadcrumbs a:hover { color: var(--c-brand); }
.breadcrumbs .sep { margin: 0 8px; opacity: .6; }

/* =========================================================
   8. Layout: content + sidebar
   ========================================================= */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }

/* ---------- Body copy typography (shared by every content page) ----------
   The original theme shipped no .entry-content rules at all, so headings, lists, images
   and tables inside the body were left completely unstyled. This fills that gap and adds
   scroll-margin to headings so section anchors are not hidden behind the sticky header. */
.entry-content { line-height: 1.78; font-size: 16.5px; color: var(--c-body); }
.entry-content > * + * { margin-top: 1.05em; }
.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 {
  color: var(--c-ink); line-height: 1.35; scroll-margin-top: 96px;
}
.entry-content h2 { margin-top: 1.9em; font-size: clamp(21px, 2.4vw, 26px); }
.entry-content h3 { margin-top: 1.6em; font-size: clamp(18px, 1.8vw, 21px); }
.entry-content h4 { margin-top: 1.4em; font-size: 17px; }
.entry-content p { margin: 0; }
.entry-content ul, .entry-content ol { margin-left: 0; padding-left: 1.4em; }
.entry-content li { margin-bottom: .5em; }
.entry-content li::marker { color: var(--c-brand-light); }
.entry-content a:not(.btn) { color: var(--c-brand-light); text-decoration: underline; text-underline-offset: 2px; }
.entry-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.entry-content blockquote {
  margin: 1.5em 0; padding: 16px 20px; border-left: 3px solid var(--c-accent);
  background: var(--c-bg-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--c-ink);
}
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; }
.entry-content th, .entry-content td { padding: 10px 14px; border: 1px solid var(--c-line); text-align: left; }
.entry-content th { background: var(--c-bg-soft); font-weight: 600; color: var(--c-ink); }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { margin-top: 8px; font-size: 14px; color: var(--c-muted); text-align: center; }
.entry-content hr { border: 0; border-top: 1px solid var(--c-line); margin: 2em 0; }
/* Let wide tables scroll horizontally on mobile instead of breaking the layout */
.entry-content .wp-block-table { overflow-x: auto; }

.page-title { padding-block: clamp(28px,4vw,44px) 0; }
.page-title--hero { background: var(--c-bg-soft); }

/* ---------- Single product (full-width flow: gallery, TOC, body copy, spec table) ---------- */
.product-single { display: flex; flex-direction: column; gap: 40px; }

/* (1) Product media: the North American B2B convention — white background, whole unit in frame without cropping, switchable images, click to zoom */
.product-media { margin-bottom: 4px; }
.product-gallery {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--c-line); background: #fff;
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
}
.product-gallery--wide { aspect-ratio: 4/3; max-height: 520px; }
/* contain rather than cover: cover crops bushings and radiators, which US engineers read as unprofessional */
.product-gallery--wide img,
.product-gallery img { width: 100%; height: 100%; object-fit: contain; display: block; }
.product-media__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* ---------- Product gallery (main image, thumbnail strip, lightbox) ---------- */
.pg { display: flex; flex-direction: column; gap: 12px; }
.pg__stage {
  border: 1px solid var(--c-line); border-radius: var(--radius);
  background: #fff; overflow: hidden;
}
.pg__slide { margin: 0; padding: clamp(10px, 2vw, 18px); }
.pg__zoom {
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  background: transparent; cursor: zoom-in; aspect-ratio: 4/3;
}
.pg__img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pg__hint {
  position: absolute; right: 10px; bottom: 10px;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(11,46,89,.88); color: #fff; font-size: 12px;
  opacity: 0; transform: translateY(4px); transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}
.pg__zoom:hover .pg__hint,
.pg__zoom:focus-visible .pg__hint { opacity: 1; transform: none; }
.pg__cap { margin-top: 10px; text-align: center; font-size: 13px; color: var(--c-muted); }

.pg__thumbs {
  display: flex; gap: 10px; margin: 0; padding: 2px; list-style: none;
  overflow-x: auto; scrollbar-width: thin;
}
.pg__thumbs li { flex: 0 0 auto; }
.pg__thumb {
  width: 84px; height: 84px; padding: 4px;
  border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; display: grid; place-items: center; overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pg__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pg__thumb:hover { border-color: #c3d2e6; }
.pg__thumb.is-active { border-color: var(--c-brand-light); box-shadow: 0 0 0 2px rgba(22,70,127,.16); }

/* Lightbox */
.pg-lb {
  position: fixed; inset: 0; z-index: 1200;
  display: grid; grid-template-rows: 1fr auto; gap: 12px;
  padding: clamp(12px, 3vw, 28px); background: rgba(9,18,32,.94);
}
.pg-lb[hidden] { display: none; }
.pg-lb__figure { margin: 0; display: grid; place-items: center; min-height: 0; }
.pg-lb__img {
  max-width: 100%; max-height: 70vh; object-fit: contain;
  background: #fff; border-radius: var(--radius-sm);
}
.pg-lb__cap { margin-top: 10px; text-align: center; color: #d7e2f0; font-size: 14px; }
.pg-lb__count { margin: 0; text-align: center; color: #aebfd4; font-size: 13px; }
.pg-lb__close, .pg-lb__nav {
  position: absolute; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.3); border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer; line-height: 1;
}
.pg-lb__close { top: 14px; right: 14px; width: 44px; height: 44px; font-size: 30px; }
.pg-lb__nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 28px; }
.pg-lb__nav--prev { left: 12px; }
.pg-lb__nav--next { right: 12px; }
.pg-lb__close:hover, .pg-lb__nav:hover { background: rgba(255,255,255,.24); }
.pg-lb__close:focus-visible, .pg-lb__nav:focus-visible,
.pg__zoom:focus-visible, .pg__thumb:focus-visible { outline: 2px solid var(--c-brand-light); outline-offset: 2px; }

/* (1) Above-the-fold two columns: left gallery, right buy box (the North American B2B convention: specs and CTA visible immediately) */
.product-top {
  display: grid; gap: clamp(24px, 4vw, 48px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: start;
}
.product-buybox {
  position: sticky; top: 96px;   /* matches the fixed header height so the CTA stays visible while scrolling */
  display: flex; flex-direction: column; gap: 16px;
}
.buybox__card { padding: 22px 24px; }
/* The spec card opts out of the card hover lift so it does not distract while reading */
.buybox__card:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--c-line); }
.buybox__title { margin: 0 0 6px; font-size: 18px; }
.buybox__price {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
  margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--c-line);
}
.buybox__price-label { font-size: 13px; color: var(--c-muted); }
.buybox__price-value { font-size: 22px; font-weight: 700; color: var(--c-ink); line-height: 1.2; }
.buybox__price-sep { color: var(--c-muted); }
.buybox__price-term { width: 100%; font-size: 12px; color: var(--c-muted); }
.buybox__list { margin: 0; }
.buybox__row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px dashed var(--c-line);
}
.buybox__row:last-child { border-bottom: 0; }
.buybox__row dt { font-size: 14px; color: var(--c-muted); }
.buybox__row dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--c-ink); text-align: right; }
.buybox__actions { display: flex; flex-direction: column; gap: 10px; }
.btn--block { display: flex; width: 100%; justify-content: center; }
.buybox__note { margin: 2px 0 0; font-size: 13px; color: var(--c-muted); line-height: 1.5; }

/* (2) Body content */
.product-body { display: flex; flex-direction: column; }
/* Body container: cap the line length for readability (60-75 characters is the comfortable range at 15px and up) */
.product-body .entry-content { max-width: 78ch; }
.product-body .entry-content > :first-child { margin-top: 0; }
.product-body .entry-content > :last-child { margin-bottom: 0; }

/* TOC card: sits directly above the body so it reads as part of the same block */
.product-body .toc {
  margin: 0 0 36px;
  max-width: 78ch;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.product-body .toc__title { margin-bottom: 14px; }
.product-body .toc__item > a { font-size: 15px; }

/* Spec card */
.spec-card { margin-top: 44px; padding: 26px 28px; max-width: 78ch; }
/* The spec card does not need the card hover animation */
.spec-card:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--c-line); }
.spec-card__title { margin: 0 0 16px; font-size: 20px; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--c-line); font-size: 14px; vertical-align: top; }
.spec-table th { width: 42%; color: var(--c-ink); font-weight: 600; background: var(--c-bg-soft); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }

/* CTA */
.product-cta { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--c-line); }
.product-tags { margin-top: 24px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.tag { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--c-bg-soft); color: var(--c-brand); font-size: 13px; font-weight: 600; }

/* =========================================================
   9. Forms / inquiry
   ========================================================= */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--c-ink); }
.field input, .field select, .field textarea {
  font: inherit; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  background: #fff; color: var(--c-ink); width: 100%; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c-brand-light); box-shadow: 0 0 0 3px rgba(22,70,127,.15); }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 13px; color: var(--c-muted); }
.form-success { background: #eafaf0; border: 1px solid #b9e8cd; color: #1f7a45; padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; }

.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.contact-info li { list-style: none; margin-bottom: 14px; }
.contact-info ul { padding: 0; }
.contact-info strong { color: var(--c-ink); display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.contact-info span { color: var(--c-body); }

/* =========================================================
   10. Calculator widget
   ========================================================= */
.calc { background: var(--c-bg-soft); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 26px; }
.calc__result { margin-top: 18px; padding: 16px; border-radius: var(--radius-sm); background: var(--c-brand); color: #fff; font-size: 18px; font-weight: 700; }
.calc__result small { display: block; font-weight: 500; font-size: 13px; opacity: .85; }

/* =========================================================
   11. Footer
   ========================================================= */
.site-footer { background: var(--c-bg-dark); color: #aebfd4; padding-top: clamp(48px,6vw,72px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.site-footer a { color: #aebfd4; display: block; padding: 5px 0; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-brand p { color: #8aa0bd; font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-block: 22px; font-size: 13px; color: #8aa0bd; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a { width: 36px; height: 36px; border-radius: 9px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; }

/* =========================================================
   12. Utilities / misc
   ========================================================= */
.divider { height: 1px; background: var(--c-line); border: 0; margin: 0; }
.logo-strip { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: center; opacity: .8; }
.logo-strip span { font-weight: 700; color: var(--c-muted); letter-spacing: .04em; }
.faq-item { border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 12px; }
.faq-item h3 { font-size: 16px; margin: 0 0 6px; }
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--c-line); }
.feature-list li::before { content: "✓"; color: var(--c-ok); font-weight: 800; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 12px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 200; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* =========================================================
   13. Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
}
/* On tablet and phone the two columns stack: image first, then the specs and the CTA */
@media (max-width: 900px) {
  .product-top { grid-template-columns: 1fr; }
  .product-buybox { position: static; }
}
@media (max-width: 700px) {
  .pg__thumb { width: 68px; height: 68px; }
  .pg-lb__img { max-height: 62vh; }
  .pg-lb__nav { width: 42px; height: 42px; }
  .spec-card { padding: 20px; }
  .product-body .toc { padding: 18px 20px; }
}
@media (max-width: 860px) {
  .main-nav { position: fixed; inset: 72px 0 0 0; background: #fff; padding: 20px; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { padding: 14px; border-bottom: 1px solid var(--c-line); }
  .main-nav .sub-menu { position: static; box-shadow: none; border: 0; padding-left: 14px; }
  .nav-toggle { display: block; }
  .header-cta .btn--ghost { display: none; }
  .grid--3, .grid--4 { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }
}

/* =========================================================
   SEO and content enhancement modules — TOC, related content, E-E-A-T, FAQ
   ========================================================= */

/* ---------- Table of contents ---------- */
.toc {
  background: #f8fafc;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 32px 0;
}
.toc__title {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.toc__list { list-style: none; margin: 0; padding: 0; }
.toc__sub  { list-style: none; margin: 6px 0 6px 16px; padding: 0; border-left: 2px solid var(--c-line); }
.toc__item { margin: 6px 0; }
.toc__item > a {
  display: block;
  padding: 4px 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--c-ink);
  text-decoration: none;
  border-bottom: 0;
}
.toc__item > a:hover { color: var(--c-brand); text-decoration: underline; }
.toc__item--h3 > a { font-size: 14px; color: var(--c-body); }

/* Heading anchors: not hidden behind the sticky nav while scrolling, plus a brief highlight on arrival */
:target { scroll-margin-top: 96px; }
h2[id]:target, h3[id]:target { animation: tex-highlight 1.6s ease-out; }
@keyframes tex-highlight {
  0%   { background: rgba(255, 122, 26, .18); }
  100% { background: transparent; }
}

/* ---------- E-E-A-T meta bar ---------- */
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c-line);
  font-size: 14px;
  color: var(--c-muted);
}
.entry-meta strong { color: var(--c-ink); font-weight: 600; }
.entry-meta__updated::before { content: "·"; margin-right: 18px; color: var(--c-line); }

/* ---------- Related content ---------- */
.related-section { margin-top: 48px; }
.related-section__title    { margin-bottom: 24px; font-size: 24px; }
.related-section__subtitle { margin: 40px 0 20px; font-size: 18px; color: var(--c-body); }
.card__inner { display: block; text-decoration: none; color: inherit; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 26px; max-width: 820px; }
.faq-item h3 { margin-bottom: 8px; scroll-margin-top: 96px; }
.faq-item p  { margin: 0; color: var(--c-body); }

/* ---------- Spacing after the card heading level fix ---------- */
.grid .card h3 { margin: 0 0 8px; }

/* =========================================================
   15. Reviews and ratings
   ========================================================= */

/* Star display: a grey base row with a coloured fill clipped to a percentage width,
   so 4.7 stars renders as 4.7 stars without a single image request. */
.tex-stars {
  position: relative; display: inline-block;
  font-size: 16px; line-height: 1; letter-spacing: 2px;
  white-space: nowrap; vertical-align: middle;
}
.tex-stars--lg { font-size: 24px; }
.tex-stars__base { color: var(--c-line); }
.tex-stars__fill { position: absolute; top: 0; left: 0; overflow: hidden; color: var(--c-accent); white-space: nowrap; }

/* Compact badge in the buy box, right under the price */
.tex-rating-badge {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 14px; font-size: 13px; color: var(--c-muted);
}
.tex-rating-badge__text strong { color: var(--c-ink); font-size: 15px; }

/* ---------- Section ---------- */
.tex-reviews { margin-top: 44px; padding: 28px; max-width: 78ch; }
.tex-reviews:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--c-line); }
.tex-reviews__title { margin: 0 0 22px; font-size: 22px; }
.tex-reviews__empty { color: var(--c-body); }
.tex-reviews__closed { margin: 18px 0 0; font-size: 14px; color: var(--c-muted); }

/* ---------- Average + histogram ---------- */
.tex-rv-summary {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: 28px; align-items: center;
  padding: 22px 24px; margin-bottom: 26px;
  background: var(--c-bg-soft); border: 1px solid var(--c-line); border-radius: var(--radius);
}
.tex-rv-summary__score { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tex-rv-summary__value { font-size: 44px; font-weight: 800; line-height: 1; color: var(--c-ink); }
.tex-rv-summary__outof { font-size: 13px; color: var(--c-muted); margin-top: -6px; }
.tex-rv-summary__count { font-size: 12.5px; color: var(--c-muted); text-align: center; }

.tex-rv-hist { list-style: none; margin: 0; padding: 0; }
.tex-rv-hist__row { display: grid; grid-template-columns: 42px 1fr 34px; gap: 10px; align-items: center; margin-bottom: 6px; font-size: 13px; }
.tex-rv-hist__label { color: var(--c-muted); }
.tex-rv-hist__bar { display: block; height: 8px; background: #e3e9f2; border-radius: 999px; overflow: hidden; }
.tex-rv-hist__fill { display: block; height: 100%; background: var(--c-accent); border-radius: 999px; }
.tex-rv-hist__num { color: var(--c-muted); text-align: right; }

/* ---------- Review list ---------- */
.tex-rv-list { list-style: none; margin: 0 0 30px; padding: 0; }
.tex-rv { padding: 20px 0; border-bottom: 1px solid var(--c-line); }
.tex-rv:first-child { padding-top: 0; }
.tex-rv__head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; font-size: 13px; color: var(--c-muted); }
.tex-rv__author { font-weight: 700; color: var(--c-ink); }
.tex-rv__tag {
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  background: rgba(31,157,85,.12); color: var(--c-ok);
}
.tex-rv__title { margin: 0 0 6px; font-size: 16px; }
.tex-rv__body { font-size: 15px; color: var(--c-body); }
.tex-rv__body p:last-child { margin-bottom: 0; }

/* ---------- Submission form ---------- */
.tex-rv-form { max-width: 640px; }
.tex-rv-form .field { margin-bottom: 14px; }
.tex-rv-form .field--half { display: inline-block; width: calc(50% - 7px); vertical-align: top; }
.tex-rv-form .field--half + .field--half { margin-left: 14px; }
.tex-rv-form .field--full { display: block; width: 100%; }
.tex-rv-form input[type="text"], .tex-rv-form input[type="email"], .tex-rv-form textarea {
  width: 100%; padding: 11px 13px; font: inherit;
  border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: #fff; color: var(--c-ink);
}
.tex-rv-form input:focus, .tex-rv-form textarea:focus {
  outline: none; border-color: var(--c-brand-light); box-shadow: 0 0 0 3px rgba(22,70,127,.15);
}
.tex-rv-form textarea { min-height: 120px; resize: vertical; }
.tex-rv-form label, .tex-rate__label { display: block; font-size: 14px; font-weight: 600; color: var(--c-ink); margin-bottom: 5px; }

/* Star radio input. The inputs are emitted in reverse order (5 -> 1) and the container
   flips with row-reverse, so the CSS sibling selector fills the stars left to right. */
.tex-rate { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.tex-rate input { position: absolute; opacity: 0; width: 0; height: 0; }
.tex-rate label { margin: 0; cursor: pointer; font-size: 26px; line-height: 1; color: var(--c-line); transition: color .12s ease; }
.tex-rate label:hover, .tex-rate label:hover ~ label, .tex-rate input:checked ~ label { color: var(--c-accent); }
.tex-rate input:focus-visible + label { outline: 2px solid var(--c-brand-light); outline-offset: 2px; border-radius: 3px; }

/* Honeypot: positioned off-screen rather than display:none, because many naive bots
   skip hidden inputs entirely. */
.tex-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 700px) {
  .tex-reviews { padding: 20px; }
  .tex-rv-summary { grid-template-columns: 1fr; gap: 18px; }
  .tex-rv-form .field--half { display: block; width: 100%; }
  .tex-rv-form .field--half + .field--half { margin-left: 0; }
}
