/* ============================================================================
   CELEST Watches — newsite theme
   Dark, minimalist, airy. Single source of truth for all site styling.
   Design tokens live in :root; components reference them.
   ============================================================================ */

:root {
  --bg: #1a1a1a;            /* page background — product images blend into this */
  --surface: #222222;       /* slightly elevated surface (dropdowns, inputs) */
  --surface-2: #262626;     /* hover / secondary elevation */
  --text: #e8e8e8;          /* primary text */
  --muted: #a0a0a0;         /* secondary / muted text */
  --border: #2e2e2e;        /* hairline borders / dividers */
  --border-strong: #3a3a3a; /* stronger borders (focus, inputs) */
  --accent: #d4af37;        /* gold accent — links, buttons, highlights */
  --accent-hover: #e5c25a;  /* gold hover */
  --accent-ink: #1a1a1a;    /* text on a gold fill */
  --ok: #5cc85c;            /* success message */
  --err: #e06a6a;           /* error message */

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Montserrat", var(--font);   /* headings, menu, logo */

  --maxw-text: 44rem;       /* comfortable reading width */
  /* Article column for blog posts and static pages. Deliberately wider than
     --maxw-text: that value is the typographic ideal, this one is the width the
     site actually reads best at (and matches .home-intro). Kept separate so
     tuning it does not move .product-content or the pagers.
     Reference: 44rem ~86 chars, 52rem ~101, 60rem ~117, 78rem ~152 (the old
     full-body width). Change this one number to retune every article page. */
  --maxw-article: 60rem;
  --radius: 6px;
}

/* ---- fonts (self-hosted, latin subset, SIL OFL — assets/fonts/OFL-*.txt) ----
   Inter: body text (400, 400 italic, 600; heavier weights render as 600).
   Montserrat: logo (300 + 500), headings (500), top-level menu (400) — the
   same typeface as the logo and the OG image. No Google Fonts (GDPR). */
@font-face {
  font-family: "Montserrat";
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url("fonts/montserrat-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/montserrat-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/montserrat-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url("fonts/inter-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
}

/* ---- base / reset ---- */
* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  margin: 0;
  /* airy: give the page breathing room; content sits in a centered column */
  padding: 0 1.5rem 4rem;
  max-width: 78rem;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--text); font-family: var(--font-display); font-weight: 500; letter-spacing: 0.01em; line-height: 1.25; }
h1 { font-size: 1.9rem; margin: 1.5rem 0 1rem; }
h2 { font-size: 1.35rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; }

p { margin: 0 0 1rem; }

/* ============================================================================
   NOTICE BAR (colors come inline from the WP setting; only link style here)
   Full-bleed: the body is a centered 78rem column with side padding, so break
   the notice out to span the full viewport width.
   ============================================================================ */
.site-notice {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.site-notice a { color: inherit; text-decoration: underline; }

/* ============================================================================
   HEADER / MENU / LOGO / SEARCH
   ============================================================================ */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  margin: 0 0 2rem;
  /* Sticky: header pins to the top; content scrolls under. Notice scrolls away. */
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--bg);
  padding: 0.9rem 0;
}
.site-header-left { display: flex; align-items: center; gap: 2rem; flex: 1 1 auto; }

.site-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-family: var(--font-display);
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
}
/* The negative right margins cancel the trailing letter-spacing, so both lines
   centre on the letters themselves. */
.site-logo .logo-name {
  font-size: 1.85rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  margin-right: -0.14em;
  color: var(--text);
  transition: color 0.15s ease;
}
.site-logo .logo-sub {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.6em;
  margin-right: -0.6em;
  margin-top: 0.4rem;
  color: var(--accent);
}
.site-logo:hover { text-decoration: none; }
.site-logo:hover .logo-name { color: var(--accent); }

.site-menu ul { list-style: none; margin: 0; padding: 0; }
.site-menu > ul { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.site-header .site-menu > ul { border-bottom: none; margin-bottom: 0; }
.site-menu a {
  text-decoration: none;
  color: var(--muted);
  display: block;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}
.site-menu a:hover { text-decoration: none; color: var(--text); }
.site-menu > ul > li > a { font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.03em; }
.site-menu > ul > li > a:hover { color: var(--accent); text-decoration: underline; }
.site-menu li { position: relative; }
/* Submenus: hidden by default, shown on hover. */
.site-menu li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 11rem;
  padding: 0.35rem 0;
  z-index: 100;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius);
}
.site-menu li:hover > ul { display: block; }
.site-menu li ul li { position: relative; }
.site-menu li li ul { top: 0; left: 100%; }
.site-menu li ul a { padding: 0.4rem 0.9rem; white-space: nowrap; }
.site-menu li ul a:hover { background: var(--surface-2); }

/* search: a magnifier icon in the header opens a full-screen search overlay
   (#search-overlay, toggled by the header script). The predictive results are
   listed inside the overlay. */
.site-search { flex: 0 0 auto; display: flex; }
#site-search-open {
  padding: 0.5rem 0.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#site-search-open:hover { background: var(--surface-2); color: var(--text); }

html.search-open { overflow: hidden; }   /* no page scroll behind the overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;                         /* above the sticky header (500) */
  background: var(--bg);
  overflow-y: auto;
}
.search-overlay[hidden] { display: none; }
.search-overlay-inner { max-width: 48rem; margin: 0 auto; padding: 6rem 1.5rem 3rem; }
.search-overlay-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  padding: 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
}
.search-overlay-close:hover { background: var(--surface-2); color: var(--text); }
.search-overlay-field {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border-bottom: 2px solid var(--border-strong);
  padding: 0.3rem 0;
}
.search-overlay-field:focus-within { border-color: var(--accent); }
.search-overlay-field svg { flex: 0 0 auto; color: var(--muted); }
.search-overlay-field input {
  flex: 1;
  min-width: 0;
  padding: 0.3rem 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1.8rem;
  font-weight: 400;
}
.search-overlay-field input::placeholder { color: var(--muted); }
.search-overlay-hint { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.85rem; }
/* In the overlay the results are a plain list, not a floating dropdown. */
.search-overlay .site-search-results {
  position: static;
  min-width: 0;
  max-width: none;
  max-height: none;
  overflow: visible;
  margin-top: 1.5rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.search-overlay .ssr-item { padding: 0.7rem 0.5rem; }
.search-overlay .ssr-title-link { font-size: 1rem; }
.site-search-results {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 30rem;
  max-width: 34rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  max-height: 26rem;
  overflow-y: auto;
  border-radius: var(--radius);
  margin-top: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.site-search-results::-webkit-scrollbar { width: 5px; }
.site-search-results::-webkit-scrollbar-track { background: transparent; }
.site-search-results::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.site-search-results.open { display: block; }
.ssr-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--border);
}
.ssr-item:last-child { border-bottom: none; }
.ssr-item:hover { background: var(--surface-2); }
.ssr-link-img { flex: 0 0 auto; display: block; }
.ssr-item img { width: 77px; height: 77px; object-fit: cover; background: var(--surface-2); border-radius: 4px; display: block; }
.ssr-item .ssr-kind { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; flex: 0 0 auto; }
.ssr-item .ssr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.ssr-title-link { font-size: 0.9rem; line-height: 1.25; color: var(--text); text-decoration: none; }
.ssr-title-link:hover { color: var(--text); text-decoration: none; }
.ssr-item .ssr-platform { font-size: 0.72rem; color: var(--accent); letter-spacing: 0.02em; text-decoration: none; align-self: flex-start; }
.ssr-item .ssr-platform:hover { text-decoration: underline; }
.ssr-empty { padding: 0.7rem; color: var(--muted); font-size: 0.9rem; }

/* ============================================================================
   BREADCRUMB
   ============================================================================ */
.crumb { margin-bottom: 0.75rem; color: var(--muted); font-size: 0.9rem; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }
.crumb em { color: var(--text); font-style: normal; }

/* ============================================================================
   CATALOG: tree + product grid + cards (borderless — images blend into bg)
   ============================================================================ */
.wrap { display: flex; gap: 3rem; align-items: flex-start; }
.left { flex: 0 0 16rem; }
/* Category tree — modern sidebar nav styling (no markup change). */
.left ul { list-style: none; margin: 0; padding: 0; }
.left li { margin: 0; line-height: 1.4; }
.left a {
  display: inline-block;
  padding: 0.5rem 0.6rem 0.5rem 0.6rem;
  color: var(--muted); text-decoration: none;
  border-radius: var(--radius);
  transition: color 0.15s ease, background 0.15s ease;
}
.left a:hover { color: var(--accent); background: var(--surface); text-decoration: none; }
/* Top-level categories: accent, larger, separated by top margin between blocks. */
.left > ul > li { margin-top: 1.5rem; }
.left > ul > li:first-child { margin-top: 0; }
.left > ul > li > a { color: var(--accent); font-size: 1.1rem; }
.left > ul > li > a:hover { color: var(--accent-hover); }
/* Nested levels: subtle indent (no guide line). */
.left ul ul { margin-left: 0.6rem; padding-left: 0.6rem; }
.left ul ul a { font-size: 0.9rem; padding: 0.35rem 0.6rem; }
.left .cat-count { color: var(--muted); font-size: 0.8rem; margin-left: 0.15rem; }
.cat-total { font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.right { flex: 1; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Product card — borderless, image sits directly on the page background. */
.pcard { list-style: none; text-align: center; margin: 0; }
.pcard a { text-decoration: none; color: var(--text); display: block; }
.pcard a:hover { text-decoration: none; color: var(--accent); }
.pcard .name { font-size: 0.9rem; color: var(--muted); margin-top: 0.6rem; transition: color 0.15s ease; }
.pcard a:hover .name { color: var(--text); }
.pg-thumb {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  /* No card chrome: transparent so square product images blend into --bg. */
  background: transparent;
  overflow: hidden;
  border-radius: var(--radius);
}
.pg-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-thumb .pg-hover { opacity: 0; transition: opacity 0.25s ease; }
.pg-thumb:hover .pg-hover { opacity: 1; }

/* ============================================================================
   PRODUCT SLIDER
   ============================================================================ */
.pslider { margin: 3rem 0; }
.pslider h2 { margin: 0 0 1rem; }
.pslider-wrap { position: relative; }
/* Embla: viewport clips, container is the flex track, slides size 4-in-view. */
.pslider-track { overflow: hidden; }
.pslider-container { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.pslider-container .pcard { flex: 0 0 calc((100% - 3 * 2rem) / 4); min-width: 0; margin: 0; }
.pslider-btn {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.pslider-btn:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }
.pslider-btn:disabled { opacity: 0.35; cursor: default; }
.pslider-btn:disabled:hover { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.pslider-prev { left: -0.8rem; }
.pslider-next { right: -0.8rem; }

/* Homepage-specific: intro + slider headings with "See all" link */
.home-intro { max-width: 60rem; margin: 0 auto 2rem; }
.home-intro figure { margin: 0 0 1.5rem; text-align: center; }
.home-intro img { max-width: 100%; height: auto; border-radius: var(--radius); }
.slider-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.slider-head .see-all { font-size: 0.9rem; white-space: nowrap; color: var(--accent); }
.slider-head .see-all:hover { color: var(--accent-hover); }

/* ============================================================================
   BADGES (overlay on thumbnails)
   ============================================================================ */
.badges { position: absolute; top: 0.5rem; left: 0.5rem; z-index: 3; display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 0.3rem; }
.badge { font-size: 0.62rem; line-height: 1; padding: 0.25rem 0.45rem; border-radius: 3px; color: #fff; font-weight: 600; white-space: nowrap; letter-spacing: 0.03em; }
.badge-apple { background: #333; }
.badge-wearos { background: #4285f4; }
.badge-huawei { background: #c8102e; }
.badge-sale { background: #e53935; }
.badge-free { background: var(--accent); color: var(--accent-ink); }
.badge-coming { background: #f9a825; color: #1a1a1a; }

/* ============================================================================
   PRODUCT DETAIL PAGE
   ============================================================================ */
/* Catalog header: title + sort control. (Was inline styles.) */
.catalog-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.5rem; }
.catalog-head h1 { margin: 0; }

/* Sort control. Follows the same form-control pattern as the contact/review
   inputs below. appearance:none drops the native arrow so the chevron can be
   drawn in the site's muted grey.
   LIMIT: only the CLOSED control is styleable. The open option list is rendered
   by the OS; html{color-scheme:dark} is what keeps that dark. The chevron colour
   is hard-coded because a CSS var cannot be interpolated into a data: URI — it
   is --muted (#a0a0a0); change both together. */
.sort-label { font-size: 0.9rem; color: var(--muted); display: inline-flex; align-items: center; gap: 0.5rem; }
.sort-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding: 0.45rem 2rem 0.45rem 0.7rem;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%23a0a0a0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
}
.sort-select:hover { border-color: var(--accent); }
.sort-select:focus { outline: none; border-color: var(--accent); }
/* Best-effort on the OS-rendered list; honoured by some platforms, ignored by others. */
.sort-select option { background: var(--surface); color: var(--text); }

/* ---- facet checkboxes (left column) ---- */
/* Colours match the apps rail (.left ul.app-rail): muted by default, accent
   only for what is currently selected. */
.facet {
  display: flex; align-items: baseline; gap: 0.45rem;
  cursor: pointer; padding: 0.1rem 0; color: var(--muted);
}
.facet input[type=checkbox] {
  flex: 0 0 auto; margin: 0; accent-color: var(--accent); cursor: pointer;
}
.facet:hover .facet-name { color: var(--accent); }
.facet.facet-on .facet-name { color: var(--accent); }
.facet.facet-off { cursor: default; opacity: 0.4; }
.facet.facet-off:hover .facet-name { color: var(--muted); }
.facet-actions { display: flex; align-items: center; gap: 0.9rem; margin-top: 1rem; }
#facet-apply {
  padding: 0.45rem 1.1rem;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: var(--radius);
  font-family: inherit; font-size: 0.9rem; cursor: pointer;
}
#facet-apply:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.facet-clear { font-size: 0.9rem; color: var(--muted); }
.facet-clear:hover { color: var(--accent); }

/* ---- Apps page (apps.php) ---- */
/* Typography follows the blog list: 1.35rem titles in --text going accent on
   hover, 1rem/1.6 body copy in --text. Each card is a single <a>, so the link
   carries text-decoration:none and only .app-cta underlines on hover. */
.apps-intro { max-width: var(--maxw-text); color: var(--muted); margin: 0 0 1.5rem; }

/* The rail is a flat list, so the catalog's top-level-category rule
   (.left > ul > li > a: accent, 1.1rem, 1.5rem gaps) would render every entry
   as a heading. Override to ordinary nav weight; accent marks the active one. */
.left ul.app-rail > li { margin-top: 0; }
.left ul.app-rail > li > a { color: var(--muted); font-size: 0.95rem; padding: 0.4rem 0.6rem; }
.left ul.app-rail > li > a:hover { color: var(--accent); }
.left ul.app-rail > li > a.on { color: var(--accent); }
.app-rail-sep { margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--border); }

.app-featured {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin: 0 0 1.5rem;
  color: inherit; text-decoration: none;
}
.app-featured:hover { background: var(--surface-2); border-color: var(--border-strong); text-decoration: none; }
.app-featured:hover .app-cta { text-decoration: underline; }
.app-featured-shot { aspect-ratio: 2 / 1; overflow: hidden; }
.app-featured-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-featured-body { padding: 1rem 1.1rem 1.15rem; }
.app-featured-tag {
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent);
  padding: 0.15rem 0.55rem; border-radius: var(--radius);
}
.app-featured-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; color: var(--text); margin: 0.7rem 0 0.35rem; line-height: 1.25; }

.app-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.app-card { margin: 0; }
.app-card-link {
  display: flex; flex-direction: column; height: 100%;
  color: inherit; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.app-card-link:hover { border-color: var(--border-strong); background: var(--surface-2); text-decoration: none; }
.app-card-link:hover .app-cta { text-decoration: underline; }
/* Extra breathing room under the section heading. Scoped to this page so the
   catalog's own .catalog-head spacing is untouched. */
.apps-head { margin-bottom: 1.25rem; }
.app-shot { aspect-ratio: 2 / 1; overflow: hidden; }
.app-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-body { padding: 0.9rem 1.1rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
.app-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; color: var(--text); margin-bottom: 0.35rem; line-height: 1.25; }
.app-free {
  font-size: 0.7rem; vertical-align: 0.25em; color: var(--accent-ink);
  background: var(--accent); padding: 0.1rem 0.4rem; border-radius: var(--radius);
}
.app-blurb { color: var(--text); font-size: 1rem; line-height: 1.6; margin: 0 0 0.7rem; }
.app-cta { margin-top: auto; color: var(--accent); }
.app-empty { color: var(--muted); }

/* Hero: two columns — image stack (left) + badge/title/description (right). */
.product-hero { display: flex; gap: 3rem; align-items: flex-start; margin: 1rem 0 2.5rem; }
.product-hero .hero-left { flex: 0 0 42%; max-width: 42%; }
.product-hero .hero-right { flex: 1 1 auto; min-width: 0; }

.hero-main { position: relative; width: 100%; aspect-ratio: 1 / 1; background: transparent; border-radius: var(--radius); overflow: hidden; }
.hero-main img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Thumbnail strip (lib/slider.php render_thumb_strip). Embla viewport: it
   clips, the container is what moves. The scrollbar/scroll-behavior rules the
   old native overflow-x strip needed are gone — nothing scrolls natively now. */
.thumb-strip { overflow: hidden; margin-top: 0.9rem; cursor: grab; }
.thumb-strip.dragging { cursor: grabbing; }
.thumb-strip-container { display: flex; gap: 0.75rem; }
.thumb-strip-item {
  flex: 0 0 calc((100% - 3 * 0.75rem) / 4);
  aspect-ratio: 1 / 1; padding: 0;
  border: 2px solid transparent; border-radius: var(--radius);
  background: transparent; cursor: pointer; overflow: hidden;
}
.thumb-strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-strip-item.active { border-color: var(--accent); }
.thumb-strip-item:hover { border-color: var(--border-strong); }

.hero-right .hero-badges { margin-bottom: 0.75rem; }
/* badges normally overlay a thumbnail (absolute); in the hero-right flow they
   need to sit inline, so reset the absolute positioning here. */
.hero-right .hero-badges .badges { position: static; flex-direction: row; }
.hero-right h1 { margin: 0 0 1rem; }
.hero-desc { color: var(--text); line-height: 1.7; }
.hero-desc h3 { font-size: 1rem; margin: 1.5rem 0 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.hero-desc a { color: var(--accent); }

/* Video + long-description content sit full-width below the hero. */
.product-video { margin: 2rem 0; }
.product-video h2 { margin: 0 0 1rem; }
.product-modula { margin: 2rem 0; }
.product-modula h2 { margin: 0 0 1rem; }
/* CSS-columns masonry: images pack by column (top-to-bottom, then next column). */
.modula-masonry { column-count: 3; column-gap: 0.5rem; }
.modula-item { display: block; width: 100%; margin: 0 0 0.5rem; padding: 0; border: none; background: transparent; cursor: zoom-in; break-inside: avoid; }
.modula-item img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.modula-item:hover img { opacity: 0.9; }
.product-content { max-width: var(--maxw-text); margin: 2rem 0; }
.review-heading { margin-top: 1rem; }
.product-content h2 { font-size: 1.2rem; margin: 2rem 0 0.75rem; }

/* Lightbox overlay */
.lightbox {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 88vw; max-height: 88vh; object-fit: contain; border-radius: var(--radius); }
.lightbox button {
  position: absolute; background: rgba(34, 34, 34, 0.8); color: var(--text);
  border: 1px solid var(--border-strong); cursor: pointer; border-radius: var(--radius);
  font-size: 1.6rem; line-height: 1; width: 3rem; height: 3rem;
}
.lightbox button:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }
.lightbox .lb-close { top: 1.25rem; right: 1.25rem; }
.lightbox .lb-prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 1.25rem; top: 50%; transform: translateY(-50%); }

.field { margin: 1rem 0; }
.field .label { font-weight: 600; color: var(--muted); }
.review { border-top: 1px solid var(--border); padding: 0.75rem 0; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.75rem; margin: 0.75rem 0; }
.img-grid img { width: 100%; height: auto; display: block; border-radius: var(--radius); }
.store-btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  margin: 0.25rem 0.35rem 0.25rem 0;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--accent);
  transition: background 0.15s ease, color 0.15s ease;
}
.store-btn:hover { background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.video { margin: 0.75rem 0; }
/* YouTube (portrait Shorts, 9:16): fill container width, capped + centered. */
.video-youtube { width: 100%; max-width: 360px; margin-left: auto; margin-right: auto; }
.video-youtube iframe { width: 100%; height: auto; aspect-ratio: 9 / 16; display: block; }
.thumb-overlay { position: relative; display: inline-block; }

/* ============================================================================
   FORMS (contact, newsletter, review) — shared dark form styling
   ============================================================================ */
.cf-wrap, .nl-wrap { max-width: 32rem; }
.cf-row, .nl-row, .rf-row { margin: 1rem 0; }
.cf-row label.blocklabel, .nl-row label.blocklabel, .rf-row label {
  display: block; margin-bottom: 0.35rem; font-weight: 600; color: var(--text);
}
.nl-platforms label { display: block; margin: 0.25rem 0; font-weight: normal; color: var(--text); }

#cf-form input[type=text], #cf-form input[type=email], #cf-form textarea,
#nl-form input[type=email],
#review-form input[type=text], #review-form input[type=email], #review-form textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
#review-form input[type=text], #review-form input[type=email], #review-form textarea { max-width: 32rem; }
#cf-form input:focus, #cf-form textarea:focus,
#nl-form input:focus,
#review-form input:focus, #review-form textarea:focus { outline: none; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); }

/* Submit buttons — gold accent fill */
#cf-submit, #nl-submit, #rf-submit {
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}
#cf-submit:hover, #nl-submit:hover, #rf-submit:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
#cf-submit:disabled, #nl-submit:disabled, #rf-submit:disabled { opacity: 0.5; cursor: default; }

#cf-msg.ok, #nl-msg.ok, #review-msg.ok { color: var(--ok); font-weight: 600; }
#cf-msg.err, #nl-msg.err, #review-msg.err { color: var(--err); font-weight: 600; }

/* review star input */
.star-input { font-size: 1.7rem; line-height: 1; cursor: pointer; user-select: none; }
.star-input .star { color: var(--border-strong); padding: 0 0.05em; }
.star-input .star.on { color: var(--accent); }

/* Honeypots: hidden from humans */
.cf-hp, .rf-hp { position: absolute; left: -99999px; top: -99999px; }

/* ============================================================================
   BLOG
   ============================================================================ */
.blog-list { max-width: none; }
.blog-item { display: flex; gap: 2rem; margin: 0 0 3rem; }
.blog-item > a { flex: 0 0 400px; display: block; }
.blog-item img { width: 100%; height: 240px; object-fit: cover; display: block; border-radius: var(--radius); }
.blog-item .body { flex: 1 1 auto; min-width: 0; }
.blog-item h2 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.blog-item h2 a { text-decoration: none; color: var(--text); }
.blog-item h2 a:hover { color: var(--accent); text-decoration: none; }
.blog-item .date { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.6rem; }

/* single post */
/* .post wraps the h1, date, feature image and body, so one constraint covers
   the whole article. Centred, with .article-col carrying the same width to the
   breadcrumb above it so the column reads as one centred block rather than a
   narrow body under left-aligned chrome. */
.post { max-width: var(--maxw-article); margin-left: auto; margin-right: auto; }
.post .date { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.post .feature { width: 100%; height: auto; margin-bottom: 1.5rem; border-radius: var(--radius); }
.post img { max-width: 100%; height: auto; }

/* ============================================================================
   STATIC PAGES (About, Privacy, etc.)
   ============================================================================ */
/* The page <h1> and breadcrumb are siblings of .page-content rather
   than parents, so each needs the constraint to share the centred column. A
   bare body > h1 selector would also catch the catalog and apps pages, hence
   the classes. .article-col is the generic one, used on the chrome. */
.page-title, .page-content, .article-col {
  max-width: var(--maxw-article); margin-left: auto; margin-right: auto;
}
.page-content h2 { font-size: 1.2rem; margin: 2rem 0 0.75rem; }
.page-content p, .page-content li { line-height: 1.7; }
.updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }

/* ============================================================================
   SEARCH RESULTS PAGE
   ============================================================================ */
.search-results { max-width: none; list-style: none; padding: 0; margin: 0; }
.sr-row {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1rem 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text);
}
.sr-row:hover { background: var(--surface); }
.sr-row img { width: 96px; height: 96px; object-fit: cover; flex: 0 0 auto; background: var(--surface-2); border-radius: var(--radius); }
.sr-row .sr-title { flex: 1; }
.sr-row .sr-kind { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; flex: 0 0 auto; }

/* ============================================================================
   404
   ============================================================================ */
.nf { max-width: 40rem; margin-top: 3rem; }
.nf h1 { margin-bottom: 0.75rem; }
.nf a { color: var(--accent); }

/* ============================================================================
   PAGINATION
   ============================================================================ */
.pager-numbered { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.4rem; max-width: var(--maxw-text); margin: 3rem auto; }
.pager-simple { display: none; justify-content: space-between; max-width: var(--maxw-text); margin: 3rem 0; }
.pager-numbered a, .pager-numbered span { text-decoration: none; color: var(--muted); min-width: 2.1rem; padding: 0.35rem 0.55rem; text-align: center; border: 1px solid var(--border); border-radius: var(--radius); line-height: 1; }
.pager-numbered a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.pager-numbered .pg-current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.pager-numbered .pg-gap { border: none; padding: 0.35rem 0.15rem; min-width: auto; color: var(--muted); }
.pager-numbered .pg-disabled { color: var(--border-strong); border-color: var(--border); }
.pager-simple a { text-decoration: none; }
.pager-simple .pg-disabled { color: var(--muted); }

/* ============================================================================
   FOOTER
   ============================================================================ */
.site-footer { margin-top: 5rem; padding: 3rem 0; border-top: 1px solid var(--border); font-size: 0.9rem; }
.site-footer .footer-cols { display: flex; flex-wrap: wrap; gap: 3rem; }
.site-footer .footer-col { flex: 1 1 12rem; min-width: 11rem; }
.site-footer .footer-col > h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 1rem; color: var(--accent); }
.site-footer .footer-section { margin: 0 0 1.25rem; }
.site-footer .footer-section h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 1.25rem 0 0.5rem; color: var(--muted); font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 0.5rem; }
.site-footer a { text-decoration: none; color: var(--muted); }
.site-footer a:hover { text-decoration: none; color: var(--accent); }

/* ============================================================================
   COOKIE CONSENT BAR (folded into theme)
   ============================================================================ */
#cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: var(--surface); color: var(--text);
  padding: 1rem 1.25rem; font-size: 0.9rem; line-height: 1.4; display: none;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.5);
}
#cookie-bar.show { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: center; }
#cookie-bar p { margin: 0; flex: 1 1 20rem; max-width: 44rem; }
#cookie-bar a { color: var(--accent); }
#cookie-bar .cb-actions { display: flex; gap: 0.6rem; flex: 0 0 auto; }
#cookie-bar button { padding: 0.45rem 1.1rem; border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; font-size: 0.9rem; font-family: inherit; }
#cookie-bar .cb-accept { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
#cookie-bar .cb-reject { background: transparent; color: var(--text); }
#cookie-bar .cb-accept:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
#cookie-bar .cb-reject:hover { background: var(--surface-2); }

/* ============================================================================
   HAMBURGER MENU TOGGLE (base — hidden on desktop, shown on mobile)
   ============================================================================ */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.6rem; height: 2.6rem;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  flex: 0 0 auto;
}
.menu-toggle span { display: block; height: 2px; width: 100%; background: var(--text); transition: transform 0.2s ease, opacity 0.2s ease; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================================
   RESPONSIVE — mobile layout (<= 768px)
   ============================================================================ */
@media (max-width: 768px) {
  body { padding: 0 1rem 3rem; }

  /* --- Header: logo left, hamburger right --- */
  .site-header { flex-wrap: wrap; gap: 0.75rem; padding: 0.75rem 0; }
  .site-header-left { flex: 1 1 100%; justify-content: space-between; gap: 0.75rem; }
  .site-logo .logo-name { font-size: 1.45rem; }
  .site-logo .logo-sub { font-size: 0.55rem; margin-top: 0.3rem; }
  .menu-toggle { display: flex; }

  /* The desktop nav is hidden on mobile; the drilldown overlay (built by JS)
     replaces it. */
  .site-menu { display: none; }

  /* Search: hidden on mobile — it lives in the drilldown overlay (pinned top). */
  .site-search { display: none; }

  /* --- Fullscreen drilldown menu overlay (built by JS on mobile) --- */
  .mnav { position: fixed; inset: 0; z-index: 1000; background: var(--bg); display: none; flex-direction: column; }
  .mnav.open { display: flex; }
  .mnav-top { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--border); }
  .mnav-title { flex: 1 1 auto; font-weight: 600; font-size: 1.05rem; min-width: 0; }
  .mnav-close { flex: 0 0 auto; font-family: inherit; width: 2.4rem; height: 2.4rem; border: 1px solid var(--border-strong); border-radius: var(--radius); background: transparent; color: var(--text); font-size: 1.4rem; line-height: 1; cursor: pointer; }
  .mnav-back { flex: 0 0 auto; font-family: inherit; width: 2.4rem; height: 2.4rem; border: 1px solid var(--border-strong); border-radius: var(--radius); background: transparent; color: var(--text); font-size: 1.2rem; line-height: 1; cursor: pointer; display: none; }
  .mnav-back.show { display: block; }
  /* Pinned search at the top of the overlay. */
  .mnav-search { padding: 0.9rem 1rem; border-bottom: 1px solid var(--border); position: relative; }
  .mnav-search input { width: 100%; padding: 0.6rem 0.7rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); color: var(--text); font-size: 0.95rem; }
  .mnav-search input::placeholder { color: var(--muted); }
  .mnav-search .site-search-results { left: 1rem; right: 1rem; width: auto; min-width: 0; max-width: none; top: calc(100% - 0.4rem); }
  /* Levels viewport + sliding track (C-i: translateX per level). */
  .mnav-viewport { flex: 1 1 auto; overflow: hidden; position: relative; }
  .mnav-track { display: flex; height: 100%; transition: transform 0.28s ease; }
  .mnav-level { flex: 0 0 100%; width: 100%; overflow-y: auto; list-style: none; margin: 0; padding: 0; }
  .mnav-level li { border-bottom: 1px solid var(--border); }
  .mnav-item { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.9rem 1rem; color: var(--text); text-decoration: none; width: 100%; background: transparent; border: none; font: inherit; text-align: left; cursor: pointer; }
  .mnav-item:hover { background: var(--surface); text-decoration: none; color: var(--text); }
  .mnav-item .mnav-caret { color: var(--muted); flex: 0 0 auto; }
  /* Parent row: name (flex-fill) + arrow (fixed tap target on the right). */
  .mnav-parent { display: flex; align-items: stretch; }
  .mnav-parent .mnav-name { flex: 1 1 auto; width: auto; }
  .mnav-arrow { flex: 0 0 auto; width: 3.2rem; display: flex; align-items: center; justify-content: center; background: transparent; border: none; border-left: 1px solid var(--border); color: var(--muted); font-size: 1.3rem; cursor: pointer; }
  .mnav-arrow:hover { background: var(--surface); color: var(--accent); }

  /* --- Catalog: single column; collapsible tree --- */
  .wrap { flex-direction: column; gap: 1.5rem; }
  .left { flex: 1 1 auto; width: 100%; }
  .cat-tree-toggle { cursor: pointer; position: relative; padding-right: 1.5rem; }
  .cat-tree-toggle::after { content: '▾'; position: absolute; right: 0.25rem; transition: transform 0.2s ease; color: var(--muted); }
  #cat-tree.open .cat-tree-toggle::after { transform: rotate(180deg); }
  /* Tree collapsed by default on mobile; the toggle's .open shows it.
     Two selectors because the two sidebars differ: the apps rail is a bare
     <ul>, the catalog's facets are wrapped in <form id="facet-form">. Hiding
     the form also hides the Apply/Clear buttons while collapsed. */
  #cat-tree > ul, #cat-tree > form { display: none; }
  #cat-tree.open > ul, #cat-tree.open > form { display: block; }

  /* --- Blog: stack image above text, full width --- */
  .blog-item { flex-direction: column; gap: 1rem; }
  .blog-item > a { flex: 1 1 auto; width: 100%; }
  .blog-item img { height: 200px; }

  /* --- Product hero already stacks (<=760); ensure column here too --- */
  .product-hero { flex-direction: column; gap: 1.5rem; }
  .product-hero .hero-left { flex-basis: auto; max-width: 100%; width: 100%; }
  .modula-masonry { column-count: 2; }

  /* --- Footer: single column, centered --- */
  .site-footer .footer-cols { flex-direction: column; gap: 2rem; text-align: center; }
  .site-footer .footer-col > h3 { text-align: center; }

  /* --- Type scale down --- */
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }

  /* --- Grid / sliders: 2-up (already handled at 700; align here) --- */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .app-grid { grid-template-columns: 1fr; }
  .pslider-container .pcard { flex: 0 0 calc((100% - 1rem) / 2); }

  /* --- Search results page: smaller images --- */
  .sr-row img { width: 64px; height: 64px; }

  /* --- Pagination: numbered hidden, simple prev/next shown --- */
  .pager-numbered { display: none; }
  .pager-simple { display: flex; }
}
