/* ===== Tokens ===== */
:root {
  --navy: #0d2d84;
  --navy-dark: #081d57;
  --yellow: #ffd200;
  --yellow-dark: #e6b800;
  --red: #e8202a;
  --green: #4cb51c;
  --orange: #f59e0b;
  --sky: #2b8be0;

  --bg: #ffffff;
  --surface: #f4f6fb;
  --line: #dde3ee;
  --text: #1a2233;
  --muted: #5b6577;

  --radius: 14px;
  --shadow: 0 6px 24px rgba(16, 24, 40, 0.08);
  --font-head: "Kanit", "IBM Plex Sans Thai", sans-serif;
  --font-body: "IBM Plex Sans Thai", "Sarabun", sans-serif;
  --header-h: 76px;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0; color: var(--navy-dark); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.section { padding: 72px 0; }
.eyebrow {
  font-family: var(--font-head);
  font-weight: 500;
  color: #1d67b8;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

/* Roof-colour stripe taken from the logo */
.roof-stripe {
  height: 5px;
  background: linear-gradient(90deg,
    var(--navy) 0 20%, var(--sky) 20% 35%, var(--green) 35% 52%,
    var(--yellow) 52% 68%, var(--orange) 68% 84%, var(--red) 84% 100%);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .nav-toggle:focus-visible {
  outline: 3px solid var(--sky); outline-offset: 2px;
}
.btn-yellow { background: var(--yellow); color: var(--navy-dark); }
.btn-yellow:hover { background: var(--yellow-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--navy); }
.btn-sm { padding: 8px 18px; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 92px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-head); font-size: 1.15rem; color: var(--navy); }
.brand-text small { color: var(--muted); font-size: 0.8rem; }

.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-menu a:not(.btn) {
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-menu a:not(.btn):hover { color: var(--navy); border-color: var(--yellow); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; padding: 10px; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 3px; border-radius: 2px; background: var(--navy); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(10.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  background-color: var(--navy);
  background-image: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #1747b8 100%);
  color: #fff;
  overflow: hidden;
}
/* Corrugated-sheet texture */
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(4,16,48,0.16) 0 22px, transparent 22px 48px);
  pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px;
  padding-top: 72px; padding-bottom: 80px;
}
.hero .eyebrow { color: var(--yellow); }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; }
.hero h1 span { color: var(--yellow); }
.lead { margin-top: 18px; font-size: 1.1rem; color: rgba(255,255,255,0.88); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  margin-top: 40px; max-width: 520px;
}
.hero-facts li {
  border-left: 3px solid var(--yellow);
  padding: 4px 0 4px 12px;
  display: flex; flex-direction: column; line-height: 1.35;
}
.hero-facts strong { font-family: var(--font-head); font-size: 1.4rem; color: #fff; }
.hero-facts span { font-size: 0.85rem; color: rgba(255,255,255,0.75); }

.hero-visual {
  background: #fff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transform: rotate(-2deg);
}

/* ===== Products ===== */
.products { background: var(--surface); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.section-head p:last-child { color: var(--muted); margin-top: 8px; }

.group-title {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  font-size: 1.6rem; margin: 0 0 18px;
  padding-left: 12px; border-left: 5px solid var(--yellow);
}
.group-title span { font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.card-grid + .group-title { margin-top: 48px; }

.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid-2 .card { flex-direction: row; }
.card-grid-2 .card-media { flex: 0 0 42%; aspect-ratio: auto; min-height: 100%; }

.card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(16, 24, 40, 0.12); }
.card-media { aspect-ratio: 16 / 10; background: #e9eef8; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media.placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background:
    repeating-linear-gradient(90deg, #dfe6f3 0 14px, #eef2f9 14px 32px);
  color: var(--muted); font-size: 0.85rem; line-height: 1.4;
}
.card-media.placeholder span { background: rgba(255,255,255,0.85); padding: 6px 12px; border-radius: 8px; border: 1px dashed #b4bfd6; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h4, .card-title { font-size: 1.25rem; }
.card-body > p:not(.price) { color: var(--muted); font-size: 0.95rem; }
.specs { display: flex; flex-direction: column; gap: 2px; font-size: 0.9rem; }
.specs li { position: relative; padding-left: 16px; }
.specs li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 7px; height: 7px; border-radius: 2px; background: var(--yellow); }
.price { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--muted); }
.price strong { font-family: var(--font-head); color: var(--red); font-size: 1.15rem; }

.note { margin-top: 28px; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* ===== Calculator ===== */
.calculator { background: var(--surface); }
.calc-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: start; }
.calc-diagram { margin: 0; max-width: 340px; align-self: center; width: 100%; }
.calc-diagram svg { width: 100%; height: auto; display: block; font-family: var(--font-body); }

.calc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.calc-hint, .calc-note { font-size: 0.85rem; color: var(--muted); }
.calc-result {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center;
  background: var(--navy);
  color: #fff;
  border-radius: 12px;
  padding: 20px 22px;
}
.calc-main { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; padding: 4px 24px 4px 4px; border-right: 1px solid rgba(255,255,255,0.2); }
.calc-main span { font-size: 0.9rem; color: rgba(255,255,255,0.8); }
.calc-main strong { font-family: var(--font-head); font-size: 3.2rem; color: var(--yellow); line-height: 1.1; }
.calc-main small { font-size: 0.9rem; color: rgba(255,255,255,0.8); }
.calc-stats { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.calc-stats div { display: flex; justify-content: space-between; gap: 12px; font-size: 0.95rem; }
.calc-stats dt { color: rgba(255,255,255,0.8); }
.calc-stats dd { margin: 0; font-weight: 600; color: #fff; text-align: right; }
.calc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.calc-actions .btn { flex: 1 1 auto; }
.btn-ghost { background: transparent; border-color: #c8d0e0; color: var(--navy); }
.btn-ghost:hover { border-color: var(--navy); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.contact-info h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.contact-info > p:not(.eyebrow) { color: var(--muted); margin-top: 10px; }
.contact-list { margin-top: 28px; display: flex; flex-direction: column; }
.contact-list li {
  display: grid; grid-template-columns: 96px 1fr; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.contact-list .label { font-family: var(--font-head); font-weight: 500; color: var(--navy); }
.contact-list a { font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.ph { color: #a2560c; background: #fff4d6; font-style: normal; font-size: 0.88rem; padding: 3px 8px; border-radius: 6px; display: inline-block; line-height: 1.4; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.contact-form h3 { font-size: 1.35rem; margin-bottom: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.95rem; }
.field > span { font-weight: 500; }
.field b { color: var(--red); }
.field input, .field select, .field textarea {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c8d0e0;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
.field textarea { resize: vertical; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--red); }
.error { color: var(--red); font-size: 0.82rem; min-height: 0; }
.error:empty { display: none; }
.form-status { font-size: 0.95rem; }
.form-status:empty { display: none; }
.form-status.ok { color: #1d7a33; background: #e7f6ea; padding: 10px 14px; border-radius: 10px; }

.muted { color: var(--muted); font-size: 0.85rem; }

/* ===== Nav: current page ===== */
.nav-menu a[aria-current="page"] { color: var(--navy); border-color: var(--yellow); }

/* ===== Home: 2 choices ===== */
.hero-home .container { position: relative; z-index: 1; padding-top: 56px; padding-bottom: 64px; }
.home-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.home-head .lead { margin: 14px auto 0; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.choice {
  display: flex; flex-direction: column; gap: 8px;
  background: #fff; color: var(--text);
  border-radius: 20px;
  padding: 28px 28px 24px;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  border: 3px solid transparent;
  transition: transform .2s, border-color .2s;
}
.choice:hover { transform: translateY(-4px); border-color: var(--yellow); }
.choice:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.choice-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--yellow); color: var(--navy-dark);
  display: grid; place-items: center; margin-bottom: 6px;
}
.choice-icon svg { width: 40px; height: 40px; }
.choice-tag { font-size: 0.85rem; font-weight: 600; color: #1d67b8; }
.choice-title { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--navy-dark); line-height: 1.2; }
.choice-desc { color: var(--muted); }
.choice-list { margin: 6px 0 10px; display: flex; flex-direction: column; gap: 4px; font-size: 0.95rem; }
.choice-list li { position: relative; padding-left: 18px; }
.choice-list li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 8px; height: 8px; border-radius: 2px; background: var(--yellow); }
.choice-cta {
  margin-top: auto; align-self: flex-start;
  font-family: var(--font-head); font-weight: 500; font-size: 1.05rem;
  background: var(--navy); color: #fff; padding: 10px 22px; border-radius: 999px;
}
.choice:hover .choice-cta { background: var(--navy-dark); }
.home-facts { margin: 36px auto 0; }

/* ===== Sub-page hero ===== */
.page-hero .container { position: relative; z-index: 1; padding-top: 40px; padding-bottom: 48px; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; }
.page-hero h1 span { color: var(--yellow); }
.breadcrumb { font-size: 0.9rem; color: rgba(255,255,255,0.75); margin-bottom: 14px; }
.breadcrumb a { color: #fff; }
.page-jump, .page-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* product group headings on sub-pages */
.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid-single { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.group-title .num {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); color: var(--yellow);
  font-family: var(--font-head); font-size: 1rem;
}
h2.group-title { font-size: 1.6rem; }

/* ===== 3D viewer ===== */
.viewer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.viewer-stage { display: flex; flex-direction: column; gap: 10px; }
.viewer-canvas {
  position: relative;
  height: 460px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #eef2f8;
  border: 1px solid var(--line);
  cursor: grab;
  touch-action: none;
}
.viewer-canvas:active { cursor: grabbing; }
.viewer-canvas canvas { display: block; width: 100%; height: 100%; }
.viewer-failed { display: grid; place-items: center; cursor: default; }
.viewer-fallback { max-width: 32ch; text-align: center; color: var(--muted); padding: 16px; }
.viewer-views { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 0.9rem;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid #c8d0e0; background: #fff; color: var(--navy);
  cursor: pointer;
}
.chip:hover { border-color: var(--navy); }
.viewer-help { font-size: 0.85rem; color: var(--muted); }

.viewer-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; gap: 18px;
}
.opt-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.opt-group legend { font-family: var(--font-head); font-weight: 500; color: var(--navy-dark); margin-bottom: 10px; padding: 0; }
.opt-value { font-family: var(--font-body); font-weight: 500; font-size: 0.88rem; color: var(--muted); margin-left: 6px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span {
  display: block; text-align: center;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid #c8d0e0; background: #fff;
  font-size: 0.92rem; font-weight: 500;
}
.seg input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.swatches { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.swatches-under { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.swatch {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.18);
  background-size: cover;
  cursor: pointer;
  padding: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.5);
}
.swatches-under .swatch { aspect-ratio: 4 / 3; }
.swatch[aria-pressed="true"] { outline: 3px solid var(--yellow); outline-offset: 2px; border-color: var(--navy); }
.swatch:disabled { cursor: not-allowed; }
.is-disabled .swatches { opacity: 0.35; }
.opt-disabled-note { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }

/* ===== Calculator list ===== */
.calc-card .calc-diagram { margin: 2px auto 0; }
.calc-list-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: calc(var(--header-h) + 16px);
}
.calc-list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.calc-list-head h3 { font-size: 1.25rem; }
.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 0.9rem; color: var(--red); cursor: pointer; text-decoration: underline; }
.calc-empty { color: var(--muted); font-size: 0.95rem; padding: 18px; border: 1px dashed #c8d0e0; border-radius: 10px; text-align: center; }
.calc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.calc-item {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
}
.calc-item-text { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.calc-item-text strong { font-family: var(--font-head); font-weight: 500; color: var(--navy-dark); }
.calc-item-dims { font-size: 0.88rem; color: var(--muted); }
.calc-item-result { font-weight: 600; }
.icon-btn {
  flex: none; width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid #c8d0e0; background: #fff; color: var(--muted);
  cursor: pointer; font-size: 0.9rem;
}
.icon-btn:hover { color: var(--red); border-color: var(--red); }
.calc-summary { background: var(--navy); color: #fff; border-radius: 12px; padding: 16px 18px; }
.calc-summary-title { font-family: var(--font-head); color: var(--yellow); margin-bottom: 6px; }
.calc-summary ul { display: flex; flex-direction: column; gap: 4px; }
.calc-summary li { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; }
.calc-summary li span { color: rgba(255,255,255,0.85); }

/* ===== Footer ===== */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.8); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-top: 36px; padding-bottom: 24px; }
.footer-brand { font-family: var(--font-head); font-size: 1.15rem; color: #fff; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center; }
.site-footer a { color: var(--yellow); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.copyright { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 16px; padding-bottom: 24px; font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid-2 .card { flex-direction: column; }
  .card-grid-2 .card-media { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .card-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viewer-grid { grid-template-columns: 1fr; }
  .viewer-canvas { height: 400px; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-list-card { position: static; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .brand img { width: 72px; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff;
    padding: 8px 16px 16px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-call { margin-top: 12px; }

  .hero-grid { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; }
  .hero-visual { order: -1; max-width: 360px; padding: 18px; transform: rotate(-1.5deg); }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .choice-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}

@media (max-width: 560px) {
  .card-grid, .card-grid-2, .card-grid-3 { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr; gap: 16px; }
  .choice { padding: 22px 18px 20px; }
  .viewer-canvas { height: 320px; }
  .swatches { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .viewer-panel, .calc-list-card { padding: 18px 16px; }
  .page-jump .btn { flex: 1 1 100%; }
  .field-row { grid-template-columns: 1fr; }
  .contact-form, .calc-card { padding: 20px 16px; }
  .calc-result { grid-template-columns: 1fr; gap: 14px; }
  .calc-main { padding: 4px 4px 16px;  border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.2); }
  .contact-list li { grid-template-columns: 80px 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-facts strong { font-size: 1.15rem; }
  .brand-text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
  .btn:hover, .card:hover { transform: none; }
}

.home-head h1 span { white-space: nowrap; }
.calc-diagram svg[hidden] { display: none; }

/* product photos on white (not cropped) */
.card-media.photo { background: #fff; border-bottom: 1px solid var(--line, #e3e8f2); }
.card-media.photo img { object-fit: contain; }

/* LINE add-friend button */
.btn-line { background: #047a35; color: #fff; }
.btn-line:hover { background: #036029; }
.contact-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.swatches-under { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 560px) { .swatches-under { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* B2B: PVC stock photo + pattern gallery */
.pvc-stock { margin: 0 0 20px; border-radius: var(--radius, 14px); overflow: hidden; background: #e9eef8; }
.pvc-stock img { width: 100%; aspect-ratio: 1400 / 770; object-fit: cover; display: block; }
.pvc-stock figcaption { padding: 10px 16px; font-size: 0.9rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-top: 0; }
.pvc-gallery-title { margin: 36px 0 14px; font-size: 1.35rem; }
.pvc-gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.pvc-gallery figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pvc-gallery img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; }
.pvc-gallery figcaption { padding: 8px 10px 10px; font-size: 0.9rem; font-weight: 600; color: var(--navy); line-height: 1.35; }
.pvc-gallery figcaption span { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: var(--yellow); color: var(--navy-dark, #0a2263); font-size: 0.78rem; }
@media (max-width: 1024px) { .pvc-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pvc-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* B2B: coil stock photos */
.coil-gallery { list-style: none; padding: 0; margin: 14px 0 44px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.coil-gallery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: 12px; border: 1px solid var(--line); }
@media (max-width: 560px) { .coil-gallery { grid-template-columns: 1fr; gap: 10px; } }

/* ===== Articles ===== */
.article-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: 36px 0 32px; }
.article-wrap { max-width: 800px; }
.article-head .breadcrumb { color: var(--muted); }
.article-head .breadcrumb a { color: var(--navy); }
.article-head h1 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); line-height: 1.2; margin-top: 14px; color: var(--navy); }
.article-head .lead { color: var(--muted); font-size: 1.08rem; margin-top: 12px; }
.article-meta { margin-top: 14px; font-size: 0.88rem; color: var(--muted); }
.article-body { padding-top: 32px; padding-bottom: 64px; }
.article-body > p, .article-body > ul { font-size: 1.04rem; line-height: 1.85; margin-top: 16px; }
.article-body > h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin-top: 40px; color: var(--navy); }
.article-body a { color: #1764b0; text-decoration: underline; text-underline-offset: 3px; }
.article-body .btn { text-decoration: none; }
.article-body .btn-line, .article-body .btn-line:hover { color: #fff; }
.article-figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.article-figure img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; display: block; }
.table-wrap { overflow-x: auto; margin-top: 18px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.table-wrap table { border-radius: 8px; overflow: hidden; }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: 0.97rem; }
.table-wrap th, .table-wrap td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap thead th { background: var(--navy); color: #fff; font-family: var(--font-head); font-weight: 500; }
.table-wrap tbody th { color: var(--navy); font-weight: 600; background: var(--surface); }
.table-wrap tbody tr:last-child th, .table-wrap tbody tr:last-child td { border-bottom: 0; }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 28px; margin-top: 12px; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 0.6em; width: 10px; height: 10px; border-radius: 3px; background: var(--yellow); }
.checklist strong { color: var(--navy); }
.article-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 22px; }
.article-cta { margin-top: 48px; padding: 24px; border-radius: var(--radius); background: var(--navy); color: #fff; }
.article-cta h2 { font-size: 1.35rem; color: #fff; }
.article-cta p { margin-top: 8px; color: #d8e0f2; }
.article-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.6); }
.article-cta .btn-ghost:hover { border-color: #fff; }
.article-related { margin-top: 36px; }
.article-related h2 { font-size: 1.15rem; color: var(--navy); }
.article-related ul { list-style: none; padding: 0; margin-top: 10px; }
.article-related li { padding: 10px 0; border-bottom: 1px solid var(--line); }

/* "guides" teaser cards on product pages */
.guides { background: var(--surface); }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 900px; margin: 0 auto; }
.guide-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; }
.guide-card:hover { border-color: var(--navy); transform: translateY(-2px); }
.guide-card strong { font-family: var(--font-head); font-size: 1.15rem; color: var(--navy); line-height: 1.35; }
.guide-card span { color: var(--muted); font-size: 0.95rem; }
.guide-card em { font-style: normal; color: #1764b0; font-weight: 600; margin-top: auto; }
.footer-guides { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }
.footer-guides strong { display: block; margin-bottom: 2px; }
@media (max-width: 860px) { .guide-grid { grid-template-columns: 1fr; } .article-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* the hidden attribute must always win over component display rules */
[hidden] { display: none !important; }
.table-note { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }

/* spec note under the PU sheet cards */
.spec-callout {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 18px; padding: 14px 18px;
  background: #fff8db; border: 1px solid #f0d468;
  border-radius: 12px; color: #4a3b00;
}
.spec-callout-icon { flex: 0 0 22px; width: 22px; height: 22px; color: #a07c00; margin-top: 2px; }
.spec-callout p { margin: 0; font-size: 0.95rem; line-height: 1.65; }
.spec-callout strong { color: var(--navy-dark); }
.spec-callout + .group-title { margin-top: 48px; }
.form-status.err { color: #9b1c1c; background: #fdecec; padding: 10px 14px; border-radius: 10px; }
.form-status.err a { color: #9b1c1c; font-weight: 600; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
