/* Electrical Supplies Ltd – Cobalt + neutrals. Themes: html[data-theme="light"|"dark"] */

:root {
  color-scheme: light;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --size-title: 2rem;
  --size-header: 1.25rem;
  --size-paragraph: 1rem;

  --cobalt: #4544fe;
  --cobalt-dark: #2a29a8;
  --header-bg: var(--cobalt);
  --hero-grad-from: #4544fe;
  --hero-grad-to: #2a29a8;
  --footer-bg: #2a29a8;

  --surface-page: #ffffff;
  --surface-card: #ffffff;
  --surface-subtle: #f5f7fa;
  --surface-hero-photo-1: #dfe6f5;
  --surface-hero-photo-2: #c8d4f0;

  --text-body: #2a29a8;
  --text-heading: #2a29a8;
  --text-on-brand: #ffffff;

  --border-subtle: rgba(0, 71, 171, 0.1);
  --border-cobalt-soft: rgba(69, 68, 254, 0.14);
  --border-cobalt-mid: rgba(69, 68, 254, 0.18);
  --border-cobalt-hover: rgba(69, 68, 254, 0.35);
  --border-neutral: #e0e4e8;

  --shadow-card: 0 2px 12px rgba(0, 71, 171, 0.08);
  --shadow-card-alt: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-contact: 0 4px 16px rgba(42, 41, 168, 0.07);
  --shadow-contact-hover: 0 8px 24px rgba(42, 41, 168, 0.12);
  --shadow-product-hover: 0 4px 12px rgba(0, 71, 171, 0.15);
  --shadow-tile: 0 1px 5px rgba(0, 0, 0, 0.04);
  --shadow-cta: 0 4px 14px rgba(42, 41, 168, 0.25);

  --hero-photo-shade: linear-gradient(to top, rgba(42, 41, 168, 0.45) 0%, transparent 45%);
}

html[data-theme='dark'] {
  color-scheme: dark;

  --cobalt: #8a89ff;
  --cobalt-dark: #6c6bd4;
  /* Top bar + hero chrome: same family as footer (light = cobalt → cobalt-deep) */
  --header-bg: #2f2d42;
  --footer-bg: #252438;
  --hero-grad-from: var(--header-bg);
  --hero-grad-to: var(--footer-bg);

  --surface-page: #1e1e1e;
  --surface-card: #252526;
  --surface-subtle: #2d2d30;
  --surface-hero-photo-1: #2a2c33;
  --surface-hero-photo-2: #32353d;

  --text-body: #e4e4e4;
  --text-heading: #ececec;
  --text-on-brand: #f5f5f5;

  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-cobalt-soft: rgba(138, 137, 255, 0.28);
  --border-cobalt-mid: rgba(138, 137, 255, 0.35);
  --border-cobalt-hover: rgba(180, 179, 255, 0.5);
  --border-neutral: #3c3c3c;

  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.4);
  --shadow-card-alt: 0 2px 18px rgba(0, 0, 0, 0.45);
  --shadow-contact: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-contact-hover: 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-product-hover: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-tile: 0 1px 4px rgba(0, 0, 0, 0.35);
  --shadow-cta: 0 4px 18px rgba(0, 0, 0, 0.45);

  --hero-photo-shade: linear-gradient(to top, rgba(12, 11, 28, 0.72) 0%, transparent 48%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--size-paragraph);
  line-height: 1.5;
  color: var(--text-body);
  background: var(--surface-page);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Trade portal hidden until TRADE_PORTAL_PUBLIC_ENABLED=true in .env (see server.js) */
#site-auth-nav a[href="/customer/login"] {
  display: none !important;
}

/* Header */
.site-header {
  background: var(--header-bg);
  color: var(--text-on-brand);
  padding: 1.1rem 0;
  border-bottom: 0;
  box-shadow: none;
}

html[data-theme='dark'] .site-header {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07);
}

main {
  display: block;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  flex: 1 1 auto;
  min-width: min(100%, 10rem);
}

@media (max-width: 640px) {
  .header-end {
    flex-basis: 100%;
    justify-content: flex-end;
    gap: 0.65rem 0.85rem;
  }
}

.logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: var(--size-header);
  font-weight: 700;
  color: var(--text-on-brand);
  text-decoration: none;
  line-height: 0;
}

.logo-img {
  display: block;
  height: auto;
  max-height: min(5.5rem, 22vw);
  width: auto;
  max-width: min(440px, 85vw);
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-on-brand);
  text-decoration: none;
  font-size: var(--size-paragraph);
}

.theme-toggle {
  position: relative;
  flex-shrink: 0;
  width: 2.65rem;
  height: 2.65rem;
  margin: 0;
  padding: 0;
  color: var(--text-on-brand);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.theme-toggle:active {
  transform: scale(0.94);
}

.theme-toggle:focus {
  outline: 2px solid var(--text-on-brand);
  outline-offset: 2px;
}

.theme-toggle:focus:not(:focus-visible) {
  outline: none;
}

.theme-toggle__icon-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
  pointer-events: none;
}

.theme-toggle__icon-wrap svg {
  width: 1.3rem;
  height: 1.3rem;
}

/* Light: show moon (switch to dark) */
html[data-theme='light'] .theme-toggle__icon--sun {
  opacity: 0;
  transform: rotate(100deg) scale(0.35);
}

html[data-theme='light'] .theme-toggle__icon--moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* Dark: show sun (switch to light) */
html[data-theme='dark'] .theme-toggle__icon--sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

html[data-theme='dark'] .theme-toggle__icon--moon {
  opacity: 0;
  transform: rotate(-100deg) scale(0.35);
}

.nav a:hover {
  text-decoration: underline;
}

/* Logo + tagline (public site header) */
.header-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

.logo-tagline {
  margin: 0;
  max-width: 16rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(0.82rem, 2.1vw, 0.98rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  align-self: flex-end;
  margin-right: 0.15rem;
  padding-left: 1.75rem;
}

html[data-theme='dark'] .logo-tagline {
  color: rgba(245, 245, 245, 0.9);
}

.logo-tagline::before {
  content: '\201C';
  margin-right: 0.08em;
}

.logo-tagline::after {
  content: '\201D';
  margin-left: 0.08em;
}

/* Hamburger menu — same footprint / feel as .theme-toggle */
.nav-menu-toggle {
  position: relative;
  flex-shrink: 0;
  width: 2.65rem;
  height: 2.65rem;
  margin: 0;
  padding: 0;
  color: var(--text-on-brand);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
  z-index: 2;
}

.nav-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.nav-menu-toggle:active {
  transform: scale(0.94);
}

.nav-menu-toggle:focus {
  outline: 2px solid var(--text-on-brand);
  outline-offset: 2px;
}

.nav-menu-toggle:focus:not(:focus-visible) {
  outline: none;
}

.nav-menu-toggle--auth {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-menu-toggle__auth-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.nav-menu-toggle__auth-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.nav-menu-toggle__icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.nav-menu-toggle__bar {
  position: absolute;
  left: 50%;
  width: 1.15rem;
  height: 2px;
  margin-left: -0.575rem;
  background: currentColor;
  border-radius: 1px;
  transition:
    transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1),
    opacity 0.28s ease,
    top 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.nav-menu-toggle__bar--top {
  top: calc(50% - 6px);
}

.nav-menu-toggle__bar--mid {
  top: 50%;
  margin-top: -1px;
}

.nav-menu-toggle__bar--bot {
  top: calc(50% + 6px);
}

body.site-nav-is-open .site-nav-menu .nav-menu-toggle__bar--top {
  top: 50%;
  margin-top: -1px;
  transform: rotate(45deg);
}

body.site-nav-is-open .site-nav-menu .nav-menu-toggle__bar--mid {
  opacity: 0;
  transform: scaleX(0.2);
}

body.site-nav-is-open .site-nav-menu .nav-menu-toggle__bar--bot {
  top: 50%;
  margin-top: -1px;
  transform: rotate(-45deg);
}

/* Main nav + login dropdown wrappers */
.site-nav-menu,
.site-auth-menu {
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 82;
}

.site-nav-menu {
  align-items: flex-start;
}

.site-auth-menu {
  align-items: flex-end;
}

.site-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

body.site-nav-is-open .site-nav-backdrop,
body.site-auth-is-open .site-nav-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.site-nav-is-open .site-nav-menu .nav-menu-toggle,
body.site-auth-is-open .site-auth-menu .nav-menu-toggle--auth {
  /* Stay same size as closed — scale hover was splitting it from the menu */
  transform: none;
  box-shadow: none;
  z-index: 3;
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.72);
  color: var(--text-body);
}

html[data-theme='dark'] body.site-nav-is-open .site-nav-menu .nav-menu-toggle,
html[data-theme='dark'] body.site-auth-is-open .site-auth-menu .nav-menu-toggle--auth {
  color: var(--footer-bg);
}

body.site-nav-is-open .site-nav-menu .nav-menu-toggle:focus,
body.site-auth-is-open .site-auth-menu .nav-menu-toggle--auth:focus {
  outline-color: var(--text-body);
}

html[data-theme='dark'] body.site-nav-is-open .site-nav-menu .nav-menu-toggle:focus,
html[data-theme='dark'] body.site-auth-is-open .site-auth-menu .nav-menu-toggle--auth:focus {
  outline-color: var(--footer-bg);
}

body.site-nav-is-open .site-nav-menu .nav-menu-toggle:hover,
body.site-nav-is-open .site-nav-menu .nav-menu-toggle:focus-visible,
body.site-auth-is-open .site-auth-menu .nav-menu-toggle--auth:hover,
body.site-auth-is-open .site-auth-menu .nav-menu-toggle--auth:focus-visible {
  transform: none;
  box-shadow: none;
}

body.site-nav-is-open .site-nav-menu .nav-menu-toggle:active,
body.site-auth-is-open .site-auth-menu .nav-menu-toggle--auth:active {
  transform: none;
}

/* Hover or keyboard focus in cluster = same tint on button + panel */
body.site-nav-is-open .site-nav-menu:has(:hover, :focus-within) .nav-menu-toggle,
body.site-nav-is-open .site-nav-menu:has(:hover, :focus-within) .nav.nav--site-dropdown,
body.site-auth-is-open .site-auth-menu:has(:hover, :focus-within) .nav-menu-toggle--auth,
body.site-auth-is-open .site-auth-menu:has(:hover, :focus-within) .nav.nav--auth-dropdown {
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(255, 255, 255, 0.86);
}

.site-header .nav.nav--site-dropdown,
.site-header .nav.nav--auth-dropdown {
  position: absolute;
  top: calc(100% + 0.55rem);
  width: max-content;
  margin: 0;
  padding: 0.2rem 0 0.35rem;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  color: var(--text-on-brand);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-0.25rem);
  z-index: 2;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    opacity 0.22s ease,
    visibility 0.22s ease,
    transform 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.site-header .nav.nav--site-dropdown {
  left: 0;
  right: auto;
  min-width: calc(2.65rem + 1.5rem + 2.65rem);
  max-width: min(22rem, calc(100vw - 1.5rem));
}

.site-header .nav.nav--auth-dropdown {
  left: auto;
  right: 0;
  min-width: 11.5rem;
  max-width: min(18rem, calc(100vw - 1.5rem));
}

body.site-nav-is-open .site-header .nav.nav--site-dropdown,
body.site-auth-is-open .site-header .nav.nav--auth-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.72);
}

body.site-nav-is-open .site-header .nav.nav--site-dropdown > * + *,
body.site-auth-is-open .site-header .nav.nav--auth-dropdown > * + * {
  border-top-color: rgba(255, 255, 255, 0.28);
}

body.site-nav-is-open .site-header .nav.nav--site-dropdown a:hover,
body.site-nav-is-open .site-header .nav.nav--site-dropdown .nav-drawer-btn:hover,
body.site-auth-is-open .site-header .nav.nav--auth-dropdown a:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Open menu: body text / footer blues so links & X read on the light frosted panel */
body.site-nav-is-open .site-header .nav.nav--site-dropdown,
body.site-nav-is-open .site-header .nav.nav--site-dropdown a,
body.site-nav-is-open .site-header .nav.nav--site-dropdown .nav-drawer-btn,
body.site-auth-is-open .site-header .nav.nav--auth-dropdown,
body.site-auth-is-open .site-header .nav.nav--auth-dropdown a {
  color: var(--text-body);
}

body.site-nav-is-open .site-header .nav.nav--site-dropdown a,
body.site-nav-is-open .site-header .nav.nav--site-dropdown .nav-drawer-btn,
body.site-auth-is-open .site-header .nav.nav--auth-dropdown a {
  font-weight: 600;
}

html[data-theme='dark'] body.site-nav-is-open .site-header .nav.nav--site-dropdown,
html[data-theme='dark'] body.site-nav-is-open .site-header .nav.nav--site-dropdown a,
html[data-theme='dark'] body.site-nav-is-open .site-header .nav.nav--site-dropdown .nav-drawer-btn,
html[data-theme='dark'] body.site-auth-is-open .site-header .nav.nav--auth-dropdown,
html[data-theme='dark'] body.site-auth-is-open .site-header .nav.nav--auth-dropdown a {
  color: var(--footer-bg);
}

.site-header .nav.nav--site-dropdown > * + *,
.site-header .nav.nav--auth-dropdown > * + * {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.site-header .nav.nav--site-dropdown a,
.site-header .nav.nav--auth-dropdown a {
  display: block;
  padding: 0.55rem 0.95rem;
  color: var(--text-on-brand);
  text-decoration: none;
  font-size: var(--size-paragraph);
}

.site-header .nav.nav--site-dropdown a:hover,
.site-header .nav.nav--auth-dropdown a:hover {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.site-header .nav.nav--site-dropdown .nav-drawer-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.95rem;
  text-align: left;
  font: inherit;
  font-size: var(--size-paragraph);
  color: var(--text-on-brand);
  background: transparent;
  border: none;
  cursor: pointer;
}

.site-header .nav.nav--site-dropdown .nav-drawer-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.site-nav-is-open .header-brand,
body.site-auth-is-open .header-brand {
  position: relative;
  z-index: 81;
}

body.site-nav-is-open .header-end .theme-toggle,
body.site-auth-is-open .header-end .theme-toggle {
  position: relative;
  z-index: 81;
}

/* Hero */
.hero {
  background: linear-gradient(145deg, var(--hero-grad-from) 0%, var(--hero-grad-to) 100%);
  color: var(--text-on-brand);
  padding: 4.5rem 0;
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-heading {
  margin: 0;
  line-height: 0;
}

.hero-logo-img {
  display: block;
  height: auto;
  max-height: min(12rem, 32vw);
  max-width: min(520px, 92vw);
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}

.hero-logo-img--small {
  max-height: 3.5rem;
  max-width: min(280px, 70vw);
}

.hero-brand-mark {
  margin: 0;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: var(--size-title);
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1.15rem;
  margin: 0;
  opacity: 0.95;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-small {
  padding: 2.5rem 0;
}

.hero-small .hero-tagline {
  margin-bottom: 0;
}

/* —— Home Option B: store photo hero —— */
.hero--b {
  /* No top padding — avoids a white band between cobalt header and the photo */
  --hero-b-photo-h: clamp(200px, 48vh, 520px);
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
}

@supports (height: 1svh) {
  .hero--b {
    --hero-b-photo-h: clamp(200px, min(48svh, 520px), 520px);
  }
}

.hero-photo-frame {
  position: relative;
  width: 100%;
  height: var(--hero-b-photo-h);
  max-height: var(--hero-b-photo-h);
  min-height: 200px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--surface-hero-photo-1) 0%, var(--surface-hero-photo-2) 100%);
  line-height: 0;
  font-size: 0;
  transition:
    height 0.35s ease,
    max-height 0.35s ease,
    min-height 0.35s ease,
    opacity 0.25s ease;
}

/* No real storefront image yet — hide the band so the header flows into the title strip */
.hero-photo-frame--collapsed {
  max-height: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  opacity: 0;
  pointer-events: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.hero-photo-frame--collapsed .hero-store-photo,
.hero-photo-frame--collapsed .hero-photo-shade {
  display: none;
}

.hero-store-photo {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  object-fit: cover;
  object-position: center;
  vertical-align: top;
}

.hero-photo-shade {
  position: absolute;
  inset: 0;
  background: var(--hero-photo-shade);
  pointer-events: none;
}

.hero-brand-strip {
  position: relative;
  background: linear-gradient(145deg, var(--hero-grad-from) 0%, var(--hero-grad-to) 100%);
  color: var(--text-on-brand);
  padding: 2rem 0 2.25rem;
  text-align: center;
}

.hero-inner--b {
  width: 100%;
}

.hero-b-main {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  padding-inline: max(1.25rem, env(safe-area-inset-left, 0px))
    max(1.25rem, env(safe-area-inset-right, 0px));
}

.hero--b .hero-tagline {
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
  margin-block: 0;
  font-size: 1.05rem;
  line-height: 1.55;
  text-align: center;
  text-wrap: balance;
}

@media (max-width: 560px) {
  .hero-b-main {
    padding-inline: 0;
  }
}

.section-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin: 0 0 0.35rem;
}

.section-title--lg {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.paragraph--lead {
  font-size: 1.05rem;
  line-height: 1.65;
}

/* About Option B */
.about--b {
  padding: 3.5rem 0;
}

.about-b-grid {
  display: grid;
  gap: 1.25rem 2.25rem;
  align-items: stretch;
  grid-template-columns: 1fr;
}

.about-b-copy--split {
  grid-column: 1;
  grid-row: auto;
  margin: 0;
}

#suppliers-preview {
  grid-column: 1;
  grid-row: auto;
}

@media (min-width: 880px) {
  /* About copy first (left), brands second (right) — matches phone reading order */
  .about-b-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 1fr);
    column-gap: 2.25rem;
    row-gap: 0;
    align-items: stretch;
  }

  #suppliers-preview {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    min-height: 0;
    align-self: stretch;
  }

  #suppliers-preview .about-b-tiles-wrap {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .about-b-copy--split {
    grid-column: 1;
    border-left: none;
    margin-left: 0;
    padding-left: 0;
    border-right: 3px solid var(--border-cobalt-mid);
    padding-right: 2.25rem;
    margin-right: 0.25rem;
  }

  .about-b-grid:has(.about-b-suppliers-block.hidden) .about-b-copy--split {
    grid-column: 1 / -1;
    border-right: none;
    padding-right: 2rem;
    margin-right: 0;
  }
}

.about-b-copy.section-card {
  margin: 0;
}

.about-content--b .paragraph {
  margin-bottom: 0.75rem;
}

.about-content--b .paragraph:last-child {
  margin-bottom: 0;
}

/* Contact Option B */
.contact--b {
  padding: 3.5rem 0 3rem;
}

.contact-b-header {
  max-width: 40rem;
  margin-bottom: 1.75rem;
}

.contact-b-intro {
  margin: 0.5rem 0 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--text-body);
  opacity: 0.92;
}

.contact-b-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 700px) {
  .contact-b-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }
}

@media (min-width: 1000px) {
  .contact-b-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.contact-b-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1.25rem 1.35rem;
  background: var(--surface-card);
  border-radius: 12px;
  border: 1px solid var(--border-cobalt-soft);
  box-shadow: var(--shadow-contact);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}

a.contact-b-card:hover {
  box-shadow: var(--shadow-contact-hover);
  border-color: var(--border-cobalt-hover);
  transform: translateY(-2px);
}

.contact-b-card--static {
  cursor: default;
}

.contact-b-icon {
  color: var(--cobalt);
  line-height: 0;
  margin-bottom: 0.15rem;
}

.contact-b-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-body);
  opacity: 0.72;
}

.contact-b-value {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.contact-b-card--social .contact-b-action {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--cobalt);
  text-decoration: none;
  margin-top: 0.15rem;
}

.contact-b-card--social .contact-b-action:hover {
  text-decoration: underline;
}

.contact-b-card--social .contact-b-action--secondary {
  font-size: 0.92rem;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 0.35rem;
}

/* Location Option B */
.location--b .location-b-head {
  margin-bottom: 1rem;
}

.location--b .section-card {
  margin-top: 0;
}

/* Suppliers */
.about-b-suppliers-block {
  margin-bottom: 0;
}

.about-b-suppliers-block.hidden {
  display: none !important;
}

.about-b-brand-head,
.about-b-copy-head {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.about-b-brand-head .section-kicker,
.about-b-copy-head .section-kicker {
  margin-bottom: 0.4rem;
}

.about-b-copy-head .section-title--lg {
  margin-bottom: 0;
}

.about-b-tiles-wrap {
  position: relative;
  background: var(--surface-card);
  border-radius: 12px;
  padding: 1.35rem 1.2rem 1.15rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.suppliers-preview-intro {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.supplier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.65rem;
}

/* About card: 2×3 cells (5 brands + view-all), heading/intro above */
.supplier-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  min-height: 288px;
}

.supplier-preview-cell {
  background: var(--surface-card);
  border-radius: 12px;
  padding: 0.5rem 0.45rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  min-height: 88px;
  box-sizing: border-box;
}

/* Brand cells: white mat + thin grey edge; logo only (contain), not full-bleed cover */
.supplier-preview-cell:not(.supplier-preview-cell--empty):not(.supplier-preview-cell--cta) {
  padding: 0.5rem;
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border-neutral);
  box-shadow: var(--shadow-card);
  border-radius: 12px;
}

.supplier-preview-cell--empty {
  background: var(--surface-subtle);
  border-style: dashed;
  border-color: var(--border-cobalt-mid);
  box-shadow: none;
  opacity: 0.85;
}

.supplier-preview-cell--cta {
  padding: 0.35rem;
}

.supplier-preview-cell--cta:not(.supplier-preview-cell--empty) {
  background: linear-gradient(145deg, var(--hero-grad-from) 0%, var(--hero-grad-to) 100%);
  border: none;
  box-shadow: var(--shadow-cta);
}

.supplier-preview-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  min-height: 3.5rem;
  padding: 0.5rem 0.35rem;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-on-brand);
  text-decoration: none;
  border-radius: 8px;
  transition: filter 0.15s ease;
}

.supplier-preview-view-all:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.supplier-tile {
  border: 1px solid var(--border-cobalt-soft);
  border-radius: 10px;
  background: var(--surface-card);
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.35rem;
  box-shadow: var(--shadow-tile);
}

.supplier-tile--in-preview {
  position: relative;
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Inset curve so the mat inside the outer border follows a rounded corner too */
  border-radius: 9px;
  overflow: hidden;
}

.supplier-tile--in-preview .supplier-tile-img {
  display: block;
  flex: 0 1 auto;
  align-self: center;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}

.supplier-tile--in-preview .supplier-tile-fallback {
  font-size: 0.72rem;
}

.supplier-tile-img {
  max-width: 100%;
  max-height: 38px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.supplier-tile-fallback {
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
  color: var(--text-heading);
  hyphens: auto;
  word-break: break-word;
}

.suppliers-section {
  padding: 3rem 0;
  background: var(--surface-subtle);
}

.suppliers-section.hidden {
  display: none !important;
}

.suppliers-section-intro {
  max-width: 42rem;
  margin: 0 0 1.35rem;
}

/* Suppliers — dedicated page */
.suppliers-page-section {
  padding: 3rem 0 3.5rem;
}

.suppliers-page-lead {
  max-width: 42rem;
  margin: 0 0 2.25rem;
  line-height: 1.6;
  font-size: 1.05rem;
}

#suppliers-page-root {
  padding-top: 1.35rem;
}

.suppliers-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.supplier-page-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.supplier-page-card__logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: clamp(6.5rem, 18vw, 8rem);
  height: clamp(6.5rem, 18vw, 8rem);
  padding: 0.65rem 1.25rem;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  /* Same surface as card body so the strip matches the lower half */
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
}

.supplier-page-card__img {
  display: block;
  flex: 0 1 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
}

.supplier-page-card__fallback {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-heading);
  line-height: 1.25;
  margin: auto;
  padding: 0.75rem 1rem;
}

.supplier-page-card__body {
  padding: 1.2rem 1.35rem 1.45rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.supplier-page-card__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-heading);
  line-height: 1.3;
}

.supplier-page-card__desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-body);
  opacity: 0.92;
}

/* Grimmy’s Grotto — tab on bottom-left of hero strip (title; subtitle on hover) */
.grotto-tag {
  position: absolute;
  left: max(0px, env(safe-area-inset-left, 0px));
  bottom: 0;
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding: 0.8rem 1rem 0.8rem 0.85rem;
  min-height: 3.1rem;
  max-width: min(12.5rem, 78vw);
  text-decoration: none;
  color: var(--text-heading);
  background: var(--surface-card);
  border: 1px solid var(--border-neutral);
  border-left: 4px solid var(--cobalt);
  border-bottom: none;
  border-radius: 0 12px 0 0;
  box-shadow: var(--shadow-card);
  transition:
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    padding 0.25s ease;
}

.grotto-tag:hover,
.grotto-tag:focus-visible {
  padding-bottom: 0.85rem;
  background: #fff;
  box-shadow: var(--shadow-contact-hover);
}

.grotto-tag__label {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
}

.grotto-tag__sub {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-body);
  transition:
    max-height 0.28s ease,
    opacity 0.22s ease,
    margin 0.28s ease;
}

@media (hover: hover) {
  .grotto-tag:hover .grotto-tag__sub,
  .grotto-tag:focus-visible .grotto-tag__sub {
    max-height: 2.75rem;
    opacity: 0.92;
    margin-top: 0.25rem;
  }
}

/* Mid widths: absolute bottom-left tab overlaps balanced hero copy — stack strip instead */
@media (max-width: 1120px) {
  .hero-brand-strip {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.125rem;
  }

  .hero-inner--b {
    order: -1;
  }

  .grotto-tag {
    position: relative;
    left: auto;
    bottom: auto;
    align-self: center;
    max-width: min(18rem, calc(100% - 2.5rem));
    border-radius: 12px;
    border: 1px solid var(--border-neutral);
    border-left: 4px solid var(--cobalt);
  }
}

@media (max-width: 560px) {
  .grotto-tag {
    max-width: min(10.5rem, 88vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .grotto-tag {
    transition-duration: 0.12s;
  }

  .grotto-tag__sub {
    transition-duration: 0.12s;
  }

  @media (hover: hover) {
    .grotto-tag:hover .grotto-tag__sub,
    .grotto-tag:focus-visible .grotto-tag__sub {
      transition-duration: 0.12s;
    }
  }
}

/* Standalone Grimmy’s Grotto page */
.grotto-page-lead {
  max-width: 40rem;
}

.grotto-page-soon {
  margin: 1.5rem 0 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-heading);
}

.grotto-page-back {
  margin-top: 2rem;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section:nth-child(even) {
  background: var(--surface-subtle);
}

/* Home (layout B): stripe backgrounds by section id — order changed so :nth-child(even) no longer alternates correctly here */
body.home-layout-b main > #about.section {
  background: var(--surface-page);
}

body.home-layout-b main > #home-news.section {
  background: var(--surface-subtle);
}

body.home-layout-b main > #contact.section {
  background: var(--surface-page);
}

body.home-layout-b main > #location.section {
  background: var(--surface-subtle);
}

.section-card-wrap {
  padding: 3rem 0;
}

.section-card {
  background: var(--surface-card);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
}

.section:nth-child(even) .section-card {
  box-shadow: var(--shadow-card-alt);
}

.section-card .section-title {
  margin-top: 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--size-header);
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text-heading);
}

.section-intro {
  font-size: var(--size-paragraph);
  margin: 0 0 1.25rem;
}

.paragraph {
  font-size: var(--size-paragraph);
  margin: 0 0 0.5rem;
}

/* Products */
.search-wrap {
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  max-width: 320px;
  padding: 0.6rem 1rem;
  font-family: var(--font-body);
  font-size: var(--size-paragraph);
  color: var(--text-body);
  background: var(--surface-card);
  border: 2px solid var(--cobalt);
  border-radius: 6px;
}

.search-input:focus {
  outline: none;
  border-color: var(--cobalt-dark);
}

.search-input::placeholder {
  color: var(--text-body);
  opacity: 0.5;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: var(--surface-card);
  border: 1px solid var(--border-neutral);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: var(--shadow-product-hover);
}

.product-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--surface-subtle);
}

.product-card .no-image {
  width: 100%;
  height: 160px;
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cobalt);
  font-size: var(--size-paragraph);
}

.product-card .card-body {
  padding: 1rem;
}

.product-card .card-title {
  font-family: var(--font-heading);
  font-size: var(--size-paragraph);
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.product-card .card-desc {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-body);
  opacity: 0.9;
}

.products-empty {
  font-size: var(--size-paragraph);
  color: var(--text-body);
  opacity: 0.8;
}

.hidden {
  display: none !important;
}

/* About */
.about-content {
  max-width: 640px;
}

/* Contact */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Location / Map */
.map-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-subtle);
  min-height: 280px;
}

.section-card .map-wrap {
  margin-top: 0.5rem;
}

.map-placeholder {
  padding: 2rem;
  text-align: center;
  color: var(--text-body);
  opacity: 0.85;
}

.map-embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-embed:not(.hidden) + .map-placeholder,
.map-placeholder:has(+ .map-embed:not(.hidden)) {
  display: none;
}

.map-wrap .map-embed.hidden {
  display: none;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--text-on-brand);
  padding: 1.25rem 0;
  text-align: center;
}

.site-footer .paragraph {
  margin: 0;
  font-size: var(--size-paragraph);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.footer-links a {
  color: var(--text-on-brand);
  text-decoration: none;
  font-size: var(--size-paragraph);
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Embedded site chat (public widget) */
#site-chat-root {
  font-family: var(--font-body);
}

.site-chat-launcher {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 905;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 999px;
  background: var(--cobalt);
  color: var(--text-on-brand);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.site-chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-contact-hover);
}

.site-chat-panel {
  position: fixed;
  right: 1rem;
  left: auto;
  bottom: 4.25rem;
  z-index: 910;
  width: min(100vw - 2rem, 400px);
  height: min(85vh, 640px);
  max-height: min(85vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  color: var(--text-body);
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card-alt);
  overflow: hidden;
}

.site-chat-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.site-chat-panel.hidden {
  display: none !important;
}

.site-chat-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  background: linear-gradient(135deg, var(--hero-grad-from), var(--hero-grad-to));
  border-bottom: none;
  color: var(--text-on-brand);
}

.site-chat-panel__brand {
  min-width: 0;
  flex: 1;
}

.site-chat-panel__kicker {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

.site-chat-panel__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-on-brand);
}

.site-chat-panel__sub {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  line-height: 1.35;
  opacity: 0.88;
  max-width: 16rem;
}

.site-chat-panel__head .site-chat-panel__close {
  color: var(--text-on-brand);
  flex-shrink: 0;
}

.site-chat-panel__head .site-chat-panel__close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.site-chat-panel__close {
  border: none;
  background: transparent;
  color: var(--text-body);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  opacity: 0.75;
}

.site-chat-panel__close:hover {
  opacity: 1;
  background: var(--border-subtle);
}

.site-chat-ref-banner {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  background: rgba(69, 68, 254, 0.08);
  border-bottom: 1px solid var(--border-subtle);
}

.site-chat-ref-banner.hidden {
  display: none;
}

.site-chat-ref__label {
  font-weight: 600;
  color: var(--text-heading);
  margin-right: 0.35rem;
}

.site-chat-ref__id {
  font-size: 0.85em;
  word-break: break-all;
}

.site-chat-scroll {
  flex: 1 1 auto;
  min-height: 10rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.site-chat-welcome {
  padding: 0.85rem 0.85rem 0.35rem;
}

.site-chat-welcome.hidden {
  display: none;
}

.site-chat-welcome__lead {
  margin: 0 0 0.35rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
}

.site-chat-welcome__text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-body);
  opacity: 0.92;
}

.site-chat-name-row {
  padding: 0.65rem 0.85rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(69, 68, 254, 0.04);
  flex-shrink: 0;
}

.site-chat-name-row.hidden {
  display: none;
}

.site-chat-name-label {
  display: block;
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-heading);
}

.site-chat-name-input {
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border-neutral);
  border-radius: 8px;
  font-size: 0.88rem;
  background: var(--surface-page);
  color: var(--text-body);
}

.site-chat-name-input--error {
  border-color: #c0392b;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.15);
}

.site-chat-name-error {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: #c0392b;
}

.site-chat-name-error.hidden {
  display: none;
}

.site-chat-attach-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  background: rgba(69, 68, 254, 0.08);
  border-top: 1px solid var(--border-cobalt-soft);
  color: var(--text-heading);
}

.site-chat-attach-bar.hidden {
  display: none;
}

.site-chat-attach-bar__label {
  font-weight: 600;
}

.site-chat-attach-bar__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-chat-attach-bar__clear {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--text-heading);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  border-radius: 4px;
  opacity: 0.75;
}

.site-chat-attach-bar__clear:hover {
  opacity: 1;
  background: var(--border-subtle);
}

.site-chat-messages {
  flex: 1;
  min-height: 4rem;
  padding: 0.35rem 0.85rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-chat-messages:empty {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.site-chat-msg {
  max-width: 88%;
  padding: 0.45rem 0.65rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.site-chat-msg--visitor {
  align-self: flex-end;
  background: var(--cobalt);
  color: var(--text-on-brand);
}

.site-chat-msg--visitor .site-chat-msg__time {
  color: rgba(255, 255, 255, 0.75);
}

.site-chat-msg--staff {
  align-self: flex-start;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
}

.site-chat-msg__text {
  white-space: pre-wrap;
  word-break: break-word;
}

.site-chat-msg__img-wrap {
  display: block;
  margin-top: 0.35rem;
  border-radius: 8px;
  overflow: hidden;
  max-width: 220px;
}

.site-chat-msg__img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.site-chat-msg__time {
  display: block;
  font-size: 0.72rem;
  margin-top: 0.25rem;
  opacity: 0.75;
}

.site-chat-compose {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-subtle);
  align-items: end;
  flex-shrink: 0;
}

.site-chat-file {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.site-chat-file-label {
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 8px;
  line-height: 0;
  color: var(--cobalt);
  border: 1px solid transparent;
}

.site-chat-file-icon {
  display: block;
}

.site-chat-file-label:hover {
  background: rgba(69, 68, 254, 0.1);
}

.site-chat-file-label.is-active {
  background: rgba(69, 68, 254, 0.14);
  border-color: var(--border-cobalt-mid);
}

.site-chat-input {
  grid-column: 2;
  resize: none;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border-neutral);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--surface-page);
  color: var(--text-body);
}

.site-chat-send {
  grid-column: 3;
  align-self: end;
  padding: 0.55rem 0.85rem;
  border: none;
  border-radius: 8px;
  background: var(--cobalt);
  color: var(--text-on-brand);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.site-chat-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.site-chat-footer {
  margin: 0;
  padding: 0.3rem 0.85rem 0.45rem;
  font-size: 0.74rem;
  text-align: center;
  color: var(--text-body);
  opacity: 0.85;
  background: var(--surface-subtle);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.site-chat-footer__link {
  font-weight: 600;
  color: var(--cobalt);
  text-decoration: none;
}

.site-chat-footer__link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .site-chat-launcher {
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
  }

  /* Full-screen chat on phones/small tablets: room for messages + composer; dvh tracks keyboard better than vh */
  .site-chat-panel {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    box-sizing: border-box;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* When JS pins the panel to window.visualViewport (keyboard open), allow height below 100dvh */
  .site-chat-panel.site-chat-panel--vv-layout {
    min-height: 0 !important;
  }

  .site-chat-panel__head {
    padding-top: max(0.65rem, env(safe-area-inset-top, 0px));
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
  }

  .site-chat-panel__title {
    font-size: 1.22rem;
  }

  .site-chat-panel__sub {
    font-size: 0.85rem;
    max-width: none;
  }

  .site-chat-panel__close {
    font-size: 1.85rem;
    padding: 0.4rem 0.55rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    line-height: 1;
  }

  .site-chat-ref-banner {
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
    font-size: 0.88rem;
  }

  .site-chat-scroll {
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }

  .site-chat-welcome {
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
  }

  .site-chat-welcome__text {
    font-size: 0.98rem;
  }

  .site-chat-name-row {
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
  }

  .site-chat-name-label {
    font-size: 0.88rem;
  }

  .site-chat-name-input {
    font-size: 1rem;
    padding: 0.6rem 0.7rem;
    min-height: 2.85rem;
  }

  .site-chat-messages {
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
  }

  .site-chat-msg {
    font-size: 1.02rem;
    line-height: 1.45;
    padding: 0.55rem 0.75rem;
    max-width: 92%;
  }

  .site-chat-msg__time {
    font-size: 0.8rem;
  }

  .site-chat-attach-bar {
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
    font-size: 0.88rem;
  }

  .site-chat-compose {
    padding: 0.75rem max(0.85rem, env(safe-area-inset-left, 0px)) max(0.65rem, env(safe-area-inset-bottom, 0px))
      max(0.85rem, env(safe-area-inset-right, 0px));
    gap: 0.5rem;
  }

  .site-chat-input {
    font-size: 1rem;
    min-height: 3.25rem;
    line-height: 1.45;
  }

  .site-chat-send {
    font-size: 1rem;
    padding: 0.7rem 1.15rem;
    min-height: 2.85rem;
  }

  .site-chat-footer {
    font-size: 0.82rem;
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(0.45rem, env(safe-area-inset-bottom, 0px));
  }
}

.footer-link {
  color: var(--cobalt);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover {
  text-decoration: underline;
}

/* --- News: carousel, listing, article --- */
.home-news-section {
  padding: 2.75rem 0 3rem;
  background: var(--surface-subtle);
}

.home-news-head {
  max-width: 40rem;
  margin-bottom: 1.35rem;
}

.news-carousel {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.news-carousel__viewport {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
}

.news-carousel__track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.33, 1, 0.68, 1);
}

.news-carousel__slide {
  flex: 0 0 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 640px) {
  .news-carousel__slide {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

.news-carousel__media {
  aspect-ratio: 16 / 10;
  min-height: 140px;
  background: var(--surface-subtle);
  overflow: hidden;
}

.news-carousel__media:empty {
  min-height: 160px;
}

.news-carousel__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-carousel__body {
  padding: 1.35rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  justify-content: center;
}

.news-carousel__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-heading);
  line-height: 1.25;
}

.news-carousel__summary {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text-body);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-carousel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin-top: 0.35rem;
}

.news-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-on-brand);
  background: linear-gradient(145deg, var(--hero-grad-from) 0%, var(--hero-grad-to) 100%);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
}

.news-btn:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.news-btn--ghost {
  background: transparent;
  color: var(--cobalt);
  border: 2px solid var(--cobalt);
}

.news-btn--ghost:hover {
  filter: none;
  background: rgba(69, 68, 254, 0.08);
}

html[data-theme='dark'] .news-btn--ghost:hover {
  background: rgba(138, 137, 255, 0.12);
}

.news-carousel__nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.news-carousel__arrow {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  color: var(--text-heading);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.news-carousel__arrow:hover {
  border-color: var(--border-cobalt-soft);
  background: var(--surface-subtle);
}

.news-carousel__arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.news-carousel__dots {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.news-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  padding: 0;
  border: none;
  background: var(--border-neutral);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.news-carousel__dot[aria-current='true'] {
  background: var(--cobalt);
  transform: scale(1.2);
}

.news-carousel-footer {
  margin: 1.25rem 0 0;
  text-align: center;
}

.news-page-section {
  padding: 2.5rem 0 3.5rem;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
}

@media (min-width: 640px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}

a.news-card:hover {
  border-color: var(--border-cobalt-soft);
  box-shadow: var(--shadow-contact-hover);
  transform: translateY(-2px);
}

.news-card__media {
  aspect-ratio: 16 / 9;
  background: var(--surface-subtle);
  overflow: hidden;
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card__body {
  padding: 1.1rem 1.2rem 1.25rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.news-card__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-heading);
  line-height: 1.3;
}

.news-card__summary {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-body);
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cobalt);
  margin-top: 0.25rem;
}

.news-article-section {
  padding: 2rem 0 3.5rem;
}

.news-article__hero {
  width: 100%;
  max-height: min(52vh, 420px);
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin: 0 auto 1.5rem;
  background: var(--surface-subtle);
}

.news-article__title {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--text-heading);
  line-height: 1.2;
}

.news-article__body {
  max-width: 40rem;
}

.news-article__body p {
  margin: 0 0 0.85rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-body);
}

.news-article__body p:last-child {
  margin-bottom: 0;
}

.news-article__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.news-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-body);
}

/* FAQ page */
.faq-item {
  margin-bottom: 1.5rem;
}

.faq-q {
  font-family: var(--font-heading);
  font-size: var(--size-paragraph);
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text-heading);
}

@media (min-width: 640px) {
  :root {
    --size-title: 2.5rem;
  }
  /* Don’t target .hero--b here — it uses transparent bg + title strip; extra padding shows as a white band */
  .hero:not(.hero--b) {
    padding: 5.5rem 0;
  }
  .section-card {
    padding: 2.5rem;
  }
}

@media (min-width: 900px) {
  .container {
    max-width: 1000px;
  }
}
