/* ==========================================================================
   BS Battery Thailand — design system
   Colours follow bs-battery.com: red #cd1719, black, light grey #f5f5f5,
   footer #222. Red for actions and accents.
   Font: Kanit (all text)
   ========================================================================== */

/* Kanit (SIL Open Font License), self-hosted: thai + latin subsets from Google Fonts */
@font-face { font-family: 'Kanit'; font-style: italic; font-weight: 700; font-display: swap; src: url('../fonts/kanit-700i-thai.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-style: italic; font-weight: 700; font-display: swap; src: url('../fonts/kanit-700i-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Kanit'; font-style: italic; font-weight: 800; font-display: swap; src: url('../fonts/kanit-800i-thai.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-style: italic; font-weight: 800; font-display: swap; src: url('../fonts/kanit-800i-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/kanit-400-thai.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/kanit-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/kanit-500-thai.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/kanit-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/kanit-600-thai.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/kanit-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/kanit-700-thai.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/kanit-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/kanit-800-thai.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/kanit-800-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- tokens ---------- */
:root {
  /* surfaces & text */
  --c-white: #ffffff;
  --c-paper: #f5f5f5;          /* alternate section background */
  --c-line: #e6e6e6;
  --c-line-strong: #cccccc;
  --c-text: #000000;
  --c-muted: #555555;          /* 7.5:1 on white */
  /* brand */
  --c-red: #cd1719;            /* buttons, links, accents (5.4:1 on white) */
  --c-red-700: #a61415;
  --c-red-50: #fbeaea;
  /* button gradients: background-size 200% so hover slides to the darker half */
  --g-red: linear-gradient(120deg, #cd1719 0%, #b31718 50%, #a61415 100%);
  --g-dark: linear-gradient(120deg, #333333 0%, #222222 50%, #000000 100%);
  /* dark surfaces */
  --c-ink: #000000;            /* top bar, finder, dark sections */
  --c-footer: #222222;         /* footer */
  --c-ink-line: #333333;
  --c-steel: #999999;          /* secondary text on dark (7.4:1 on black, 5.5:1 on #222) */
  --c-red-bright: #ff4d4f;     /* small red text on dark */

  /* type */
  --f-display: 'Kanit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-body: 'Kanit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-hero: clamp(3rem, 6.7vw, 6rem);        /* Hero heading 72–96px */
  --fs-3xl: clamp(2.5rem, 3.9vw, 3.5rem);     /* Section heading EN 40–56px */
  --fs-2xl: clamp(1.75rem, 2.5vw, 2.25rem);   /* Thai heading 28–36px */
  --fs-section: clamp(1.75rem, 2.8vw, 2.5rem); /* home section headings, Thai and English 28–40px */
  --fs-xl: 1.375rem;
  --fs-lg: 1.125rem;
  --fs-md: 1rem;                              /* Body 16px */
  --fs-sm: .9375rem;

  /* space (4px grid) */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow-1: 0 1px 2px rgba(16, 18, 22, .05), 0 4px 14px rgba(16, 18, 22, .06);
  --shadow-2: 0 14px 34px rgba(16, 18, 22, .12);
  --container: 1480px;   /* content width 1440px + 20px side padding */
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
html, body { overflow-x: clip; }  /* closed off-canvas drawers must not widen the mobile viewport */
@supports not (overflow: clip) { body { overflow-x: hidden; } }
body { margin: 0; font-family: var(--f-body); font-size: var(--fs-md); font-weight: 400; line-height: 1.7; color: var(--c-text); background: var(--c-white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-red); text-underline-offset: 3px; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; margin: 0 0 var(--s-4); }
p { margin: 0 0 var(--s-4); }
b, strong { font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }  /* the hidden attribute always wins over component display rules */
:focus-visible { outline: 3px solid rgba(209, 0, 25, .45); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--c-red); color: #fff; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--c-red); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; }
.skip-link:focus { left: 8px; }
.icon { width: 20px; height: 20px; flex: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---------- typography ---------- */
.display { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; line-height: 1; letter-spacing: .005em; }
.display.h-xl { font-size: var(--fs-3xl); }
/* home section headings: Thai and English at the same size (28-40px) */
.h-lg.section-title, .display.section-title { font-size: var(--fs-section); line-height: 1.3; }
.h-lg, .is-th { font-family: var(--f-body); font-size: var(--fs-2xl); font-weight: 600; line-height: 1.35; letter-spacing: 0; text-transform: none; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 var(--s-2); font-family: var(--f-display); font-weight: 700; font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-red); }
.kicker::before { content: ''; width: 24px; height: 2px; background: currentColor; }
.lead { font-size: var(--fs-md); color: var(--c-muted); max-width: 48em; }   /* body text — Kanit 400 / 16px */
.muted { color: var(--c-muted); }
.tabular { font-variant-numeric: tabular-nums; }
.giant { font-family: var(--f-display); font-weight: 800; font-size: var(--fs-hero); line-height: .9; margin: 0; }

/* ---------- layout ---------- */
.section { padding: var(--s-8) 0; }
.section--tight { padding: var(--s-6) 0; }
.section--paper { background: var(--c-paper); }
.section--dark { background: var(--c-ink); color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-6); }
.section-head > div { max-width: 780px; }
.section-head h2 { margin-bottom: 0; }
.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); align-items: center; }
.split img { border-radius: var(--r-lg); width: 100%; }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: var(--s-5); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .section { padding: var(--s-7) 0; } }

/* ---------- buttons (Kanit 600 · 14–16px) ---------- */
.btn { --bg: var(--c-white); --fg: var(--c-text); --bd: var(--c-line-strong); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: var(--r-sm); border: 1.5px solid var(--bd); background: var(--bg); background-size: 200% 100%; background-position: 0 0; color: var(--fg); font-family: var(--f-body); font-weight: 600; font-size: var(--fs-sm); line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-position .35s var(--ease), background-color .2s, color .2s, border-color .2s, box-shadow .2s; }
.btn .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.btn:hover .icon:last-child { transform: translateX(2px); }
.btn--primary { --bg: var(--g-red); --fg: #fff; --bd: transparent; box-shadow: 0 4px 14px rgba(205, 23, 25, .22); }
.btn--primary:hover { background-position: 100% 0; box-shadow: 0 6px 18px rgba(205, 23, 25, .3); }
.btn--dark { --bg: var(--g-dark); --fg: #fff; --bd: transparent; }
.btn--dark:hover { background-position: 100% 0; }
.btn--ghost:hover { --bd: var(--c-text); }
.btn--light { --bg: #fff; --fg: var(--c-text); --bd: #fff; }
.btn--ghost-light { --bg: transparent; --fg: #fff; --bd: rgba(255, 255, 255, .4); }
.btn--ghost-light:hover { --bd: #fff; }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: var(--fs-md); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: .875rem; }
.btn--block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: var(--r-sm); background: none; color: inherit; cursor: pointer; }
.icon-btn:hover { background: var(--c-paper); }
.icon-btn .icon { width: 24px; height: 24px; }

/* ---------- tags ---------- */
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 500; background: var(--c-paper); color: var(--c-text); white-space: nowrap; }
.tag--red { background: var(--c-red-50); color: var(--c-red-700); }
.tag--outline { background: transparent; border: 1px solid var(--c-line-strong); }
.tier { font-family: var(--f-display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field > span { font-size: .875rem; font-weight: 500; color: var(--c-muted); }
.input, .select { width: 100%; min-height: 50px; padding: 0 16px; border: 1.5px solid var(--c-line-strong); border-radius: var(--r-sm); background: #fff; color: var(--c-text); font-size: var(--fs-md); }
.select { appearance: none; padding-right: 44px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316181b' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 18px no-repeat; cursor: pointer; }
.input:focus, .select:focus { outline: none; border-color: var(--c-red); box-shadow: 0 0 0 3px rgba(209, 0, 25, .15); }
.select:disabled { background-color: #eceef0; color: var(--c-muted); cursor: not-allowed; }
.search-input { position: relative; display: block; }
.search-input .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--c-muted); pointer-events: none; }
.search-input .input { padding-left: 44px; }
.check { display: flex; align-items: center; gap: 10px; padding: 5px 0; cursor: pointer; font-size: var(--fs-sm); }
.check input { width: 18px; height: 18px; accent-color: var(--c-red); margin: 0; flex: none; }

/* ---------- header (light) ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--c-line); transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 4px 18px rgba(16, 18, 22, .07); }
.header-inner { display: flex; align-items: center; gap: var(--s-5); height: var(--header-h); }
.logo { flex: none; display: block; }
.logo img { height: 46px; width: auto; }
.main-nav { flex: 1; display: flex; align-items: center; justify-content: flex-end; height: 100%; }
.nav-list { list-style: none; display: flex; align-items: stretch; gap: 2px; margin: 0; padding: 0; height: 100%; }
.nav-list > li { display: flex; align-items: center; }
.nav-link { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 100%; padding: 0 13px; border: 0; background: none; color: var(--c-text); cursor: pointer; font-family: var(--f-body); font-weight: 600; font-size: 1.0625rem; letter-spacing: 0; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
/* active / hover: red text only (no underline bar) */
.nav-link:hover, .nav-link[aria-expanded="true"], .nav-link[aria-current] { color: var(--c-red); }
.nav-link .caret { width: 15px; height: 15px; transition: transform .2s; }
.nav-link[aria-expanded="true"] .caret { transform: rotate(180deg); }
.nav-finder { display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; height: 42px; border-radius: 999px; background: var(--g-red); background-size: 200% 100%; transition: background-position .35s var(--ease); box-shadow: 0 4px 14px rgba(196, 0, 26, .22); color: #fff; text-decoration: none; font-family: var(--f-body); font-weight: 500; font-size: .9375rem; letter-spacing: 0; text-transform: uppercase; white-space: nowrap; }
.nav-finder .icon { width: 17px; height: 17px; }
.nav-finder:hover, .nav-finder[aria-current] { background-position: 100% 0; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.nav-toggle { display: none; color: var(--c-text); }
.drawer-head { display: none; }
.nav-backdrop { position: fixed; inset: 0; z-index: 99; background: rgba(16, 18, 22, .45); }

.has-mega { position: relative; }
.mega { position: absolute; left: 0; top: 100%; min-width: 225px; background: linear-gradient(105deg, #000 0%, #242424 100%); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s var(--ease), visibility .2s; }
.has-mega.open .mega { opacity: 1; visibility: visible; transform: none; }
.mega ul { list-style: none; margin: 0; padding: 8px 0; }
.mega a { display: block; padding: .6rem 20px; color: #fff; font-weight: 400; font-size: 1rem; line-height: 1.5; text-transform: uppercase; text-decoration: none; transition: color .15s; }
.mega a:hover, .mega a:focus-visible, .mega a[aria-current] { color: #cd1719; }

@media (max-width: 1180px) { .nav-link { padding: 0 9px; font-size: .9375rem; } }
@media (max-width: 1024px) {
  :root { --header-h: 64px; }
  .logo img { height: 38px; }
  .nav-toggle { display: inline-flex; }
  .main-nav { position: fixed; top: 0; right: 0; bottom: 0; z-index: 120; width: min(380px, 90vw); height: 100dvh; flex-direction: column; align-items: stretch; justify-content: flex-start; background: #fff; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .28s var(--ease), visibility .28s; box-shadow: -12px 0 30px rgba(16, 18, 22, .15); }
  .main-nav.open { transform: none; visibility: visible; }
  .drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 10px 20px; border-bottom: 1px solid var(--c-line); font-weight: 600; }
  .nav-list { flex-direction: column; height: auto; padding: 8px 14px; gap: 0; }
  .nav-list > li { display: block; border-bottom: 1px solid var(--c-line); }
  .nav-link { width: 100%; height: auto; justify-content: space-between; padding: 14px 6px; font-size: 1rem; }
  .nav-link[aria-current] { color: var(--c-red); }
  .nav-finder { height: 40px; padding: 0 14px; font-size: .875rem; }
  .mega { position: static; display: none; min-width: 0; background: none; opacity: 1; visibility: visible; transform: none; }
  .mega a { color: var(--c-text); padding: 10px 18px; }
  .has-mega.open .mega { display: block; }
}

/* ---------- page header (inner pages): black title band with a faded photo, like the product page ---------- */
/* same height on every page: breadcrumb + title only, centred vertically */
.page-hero { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; min-height: 180px; background: #000; color: #fff; padding: var(--s-4) 0; }
.page-hero > .container { width: 100%; }
/* min-height (not height) so an unusually long title grows the band instead of being cut off */
@media (max-width: 760px) { .page-hero { min-height: 156px; padding: 12px 0; } }
.page-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('../img/design/BS_HEADER_TEST_LITHIUM_V2-1024x576.jpg') center / cover no-repeat; opacity: .3; }
@media (min-width: 1025px) { .page-hero::before { background-image: url('../img/design/BS_HEADER_TEST_LITHIUM_V2.jpg'); } }
/* black fade over the photo: solid behind the title, lighter to the right, black at the bottom edge */
.page-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,.35) 100%), linear-gradient(180deg, rgba(0,0,0,0) 40%, #000 100%); }
.page-hero h1 { margin: var(--s-3) 0 0; font-family: var(--f-display); font-weight: 700; font-size: var(--fs-3xl); line-height: 1.05; text-transform: uppercase; max-width: 22em; color: #fff; }
.page-hero h1.is-th { font-family: var(--f-body); font-size: var(--fs-2xl); font-weight: 600; text-transform: none; line-height: 1.35; }
.page-intro { margin: 0 0 var(--s-6); }   /* intro paragraph right under the title band */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: .875rem; color: var(--c-muted); }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; opacity: .6; }
.breadcrumb a { color: var(--c-text); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-red); text-decoration: underline; }
.page-hero .breadcrumb ol { color: var(--c-steel); }
.page-hero .breadcrumb a { color: #fff; }
.page-hero .breadcrumb a:hover { color: var(--c-red-bright); }

/* ---------- home ---------- */
.home-banner { background: var(--c-ink); }
.home-banner img { width: 100%; height: auto; }
.intro { text-align: center; max-width: 960px; }
.intro .lead { margin: 0 auto var(--s-5); }
.pillars { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s-3); margin: 0; padding: 0; }
.pillars li { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: var(--r-md); border: 1px solid var(--c-line); font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .08em; text-transform: uppercase; }
.pillars .icon { color: var(--c-red); }
.video-frame { position: relative; padding-top: 56.25%; border-radius: var(--r-lg); overflow: hidden; background: var(--c-ink); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* technology cards */
@media (max-width: 1024px) { .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tech-grid { gap: var(--s-2); } .tech-card__body { padding: 12px 14px 14px; } .tech-card__name { font-size: 1.5rem; } }

/* ---------- finder panel (the one dark component) ---------- */
.finder-panel { position: relative; background: #fff; color: var(--c-text); border: 1px solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); }
.finder-panel--lift { margin-top: calc(var(--s-7) * -1); box-shadow: var(--shadow-2); z-index: 5; }
.finder-tabs { display: flex; gap: 4px; padding: 6px 6px 0; background: var(--c-paper); border-bottom: 1px solid var(--c-line); overflow-x: auto; overflow-y: hidden; }
.finder-tab { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border: 0; border-radius: var(--r-md) var(--r-md) 0 0; background: transparent; color: var(--c-muted); font-family: var(--f-body); font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; cursor: pointer; }
.finder-tab .icon { width: 20px; height: 20px; }
.finder-tab[aria-selected="true"] { background: #fff; color: var(--c-text); box-shadow: inset 0 3px 0 var(--c-red); }
.finder-tab[aria-selected="true"] .icon { color: var(--c-red); }
.finder-tab:hover { color: var(--c-text); }
.finder-body { padding: var(--s-6); }
.finder-body h2 { font-family: var(--f-display); font-weight: 700; font-size: 1.9rem; margin-bottom: var(--s-4); }
.finder-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: var(--s-3); align-items: end; }
.finder-form--code { grid-template-columns: minmax(0, 1fr) auto; }
.finder-form .field > span { color: var(--c-muted); }
.finder-form .input, .finder-form .select { border-color: var(--c-line-strong); }
.finder-form .select:disabled { background-color: #eceef0; border-color: var(--c-line); color: var(--c-muted); }
.finder-hint { margin: var(--s-3) 0 0; font-size: .875rem; color: var(--c-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.finder-hint .search-input { width: min(320px, 100%); }
.finder-hint .input { min-height: 40px; }
.finder-status { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); flex-wrap: wrap; margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--c-line); color: var(--c-muted); }
.finder-status strong { color: var(--c-text); }
.finder-status a { color: var(--c-text); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 500; }
.finder-status a .icon { color: var(--c-red); width: 18px; height: 18px; }
@media (max-width: 860px) { .finder-form { grid-template-columns: 1fr; } .finder-body { padding: var(--s-5); } }


/* battery finder results use the normal product cards (.product-grid) */
.finder-result-title { margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
@media (min-width: 761px) { .finder-result-title { white-space: nowrap; } }
@media (max-width: 640px) { .finder-result-title { font-size: 1.0625rem; } }


/* ---------- product card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s-5); }
.p-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; transition: box-shadow .25s var(--ease), border-color .2s; }
.p-card:hover { box-shadow: var(--shadow-2); border-color: transparent; }
.p-card__media { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: #fff; overflow: hidden; }
.p-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.p-card:hover .p-card__media img { transform: scale(1.03); }
.p-card__body { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px 18px; border-top: 1px solid var(--c-line); flex: 1; }
.p-card__meta { font-size: .8125rem; color: var(--c-muted); font-weight: 500; }
.p-card__name { font-size: 1.0625rem; font-weight: 600; line-height: 1.4; margin: 0; }   /* Product name — Kanit 600 / 17px */
.p-card__name a { color: var(--c-text); text-decoration: none; }
.p-card__name a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.p-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.p-card__cta { font-weight: 600; font-size: var(--fs-sm); color: var(--c-text); display: inline-flex; align-items: center; gap: 4px; }
.p-card__cta .icon { width: 16px; height: 16px; transition: transform .2s; }
.p-card:hover .p-card__cta .icon { transform: translateX(3px); }   /* black link (image and price are already red); the arrow nudges on hover */
.p-card__price { font-size: 1.25rem; font-weight: 700; color: var(--c-red); }
.compare-toggle { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--c-muted); cursor: pointer; }
.compare-toggle input { width: 16px; height: 16px; accent-color: var(--c-red); margin: 0; }

/* ---------- technical specs (Kanit 400–500 · 14–16px) ---------- */
.spec-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.spec-chips li { display: flex; align-items: baseline; gap: 2px; padding: 1px 6px; border-radius: 3px; background: #333; color: #fff; font-size: .6875rem; line-height: 1.45; text-transform: uppercase; }   /* small, quieter than the product name */
.spec-chips b { font-weight: 500; font-size: .6875rem; }
.spec-chips span { color: #fff; font-weight: 400; font-size: .625rem; }   /* unit in the same white as the number */
.spec-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; margin: 0; }
.spec-tiles > div { background: #fff; padding: 12px 16px; }
.spec-tiles dt { font-size: .875rem; font-weight: 500; color: var(--c-muted); }
.spec-tiles dd { margin: 2px 0 0; font-family: var(--f-display); font-weight: 700; font-size: 1.8rem; line-height: 1.1; }
.spec-tiles dd small { font-family: var(--f-body); font-size: .875rem; font-weight: 500; color: var(--c-muted); margin-left: 4px; }
@media (max-width: 480px) { .spec-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.spec-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.spec-table th, .spec-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.spec-table th { width: 42%; font-weight: 500; color: var(--c-muted); background: var(--c-paper); }
.spec-table tr:last-child > * { border-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--r-md); background: #fff; }

/* ---------- lists & cards ---------- */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before { content: ''; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--c-red); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d10019' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.x-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.x-list li { position: relative; padding: 12px 16px 12px 44px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-sm); }
.x-list li::before { content: ''; position: absolute; left: 16px; top: 15px; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23565c64' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat; }
.card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: var(--s-5); }
.card h3 { font-size: var(--fs-xl); margin-bottom: var(--s-2); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-sm); background: #fff8e6; border: 1px solid #f3d27a; font-size: var(--fs-sm); color: #5c4400; }
.notice .icon { color: #9a6b00; margin-top: 2px; }
.empty-state { text-align: center; padding: var(--s-8) var(--s-5); background: var(--c-paper); border-radius: var(--r-lg); }
.empty-state .icon { width: 40px; height: 40px; color: var(--c-muted); margin: 0 auto var(--s-3); }
.empty-state h3 { font-size: var(--fs-xl); }
.empty-state p { color: var(--c-muted); max-width: 32em; margin: 0 auto var(--s-4); }
.milestones { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--c-line); }
.milestones li { position: relative; padding: 0 0 var(--s-4) var(--s-5); }
.milestones li::before { content: ''; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--c-red); }
.milestones b { display: block; font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; color: var(--c-red); }

/* warranty */
.warranty-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.warranty-card { padding: var(--s-6); border-radius: var(--r-lg); background: #fff; border: 1px solid var(--c-line); border-top: 4px solid var(--c-red); }
.warranty-card .kicker { margin-bottom: var(--s-3); }
.warranty-card strong { display: block; font-family: var(--f-display); font-weight: 700; font-size: clamp(2.6rem, 5vw, 3.5rem); line-height: 1; }
.warranty-card p { color: var(--c-muted); margin: var(--s-2) 0 0; }
@media (max-width: 640px) { .warranty-cards { grid-template-columns: 1fr; } }
.help-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: var(--s-5); border-radius: var(--r-md); border: 1px solid var(--c-line); background: #fff; transition: border-color .2s; }
.help-card:hover { border-color: var(--c-text); }
.help-card .icon { width: 28px; height: 28px; color: var(--c-red); }
.help-card h3 { font-size: var(--fs-lg); margin: 0; }
.help-card h3 a { color: var(--c-text); text-decoration: none; }
.help-card h3 a::after { content: ''; position: absolute; inset: 0; }
.help-card p { margin: 0; color: var(--c-muted); font-size: var(--fs-sm); }

/* comparison table */
.compare-matrix { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; }
.compare-matrix th, .compare-matrix td { padding: 14px 18px; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; font-size: var(--fs-sm); }
.compare-matrix thead th { position: sticky; top: var(--header-h); background: #fff; border-bottom: 3px solid var(--c-red); font-family: var(--f-display); font-weight: 700; font-size: 1.4rem; text-transform: uppercase; }
.compare-matrix tbody th { background: var(--c-paper); width: 200px; font-weight: 500; }

/* ---------- dealers ---------- */
.region-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.region-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--c-line-strong); background: #fff; color: var(--c-text); text-decoration: none; font-weight: 500; font-size: var(--fs-sm); cursor: pointer; }
.region-chip b { font-weight: 600; color: var(--c-red); }
.region-chip:hover { border-color: var(--c-text); }
.region-chip[aria-pressed="true"] { background: var(--c-text); border-color: var(--c-text); color: #fff; }
.region-chip[aria-pressed="true"] b { color: #fff; }
.dealer-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s-4); align-items: center; margin-bottom: var(--s-5); }
.view-toggle { display: inline-flex; border: 1.5px solid var(--c-line-strong); border-radius: var(--r-sm); overflow: hidden; }
.view-toggle[hidden] { display: none; }
.view-toggle button { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 40px; border: 0; background: #fff; color: var(--c-muted); cursor: pointer; }
.view-toggle button + button { border-left: 1.5px solid var(--c-line-strong); }
.view-toggle button:hover { color: var(--c-text); }
.view-toggle button[aria-pressed="true"] { background: #000; color: #fff; }
.view-toggle .icon { width: 19px; height: 19px; }
.dealer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }   /* 3 shops per row */
@media (max-width: 1024px) { .dealer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .dealer-grid { grid-template-columns: 1fr; } }
.dealer-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); }
.dealer-card__top { display: flex; gap: 14px; align-items: center; }
.dealer-card__logo { width: 60px; height: 60px; flex: none; border-radius: var(--r-sm); border: 1px solid var(--c-line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dealer-card__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.dealer-card__logo span { font-family: var(--f-display); font-weight: 700; font-size: 1.4rem; color: var(--c-muted); }
.dealer-card h3 { font-size: var(--fs-md); margin: 0; line-height: 1.4; }
.dealer-card .region { font-size: .8125rem; color: var(--c-red); font-weight: 500; }
.dealer-card address { font-style: normal; font-size: var(--fs-sm); color: var(--c-muted); line-height: 1.6; }
.dealer-card__phone { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: var(--fs-sm); line-height: 1.6; color: var(--c-text); }
.dealer-card__phone .icon { width: 15px; height: 15px; flex: none; margin-top: .3em; color: var(--c-red); }
.dealer-card__phone a { color: inherit; font-weight: 500; text-decoration: none; white-space: nowrap; }
.dealer-card__phone a:hover { color: var(--c-red); text-decoration: underline; }
/* route + Facebook: equal-width buttons spanning the card (one button fills the row on its own) */
.dealer-card__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-top: auto; padding-top: 4px; }
.dealer-card__actions .btn { width: 100%; justify-content: center; }
.dealer-card__fb .icon { color: #1877f2; }   /* Facebook logo in its own blue */
.dealer-card__fb:hover { border-color: #1877f2; }
.dealer-card__info { display: flex; flex-direction: column; gap: 6px; }
/* list view: one shop per row — name | address + phone | buttons */
.dealer-grid--list { grid-template-columns: 1fr; gap: var(--s-3); }
.dealer-grid--list .dealer-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 280px; gap: var(--s-5); align-items: center; }
.dealer-grid--list .dealer-card__actions { margin: 0; padding: 0; }
@media (max-width: 1024px) {
  .dealer-grid--list .dealer-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--s-3) var(--s-5); }
  .dealer-grid--list .dealer-card__actions { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .dealer-tools { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); }
  .dealer-tools .search-input { grid-column: 1 / -1; }
  .dealer-grid--list .dealer-card { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- products page: Battery Finder bar + filter card + product grid ---------- */
.shop { background: var(--c-paper); padding: var(--s-6) 0 var(--s-8); }
.shop-finder { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: var(--s-5); padding: 16px 18px; border-radius: var(--r-md); background: var(--g-dark); color: #fff; scroll-margin-top: calc(var(--header-h) + 16px); }
.shop-finder p { margin: 0; }
.shop-finder__head { display: flex; align-items: center; gap: 12px; padding-right: 8px; }
.shop-finder__icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--c-red); }
.shop-finder__icon .icon { width: 24px; height: 24px; color: #fff; }
.shop-finder__title { font-weight: 600; line-height: 1.35; }
.shop-finder__sub { font-weight: 700; font-size: .875rem; letter-spacing: .12em; color: var(--c-red-bright); }
.shop-finder .select { min-height: 48px; border-color: #fff; }
.shop-finder .select:disabled { background-color: #3a3a3a; border-color: #3a3a3a; color: #999; }
.shop-finder__go { min-height: 48px; padding: 0 26px; }
/* products page: white finder bar so it does not merge with the dark banner above */
.shop .shop-finder { background: #fff; color: var(--c-text); border: 1px solid var(--c-line); box-shadow: var(--shadow-1); }
.shop .shop-finder__sub { color: var(--c-red); }
.shop .shop-finder .select { border-color: var(--c-line-strong); }
.shop .shop-finder .select:disabled { background-color: #eceef0; border-color: var(--c-line); color: var(--c-muted); }
@media (max-width: 1100px) { .shop-finder { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; } .shop-finder__head { grid-column: 1 / -1; } }
@media (max-width: 560px) { .shop-finder { grid-template-columns: 1fr; } .shop-finder__go { width: 100%; justify-content: center; } }

.catalog { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.catalog > * { min-width: 0; }

/* filter card */
.filters { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); }
.filters__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: #fff; color: var(--c-text); border-bottom: 1px solid var(--c-line); }
.filters__head strong { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; font-weight: 600; }
.filters__head strong .icon { width: 18px; height: 18px; color: var(--c-red); }
.filters__reset { color: var(--c-red); font-size: var(--fs-sm); text-decoration: none; }
.filters__reset:hover { text-decoration: underline; }
.filters__close { display: none; color: var(--c-text); }
.filter-group { margin: 0; padding: 14px 18px 16px; border: 0; border-top: 1px solid var(--c-line); }
.filters__head + .filter-group { border-top: 0; }
.filter-group legend { float: left; width: 100%; margin: 0 0 10px; padding: 0; font-weight: 600; font-size: .9375rem; }
.filter-group > :not(legend) { clear: both; }
/* checkbox rows (battery types, other products) */
.filter-option { display: flex; align-items: center; gap: 10px; margin: 0 -8px; padding: 7px 8px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-sm); }
.filter-option:hover { background: var(--c-paper); }
.filter-option input { appearance: none; width: 18px; height: 18px; flex: none; margin: 0; border: 1.5px solid var(--c-line-strong); border-radius: 4px; background: #fff center / 12px no-repeat; cursor: pointer; }
.filter-option input:checked { border-color: var(--c-red); background-color: var(--c-red); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E"); }
.filter-option input:focus-visible { outline: 2px solid var(--c-red); outline-offset: 2px; }
.filter-option input:checked + span { font-weight: 600; }
/* pill toggles (voltage, Ah, CCA) */
.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-pill { position: relative; cursor: pointer; }
.filter-pill input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.filter-pill span { display: inline-block; padding: 6px 12px; border: 1.5px solid var(--c-line-strong); border-radius: 999px; background: #fff; font-size: .8125rem; font-weight: 500; line-height: 1.4; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.filter-pill:hover span { border-color: #000; }
.filter-pill input:checked + span { background: #000; border-color: #000; color: #fff; }
.filter-pill input:focus-visible + span { outline: 2px solid var(--c-red); outline-offset: 2px; }
.filters__apply, .filters-toggle { display: none; }

/* results */
.catalog-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); padding: 10px 16px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); }
.catalog-bar__count { margin: 0; color: var(--c-muted); }
.catalog-bar__count strong { margin-right: 4px; font-size: 1.25rem; color: var(--c-red); }
.catalog-main .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-4); }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-4); }
.active-filters a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 12px; border-radius: 999px; background: var(--c-text); color: #fff; text-decoration: none; font-size: .8125rem; font-weight: 500; }
.active-filters a .icon { width: 14px; height: 14px; }
.active-filters a.reset { background: #fff; color: var(--c-red); border: 1px solid var(--c-line); }

/* tablet / mobile: filters slide in from the right */
@media (max-width: 960px) {
  .catalog { grid-template-columns: 1fr; }
  .filters-toggle { display: inline-flex; }
  .filters { position: fixed; inset: 0 0 0 auto; z-index: 130; width: min(380px, 92vw); max-height: none; height: 100dvh; border: 0; border-radius: 0; display: flex; flex-direction: column; transform: translateX(100%); visibility: hidden; transition: transform .28s var(--ease), visibility .28s; box-shadow: var(--shadow-2); }
  .filters.open { transform: none; visibility: visible; }
  .filters__close { display: inline-flex; }
  .filters__apply { display: flex; gap: 8px; position: sticky; bottom: 0; margin-top: auto; padding: 12px 18px; background: #fff; border-top: 1px solid var(--c-line); }
  .filters__apply .btn:last-child { flex: 1; }
}
@media (max-width: 480px) {
  .catalog-main .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* two cards per row: tighter body, price above the link */
  .catalog-main .p-card__body { padding: 10px 12px 12px; gap: 8px; }
  .catalog-main .p-card__name { font-size: .9375rem; }
  .catalog-main .p-card__foot { flex-direction: column; align-items: flex-start; gap: 2px; }
  .catalog-main .p-card__price { font-size: 1.0625rem; }
  .catalog-main .p-card__cta { white-space: nowrap; font-size: .8125rem; }
}
.compare-bar { position: fixed; left: 50%; bottom: 16px; z-index: 90; transform: translate(-50%, 140%); display: flex; align-items: center; gap: var(--s-3); padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--c-ink); color: #fff; box-shadow: var(--shadow-2); transition: transform .3s var(--ease); max-width: calc(100vw - 24px); }
.compare-bar.show { transform: translate(-50%, 0); }
.compare-bar__items { display: flex; gap: 6px; overflow-x: auto; }
.compare-bar__items span { font-family: var(--f-display); font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #34373d; white-space: nowrap; }
.compare-bar button.link { background: none; border: 0; color: var(--c-steel); cursor: pointer; text-decoration: underline; font-size: .8125rem; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: var(--s-6); flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); border: 1px solid var(--c-line); text-decoration: none; color: var(--c-text); font-weight: 500; }
.pagination a:hover { border-color: var(--c-text); }
.pagination .current { background: var(--c-text); border-color: var(--c-text); color: #fff; }

/* ---------- product detail ---------- */
.pd-top { background: var(--c-paper); border-bottom: 1px solid var(--c-line); padding: var(--s-5) 0 var(--s-7); }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); align-items: start; }
/* the photo column follows the scroll while the long details on the right are read (desktop, when it fits the screen) */
@media (min-width: 901px) {
  .pd-gallery { position: sticky; top: calc(var(--header-h) + 20px); }
  /* on short screens shrink the photo so the photo + contact buttons always fit below the header */
  .pd-gallery .pd-media { width: min(100%, calc(100vh - var(--header-h) - 240px)); margin-inline: auto; }
}
.pd-media { border-radius: var(--r-lg); background: #fff; border: 1px solid var(--c-line); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pd-media img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.pd-thumbs button { width: 70px; height: 70px; padding: 4px; border-radius: var(--r-sm); border: 2px solid var(--c-line); background: #fff; cursor: pointer; }
.pd-thumbs button[aria-current="true"] { border-color: var(--c-red); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd-info h1 { font-family: var(--f-display); font-weight: 800; font-size: clamp(3rem, 6.4vw, 5.5rem); line-height: .95; text-transform: uppercase; margin: var(--s-3) 0 var(--s-2); }
.pd-info .pd-name { font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-weight: 600; margin-bottom: var(--s-5); }  /* Product name — Kanit 600 / 20–24px */
.pd-info .pd-name small { display: block; font-size: var(--fs-sm); font-weight: 400; color: var(--c-muted); }
.pd-info .spec-tiles { margin-bottom: var(--s-5); }
.pd-price { display: flex; align-items: baseline; gap: 10px; margin: var(--s-3) 0 var(--s-4); color: var(--c-muted); font-weight: 500; }
.pd-price strong { color: var(--c-red); font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.pd-ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.pd-meta { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-4); font-size: var(--fs-sm); color: var(--c-muted); }
.pd-meta span { display: inline-flex; align-items: center; gap: 6px; }
.pd-meta a { color: inherit; }
.pd-meta .icon { width: 18px; height: 18px; color: var(--c-red); }
.pd-nav { position: sticky; top: var(--header-h); z-index: 20; background: #fff; border-bottom: 1px solid var(--c-line); }
.pd-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; overflow-x: auto; }
.pd-nav a { display: block; padding: 14px; color: var(--c-muted); text-decoration: none; font-weight: 500; font-size: var(--fs-sm); white-space: nowrap; border-bottom: 3px solid transparent; }
.pd-nav a:hover, .pd-nav a.active { color: var(--c-text); border-color: var(--c-red); }
.pd-section { padding: var(--s-7) 0; border-bottom: 1px solid var(--c-line); }
.pd-section:last-child { border-bottom: 0; }
.pd-section h2 { font-size: var(--fs-2xl); }
.pd-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); }
.fitment-group { border: 1px solid var(--c-line); border-radius: var(--r-md); margin-bottom: 8px; overflow: hidden; }
.fitment-group summary { display: flex; justify-content: space-between; padding: 14px 18px; cursor: pointer; font-weight: 600; list-style: none; }
.fitment-group summary::-webkit-details-marker { display: none; }
.fitment-group summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--c-red); }
.fitment-group[open] summary::after { content: '−'; }
.fitment-group ul { list-style: none; margin: 0; padding: 0 18px 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.fitment-group a { display: inline-block; padding: 6px 12px; border-radius: var(--r-sm); background: var(--c-paper); color: var(--c-text); text-decoration: none; font-size: var(--fs-sm); }
.fitment-group a:hover { background: var(--c-red); color: #fff; }
@media (max-width: 900px) { .pd-grid, .pd-two { grid-template-columns: 1fr; gap: var(--s-5); } .pd-media { max-width: 460px; margin: 0 auto; width: 100%; } }

/* ---------- rich content (admin-edited HTML) ---------- */
.prose { font-size: var(--fs-md); max-width: 820px; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: 1.6rem; margin: 1.8em 0 .6em; }
.prose h3 { font-size: 1.25rem; margin: 1.5em 0 .5em; padding-left: 12px; border-left: 4px solid var(--c-red); }
.prose figure { margin: 1.5em 0; }
.prose img { border-radius: var(--r-md); height: auto; }
.prose ul:not([class]) { padding-left: 1.3em; }
.prose .check-list { margin: 1em 0; }
.prose .note { color: var(--c-muted); font-size: var(--fs-sm); border-top: 1px solid var(--c-line); padding-top: 14px; margin-top: 28px; }
.prose .feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 1.4em 0; }
.prose .feature-grid .feature { background: var(--c-paper); border-radius: var(--r-md); padding: 18px; }
.prose .feature-grid h4 { margin: 0 0 6px; }
.prose .feature-grid p { margin: 0; color: var(--c-muted); }
.prose .video { position: relative; padding-top: 56.25%; margin: 1.5em 0; }
.prose .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--r-md); }
.prose table { width: 100%; border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--c-line); padding: 8px 10px; }

/* ---------- news ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-5); }
.post-card { position: relative; display: flex; flex-direction: column; border-radius: var(--r-md); overflow: hidden; background: #fff; border: 1px solid var(--c-line); transition: box-shadow .25s; }
.post-card:hover { box-shadow: var(--shadow-2); }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card__body { padding: 16px 20px 20px; }
.post-card time { font-size: .8125rem; color: var(--c-muted); }
.post-card h3 { font-size: var(--fs-lg); margin: 4px 0 0; line-height: 1.45; }
.post-card h3 a { color: var(--c-text); text-decoration: none; }
.post-card h3 a::after { content: ''; position: absolute; inset: 0; }
.article { max-width: 820px; margin: 0 auto; }
.article-cover { width: 100%; border-radius: var(--r-lg); margin-bottom: var(--s-5); }
.map-embed { position: relative; padding-top: 42%; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--c-line); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 760px) { .map-embed { padding-top: 75%; } }

/* ---------- CTA band + footer (dark) ---------- */
/* ---------- dealer recruit banner (above the footer) ---------- */
.recruit { padding: 60px 0; color: #fff; background: linear-gradient(135deg, rgba(15,15,15,.95) 0%, rgba(30,30,30,.8) 100%), url('../img/design/Untitled-2-01-1-1260x936.webp') center / cover no-repeat #111; }
.recruit__inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.recruit__title { margin: 0 0 15px; font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 700; line-height: 1.3; color: #fff; }
.recruit__title span { color: var(--c-red); letter-spacing: 1px; white-space: nowrap; }
.recruit__phones { display: flex; align-items: center; gap: 15px; margin: 0; font-size: clamp(1.1rem, 1.6vw, 1.35rem); font-weight: 500; }
.recruit__label { color: var(--c-red); font-weight: 700; }
.recruit__numbers { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 15px; }
.recruit__numbers a { color: #fff; text-decoration: none; white-space: nowrap; transition: color .2s; }
.recruit__numbers a:hover { color: var(--c-red); text-decoration: underline; }
.recruit__numbers a:not(:last-child)::after { content: '|'; display: inline-block; margin-left: 15px; color: #444; pointer-events: none; }
.recruit__btn { display: inline-flex; flex: none; align-items: center; gap: 10px; padding: 16px 40px; border: 2px solid var(--c-red); border-radius: 999px; background: var(--c-red); color: #fff; font-size: 1.25rem; font-weight: 700; text-decoration: none; white-space: nowrap; box-shadow: 0 6px 20px rgba(205,23,25,.4); transition: background-color .3s, border-color .3s, transform .3s, box-shadow .3s; }
.recruit__btn .icon { width: 20px; height: 20px; }
.recruit__btn:hover { background: var(--c-red-700); border-color: var(--c-red-700); color: #fff; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(205,23,25,.5); }
@media (max-width: 768px) {
  .recruit { padding: 45px 0; }
  .recruit__inner { flex-direction: column; gap: 30px; text-align: center; }
  .recruit__inner > div { width: 100%; }
  .recruit__title { margin-bottom: 20px; }
  .recruit__phones { flex-direction: column; gap: 8px; }
  .recruit__numbers { flex-direction: column; gap: 12px; width: 100%; }
  .recruit__numbers a { width: 100%; max-width: 280px; padding: 8px 20px; border: 1px solid rgba(255,255,255,.1); border-radius: 6px; background: rgba(255,255,255,.05); font-size: 1.25rem; }
  .recruit__numbers a:not(:last-child)::after { content: none; }
  .recruit__btn { width: 100%; max-width: 320px; justify-content: center; padding: 15px 20px; font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { .recruit__btn:hover { transform: none; } }

/* ---------- compact footer ---------- */
.site-footer { padding: 30px 0 15px; background: #111; border-top: 3px solid var(--c-red); color: #fff; }
.site-footer p { margin: 0; }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.site-footer__logos { display: flex; align-items: center; gap: 20px; flex: none; }
.site-footer__logos img { display: block; width: auto; height: 32px; }
.site-footer__logos a { display: block; }
.site-footer__logos a + a img { height: 28px; }   /* Comp-Moto logo */
.site-footer__contact { flex: 1 1 auto; padding-left: 25px; border-left: 1px solid #333; font-size: 11.5px; line-height: 1.5; color: #bbb; }
.site-footer__contact strong { color: #fff; }
.site-footer a { color: #fff; text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--c-red); }
.site-footer__links { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.site-footer__menu { display: flex; gap: 15px; margin: 0; padding: 0; list-style: none; }
.site-footer__menu a { font-size: 14px; font-weight: 500; }   /* Thai labels, same order as the header menu */
.site-footer__meta { display: flex; align-items: center; gap: 15px; font-size: 12px; color: #aaa; }
.site-footer__contact a { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: 2px; }   /* links inside the sentence: not by colour alone */
.site-footer a.site-footer__mail { color: var(--c-red-bright); font-weight: 500; }   /* #ff4d4f: 5.6:1 on #111 (brand red is 3.2:1) */
.site-footer a.site-footer__mail:hover { color: #ff8a8b; }
.site-footer__fb { display: inline-flex; }
.site-footer__fb .icon { width: 20px; height: 20px; }
.site-footer a.site-footer__fb { color: #1877f2; }   /* Facebook blue, same as the product page */
.site-footer a.site-footer__fb:hover { color: #4a95f5; }
.site-footer__bottom { margin-top: 20px; padding-top: 15px; border-top: 1px solid #222; color: #999; font-size: 11px; line-height: 1.4; text-align: center; }   /* 6.6:1 on #111 */
.site-footer__bottom a { color: #ccc; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 991px) {
  .site-footer { padding: 40px 0 20px; }
  .site-footer__inner { flex-direction: column; gap: 25px; text-align: center; }
  .site-footer__contact { padding-left: 0; border-left: 0; }
  .site-footer__links { align-items: center; }
  .site-footer__menu { flex-wrap: wrap; justify-content: center; gap: 10px 15px; }
  .site-footer__meta { flex-direction: column; gap: 5px; }
}

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: var(--s-8) 20px; }
.notfound .giant { color: var(--c-red); }
.notfound .actions { display: flex; gap: var(--s-3); justify-content: center; flex-wrap: wrap; }
@media (max-width: 400px) { .nav-finder { padding: 0 12px; gap: 6px; } .logo img { height: 34px; } }

/* home: one-row finder */
.quick-finder-band { background: var(--g-dark); padding: var(--s-5) 0; }   /* home: full-width black band, same content as the /products/ Battery Finder */
.quick-finder { margin: 0; padding: 0; border-radius: 0; background: none; }

/* home: "OUR PRODUCTS" cards (original format) */
.section-head--center { justify-content: center; text-align: center; }
.section-head--center .kicker { justify-content: center; }
.product-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.product-tile { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); padding-bottom: var(--s-5); background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: var(--c-text); transition: box-shadow .25s var(--ease), border-color .2s; }
.product-tile:hover { box-shadow: var(--shadow-2); border-color: transparent; }
.product-tile__media { width: 100%; aspect-ratio: 1; overflow: hidden; }
.product-tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.product-tile:hover .product-tile__media img { transform: scale(1.03); }
.product-tile__name { font-family: var(--f-display); font-weight: 700; font-size: 1.9rem; line-height: 1; }
@media (max-width: 760px) { .product-tiles { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }

/* home: link-only sections (warranty, dealers) */

/* ---------- structure taken from the old site ---------- */
.top-bar { background: var(--c-ink); color: #fff; font-size: .8125rem; }
.top-bar .container { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--s-5); padding-block: 7px; }
.top-bar a { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; }
.top-bar a:hover { text-decoration: underline; }
.top-bar .icon { width: 15px; height: 15px; color: var(--c-red-bright); }
@media (max-width: 760px) { .top-bar { display: none; } }

.intro__logo { display: block; width: 196px; height: auto; margin: 0 auto var(--s-4); }
.section--video { padding: var(--s-7) 0; }

/* products page banner: dark photo (old site's catalog image) + title */
.mini-banner { position: relative; padding: 60px 0; color: #fff; text-align: center; background: linear-gradient(90deg, rgba(10,10,10,.96), rgba(10,10,10,.85)), url('../img/design/BS-Battery-THAI-Catalog-1024x289.jpg') center / cover no-repeat #0a0a0a; }
@media (min-width: 1025px) { .mini-banner { background-image: linear-gradient(90deg, rgba(10,10,10,.96), rgba(10,10,10,.85)), url('../img/design/BS-Battery-THAI-Catalog-2048x578.jpg'); } }
.mini-banner__title { margin: 0 0 10px; font-family: var(--f-display); font-weight: 700; font-size: clamp(2.5rem, 5vw, 3.8rem); line-height: 1.2; letter-spacing: 2px; text-transform: uppercase; color: #fff; }
.mini-banner__title span { color: var(--c-red); }
.mini-banner h1 { margin: 0; font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 400; letter-spacing: 1px; color: #ddd; }

@media (max-width: 991px) { .mini-banner { padding: 48px 0; } }
@media (max-width: 576px) { .mini-banner { padding: 40px 0; } }


.pd-code { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: clamp(1.75rem, 2.8vw, 2.5rem); line-height: 1.3; }   /* full product name, e.g. แบตเตอรี่ MF รหัส BTZ5S-BS */
.pd-divider { border: 0; border-top: 1px solid var(--c-line); margin: var(--s-4) 0; }
.pd-subhead { margin: var(--s-6) 0 var(--s-3); font-size: var(--fs-xl); font-weight: 600; }
.pd-info .pd-meta { margin: var(--s-2) 0 0; }
.capsule-links { display: grid; gap: var(--s-2); margin-top: var(--s-4); }
.capsule-links a { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: 8px 8px 8px 18px; border: 1px solid var(--c-line); border-radius: 999px; color: var(--c-text); text-decoration: none; font-weight: 500; transition: border-color .2s; }
.capsule-links a:hover { border-color: var(--c-red); }
.capsule-links span { display: inline-flex; align-items: center; gap: 8px; }
.capsule-links .icon { color: var(--c-red); }
.capsule-links b { flex: none; width: 168px; padding: 8px 12px; border-radius: 999px; background: var(--g-red); color: #fff; font-size: var(--fs-sm); font-weight: 600; text-align: center; }   /* same width on both links */
/* Facebook link in Facebook blue */
.capsule-links a.capsule-links__fb .icon { width: 22px; height: 22px; color: #1877f2; }
.capsule-links a.capsule-links__fb b { background: #1877f2; }
.capsule-links a.capsule-links__fb:hover { border-color: #1877f2; }
@media (max-width: 400px) { .capsule-links b { width: 140px; } }
.pd-related { margin: 0 0 var(--s-8); }

/* ---------- home: why choose (old site's last home section, trimmed copy approved 2026-11-04) ---------- */
.why { padding: var(--s-8) 0; }
.why__header { margin-bottom: var(--s-6); }
.why__header h2 { margin: 0; }
.why__header h2 span { display: inline-block; color: var(--c-red); }
.why__header p { margin: var(--s-1) 0 0; font-size: var(--fs-lg); color: var(--c-muted); }
.why-chapter { display: grid; grid-template-areas: "head" "media" "body"; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); padding-block: var(--s-7); border-top: 1px solid var(--c-line); }
.why-chapter:last-child { padding-bottom: 0; }
.why-chapter__head { grid-area: head; }
.why-chapter__body { grid-area: body; display: flex; flex-direction: column; gap: var(--s-4); }
.why-chapter__tag { display: flex; align-items: center; gap: 8px; margin: 0 0 var(--s-2); font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .08em; }
.why-chapter__tag .icon { color: var(--c-red); }
.why-chapter__head h3 { margin: 0 0 var(--s-1); font-size: clamp(1.75rem, 2.5vw, 2.25rem); font-weight: 600; line-height: 1.3; }
.why-chapter__head p:last-child { margin: 0; font-size: var(--fs-lg); }
.why-nb { white-space: nowrap; }
.why-poster { grid-area: media; display: block; justify-self: center; width: 100%; max-width: 520px; height: auto; border: 1px solid var(--c-line); border-radius: var(--r-md); }
.why-types { list-style: none; display: grid; gap: var(--s-2); margin: 0; padding: 0; }
.why-types a { position: relative; display: block; height: 100%; padding: 12px 40px 14px 16px; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-paper); color: var(--c-text); text-decoration: none; transition: border-color .15s, background-color .15s; }
.why-types a:hover { border-color: var(--c-red); background: #fff; }
.why-types strong { display: block; font-family: var(--f-display); font-weight: 700; font-size: 1.6rem; line-height: 1.2; }
.why-types a:hover strong { color: var(--c-red); }
.why-types small { display: block; font-size: var(--fs-sm); color: var(--c-muted); }
.why-types .icon { position: absolute; top: 16px; right: 14px; color: var(--c-muted); }
.why-types a:hover .icon { color: var(--c-red); }
.why-features { list-style: none; margin: 0; padding: 0; }
.why-features li { display: flex; align-items: center; gap: 12px; padding-block: 10px; border-top: 1px solid var(--c-line); font-weight: 500; }
.why-features li:last-child { border-bottom: 1px solid var(--c-line); }
.why-features .icon { flex: none; color: var(--c-muted); }
.why-closing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); }
.why-closing p { flex: 1 1 auto; margin: 0; font-size: 1.0625rem; font-weight: 600; }
@media (min-width: 560px) { .why-types { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  .why-chapter { grid-template-areas: ". media" "head media" "body media" ". media"; grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); grid-template-rows: 1fr auto auto 1fr; column-gap: var(--s-7); }
  .why-chapter--flip { grid-template-areas: "media ." "media head" "media body" "media ."; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); }
  .why-poster { justify-self: stretch; max-width: none; }
}

/* ---------- home: news update (EICMA 2026) ---------- */
.nb { white-space: nowrap; }  /* keeps names together when Thai text wraps */
.news-update { padding: var(--s-7) 0; background: var(--c-ink); color: #fff; }
.news-update__title { margin: 0; }
.news-update__title span { color: var(--c-red); }
.news-update .news-feature { border-top-color: var(--c-ink-line); }
.news-update .news-feature__story p { color: #ccc; }
.news-feature { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--c-line); }
.news-feature__photo { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
.news-feature__story { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.news-feature__story h3 { margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.35; }
.news-feature__story p { margin: 0; font-size: var(--fs-md); text-wrap: pretty; }   /* same 16px body text as the other home sections */
/* red arrow label, after the signs on the booth */
.arrow-band { display: flex; align-items: stretch; gap: 5px; font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 500; line-height: 1.2; text-transform: uppercase; }
.arrow-band__label { padding: .55em 1.5em .55em .75em; background: var(--c-red); color: #fff; font-style: italic; font-weight: 700; white-space: nowrap; clip-path: polygon(0 0, calc(100% - .8em) 0, 100% 50%, calc(100% - .8em) 100%, 0 100%); }
.arrow-band i { width: .95em; margin-left: -.5em; background: var(--c-red); clip-path: polygon(0 0, 16% 0, 100% 50%, 16% 100%, 0 100%, 84% 50%); }
.arrow-band i + i { opacity: .7; }
@media (min-width: 900px) {
  .news-feature { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--s-7); align-items: center; }
  .news-feature__story h3 { font-size: 1.5rem; }
}

/* ---------- technology page (MF / SLA / SLA MAX / LITHIUM), laid out like the old site ---------- */
.tech-banner { position: relative; height: clamp(180px, 36vw, 560px); overflow: hidden; background: #000; }
.tech-banner img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.tech-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 15%, rgba(0, 0, 0, .55) 50%, rgba(0, 0, 0, .9) 80%, #000 100%); pointer-events: none; }
.tech-page { max-width: 1340px; margin: 0 auto; padding: 0 20px var(--s-8); }
.tech-pack { display: flex; justify-content: center; margin-top: clamp(-160px, -9vw, -40px); position: relative; z-index: 1; }
.tech-pack img { width: 100%; max-width: 700px; height: auto; }
.tech-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); margin-top: var(--s-5); }
.tech-card { display: flex; flex-direction: column; background: #f8f8f8; border-radius: 20px; box-shadow: 0 0 10px rgba(0, 0, 0, .25); overflow: hidden; }
.tech-card--wide { grid-column: 1 / -1; }
.tech-card__head { margin: 0; padding: 6px 16px; background: var(--c-red); color: #fff; text-align: center; font-size: 1.25rem; font-weight: 600; line-height: 1.5; }
.tech-card__body { flex: 1; padding: var(--s-5) var(--s-5) var(--s-6); }
.tech-card__body--center { display: flex; flex-direction: column; align-items: center; gap: var(--s-5); }
.tech-card__badge { display: block; width: 80px; height: 80px; margin: 0 auto var(--s-4); padding: 16px 12px; border-radius: 50%; background: var(--c-red); object-fit: contain; }
.tech-card__badge[src*="sla-max"] { padding: 10px 6px; }
.tech-card__text { margin: 0; text-indent: 2em; }
.tech-card__img { width: 100%; max-width: 365px; height: auto; }
.tech-card__img--sm { max-width: 220px; }
.tech-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tech-list li { position: relative; padding-left: 26px; }
.tech-list--dot li::before { content: ''; position: absolute; left: 2px; top: .45em; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle, var(--c-red) 0 2.5px, #fff 3px 3.5px, var(--c-red) 4px); }
.tech-list--tick li::before { content: ''; position: absolute; left: 4px; top: .3em; width: 6px; height: 11px; border: solid var(--c-red); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.tech-features { list-style: none; margin: 0; padding: 0 var(--s-5); columns: 2; column-gap: var(--s-7); }
.tech-features li { display: flex; gap: 14px; align-items: flex-start; padding: var(--s-2) 0 var(--s-3); break-inside: avoid; }
.tech-features img { flex: none; width: 34px; height: 34px; }
.tech-features strong { display: block; font-weight: 600; }
.tech-features span { display: block; color: var(--c-muted); font-size: var(--fs-sm); }
.tech-extra { margin: var(--s-7) auto 0; }
.tech-related { margin-top: var(--s-7); }
.tech-related__tab { display: inline-block; margin: 0; padding: 10px 70px 10px 16px; background: #000; color: #fff; font-size: 1.5rem; font-weight: 600; line-height: 1.3; clip-path: polygon(0 0, calc(100% - 50px) 0, 100% 100%, 0 100%); }
.tech-related__box { padding: var(--s-4) var(--s-4) var(--s-5); background: #f8f8f8; border-top: 3px solid #000; border-radius: 0 0 20px 20px; box-shadow: 0 4px 10px rgba(0, 0, 0, .15); }
@media (max-width: 900px) {
  .tech-cards { grid-template-columns: 1fr; }
  .tech-features { columns: 1; padding: 0; }
}
@media (max-width: 560px) { .tech-related__tab { font-size: 1.25rem; padding-right: 56px; } }
/* about page intro photo: the PNG has wide empty bands above and below the batteries, so show only the middle */
.about-intro__img { width: 100%; aspect-ratio: 1454 / 700; object-fit: cover; object-position: center 60%; }

/* ---------- mobile header: hamburger (left) | logo (centre) | battery finder (right) ---------- */
@media (max-width: 1024px) {
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; }
  .header-actions { display: contents; }
  .nav-toggle { grid-column: 1; grid-row: 1; justify-self: start; margin-left: -8px; }
  .logo { grid-column: 2; grid-row: 1; }
  .nav-finder { grid-column: 3; grid-row: 1; justify-self: end; }
  /* the menu now opens from the left, next to its button */
  .main-nav { left: 0; right: auto; transform: translateX(-100%); box-shadow: 12px 0 30px rgba(16, 18, 22, .15); }
}
@media (max-width: 480px) {
  .logo img { height: 32px; }
  .nav-finder { height: 34px; padding: 0 10px; gap: 5px; font-size: .75rem; box-shadow: none; }
  .nav-finder .icon { width: 14px; height: 14px; }
}
/* very small phones (320px): icon-only finder button so it never runs into the centred logo; the text stays for screen readers */
@media (max-width: 359px) {
  .nav-finder { width: 36px; height: 36px; padding: 0; justify-content: center; font-size: 0; }
  .nav-finder .icon { width: 16px; height: 16px; }
}
/* page behind the open menu: dimmed and slightly blurred */
.nav-backdrop { background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* ---------- mobile type scale: headings sized for small screens ---------- */
@media (max-width: 640px) {
  :root {
    --fs-3xl: 1.75rem;      /* English page / section titles 28px */
    --fs-2xl: 1.375rem;     /* Thai headings 22px */
    --fs-section: 1.5rem;   /* home section headings 24px */
    --fs-xl: 1.1875rem;
  }
  .mini-banner__title { font-size: 1.875rem; letter-spacing: 1px; }
  .mini-banner h1 { font-size: 1.0625rem; }
  .finder-body h2 { font-size: 1.25rem; }
  .milestones b { font-size: 1.125rem; }
  .warranty-card strong { font-size: 2rem; }
  .product-tile__name { font-size: 1.375rem; }
  .prose h2 { font-size: 1.25rem; }
  .prose h3 { font-size: 1.0625rem; }
  .recruit__title { font-size: 1.25rem; }
  .recruit__phones, .recruit__numbers a { font-size: 1.0625rem; }
  .recruit__btn { font-size: 1.0625rem; }
  .pd-code { font-size: 1.375rem; }
  .pd-price strong { font-size: 1.5rem; }
  .page-hero h1 { font-size: var(--fs-3xl); }
  .intro__logo { display: none; }   /* the header already shows the logo on phones */
  .pillars { gap: var(--s-2); }
  .pillars li { padding: 8px 14px; font-size: .9375rem; gap: 8px; }
  .pillars .icon { width: 18px; height: 18px; }
}
/* the header sits above the backdrop, so blur its own items while the menu is open */
body.nav-open .site-header .logo, body.nav-open .site-header .nav-finder { filter: blur(3px); opacity: .6; pointer-events: none; }

/* ---------- mobile spacing: tighter top / bottom on phones ---------- */
@media (max-width: 640px) {
  .section, .section--video, .news-update { padding: 36px 0; }
  .section--tight { padding: 24px 0; }
  .quick-finder-band { padding: 20px 0; }
  .shop { padding: 20px 0 40px; }
  .tech-page { padding-bottom: 40px; }
  .pd-related { margin-bottom: 40px; }
  .recruit { padding: 36px 0; }
  .site-footer { padding: 28px 0 16px; }
  .intro .lead { margin-bottom: var(--s-4); }
  .section-head { margin-bottom: var(--s-4); }
}

/* ---------- floating contact (bottom right): one button opens call sales / email / Facebook; back-to-top above it ---------- */
.float-actions { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.float-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; color: #fff; cursor: pointer; text-decoration: none; transition: transform .2s, box-shadow .2s, opacity .25s, visibility .25s, background-color .2s; }
/* main toggle */
.float-btn--toggle { position: relative; width: 56px; height: 56px; background: var(--c-red); box-shadow: 0 8px 22px rgba(205, 23, 25, .4); }
.float-btn--toggle .icon { position: absolute; width: 26px; height: 26px; transition: opacity .2s, transform .25s; }
.float-btn--toggle .icon-close { opacity: 0; transform: rotate(-90deg); }
.is-open .float-btn--toggle { background: #111; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
.is-open .float-btn--toggle .icon-open { opacity: 0; transform: rotate(90deg); }
.is-open .float-btn--toggle .icon-close { opacity: 1; transform: none; }
.float-btn--toggle:hover { transform: translateY(-2px); }
/* menu items: label pill + round icon, shown only while open */
.float-menu { position: absolute; right: 4px; bottom: 68px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }   /* the empty box must not catch clicks meant for the back-to-top button */   /* opens above the toggle; takes no space while closed */
.is-open .float-btn--top { opacity: 0; visibility: hidden; }   /* the open menu covers its spot */
.float-menu .float-btn { gap: 10px; border-radius: 999px; opacity: 0; visibility: hidden; transform: translateY(12px) scale(.9); pointer-events: none; }
.is-open .float-menu .float-btn { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.is-open .float-menu .float-btn:nth-child(3) { transition-delay: 0s; }
.is-open .float-menu .float-btn:nth-child(2) { transition-delay: .04s; }
.is-open .float-menu .float-btn:nth-child(1) { transition-delay: .08s; }
.float-menu .icon { box-sizing: border-box; width: 48px; height: 48px; padding: 12px; border-radius: 50%; background: var(--fb-bg, #333); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.float-btn--phone { --fb-bg: var(--c-red); }
.float-btn--mail { --fb-bg: #222; }
.float-btn--fb { --fb-bg: #1877f2; }
.float-btn--fb .icon { padding: 10px; }
.float-btn__label { padding: 6px 12px; border-radius: 999px; background: #111; color: #fff; font-size: .8125rem; font-weight: 500; white-space: nowrap; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.float-menu .float-btn:hover .float-btn__label { background: var(--c-red); }
/* back to top */
.float-btn--top { width: 44px; height: 44px; margin-right: 6px; background: #222; box-shadow: 0 6px 16px rgba(0, 0, 0, .22); }
.float-btn--top .icon { width: 20px; height: 20px; }
.float-btn--top:hover { transform: translateY(-2px); color: #fff; }
.float-btn--top:not(.is-visible) { opacity: 0; visibility: hidden; transform: translateY(8px); }
@media (max-width: 640px) {
  .float-actions { right: 12px; bottom: 12px; gap: 10px; }
  .float-btn--toggle { width: 50px; height: 50px; }
  .float-menu { bottom: 60px; }
  .float-btn--toggle .icon { width: 23px; height: 23px; }
  .float-menu .icon { width: 44px; height: 44px; padding: 11px; }
  .float-btn--fb .icon { padding: 9px; }
  .float-btn--top { width: 40px; height: 40px; margin-right: 5px; }
}
/* keep them out of the way while the site menu or the filter drawer is open */
body.nav-open .float-actions, body:has(.filters.open) .float-actions { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .float-btn, .float-btn .icon { transition: none; } }

/* ---------- footer menu: one line on phones ---------- */
@media (max-width: 640px) {
  .site-footer__menu { flex-wrap: nowrap; justify-content: center; gap: 5px; }
  .site-footer__menu a { font-size: 11px; white-space: nowrap; }
}
@media (max-width: 374px) { .site-footer__menu { gap: 4px; margin-inline: -10px; } .site-footer__menu a { font-size: 10px; } }

/* battery finder page: search panel band (grey) → results (white) → accessories (grey) */
.finder-zone { padding: var(--s-6) 0; background: var(--c-paper); border-bottom: 1px solid var(--c-line); }
.finder-extra { border-top: 1px solid var(--c-line); }
@media (max-width: 640px) { .finder-zone { padding: 20px 0; } }

/* finder form: year still needed for this model */
.finder-form .select.is-required { border-color: var(--c-red); box-shadow: 0 0 0 3px rgba(205, 23, 25, .15); }

/* battery finder page rhythm: search band, then results / product list / accessories with equal, tighter spacing */
.finder-zone { padding: 40px 0; }
.finder-zone ~ .section { padding: 48px 0 56px; }
.finder-head { margin-bottom: var(--s-5); }
@media (max-width: 640px) {
  .finder-zone { padding: 20px 0; }
  .finder-zone ~ .section { padding: 28px 0 32px; }
  .finder-head { margin-bottom: var(--s-4); }
  .finder-zone ~ .section .pagination { margin-top: var(--s-5); }
}

/* admin "ดูตัวอย่าง" bar (only for signed-in admins opening ?preview=1) */
.preview-bar { position: sticky; top: 0; z-index: 200; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px; padding: 8px 16px; background: #fff4d6; border-bottom: 1px solid #f0d58a; color: #6b4a00; font-size: 14px; text-align: center; }
.preview-bar a { color: #6b4a00; font-weight: 600; }

/* finder tabs on phones: both tabs visible, equal width, label may wrap */
@media (max-width: 560px) {
  .finder-tabs { overflow: visible; }
  .finder-tab { flex: 1 1 0; min-width: 0; justify-content: center; gap: 6px; padding: 10px 8px; font-size: .8125rem; line-height: 1.25; white-space: normal; text-align: left; }
  .finder-tab .icon { width: 18px; height: 18px; flex: none; }
}

/* Dealers: region chips scroll sideways on phones (one row instead of three) */
@media (max-width: 640px) {
  .region-chips { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
    margin-inline: -20px; padding-inline: 20px; scroll-padding-inline: 20px; padding-bottom: 2px; }
  .region-chips::-webkit-scrollbar { display: none; }
  .region-chip { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
}

/* Product without a photo yet: faded logo instead of an empty box */
img.no-photo, .pd-media img.no-photo { width: 45% !important; height: auto !important; object-fit: contain !important; opacity: .18; filter: grayscale(1); margin: auto; }

/* ---------- page loading bar (app.js): thin red line at the top while the next page loads ---------- */
.page-loading { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000; pointer-events: none; background: var(--c-red); box-shadow: 0 0 8px rgba(205, 23, 25, .6); transform: scaleX(0); transform-origin: 0 50%; opacity: 0; }
/* fast at first, then slows down near the end: the new page replaces it when it arrives */
.page-loading.is-loading { opacity: 1; transform: scaleX(.92); transition: transform 10s cubic-bezier(.08, .8, .2, 1), opacity .2s; }
.page-loading.is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: page-loading-shine 1.1s linear infinite; }
@keyframes page-loading-shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
