/* Versigen website — design tokens + base styles.
   Brand identifiers kept from the old WordPress theme: Oswald typeface,
   teal accent, dark nav. Everything else is new. */

:root {
  --ink:        #1b1e1f;
  --muted:      #5d6467;
  --bg:         #f4f5f5;
  --surface:    #ffffff;
  --border:     #e1e3e4;

  --accent:     #1f9a86;
  --accent-d:   #187a6a;
  --accent-soft: #e6f5f2;
  /* Charcoal + light grey for buttons, chips and filters so teal is kept to
     the accordion bars, spec arrows and small accents - too much teal fought
     the grey/green stainless in product photos. */
  --steel:      #2c3235;
  --chip:       #eceeee;
  --cta:        #e8622c; /* the catalogue's orange (catalogue.css --orange) - Request a Quote */
  --cta-d:      #c9501e;
  --nav-bg:     #16191a;
  --nav-text:   #f4f5f5;
  --nav-muted:  #9aa0a2;

  --danger:     #b3261e;
  --radius:     8px;
  --shadow:     0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.05);

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --max-width: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(1.6rem, 2.5vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
h3 { font-size: 1.1rem; letter-spacing: 0.01em; }

p { margin: 0 0 1em; }
a { color: var(--accent-d); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.section { padding-block: 48px; }
.section-tight { padding-block: 24px; }

/* ---- Buttons ---- */
.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--accent-d); border-color: var(--accent-d); text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }
/* The quieter partner of a main .btn (Ask a Question beside Request a Quote) */
.btn-outline { background: var(--surface); color: var(--steel); border-color: var(--steel); }
.btn-outline:hover { background: var(--steel); color: #fff; }

/* ---- Cards / grid ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ---- Forms ---- */
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="search"],
input[type="number"], textarea, select {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
textarea { min-height: 100px; resize: vertical; }
.field { margin-bottom: 16px; }
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 200px; }
.form-status { font-size: 0.9rem; margin-top: 10px; }
.form-status.error { color: var(--danger); }
.form-status.success { color: var(--accent-d); }
/* Replaces an enquiry form once it's sent (app.js formSent) */
.form-sent {
    padding: 16px 18px; border-radius: 6px; outline: none;
    border-left: 4px solid var(--accent-d);
    background: color-mix(in srgb, var(--accent-d) 8%, #fff);
}
.form-sent strong { display: block; font-size: 1.05rem; color: var(--accent-d); }
.form-sent p { margin: 4px 0 0; }
.remember-note { font-size: 0.8rem; margin: 0 0 12px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-d); text-decoration: underline; cursor: pointer; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Top nav ---- */
.site-nav { background: var(--nav-bg); color: var(--nav-text); position: sticky; top: 0; z-index: 40; }
.nav-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.06em; color: var(--nav-text); white-space: nowrap; }
.brand:hover { text-decoration: none; color: var(--nav-muted); }
/* The logo itself (header.php) - ~34px tall in the 64px bar; flex: none so the menu can't squash it. */
.brand { display: flex; align-items: center; flex: none; }
.brand-logo { display: block; height: 34px; width: auto; fill: currentColor; }

/* Hamburger — hidden on desktop, shown under the mobile breakpoint below */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none; border: none; color: var(--nav-text);
  padding: 8px; border-radius: var(--radius); cursor: pointer;
}
.nav-toggle:hover { background: rgba(255,255,255,0.08); }

.nav-menu { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link { padding: 10px 12px; color: var(--nav-muted); font-size: 0.9rem; font-weight: 600; white-space: nowrap; border-radius: var(--radius); }
.nav-link:hover { color: var(--nav-text); background: rgba(255,255,255,0.06); text-decoration: none; }
.nav-tel-mobile { display: none; }

/* Products dropdown */
.nav-products { position: relative; }
.nav-products-toggle {
  display: flex; align-items: center; gap: 4px;
  font: inherit; padding: 10px 12px; border: none; border-radius: var(--radius);
  background: none; color: var(--nav-muted); font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.nav-products-toggle:hover, .nav-products-toggle[aria-expanded="true"] { color: var(--nav-text); background: rgba(255,255,255,0.06); }
.nav-caret { font-size: 0.7em; }
.nav-products-panel {
  position: absolute; top: 100%; left: 0; z-index: 30; margin-top: 6px;
  display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 18px 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px; width: max-content;
  /* Wide enough that category names sit on one line, never wider than the window. */
  max-width: min(960px, calc(100vw - 40px));
}
.nav-products-panel[hidden] { display: none; }
@media (min-width: 781px) and (max-width: 1000px) {
  .nav-products-panel { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
.nav-products-col { min-width: 0; }
.nav-products-heading { display: block; font-weight: 700; color: var(--ink); font-size: 0.9rem; margin-bottom: 6px; }
.nav-products-col ul { list-style: none; margin: 0; padding: 0; }
.nav-products-col li a { display: block; padding: 3px 0; color: var(--muted); font-size: 0.85rem; }
.nav-products-col li a:hover { color: var(--accent-d); text-decoration: none; }

.nav-tel { color: var(--accent); font-family: var(--font-display); font-weight: 600; white-space: nowrap; }
.nav-tel:hover { text-decoration: none; color: var(--nav-text); }

/* ---- Mobile nav ---- */
@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav-tel { display: none; }
  .nav-tel-mobile { display: block; }

  .nav-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--nav-bg); border-top: 1px solid rgba(255,255,255,0.1);
    padding: 8px 20px 16px;
  }
  .nav-menu.open { display: flex; }
  .nav-link { padding: 12px 4px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.08); }

  .nav-products { width: 100%; }
  .nav-products-toggle { width: 100%; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); border-radius: 0; }
  .nav-products-panel {
    position: static; margin-top: 0; width: auto; max-width: none;
    grid-template-columns: 1fr; gap: 14px; box-shadow: none; border: none;
    border-radius: 0; background: rgba(255,255,255,0.04); padding: 14px;
  }
  .nav-products-heading { color: var(--nav-text); }
  .nav-products-col li a { color: var(--nav-muted); }
  .nav-products-col li a:hover { color: var(--nav-text); }
}

/* ---- Footer ---- */
.site-footer { background: var(--nav-bg); color: var(--nav-muted); margin-top: 64px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; padding: 32px 20px; }
.site-footer strong { color: var(--nav-text); }
.site-footer .muted { color: var(--nav-muted); margin: 4px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; }
.footer-links a { color: var(--nav-muted); font-size: 0.9rem; }
/* "A | B | C" - a bar before every link but the first. */
.footer-links a + a::before { content: '|'; margin: 0 12px; color: var(--nav-muted); opacity: 0.5; }
/* Second row, full width under the brand + contact row. */
.footer-sub { flex-basis: 100%; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer-links a:hover { color: var(--nav-text); }
/* LinkedIn icon at the end of the Contact | phone row */
.footer-social { display: inline-flex; align-items: center; }
.footer-social svg { width: 18px; height: 18px; fill: currentColor; }

/* ---- Home hero ---- */
.hero { background: var(--nav-bg); color: var(--nav-text); padding: 64px 0; text-align: center; }
.hero h1 { color: var(--nav-text); }
.hero-sub { color: var(--nav-muted); max-width: 520px; margin: 0 auto 28px; }
.hero-search { display: flex; max-width: 560px; margin: 0 auto; gap: 8px; }
.hero-search input { flex: 1; }
.hero-photo {
  background-size: cover; background-position: center; position: relative;
}
.hero-photo::before {
  content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.55);
}
.hero-photo .container { position: relative; z-index: 1; }
.hero-photo h1, .hero-photo .hero-sub { color: #fff; }
/* Homepage categories: one scrolling row (app.js drives the arrows; it
   still swipes/scrolls with JS off). */.carousel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.carousel-head h2 { font-size: 1.15rem; margin: 0; }
.carousel-nav { display: flex; gap: 6px; }
.carousel-nav[hidden] { display: none; }
.carousel-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font-size: 1.4rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 3px;
}
.carousel-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-d); }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }
.carousel-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 210px; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 4px 2px 12px; /* room for the tile shadow + hover lift */
  scrollbar-width: thin;
}
.carousel-track > * { scroll-snap-align: start; }
@media (prefers-reduced-motion: reduce) { .carousel-track { scroll-behavior: auto; } }
.carousel-track .category-tile-body { padding: 10px 14px 14px; }
.carousel-track .category-tile-body h3 { font-size: 0.95rem; margin-bottom: 4px; }
.carousel-track .category-tile-body .muted {
  font-size: 0.8rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Featured range splash above the categories: photo | copy, 50:50. The
   photo fills its half edge to edge (cover), cropped from the left so a
   wide catalogue overview keeps the unit, which sits right of centre. */
.feature-banner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-bottom: 40px; overflow: hidden; color: inherit;
  transition: box-shadow 0.15s;
}
.feature-banner:hover { text-decoration: none; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.feature-banner-media { position: relative; min-height: 340px; background: var(--chip); }
.feature-banner-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.feature-banner-body { padding: 40px 48px; border-left: 4px solid var(--accent); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.feature-banner-eyebrow {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.75rem; color: var(--accent-d); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 999px;
}
.feature-banner-body .logo-anim { width: 180px; margin-bottom: 20px; }
.feature-banner-body h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 0; }
.feature-banner-sub { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 14px; }
.feature-banner-body p:not(.feature-banner-sub) { max-width: 46ch; }
.feature-banner:hover .btn { background: var(--accent-d); border-color: var(--accent-d); }
@media (max-width: 700px) {
  .feature-banner { grid-template-columns: 1fr; }
  .feature-banner-media { min-height: 0; aspect-ratio: 16 / 9; }
  .feature-banner-body { border-left: 0; border-top: 4px solid var(--accent); padding: 24px 20px; }
}

/* Animated Versigen logo (includes/logo-anim.php): app.js adds is-waiting,
   then is-playing once it's on screen; without either it just shows. */
.logo-anim svg { display: block; width: 100%; height: auto; overflow: visible; }
.logo-anim .lp { fill: var(--ink); transform-box: fill-box; transform-origin: center; }
.logo-anim.is-waiting .lp, .logo-anim.is-playing .lp { opacity: 0; transform: scale(0); }
.logo-anim.is-playing .lp { animation: logo-pop 0.5s cubic-bezier(.34, 1.56, .64, 1) var(--d, 0s) forwards; }
@keyframes logo-pop { to { opacity: 1; transform: scale(1); } }
.logo-anim-tagline {
  display: block; margin-top: 6px; text-align: center; white-space: nowrap;
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink);
}
.logo-anim.is-waiting .logo-anim-tagline, .logo-anim.is-playing .logo-anim-tagline { opacity: 0; transform: translateY(6px); }
.logo-anim.is-playing .logo-anim-tagline { animation: logo-tag 0.6s ease 1.3s forwards; }
@keyframes logo-tag { to { opacity: 1; transform: none; } }

.category-tile { display: flex; flex-direction: column; color: inherit; overflow: hidden; padding: 0; transition: box-shadow 0.15s, transform 0.15s; }
.category-tile:hover { text-decoration: none; box-shadow: 0 4px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.category-tile-media { aspect-ratio: 4 / 3; background: #fff; display: flex; align-items: center; justify-content: center; }
.category-tile-media img { width: 100%; height: 100%; object-fit: contain; padding-top: 12px; }
/* A catalogue overview scene fills the tile edge to edge */
.category-tile-media.is-scene img { object-fit: cover; padding: 0; }
.category-tile-noimg { width: 100%; height: 100%; background: linear-gradient(135deg, var(--bg), var(--border)); }
.category-tile-body { padding: 16px 24px 20px; }
.category-tile-body h3 { margin-bottom: 6px; }

/* ---- Product card (category listing + search results) ---- */
.product-card { display: flex; flex-direction: column; color: inherit; overflow: hidden; transition: box-shadow 0.15s, transform 0.15s; }
.product-card:hover { text-decoration: none; box-shadow: 0 4px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.product-card-media { aspect-ratio: 4 / 3; background: #fff; display: flex; align-items: center; justify-content: center; }
.product-card-media img { width: 100%; height: 100%; object-fit: contain; padding-top: 12px; }
.product-card-noimg { width: 100%; height: 100%; background: linear-gradient(135deg, var(--bg), var(--border)); }
.product-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-card-body h3 { margin-bottom: 8px; font-size: 1rem; }
.product-card-desc {
  color: var(--muted); font-size: 0.9rem; margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card-models { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.product-card-models li { font-size: 0.75rem; font-weight: 600; background: var(--chip); color: var(--ink); padding: 3px 8px; border-radius: 999px; }
.product-card-models li.muted { background: var(--bg); color: var(--muted); }

/* ---- Product page ---- */
.breadcrumbs { font-size: 0.85rem; margin-bottom: 16px; }

/* Previous / next product in the category (product.php, bottom of the page).
   Outlined charcoal - quieter than the old site's black bars and the orange quote button. */
/* Desktop: compact, as wide as the name needs, Previous far left / Next far right.
   Phones: full width, stacked - easy to tap. */
.product-pager { display: flex; justify-content: space-between; gap: 16px; padding-block: 24px 8px; }
.product-pager-link {
  display: flex; flex-direction: column; gap: 1px; max-width: 45%;
  padding: 12px 30px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); text-decoration: none;
}
.product-pager-link:hover { border-color: var(--steel); background: var(--chip); text-decoration: none; }
.product-pager-link.next { margin-left: auto; text-align: right; }
.product-pager-dir { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.product-pager-name { font-family: var(--font-display); font-size: 0.95rem; text-transform: uppercase; }
@media (max-width: 600px) {
  .product-pager { flex-direction: column; gap: 10px; }
  .product-pager-link { max-width: none; padding: 12px 16px; }
  .product-pager-link.next { margin-left: 0; }
  .product-pager-name { font-size: 1.05rem; }
}
.product-top { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 32px; margin-bottom: 32px; }
@media (max-width: 780px) {
  .product-top { grid-template-columns: minmax(0, 1fr); }
  /* One column on phones: hero, then name/intro/accordion, then specs - so
     the H1 isn't buried under the spec table. display: contents lifts the
     hero and switcher out of .product-media so they can be ordered
     independently around .product-intro. */
  .product-media { display: contents; }
  .product-hero { order: 1; min-width: 0; }
  .product-intro { order: 2; }
  .product-top .model-switcher { order: 3; min-width: 0; margin-top: 0; }
}
/* A plain `1fr` column won't shrink below its widest child (a long model
   code in the select, an unbroken word), which pushes the page wider than a
   phone screen and makes the container's side padding look missing. */
.product-media, .product-intro { min-width: 0; }
.product-hero {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; padding: 5px; aspect-ratio: 1 / 1; /* Versigen product photos are all square */
  container-type: size;
}
/* The stage shrink-wraps the image exactly (sized off the hero box via
   container units, not %, to avoid a sizing loop), so hotspot left/top %s
   land on the same spot of the picture they were placed on in VersiHub. */
.hotspot-stage { position: relative; line-height: 0; }
.hotspot-stage img { display: block; width: auto; height: auto; max-width: 100cqw; max-height: 100cqh; }

/* ---- Hero hotspots: numbered dots with hover/tap tooltips ---- */
.hotspot {
  position: absolute; transform: translate(-50%, -50%); z-index: 1;
  width: 28px; height: 28px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 2px solid #fff;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); cursor: pointer;
}
.hotspot:hover, .hotspot:focus-visible, .hotspot.is-open { background: var(--accent-d); z-index: 2; }
.hotspot-tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 220px; padding: 8px 10px;
  background: var(--ink); color: #fff; border-radius: 6px;
  font-size: 0.8rem; font-weight: 500; line-height: 1.35; text-align: left;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.15s ease;
}
.hotspot-tip::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--ink);
}
.hotspot:hover .hotspot-tip, .hotspot:focus-visible .hotspot-tip, .hotspot.is-open .hotspot-tip { opacity: 1; visibility: visible; }
.hotspot--left .hotspot-tip { left: auto; right: -8px; transform: none; }
.hotspot--left .hotspot-tip::after { left: auto; right: 16px; transform: none; }
.hotspot--right .hotspot-tip { left: -8px; transform: none; }
.hotspot--right .hotspot-tip::after { left: 16px; transform: none; }
.hotspot--below .hotspot-tip { bottom: auto; top: calc(100% + 10px); }
.hotspot--below .hotspot-tip::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--ink); }
.product-hero-none { width: 100%; height: 100%; background: var(--bg); border-radius: var(--radius); }
.product-subhead { text-transform: none; letter-spacing: normal; font-size: 1.1rem; }
.icon-badges { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.icon-badges li { font-size: 0.75rem; font-weight: 600; background: var(--chip); color: var(--ink); padding: 4px 10px; border-radius: 999px; }
.feature-list { padding-left: 20px; }
.feature-list li { margin-bottom: 4px; }
.warranty { font-size: 0.85rem; }

/* ---- Accordion (Product Information / Features / Downloads) - the old
   site's collapsible teal bars, one panel open at a time
   (see app.js) ---- */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 16px 0; }
.accordion-item + .accordion-item { border-top: 1px solid var(--border); }
.accordion-toggle {
  display: block; width: 100%; position: relative;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  padding: 10px 40px 10px 16px; margin: 0; text-align: left;
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.accordion-toggle:hover, .accordion-toggle[aria-expanded="true"] { background: var(--accent-d); }
.accordion-toggle::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; line-height: 1; }
.accordion-toggle[aria-expanded="true"]::after { content: '\2212'; }
/* The old site animates this with jQuery's slideToggle - a real height
   animation, JS-driven. Ported here as a `max-height` transition against an
   exact, JS-measured target (app.js sets it to the panel's own scrollHeight,
   never a guessed ceiling) with a smooth deceleration curve, plus a slight
   opacity fade on the inner content so the reveal doesn't look hard-clipped. */
.accordion-panel { overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.accordion-panel-inner { background: var(--surface); padding: 16px 16px 36px; opacity: 0; transition: opacity 0.3s ease; }
.accordion-panel.is-open .accordion-panel-inner { opacity: 1; transition-delay: 0.05s; }
.accordion-panel-inner > *:last-child { margin-bottom: 0; }

/* ---- Model spec switcher (sits under the hero) ---- */
.model-switcher { margin-top: 20px; }
.model-panel { display: none; }
.model-panel.active { display: block; }
.model-carousel { display: flex; align-items: stretch; gap: 8px; margin-bottom: 10px; }
.model-carousel-arrow {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--radius);
  border: none; background: var(--accent); color: #fff;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.model-carousel-arrow:hover { background: var(--accent-d); }
.model-carousel-select {
  flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 0.95rem; cursor: pointer;
}
.model-carousel-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.model-single-code { font-weight: 600; color: var(--accent-d); margin-bottom: 10px; }
.spec-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 0.9rem; background: var(--surface); }
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td { padding: 9px 14px; vertical-align: top; }
.spec-table td:first-child { width: 45%; color: var(--muted); }
.spec-table td:last-child { font-weight: 600; }

/* ---- Downloads ---- */
.downloads { display: flex; flex-direction: column; gap: 20px; }
.download-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.download-filter {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.download-filter:hover { background: var(--chip); }
.download-filter.is-active { background: var(--steel); border-color: var(--steel); color: #fff; }
.downloads-group h4 { margin-bottom: 8px; text-transform: none; font-family: var(--font-body); font-weight: 700; }
.downloads-list { display: flex; flex-direction: column; gap: 6px; }
.download-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink); }
.download-item:hover { background: var(--bg); text-decoration: none; border-color: var(--accent); }
.download-size { font-size: 0.8rem; white-space: nowrap; }

/* Read out by screen readers, not shown (e.g. "PDF, opens in a new tab") */
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.gallery-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: block; }
.gallery-item img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.gallery-caption { display: block; padding: 6px 8px; font-size: 0.75rem; color: var(--muted); }
.product-hero { cursor: zoom-in; }
.product-hero.has-hotspots { cursor: default; }

/* ---- Lightbox ---- */
body.lightbox-open { overflow: hidden; }
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 48px;
}
.lightbox-overlay[hidden] { display: none; }
.lightbox-figure { max-width: 100%; max-height: 100%; margin: 0; text-align: center; }
.lightbox-img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.lightbox-caption { color: #fff; opacity: 0.85; font-size: 0.85rem; margin-top: 12px; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed; background: rgba(255,255,255,0.1); color: #fff; border: none; border-radius: 999px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1;
  transition: background 0.15s;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }
.lightbox-close { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 1.8rem; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
@media (max-width: 640px) {
  .lightbox-overlay { padding: 24px; }
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; font-size: 1.5rem; }
}

/* ---- Quick Quote ---- */
.enquiry-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  padding: 16px 20px; margin-bottom: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.enquiry-q { margin: 0; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.2; text-transform: uppercase; }
.enquiry-q strong { color: var(--accent); }
.enquiry-call { margin: 0; display: flex; flex-direction: column; }
.enquiry-call a { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent-d); }
.enquiry-call span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.02em; color: var(--muted); }
/* One short left-right wiggle to draw the eye to Quick Quote - played once
   a second after the page loads, on the first few product pages of a visit
   (product.php adds the class; how many is VersiHub > Settings > Website).
   Skipped entirely for visitors who've asked their device for less motion. */
@keyframes qq-wiggle {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(6px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
  90% { transform: translateX(2px); }
}
.qq-toggle.qq-wiggle { animation: qq-wiggle 0.7s ease-in-out 1; }
@media (prefers-reduced-motion: reduce) {
  .qq-toggle.qq-wiggle { animation: none; }
}
.enquiry-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.qq-toggle { background: var(--cta); border-color: var(--cta); }
.btn.qq-toggle:hover { background: var(--cta-d); border-color: var(--cta-d); }
/* ---- Attention tooltips (app.js "Attention tooltips") ----
   z-index under the sticky .site-nav (40), so a tip scrolls away beneath it. */
.tip {
  position: absolute; z-index: 35; width: max-content; max-width: min(300px, calc(100vw - 24px));
  padding: 14px 36px 14px 16px; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font-size: 0.9rem; line-height: 1.4;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  opacity: 0; transform: translateY(6px); transition: opacity 0.4s ease, transform 0.4s ease;
}
.tip.tip-in { opacity: 1; transform: none; }
.tip::before { /* the arrow, pointing up at the button */
  content: ''; position: absolute; top: -7px; left: var(--arrow-x, 50%); margin-left: -7px;
  border: 7px solid transparent; border-top: 0; border-bottom-color: var(--surface);
}
.tip strong { display: block; color: var(--cta); font-family: var(--font-display); font-size: 1rem; text-transform: uppercase; margin-bottom: 2px; }
.tip a { display: inline-block; margin-top: 6px; font-weight: 600; color: var(--cta-d); }
.tip-close {
  position: absolute; top: 6px; right: 8px; background: none; border: none; padding: 2px 6px;
  font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer;
}
.tip-close:hover { color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .tip { transition: opacity 0.2s; transform: none; }
}

/* ---- Ask a Question (includes/ask-form.php) ---- */
.ask-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin-top: 40px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.ask-bar-text { margin: 0; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.2; text-transform: uppercase; }
.ask-bar-text strong { color: var(--accent); }
.ask-bar + .ask-form-wrap { margin-top: 16px; }
.ask-sent { margin-bottom: 16px; }

.qq-form-wrap { margin: -8px 0 24px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.qq-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qq-close {
  background: none; border: none; padding: 4px 0; cursor: pointer;
  font: inherit; font-size: 0.85rem; color: var(--muted); text-decoration: underline;
}
.qq-close:hover { color: var(--ink); }
.qq-models { border: none; padding: 0; margin: 0 0 16px; }
.qq-models legend { font-size: 0.85rem; font-weight: 600; color: var(--muted); padding: 0 0 6px; }
.qq-model-check { display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 8px 0; font-weight: 400; text-transform: none; color: var(--ink); }
.qq-model-check input { width: auto; }
/* Accessory titles are longer than model codes - one per line, two columns on wide screens. */
.qq-accessories { columns: 2 280px; column-gap: 24px; }
.qq-accessories legend { column-span: all; }
.qq-accessories .qq-model-check { display: flex; align-items: flex-start; margin: 0 0 8px; break-inside: avoid; }
.qq-accessories .qq-model-check input { margin-top: 3px; flex: none; }

/* ---- Distributors (distributors.php) ---- */
.distributor-grid { margin: 24px 0 40px; }
.distributor-card .product-card-media { aspect-ratio: 2 / 1; } /* logos are 600 x 300 */
.distributor-card .product-card-media img { padding: 12px; } /* a logo fills its 2:1 box - keep it off the edges */
.distributor-card .product-card-body p { margin: 0; font-size: 0.9rem; }

/* ---- Stock clearance (stock-clearance.php) ---- */
.clearance-grid { margin: 24px 0 40px; }
.clearance-card .product-card-media { position: relative; }
.clearance-badge {
  position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
}
.clearance-card .product-card-body { display: flex; flex-direction: column; flex: 1; }
.clearance-card h3 { text-transform: none; }
.clearance-code { margin: 0 0 4px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); }
.clearance-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 8px 0; }
.clearance-price strong { font-size: 1.35rem; color: var(--accent-d); }
.clearance-specs { font-size: 0.85rem; margin: 0 0 12px; }
.clearance-enquire { margin-top: auto; align-self: flex-start; }

.clearance-detail { display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: 32px; margin-bottom: 32px; }
.clearance-detail-media img { width: 100%; height: auto; display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.clearance-detail-media .product-card-noimg { aspect-ratio: 4 / 3; border-radius: var(--radius); }
.clearance-detail h1 { margin-top: 0; }
.clearance-detail .clearance-price strong { font-size: 1.8rem; }
.clearance-gst { font-size: 0.85rem; }
.clearance-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0; }
.clearance-facts dt { font-weight: 600; color: var(--muted); }
.clearance-facts dd { margin: 0; }
.clearance-enquiry { padding: 24px; margin-bottom: 24px; }
.clearance-enquiry h2 { margin-top: 0; }
.clearance-terms { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--muted); }
.clearance-terms h2 { font-size: 1rem; color: var(--ink); }
.clearance-terms ul { padding-left: 20px; }
@media (max-width: 780px) {
  .clearance-detail { grid-template-columns: 1fr; }
}

/* ---- Search page ---- */
.search-box { width: 100%; max-width: 560px; font-size: 1.1rem; padding: 14px 16px; margin: 16px 0 24px; }
#search-results { margin-top: 12px; }

/* ---- Contact page ---- */
.contact-page { max-width: 640px; }

/* Legal pages: terms & conditions, privacy policy */
.legal-page { max-width: 820px; line-height: 1.6; }
.legal-page section { scroll-margin-top: 90px; }
.legal-page h2 { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.legal-page h3 { margin: 28px 0 8px; }
.legal-page p { margin: 0 0 12px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 8px 0 0; }
.legal-list { list-style: none; margin: 0 0 14px; padding: 0 0 0 4px; }
.legal-list li { display: flex; gap: 10px; margin-bottom: 6px; }
.legal-list .legal-list { margin: 6px 0 0; }
.legal-marker { flex: 0 0 2.4em; color: var(--muted); }
