/*
Theme Name: PCM Tests
Theme URI: https://pcmtests.com
Author: PCM Tests
Author URI: https://pcmtests.com
Description: Custom theme for PCM Tests — pool & spa water testing products.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
License: Proprietary
Text Domain: pcm-tests
Domain Path: /languages
*/

/* ============================================================
   DESIGN SYSTEM — CSS Custom Properties
   ============================================================ */
:root {
  /* Brand Colors */
  --color-primary: #0048ff;
  --color-primary-dark: #001a5e;
  --color-primary-light: #eef3ff;
  --color-secondary: #dfdfdf;
  --color-secondary-dark: #d3d3d3;
  --color-white: #ffffff;
  --color-text: #1a1a2e;
  --color-text-muted: #5a6080;
  --color-border: #dde3f5;

  /* Typography */
  --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  /* 12px */
  --font-size-sm: 0.875rem;
  /* 14px */
  --font-size-base: 1rem;
  /* 16px */
  --font-size-md: 1.125rem;
  /* 18px */
  --font-size-lg: 1.375rem;
  /* 22px */
  --font-size-xl: 2rem;
  /* 32px */
  --font-size-2xl: 2.75rem;
  /* 44px */
  --font-size-3xl: 3.5rem;
  /* 56px */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semi: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;

  /* Layout */
  --container-max: 1200px;
  --header-height: 80px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 72, 255, 0.10);
  --shadow-md: 0 6px 24px rgba(0, 72, 255, 0.15);
  --shadow-lg: 0 16px 48px rgba(0, 72, 255, 0.20);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
}

.section {
  position: relative;
}

.section--padded {
  padding: var(--space-xl) 0;
}

.section--padded-sm {
  padding: var(--space-lg) 0;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: center;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-center {
  text-align: center;
}

.text-white {
  color: var(--color-white);
}

.text-primary {
  color: var(--color-primary);
}

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */
.heading-hero {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-black);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.heading-1 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.heading-2 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-black);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.heading-3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-black);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.body-lg {
  font-size: var(--font-size-md);
  line-height: 1.7;
}

.body-sm {
  font-size: var(--font-size-sm);
}

/* ============================================================
   WAVE DIVIDERS
   ============================================================ */
.wave-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  /* Squish the very dramatic wave down to a subtle height */
  height: clamp(40px, 5vw, 80px);
  margin-top: calc(-1 * clamp(40px, 5vw, 80px) - (-1px));
  /* Match height perfectly */
  margin-bottom: -1px;
  position: relative;
  z-index: 10;
  pointer-events: none;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-family: var(--font-family);
  font-weight: var(--font-weight-semi);
  font-size: var(--font-size-sm);
  line-height: 1;
  padding: 0.75em 1.75em;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.02em;
}

/* Solid Primary (blue fill) */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: 2px solid var(--color-primary);
}

.btn-primary:hover {
  background-color: #0038e0;
  border-color: #0038e0;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Solid Secondary (yellow fill) */
.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-primary-dark);
  border: 2px solid var(--color-secondary);
}

.btn-secondary:hover {
  background-color: var(--color-secondary-dark);
  border-color: var(--color-secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 209, 0, 0.35);
}

/* Outline (white border for dark backgrounds) */
.btn-outline-white {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn-outline-white:hover {
  background-color: var(--color-white);
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* Outline Primary (blue border for light backgrounds) */
.btn-outline-primary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline-primary:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* Pill nav buttons (small) */
.btn-pill {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semi);
  padding: 0.5em 1.2em;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-white);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  transition: all var(--transition-fast);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.btn-pill:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--color-white);
}

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-primary);
  height: var(--header-height);
  box-shadow: 0 2px 16px rgba(0, 72, 255, 0.3);
}

/* WP Admin Bar Offset */
.admin-bar #site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar #site-header {
    top: 46px;
  }
}

.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-md);
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  flex-shrink: 0;
}

.custom-logo-link img,
.site-logo img,
.site-logo svg {
  max-height: 65px;
  width: auto;
  max-width: 100%;
  display: block;
}

.site-logo .logo-mark {
  width: 44px;
  height: 44px;
  background: var(--color-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-black);
  font-size: 1rem;
  color: var(--color-primary-dark);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.site-logo .logo-text {
  font-weight: var(--font-weight-black);
  font-size: var(--font-size-md);
  color: var(--color-white);
  line-height: 1;
  letter-spacing: -0.01em;
}

.site-logo .logo-text span {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Primary Navigation */
#primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

#primary-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

#primary-nav a {
  display: block;
  padding: 0.5em 0.85em;
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

#primary-nav a:hover,
#primary-nav .current-menu-item>a {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.12);
}

/* Dropdown */
#primary-nav .menu-item-has-children {
  position: relative;
}

#primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: var(--space-xs) 0;
  z-index: 100;
  flex-direction: column;
  gap: 0;
}

#primary-nav .menu-item-has-children:hover .sub-menu {
  display: flex;
}

#primary-nav .sub-menu a {
  color: var(--color-text);
  padding: 0.6em 1.2em;
  border-radius: 0;
  font-size: var(--font-size-sm);
}

#primary-nav .sub-menu a:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
}

/* Mobile Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease, width 0.3s ease;
  transform-origin: center;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   ICONS
   ============================================================ */
.tabler--test-pipe {
  display: inline-block;
  width: 24px;
  height: 24px;
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M20 8.04L7.878 20.164a2.857 2.857 0 1 1-4.041-4.04L15.959 4M7 13h8m4 2l1.5 1.6a2 2 0 1 1-3 0zM15 3l6 6'/%3E%3C/svg%3E");
  background-color: currentColor;
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
      rgba(0, 26, 94, 0.72) 0%,
      rgba(0, 72, 255, 0.40) 55%,
      rgba(0, 72, 255, 0.05) 100%);
  z-index: 1;
}

.hero-inner {
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: var(--space-xl) 0;
  /* Reduced padding since we now have 2 cols */
}

@media (max-width: 768px) {
  .hero-content {
    padding-bottom: var(--space-md);
  }

  .hero-product-image {
    transform: translateY(-40px);
  }
}

.hero-image-col {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  /* Add subtle animation delay for image */
}

.hero-product-image {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 26, 94, 0.4));
  transform: translateY(-30px);
  /* Adjust vertical alignment if needed */
}

.hero-eyebrow {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-primary-dark);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35em 1em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: var(--font-weight-black);
  line-height: 1.05;
  color: var(--color-white);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.hero-subtitle {
  font-size: var(--font-size-md);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
  margin-bottom: var(--space-md);
  max-width: 440px;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ============================================================
   SECTION: PRODUCT INTRO (Yellow background)
   ============================================================ */
#section-product-intro {
  background-color: var(--color-white);
  position: relative;
}

#section-product-intro .section-text {
  color: var(--color-primary-dark);
}

#section-product-intro .heading-2 {
  color: var(--color-primary-dark);
  margin-bottom: var(--space-sm);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: var(--font-weight-black);
}

#section-product-intro p {
  color: rgba(0, 26, 94, 0.85);
  font-size: var(--font-size-md);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.product-icon-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.product-icon-wrapper svg {
  width: 44px;
  height: 44px;
  color: var(--color-primary);
}

#section-product-intro .product-image-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

#section-product-intro img {
  max-width: 100%;
  border-radius: var(--radius-md);
  filter: drop-shadow(0 16px 32px rgba(0, 26, 94, 0.2));
}

/* ============================================================
   SECTION: SPLIT (Home Owners / Service Pros)
   ============================================================ */
#section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}

.split-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: var(--space-lg);
  min-height: 440px;
}

.split-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform var(--transition-slow);
  z-index: 0;
}

.split-panel:hover::before {
  transform: scale(1.05);
}

.split-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(0, 26, 94, 0.80) 0%,
      rgba(0, 26, 94, 0.20) 60%,
      transparent 100%);
  z-index: 1;
}

.split-panel-content {
  position: relative;
  z-index: 2;
  color: var(--color-white);
}

.split-panel-title {
  font-size: var(--font-size-xl);
  color: var(--color-white);
  margin-bottom: var(--space-xs);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: var(--font-weight-black);
}

.split-panel-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-secondary);
  font-weight: var(--font-weight-semi);
  font-size: var(--font-size-sm);
  transition: gap var(--transition-fast);
  text-decoration: none;
}

.split-panel-link:hover {
  gap: 12px;
}

.split-panel-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.split-panel-link:hover svg {
  transform: translateX(4px);
}

/* ============================================================
   SECTION: ABOUT / QUALITY
   ============================================================ */
#section-about {
  background: var(--color-white);
}

#section-about .heading-2 {
  color: var(--color-primary-dark);
  margin-bottom: var(--space-sm);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: var(--font-weight-black);
}

#section-about p {
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: var(--space-sm);
}

.about-underline {
  width: 60px;
  height: 4px;
  background: var(--color-secondary);
  border-radius: 2px;
  margin-bottom: var(--space-md);
  margin-top: var(--space-xs);
}

/* ============================================================
   SECTION: VIDEO FEATURE
   ============================================================ */
#section-video {
  position: relative;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-color: var(--color-primary-dark);
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#section-video::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 26, 94, 0.55) 0%, rgba(0, 26, 94, 0.75) 100%);
  z-index: 1;
}

.video-inner {
  position: relative;
  z-index: 2;
}

.video-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: var(--color-white);
  transition: all var(--transition-base);
  cursor: pointer;
  margin-bottom: var(--space-sm);
  backdrop-filter: blur(4px);
}

.video-play-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: var(--color-white);
  transform: scale(1.1);
}

.video-play-btn svg {
  width: 28px;
  height: 28px;
  margin-left: 4px;
  /* optical alignment for play icon */
  fill: var(--color-white);
}

.video-label {
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
  margin-top: 0;
}

.video-title {
  color: var(--color-white);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-black);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 480px;
  margin: 0 auto var(--space-md);
}

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background-color: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-xl) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.footer-logo-link {
  display: block;
  text-decoration: none;
}

.footer-logo-img {
  max-height: 52px;
  width: auto;
  display: block;
}

.footer-logo-wrap .logo-mark {
  width: 40px;
  height: 40px;
  background: var(--color-secondary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-black);
  font-size: 0.9rem;
  color: var(--color-primary-dark);
}

.footer-tagline {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-desc {
  font-size: var(--font-size-sm);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--space-md);
  max-width: 260px;
}

.social-links {
  display: flex;
  gap: var(--space-xs);
}

.social-link {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: rgba(255, 255, 255, 0.7);
}

.social-link:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: var(--color-primary-dark);
  transform: translateY(-2px);
}

.social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.footer-col-title {
  color: var(--color-white);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.footer-nav-list li {
  margin-bottom: 0.6em;
}

.footer-col .footer-nav-list a[href^="mailto"] {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  color: var(--color-secondary);
  font-size: var(--font-size-sm);
  font-weight: 600;
  word-break: break-all;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.35em 0.85em;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-col .footer-nav-list a[href^="mailto"]::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2300b4d8'%3E%3Cpath d='M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z'/%3E%3Cpath d='M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.footer-col .footer-nav-list a[href^="mailto"]:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: var(--color-secondary);
  transform: translateY(-2px);
  color: var(--color-secondary);
}

.footer-nav-list a {
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}

.footer-nav-list a:hover {
  color: var(--color-secondary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.45);
}

.footer-legal {
  display: flex;
  gap: var(--space-md);
}

.footer-legal a {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.45);
  transition: color var(--transition-fast);
}

.footer-legal a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(16px);
  transition: all var(--transition-base);
  pointer-events: none;
  z-index: 999;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-in-delay-1 {
  transition-delay: 0.1s;
}

.animate-in-delay-2 {
  transition-delay: 0.2s;
}

.animate-in-delay-3 {
  transition-delay: 0.3s;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 68px;
    --space-xl: 3.5rem;
    --space-2xl: 5rem;
  }

  /* background-attachment: fixed is broken on iOS/Safari — use scroll instead */
  #section-video {
    background-attachment: scroll;
    min-height: 400px;
  }

  .heading-hero {
    font-size: 2.25rem;
  }

  .heading-1 {
    font-size: 2rem;
  }

  .heading-2 {
    font-size: 2rem;
  }

  .header-inner {
    display: flex;
    justify-content: space-between;
    gap: var(--space-xs);
  }

  .site-logo .logo-text {
    display: none;
  }

  .custom-logo-link img,
  .site-logo img,
  .site-logo svg {
    max-height: 44px;
  }

  #primary-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-primary-dark);
    padding: var(--space-md);
    z-index: 999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  }

  .admin-bar #primary-nav {
    top: calc(var(--header-height) + 32px);
  }

  @media screen and (max-width: 782px) {
    .admin-bar #primary-nav {
      top: calc(var(--header-height) + 46px);
    }
  }

  #primary-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  #primary-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  #primary-nav a {
    padding: 0.85em 1em;
    width: 100%;
    font-size: var(--font-size-base);
    border-radius: 0;
  }

  #primary-nav a:focus {
    outline: none;
  }

  #primary-nav a:hover,
  #primary-nav .current-menu-item > a {
    border-radius: 0;
    border-left: 3px solid rgba(255, 255, 255, 0.8);
    padding-left: calc(1em - 3px);
    background: rgba(255, 255, 255, 0.12);
  }

  #primary-nav .sub-menu {
    position: static;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-sm);
    margin-top: var(--space-xs);
  }

  #primary-nav .sub-menu a {
    color: rgba(255, 255, 255, 0.8);
  }

  #primary-nav .sub-menu a:hover {
    color: var(--color-secondary);
    background: rgba(255, 255, 255, 0.05);
  }

  .nav-toggle {
    display: flex;
  }

  .header-actions .btn-amazon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    gap: 0;
  }

  .header-actions .btn-amazon .amazon-text {
    display: none;
  }

  .header-actions .btn-amazon .amazon-icon {
    width: 24px;
    height: 24px;
  }

  .grid-2col {
    grid-template-columns: 1fr;
  }

  .grid-3col {
    grid-template-columns: 1fr;
  }

  #section-split {
    grid-template-columns: 1fr;
  }

  .split-panel {
    min-height: 320px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   WORDPRESS SPECIFIC OVERRIDES
   ============================================================ */
.wp-block-image {
  margin: 0;
}

.entry-content>*+* {
  margin-top: 0;
}

.wp-block-buttons {
  gap: var(--space-xs);
}

/* Admin bar offset */
.admin-bar #site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar #site-header {
    top: 46px;
  }
}

/* ============================================================
   SINGLE PRODUCT PAGE
   ============================================================ */

/* ── Hero ── */
#product-hero {
  position: relative;
  background-color: var(--product-color);
  padding: var(--space-2xl) 0 var(--space-xl);
  overflow: hidden;
  color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

#product-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0,0,0,0.18) 0%, transparent 50%, rgba(255,255,255,0.06) 100%);
  pointer-events: none;
}

.product-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.product-hero-content {
  position: relative;
  z-index: 1;
}

.product-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35em 1em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.product-hero-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.product-hero-subtitle {
  font-size: var(--font-size-lg);
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-sm);
}

.product-hero-desc {
  font-size: var(--font-size-base);
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.product-hero-desc p {
  margin-bottom: var(--space-xs);
}

.product-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.product-pill {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  padding: 0.3em 0.85em;
  border-radius: var(--radius-full);
}

.product-sizes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.product-sizes-label {
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,0.6);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-size-pill {
  -webkit-appearance: none;
  appearance: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.22);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  padding: 0.4em 0.9em;
  border-radius: var(--radius-full);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

/* Unselected variant reads as a subtle, muted chip */
.product-size-pill {
  opacity: 0.65;
}

.product-size-pill:hover,
.product-size-pill:focus-visible {
  opacity: 1;
  border-color: rgba(255,255,255,0.5);
  outline: none;
}

/* Selected variant: solid, brighter, with a check dot */
.product-size-pill.is-selected {
  opacity: 1;
  background: #ffffff;
  color: var(--product-color, var(--color-primary));
  border-color: #ffffff;
  font-weight: var(--font-weight-semi);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.product-size-pill.is-selected::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--product-color, var(--color-primary));
}

.product-hero-cta {
  margin-top: var(--space-xs);
}

/* A fixed-size stage so every product image — and both variant images —
   renders inside the same box, regardless of its native dimensions. */
.product-hero-image {
  position: relative;
  z-index: 1;
  height: 420px;
}

.product-hero-image img,
.product-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.3));
  transition: opacity 0.4s ease;
}

/* Secondary variant sits on top, hidden until hover / selection. */
.product-hero-img--secondary {
  opacity: 0;
  pointer-events: none;
}

/* Pinned (clicked) variant — mobile-friendly, no hover needed */
.product-hero-image[data-active="1"] .product-hero-img--primary { opacity: 0; }
.product-hero-image[data-active="1"] .product-hero-img--secondary { opacity: 1; }

/* Hover "peek" at the opposite variant (desktop only) */
@media (hover: hover) {
  .product-hero-image.has-hover-swap {
    cursor: pointer;
  }
  .product-hero-image.has-hover-swap:hover .product-hero-img--primary { opacity: 0; }
  .product-hero-image.has-hover-swap:hover .product-hero-img--secondary { opacity: 1; }
  .product-hero-image.has-hover-swap[data-active="1"]:hover .product-hero-img--primary { opacity: 1; }
  .product-hero-image.has-hover-swap[data-active="1"]:hover .product-hero-img--secondary { opacity: 0; }
}

.product-info-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.product-info-card-heading {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semi);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.product-specs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.product-specs-list li {
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
  padding: 0.6em 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.product-specs-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.product-specs-list li:first-child {
  padding-top: 0;
}

.spec-label {
  font-weight: var(--font-weight-semi);
  color: var(--color-white);
  white-space: nowrap;
  flex-shrink: 0;
}

.spec-label::after {
  content: ':';
}

.spec-value {
  color: rgba(255,255,255,0.8);
}


/* ── How To Use ── */
.product-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.product-step {
  text-align: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: box-shadow var(--transition-base);
}

.product-step:hover {
  box-shadow: var(--shadow-md);
}

.product-step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--product-color);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  margin: 0 auto var(--space-sm);
}

.product-step-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-black);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.product-step-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ── Parameters Tested ── */
.section--tinted {
  background: #f0f6ff;
}

.param-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Param Value Cards Grid (product page) ── */
.param-section-intro {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
  line-height: 1.7;
}

.param-section-link {
  color: var(--color-primary);
  font-weight: var(--font-weight-semi);
  text-decoration: none;
}

.param-section-link:hover {
  text-decoration: underline;
}

.param-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.param-value-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--param-color, var(--color-primary));
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-sm) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  transition: box-shadow var(--transition-base);
}

.param-value-card:hover {
  box-shadow: var(--shadow-md);
}

.param-card-top {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-xs);
}

.param-card-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.param-card-values {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.param-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
}

.param-value-label {
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.param-value-number {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--param-color, var(--color-primary));
}

.param-chevron {
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.param-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.param-warning {
  font-size: var(--font-size-sm);
  line-height: 1.6;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xs);
}

.param-warning strong {
  display: inline;
  margin-right: 0.3em;
}

.param-warning--low {
  background: #fff8e1;
  color: #7a5800;
  border-left: 3px solid #f5c400;
}

.param-warning--high {
  background: #fff0f0;
  color: #991b1b;
  border-left: 3px solid #ef4444;
}

.param-warning--fix {
  background: #f0fdf4;
  color: #166534;
  border-left: 3px solid #22c55e;
}

/* ── Reference Chart ── */
.reference-table-wrap {
  max-width: 780px;
  margin: var(--space-md) auto 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.reference-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.reference-table th {
  background: var(--product-color);
  color: var(--color-white);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semi);
  text-align: left;
  padding: var(--space-sm) var(--space-md);
}

.reference-table td {
  font-size: var(--font-size-sm);
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--color-border);
  color: var(--color-text);
}

.reference-table tbody tr:hover {
  background: var(--color-primary-light);
}

/* ── Product Responsive ── */
@media (max-width: 768px) {
  .product-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .product-hero-title {
    font-size: var(--font-size-xl);
  }

  .product-hero-image {
    height: 300px;
  }

  .product-pills,
  .product-sizes {
    justify-content: center;
  }

  .product-hero-content {
    order: 1;
  }

  .product-hero-image {
    order: 0;
  }

  .product-steps-grid {
    grid-template-columns: 1fr;
  }

  .param-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .param-section-intro {
    font-size: var(--font-size-xs);
  }
}

/* ============================================================
   PRODUCTS ARCHIVE PAGE
   ============================================================ */

/* ── Hero (shares #faq-hero base styles) ── */
#products-hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#products-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 26, 94, 0.75) 0%, rgba(0, 72, 255, 0.45) 100%);
  z-index: 1;
}

#products-hero .faq-hero-inner {
  position: relative;
  z-index: 2;
}

#products-hero .faq-hero-wave {
  position: relative;
  z-index: 2;
}

/* ── Products Intro / Trust Band ── */
.products-intro {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-md);
}

.products-intro-inner {
  max-width: 1120px;
  margin: 0 auto;
}

/* Two-column when an image is present: copy left, product image right. */
.products-intro-inner.has-image {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-xl);
}

.products-intro-inner:not(.has-image) {
  max-width: 1040px;
  text-align: center;
}

.products-intro-inner .heading-2 {
  margin-bottom: var(--space-xs);
}

.products-intro-text {
  color: var(--color-text-muted, #4a5568);
  font-size: var(--font-size-sm);
  line-height: 1.65;
  margin-top: var(--space-xs);
}

.products-intro-badges {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-xs);
}

.products-intro-inner:not(.has-image) .products-intro-badges {
  justify-content: center;
  flex-wrap: wrap;
}

/* Product image on the right */
.products-intro-media {
  flex-shrink: 0;
  width: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.products-intro-media img {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  filter: drop-shadow(0 16px 34px rgba(0, 72, 255, 0.18));
}

.products-intro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  white-space: nowrap;
  background: var(--color-primary-light, #eef3ff);
  border: 1px solid rgba(0, 72, 255, 0.12);
  color: var(--color-primary, #0048ff);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  padding: 0.5em 0.85em;
  border-radius: var(--radius-full);
}

.products-intro-badge svg {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .products-intro {
    padding-top: var(--space-lg);
  }

  /* Stack the two columns and center everything on small screens. */
  .products-intro-inner.has-image {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-md);
  }

  .products-intro-inner.has-image .products-intro-media {
    order: -1;
    width: 160px;
    margin: 0 auto;
  }

  .products-intro-inner.has-image .products-intro-badges {
    justify-content: center;
    flex-wrap: wrap;
  }

  .products-intro-text {
    font-size: var(--font-size-sm);
  }
}

/* ── Product Grid ── */
#products-archive .container {
  max-width: 1400px;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

/* ── Product Card ── */
.product-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 26, 94, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: var(--color-white);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(0, 26, 94, 0.18);
}

/* Image wrapper — fixed aspect ratio */
.product-card-image-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-primary-light);
}

.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-md);
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-image {
  transform: scale(1.08);
}

/* Placeholder when no image is set */
.product-card-image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-secondary);
}

/* Card text */
.product-card-body {
  padding: var(--space-md);
  flex: 1;
}

.product-card-title {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.product-card-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.product-card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* Empty state */
.products-empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-lg);
  padding: var(--space-2xl) 0;
}

/* Pagination */
.nav-links {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.nav-links a,
.nav-links span {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  background: var(--color-primary);
  color: #ffffff;
}

.nav-links span.current {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}
/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-dropdown {
  position: relative;
}

/* --- Collapsed trigger (globe + current code + chevron) --- */
.lang-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: inherit;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semi);
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  padding: 0.42em 0.7em 0.42em 0.6em;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.lang-dropdown-toggle:hover,
.lang-dropdown.is-open .lang-dropdown-toggle {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
}

.lang-dropdown-toggle:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

.lang-globe {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.lang-current {
  text-transform: uppercase;
}

.lang-chevron {
  width: 0.8rem;
  height: 0.8rem;
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform var(--transition-fast);
}

.lang-dropdown.is-open .lang-chevron {
  transform: rotate(180deg);
}

/* --- Expanded menu --- */
.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  min-width: 172px;
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.lang-dropdown.is-open .lang-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.lang-option:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.lang-option-code {
  flex-shrink: 0;
  min-width: 2.1em;
  padding: 0.2em 0.45em;
  border-radius: var(--radius-sm);
  background: var(--color-secondary);
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.lang-option-name {
  flex: 1;
}

.lang-check {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--color-primary);
}

.lang-option--active {
  color: var(--color-primary);
  font-weight: var(--font-weight-semi);
}

.lang-option--active .lang-option-code {
  background: var(--color-primary);
  color: var(--color-white);
}

@media (max-width: 768px) {
  .lang-dropdown-menu {
    right: 0;
  }
}

/* ============================================================
   AMAZON BUTTON
   ============================================================ */
.btn-amazon {
  background: #FF9900;
  color: #111;
  border-color: #FF9900;
  gap: 0.4em;
}

.btn-amazon:hover {
  background: #e68a00;
  border-color: #e68a00;
  color: #111;
}

.btn-amazon .amazon-icon {
  width: 1.4em;
  height: 1.4em;
  fill: #111;
  flex-shrink: 0;
  position: relative;
  top: 0.05em;
}

/* ============================================================
   PAGE: FAQ & SUPPORT
   ============================================================ */

/* Hero */
#faq-hero,
#guide-hero,
#chem-hero,
#legal-hero,
#products-hero {
  position: relative;
  background-color: var(--color-primary-dark);
  padding: var(--space-2xl) 0 0;
  overflow: hidden;
}

.faq-hero-inner {
  text-align: center;
  padding-bottom: var(--space-xl);
}

.faq-eyebrow {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--space-xs);
}

.faq-eyebrow--blue {
  color: var(--color-primary);
}

.faq-hero-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-black);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.faq-hero-subtitle {
  font-size: var(--font-size-md);
  color: rgba(255, 255, 255, 0.72);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.faq-hero-wave {
  display: block;
  line-height: 0;
  margin-bottom: -2px;
}

.faq-hero-wave svg {
  width: 100%;
  height: 48px;
  display: block;
}

/* Section headers */
.faq-section-header {
  margin-bottom: var(--space-lg);
}

.faq-section-intro {
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
  max-width: 560px;
  margin: var(--space-xs) auto 0;
  line-height: 1.7;
}

/* ── How-To Guide Steps ── */
.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.guide-step {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.guide-step:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.guide-step-number {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-step-icon {
  width: 64px;
  height: 64px;
  background: var(--color-primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
  margin-top: var(--space-xs);
}

.guide-step-icon svg {
  width: 28px;
  height: 28px;
}

.guide-step-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-black);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.guide-step-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: var(--space-sm);
}

/* Tips row */
.guide-tips {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-primary-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.guide-tips-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  white-space: nowrap;
  padding-top: 2px;
}

.guide-tips-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  flex: 1;
}

.guide-tip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0.35em 0.85em;
}

/* ── Testing Guide: product selector ── */
.tg-product-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.tg-product-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-align: left;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.tg-product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tg-product-card.is-active {
  border-color: var(--product-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--product-color) 18%, transparent), var(--shadow-md);
}

.tg-product-card-image-wrap {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tg-product-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tg-product-card-image-placeholder {
  width: 100%;
  height: 100%;
  opacity: 0.2;
}

.tg-product-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tg-product-card-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-black);
  line-height: 1.2;
  color: var(--color-text);
}

.tg-product-card-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tg-product-card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── Testing Guide: step panels ── */
.tg-steps-area {
  position: relative;
}

.tg-steps-panel {
  display: none;
  animation: tgFadeIn 250ms ease-out;
}

.tg-steps-panel.is-active {
  display: block;
}

.tg-steps-panel .guide-step-number {
  background: var(--product-color, var(--color-primary));
}

.tg-steps-panel .guide-step-icon {
  background: color-mix(in srgb, var(--product-color, var(--color-primary)) 15%, transparent);
  color: var(--product-color, var(--color-primary));
}

@keyframes tgFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .tg-product-selector {
    grid-template-columns: 1fr;
  }
}

.guide-tip svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-primary);
  flex-shrink: 0;
}

/* ── FAQ Questions ── */
.faq-questions-section {
  background: var(--color-white);
  padding: var(--space-xl) 0;
}

.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

.faq-item[open] {
  box-shadow: var(--shadow-sm);
}

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  list-style: none;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semi);
  color: var(--color-text);
  transition: color var(--transition-fast);
  user-select: none;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-top: -3px;
}

.faq-item[open] > .faq-q {
  color: var(--color-primary);
}

.faq-item[open] > .faq-q::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.faq-a {
  overflow: hidden;
  transition: height 0.3s ease;
}

.faq-a-inner {
  padding: 0 var(--space-md) var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.faq-a p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.8;
  padding-top: var(--space-sm);
}

/* ── Contact Card ── */
.faq-contact-section {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.faq-contact-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  box-shadow: var(--shadow-sm);
}

.faq-contact-icon {
  width: 64px;
  height: 64px;
  background: var(--color-primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
  color: var(--color-primary);
}

.faq-contact-icon svg {
  width: 28px;
  height: 28px;
}

.faq-contact-text {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.7;
  margin: var(--space-xs) auto var(--space-md);
  max-width: 400px;
}

/* ── FAQ Responsive ── */
@media (max-width: 768px) {
  .faq-hero-title {
    font-size: var(--font-size-xl);
  }

  .guide-steps {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .guide-tips {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .faq-q {
    padding: var(--space-sm);
  }

  .faq-a {
    padding: 0 var(--space-sm) var(--space-sm);
  }

  .faq-contact-card {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .guide-tips-list {
    flex-direction: column;
  }

  .param-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   PAGE: CHEMISTRY GUIDE
   ============================================================ */

/* ── Hero overrides — contextual image ── */
#chem-hero,
#faq-hero,
#guide-hero,
#legal-hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#chem-hero::before,
#faq-hero::before,
#guide-hero::before,
#legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 26, 94, 0.80) 0%, rgba(0, 72, 255, 0.60) 100%);
  z-index: 1;
}

#chem-hero .faq-hero-inner,
#faq-hero .faq-hero-inner,
#guide-hero .faq-hero-inner,
#legal-hero .faq-hero-inner {
  position: relative;
  z-index: 2;
}

#chem-hero .faq-hero-wave,
#faq-hero .faq-hero-wave,
#guide-hero .faq-hero-wave {
  position: relative;
  z-index: 2;
}

#chem-hero .faq-hero-wave svg {
  height: 48px;
}

/* ── Test strip hint ── */
.chem-strip-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.chem-strip-hint svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ── Master-Detail Layout ── */
#chem-params .container {
  max-width: 1400px;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.chem-master-detail {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

/* ── Left navigation ── */
.chem-nav {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  border-right: 1px solid var(--color-border);
  padding-right: var(--space-md);
}

.chem-nav-group {
  margin-bottom: var(--space-sm);
}

.chem-nav-group + .chem-nav-group {
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.chem-nav-group-label {
  display: block;
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  padding: 0 var(--space-xs);
}

.chem-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px var(--space-sm);
  border: none;
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: transparent;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.chem-nav-item:hover {
  background: color-mix(in srgb, var(--param-color, var(--color-primary)) 10%, transparent);
  color: var(--param-color, var(--color-primary));
}

.chem-nav-item.is-active {
  background: color-mix(in srgb, var(--param-color, var(--color-primary)) 12%, transparent);
  border-left-color: var(--param-color, var(--color-primary));
  color: var(--param-color, var(--color-primary));
  font-weight: var(--font-weight-semi);
}

/* ── Color swatch (shared: nav + accordion header) ── */
.param-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.param-swatch--lg {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.chem-card-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

/* ── Right detail area ── */
.chem-detail-area {
  flex: 1;
  min-width: 0;
  position: relative;
}

.chem-detail-panel {
  display: block;
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  transition: opacity 0.22s ease, transform 0.22s ease;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.chem-detail-panel.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  position: absolute;
  z-index: 1;
  box-shadow: var(--shadow-md);
}

/* Mobile accordion button — hidden on desktop */
.chem-accordion-btn {
  display: none;
}

/* ── Panel content ── */
.chem-panel-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.chem-panel-heading {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-black);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin: 0;
}

/* ── Badges ── */
.chem-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-md);
}

.chem-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  background: #f8faff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  white-space: nowrap;
}

.chem-badge strong {
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chem-badge--pool {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.chem-badge--pool strong {
  color: #1d4ed8;
}

.chem-badge--spa {
  border-color: #ddd6fe;
  background: #f5f3ff;
}
.chem-badge--spa strong {
  color: #6d28d9;
}

/* ── Warning icon colours ── */
.param-warning-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Flex layout for icon + text (scoped so product-page cards are unaffected) */
.chem-panel-body .param-warning {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border-left: 3px solid;
}

.chem-panel-body .param-warning--low {
  background: #fffbeb;
  border-left-color: #d97706;
  color: #92400e;
}
.param-warning--low .param-warning-icon  { color: #d97706; }

.chem-panel-body .param-warning--high {
  background: #fef2f2;
  border-left-color: #dc2626;
  color: #7f1d1d;
}
.param-warning--high .param-warning-icon { color: #dc2626; }

.chem-panel-body .param-warning--fix {
  background: #f0fdf4;
  border-left-color: #16a34a;
  color: #14532d;
}
.param-warning--fix  .param-warning-icon { color: #16a34a; }

/* ── Chemistry responsive ── */
@media (max-width: 768px) {
  #chem-hero .faq-hero-wave svg {
    height: 32px;
  }

  /* Switch to vertical accordion */
  .chem-master-detail {
    display: block;
    margin-top: var(--space-md);
  }

  .chem-nav {
    display: none;
  }

  /* All panels stack as accordion items — reset desktop transition */
  .chem-detail-panel {
    display: block;
    border-bottom: none;
    margin-bottom: var(--space-sm);
    opacity: 1;
    transform: none;
    pointer-events: auto;
    position: static;
    transition: none;
  }

  /* Accordion trigger */
  .chem-accordion-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-sm) 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
  }

  .chem-accordion-btn-inner {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .chem-accordion-btn .param-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-text-muted);
    transition: transform var(--transition-base);
  }

  .chem-detail-panel.is-open .chem-accordion-btn .param-chevron {
    transform: rotate(180deg);
  }

  /* Panel body: max-height accordion (no JS height math needed) */
  .chem-panel-body {
    display: block;
    overflow: hidden;
    max-height: 0;
    padding: 0;
    border-top: none;
    transition: max-height 0.3s ease, padding 0.25s ease;
  }

  .chem-detail-panel.is-open .chem-panel-body {
    max-height: 900px;
    padding: var(--space-sm) 0 var(--space-md);
    border-top: 1px solid var(--color-border);
  }

  /* Title duplicates accordion header on mobile — hide it */
  .chem-panel-title {
    display: none;
  }
}

@media (max-width: 560px) {
  #chem-hero {
    padding: var(--space-sm) 0 0;
  }
}

/* ============================================================
   PAGE: LEGAL (Privacy Policy, Terms of Service, Cookie Policy)
   ============================================================ */

#legal-hero {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.legal-content {
  max-width: 760px;
  margin: 0 auto;
  font-size: var(--font-size-base);
  line-height: 1.8;
  color: var(--color-text);
}

.legal-last-updated {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.legal-last-updated time {
  font-weight: var(--font-weight-semi);
}

.legal-content h2 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-dark);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
}

.legal-content h3 {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semi);
  color: var(--color-primary-dark);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

.legal-content p {
  margin-bottom: var(--space-md);
}

.legal-content ul,
.legal-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.legal-content ul {
  list-style: disc;
}

.legal-content ol {
  list-style: decimal;
}

.legal-content li {
  margin-bottom: var(--space-xs);
}

.legal-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--color-primary-dark);
}

.legal-content strong {
  font-weight: var(--font-weight-semi);
  color: var(--color-text);
}
