/* ═══════════════════════════════════════════════════════════════════
   LST Location — Catalogue (Mobile-First)
   One responsive stylesheet: phone → desktop, plus A4-landscape print.
   Authored mobile-first — base styles target ~320px, `min-width`
   queries enhance upward. The HTML is auto-generated by
   Scripts/gen_catalogue_mobile.py — edit colours/type/layout here.
═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* ════════════════════════════════════════════════════════════════════
   DESIGN TOKENS — single source of truth
════════════════════════════════════════════════════════════════════ */
:root {
  /* ── Brand colours ─────────────────────────────────────────────── */
  --color-bg:           #284E45;   /* dark green — page background      */
  --color-surface:      #F7F4F0;   /* cream — section panels            */
  --color-card:         #FFFFFF;   /* white — product cards             */
  --color-border:       #C9BFB2;   /* hairlines, rules                  */
  --color-text:         #2C2416;   /* body text                         */
  --color-text-muted:   #7A6E63;   /* secondary text, codes             */
  --color-brand:        #284E45;   /* green                             */
  --color-brand-contrast:#F7F4F0;
  --color-accent:       #8B7355;   /* gold / taupe                      */
  --color-accent-dark:  #5C4A30;   /* dark brown — titles               */
  --color-danger:       #B23B2E;
  --focus:              #8B7355;

  /* ── Fluid type scale — clamp(min, preferred, max). Body = --fs-0 ── */
  --fs--1: clamp(0.78rem, 0.74rem + 0.18vw, 0.86rem);
  --fs-0:  clamp(1rem,    0.97rem + 0.16vw, 1.06rem);
  --fs-1:  clamp(1.13rem, 1.04rem + 0.42vw, 1.35rem);
  --fs-2:  clamp(1.35rem, 1.18rem + 0.85vw, 1.95rem);
  --fs-3:  clamp(1.7rem,  1.4rem  + 1.5vw,  2.7rem);
  --fs-4:  clamp(2rem,    1.55rem + 2.25vw, 3.4rem);

  /* ── Spacing scale ─────────────────────────────────────────────── */
  --space-2xs: .25rem; --space-xs: .5rem;  --space-sm: .75rem;
  --space-md:  1rem;   --space-lg: 1.5rem; --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-fluid: clamp(1.25rem, 0.85rem + 2.4vw, 3rem);  /* section padding */

  /* ── Type families ─────────────────────────────────────────────── */
  --font-body:    'Lora', Georgia, serif;
  --font-heading: 'Lora', Georgia, serif;
  --font-ui:      'Montserrat', Arial, sans-serif;

  /* ── Radii, shadows ────────────────────────────────────────────── */
  --radius-sm: 6px; --radius-md: 12px; --radius-lg: 18px; --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgb(20 30 26 / .06), 0 3px 10px rgb(20 30 26 / .08);
  --shadow-2: 0 10px 40px rgb(20 30 26 / .22);

  /* ── Layout ────────────────────────────────────────────────────── */
  --container: 78rem;
  --gutter: clamp(0.85rem, 0.4rem + 2.2vw, 2rem);
  --header-h: 54px;

  /* ── z-index scale ─────────────────────────────────────────────── */
  --z-fab: 200; --z-overlay: 800; --z-header: 900;

  /* ── Motion ────────────────────────────────────────────────────── */
  --dur: 220ms; --dur-fast: 130ms; --dur-slow: 420ms;
  --ease: cubic-bezier(.2, 0, .2, 1);
}

/* ════════════════════════════════════════════════════════════════════
   RESET
════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
body {
  min-height: 100svh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-family: var(--font-body);
  font-size: var(--fs-0);
  background: var(--color-bg);
  color: var(--color-text);
}
img, picture, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
p, h1, h2, h3, h4 { overflow-wrap: break-word; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: var(--color-accent); }
[hidden] { display: none !important; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* ════════════════════════════════════════════════════════════════════
   UTILITIES
════════════════════════════════════════════════════════════════════ */
.skip-link {
  position: absolute; left: var(--space-sm); top: var(--space-sm);
  z-index: 1000; transform: translateY(-150%);
  background: var(--color-accent-dark); color: #fff;
  padding: var(--space-xs) var(--space-md); border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-size: var(--fs--1); text-decoration: none;
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

.panel {                      /* shared cream panel for cover/story/toc/category */
  background: var(--color-surface);
  border-radius: var(--radius-md);
  margin: var(--space-sm) auto;
  max-width: var(--container);
  overflow: hidden;
}
.panel:first-of-type { margin-top: 0; }

/* ════════════════════════════════════════════════════════════════════
   HEADER — slim frosted bar: logo · search · cart · sections
════════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  display: flex; align-items: center;
  min-height: var(--header-h);
  padding-inline: var(--gutter);
  padding-top: env(safe-area-inset-top);
  background: var(--color-bg);                   /* fallback: opaque */
  border-bottom: 1px solid rgb(247 244 240 / .14);
}
/* Frosted glass on a pseudo-element — keeps .site-header from becoming the
   containing block that would trap the fixed unrolling overlays. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: transparent; }
  .site-header::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: color-mix(in srgb, var(--color-bg) 80%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
  }
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md);
  width: 100%; max-width: var(--container); margin-inline: auto;
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand__logo { display: block; height: 30px; width: auto; }
.header-actions { display: flex; align-items: center; gap: var(--space-2xs); }

.hicon {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
  background: none; border: 0; cursor: pointer;
  color: var(--color-brand-contrast);
  border-radius: 50%;
  transition: background var(--dur-fast) var(--ease);
}
.hicon:hover { background: rgb(247 244 240 / .12); }
.hicon[aria-expanded="true"] { background: rgb(247 244 240 / .16); }
.hicon svg { width: 22px; height: 22px; }
.hicon__badge {
  position: absolute; top: 3px; right: 3px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--color-danger); color: #fff;
  border: 2px solid var(--color-bg);
  font-family: var(--font-ui); font-size: .66rem; font-weight: 700;
  display: none; align-items: center; justify-content: center;
}
.hicon__badge.is-visible { display: flex; }

/* hamburger → X morph — the burger slot is the universal close (X)
   affordance: it shows the X whenever any header panel is open
   (search / cart / nav), driven by body.has-panel from the script. */
.burger { position: relative; width: 20px; height: 14px; }
.burger span {
  position: absolute; left: 0; right: 0; height: 2px;
  background: currentColor; border-radius: var(--radius-pill);
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease);
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 6px; }
.burger span:nth-child(3) { top: 12px; }
body.has-panel .hicon--burger .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.has-panel .hicon--burger .burger span:nth-child(2) { opacity: 0; }
body.has-panel .hicon--burger .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ════════════════════════════════════════════════════════════════════
   HEADER PANELS — unroll downward from the header (clip-path)
════════════════════════════════════════════════════════════════════ */
.hpanel {
  position: fixed; left: 0; right: 0;
  z-index: var(--z-overlay);
  background: var(--color-surface);
  overscroll-behavior: contain;
  clip-path: inset(0 0 100% 0);                  /* closed: rolled up */
  display: none;
}
.hpanel.is-open {
  display: block; clip-path: inset(0 0 0 0);
  animation: hpanel-unroll var(--dur-slow) var(--ease);
}
.hpanel.is-closing {
  display: block;
  animation: hpanel-rollup var(--dur-slow) var(--ease) forwards;
}
@keyframes hpanel-unroll { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes hpanel-rollup { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 100% 0); } }

/* search — short panel; catalogue stays visible below for live results */
.hpanel--search {
  top: 0;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + var(--space-sm))
           var(--gutter) var(--space-md);
  box-shadow: var(--shadow-2);
}
/* cart + sections — full-screen overlays */
.hpanel--cart, .hpanel--nav {
  top: 0; bottom: 0;
  overflow: hidden auto;                         /* x: hidden — no sideways drift */
  padding-top: calc(var(--header-h) + env(safe-area-inset-top));
}
.hpanel--nav { background: var(--color-bg); }
body.panel-open { overflow: hidden; }            /* lock scroll under an overlay */

/* search pill (inside the search panel) */
.search {
  display: flex; align-items: center; gap: var(--space-xs);
  max-width: 40rem; margin-inline: auto;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: var(--space-2xs) var(--space-sm);
  box-shadow: var(--shadow-1);
}
.search__icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--color-text-muted); }
.search__input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-family: var(--font-ui); font-size: 1rem;        /* 16px — no iOS zoom */
  padding: var(--space-xs) 0; color: var(--color-text);
}
.search__input::placeholder { color: var(--color-text-muted); }
/* hide the browser's native search ✕ — we provide our own .search__clear */
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search__clear {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  color: var(--color-text-muted); font-size: 1.1rem; line-height: 1;
}
.search__clear:hover { color: var(--color-text); background: rgb(0 0 0 / .05); }

/* ════════════════════════════════════════════════════════════════════
   BACK-TO-TOP
════════════════════════════════════════════════════════════════════ */
.to-top {
  position: fixed; z-index: var(--z-fab);
  left: var(--gutter);
  bottom: max(var(--gutter), env(safe-area-inset-bottom));
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--color-surface); color: var(--color-accent-dark);
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-1); text-decoration: none;
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: #fff; }
.to-top svg { width: 22px; height: 22px; }

/* ════════════════════════════════════════════════════════════════════
   COVER
════════════════════════════════════════════════════════════════════ */
.cover {
  text-align: center;
  padding: var(--space-xl) var(--space-fluid);
  display: flex; flex-direction: column; align-items: center;
}
.cover__logo {
  width: auto; max-width: min(280px, 70%); max-height: 220px;
  object-fit: contain; margin-bottom: var(--space-md);
}
.cover__title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: var(--fs-3); color: var(--color-accent-dark);
  line-height: 1.15; text-wrap: balance; letter-spacing: .5px;
}
.cover__intro {
  font-style: italic; color: var(--color-text-muted);
  font-size: var(--fs-0); max-width: 46ch; text-wrap: pretty;
  margin-top: var(--space-sm);
}
.cover__rule {
  width: 64px; height: 2px; background: var(--color-accent);
  margin: var(--space-lg) auto;
}
.guarantee {
  width: 100%; max-width: 54rem;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) var(--space-sm);
  margin-bottom: var(--space-lg);
}
.guarantee__title {
  display: block; font-family: var(--font-ui); font-weight: 600;
  font-size: var(--fs--1); letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--color-accent-dark); margin-bottom: var(--space-xs);
}
.guarantee__text {
  font-style: italic; color: var(--color-text-muted);
  font-size: var(--fs--1); line-height: 1.65; text-wrap: pretty;
}
.cover__contact {
  display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-sm);
  align-items: center; justify-content: center;
  font-family: var(--font-ui); font-size: var(--fs--1);
  color: var(--color-text-muted);
}
.cover__link { color: var(--color-accent); text-decoration: none; }
.cover__link:hover { text-decoration: underline; }
.cover__sep { color: var(--color-border); }

@media (min-width: 40rem) {
  .cover { padding: var(--space-2xl) var(--space-fluid); }
}

/* ════════════════════════════════════════════════════════════════════
   STORY
════════════════════════════════════════════════════════════════════ */
.story { padding: var(--space-fluid); }
.story__grid { display: grid; gap: var(--space-xl); }
.story__heading {
  font-family: var(--font-heading); font-weight: 700;
  font-size: var(--fs-2); color: var(--color-accent-dark);
  letter-spacing: .5px;
}
.story__rule {
  width: 40px; height: 2px; background: var(--color-accent);
  margin: var(--space-sm) 0 var(--space-md);
}
.story__subheading {
  font-style: italic; color: var(--color-accent);
  font-size: var(--fs-1); line-height: 1.4; margin-bottom: var(--space-md);
}
.story__section-title {
  font-family: var(--font-ui); font-weight: 600; font-size: var(--fs--1);
  letter-spacing: 2px; text-transform: uppercase; color: var(--color-accent-dark);
  margin-top: var(--space-md); margin-bottom: var(--space-2xs);
}
.story__body {
  font-size: var(--fs-0); line-height: 1.75; margin-bottom: var(--space-xs);
  text-wrap: pretty;
}
.story__closing {
  font-style: italic; color: var(--color-accent);
  line-height: 1.7; margin-top: var(--space-md);
}

@media (min-width: 48rem) {
  .story__grid { grid-template-columns: 1fr 1fr; gap: var(--space-2xl); }
  .story__col--fr {
    padding-right: var(--space-xl);
    border-right: 1px solid var(--color-border);
  }
}

/* ════════════════════════════════════════════════════════════════════
   TABLE OF CONTENTS
════════════════════════════════════════════════════════════════════ */
.toc { padding: var(--space-fluid); }
.toc__heading {
  font-family: var(--font-heading); font-weight: 700;
  font-size: var(--fs-2); color: var(--color-accent-dark);
  letter-spacing: .5px;
}
.toc__rule {
  width: 48px; height: 2px; background: var(--color-accent);
  margin: var(--space-sm) 0 var(--space-lg);
}
.toc__list { display: flex; flex-direction: column; }
.toc__item {
  display: flex; align-items: baseline; gap: var(--space-sm);
  min-height: 48px; padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none; color: var(--color-text);
}
.toc__item:hover .toc__name,
.toc__item:focus-visible .toc__name { color: var(--color-accent); }
.toc__num {
  font-style: italic; color: var(--color-accent);
  font-size: var(--fs--1); min-width: 2.2em; flex-shrink: 0;
}
.toc__name {
  font-family: var(--font-ui); font-weight: 500; font-size: var(--fs-0);
  transition: color var(--dur-fast) var(--ease);
}
.toc__dots {
  flex: 1; min-width: 1rem; align-self: center;
  border-bottom: 1px dotted var(--color-border);
}

/* ════════════════════════════════════════════════════════════════════
   CATEGORY SECTIONS
════════════════════════════════════════════════════════════════════ */
.category { padding: var(--space-fluid); scroll-margin-top: calc(var(--header-h) + .5rem); }
.category__header {
  display: flex; align-items: center; gap: var(--space-md);
  flex-wrap: wrap; margin-bottom: var(--space-lg);
}
.category__title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: var(--fs-3); color: var(--color-accent-dark);
  letter-spacing: .5px; line-height: 1.1; text-wrap: balance;
}
.category__intro {
  color: var(--color-text-muted);
  font-size: var(--fs-0); line-height: 1.65;
  max-width: 68ch; margin-bottom: var(--space-lg);
  text-wrap: pretty;
}

/* ── Subcategory ──────────────────────────────────────────────────── */
.subcategory { margin-top: var(--space-xl); }
.subcategory:first-of-type { margin-top: 0; }
.subcategory__title {
  font-family: var(--font-ui); font-weight: 600; font-size: var(--fs--1);
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--color-accent);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-md);
}

/* ════════════════════════════════════════════════════════════════════
   PRODUCT GRID & CARDS
════════════════════════════════════════════════════════════════════ */
.product-grid {
  display: grid; gap: var(--space-sm);
  grid-template-columns: repeat(2, 1fr);   /* mobile: 2 columns */
}
@media (min-width: 34rem)  { .product-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-md); } }
@media (min-width: 52rem)  { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 66rem)  { .product-grid { grid-template-columns: repeat(5, 1fr); } }

.product {
  position: relative;
  display: block;
  width: 100%;
  margin: 0; padding: 0;
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 0;
  text-align: center;
  font-family: inherit;
  transition: transform var(--dur-fast) var(--ease);
}
.product:active { transform: scale(.97); }
.product.in-cart .product__media {
  outline: 2px solid var(--color-accent-dark);
  outline-offset: -2px;
  border-radius: var(--radius-sm);
}
.product__check {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-accent-dark); color: #fff;
  font-size: .72rem; font-weight: 700;
  display: none; align-items: center; justify-content: center;
}
.product.in-cart .product__check { display: flex; }
.product__media {
  display: block;
  aspect-ratio: 1 / 1; width: 100%;
  background: transparent;
}
.product__media img {
  width: 100%; height: 100%; object-fit: contain; padding: 8px;
}
.product__body {
  display: block;
  padding: var(--space-xs) var(--space-xs) var(--space-sm);
}
.product__name {
  display: block; text-align: center;
  font-family: var(--font-ui); font-weight: 600; font-size: var(--fs--1);
  line-height: 1.35; color: var(--color-text);
  overflow-wrap: break-word;
}
.product__code {
  display: block; text-align: center;
  margin-top: var(--space-2xs);
  font-family: var(--font-ui); font-size: .76rem; font-weight: 400;
  color: var(--color-text-muted); letter-spacing: .3px;
}
.product__tooltip {
  display: none;
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  width: min(200px, 80vw);
  background: var(--color-accent-dark); color: #fff;
  font-family: var(--font-ui); font-size: .72rem; line-height: 1.5;
  padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm);
  z-index: 5; pointer-events: none; box-shadow: var(--shadow-1);
}
@media (hover: hover) and (pointer: fine) {
  .product:hover .product__tooltip { display: block; }
}

/* ════════════════════════════════════════════════════════════════════
   ASSEMBLIES
════════════════════════════════════════════════════════════════════ */
.assemblies__intro {
  font-style: italic; color: var(--color-text-muted);
  font-size: var(--fs-0); line-height: 1.7;
  max-width: 68ch; margin: 0 0 var(--space-lg); text-wrap: pretty;
}
.assembly-grid {
  display: grid; gap: var(--space-md);
  grid-template-columns: 1fr;
}
@media (min-width: 38rem)  { .assembly-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem)  { .assembly-grid { grid-template-columns: repeat(3, 1fr); } }

.assembly {
  position: relative;
  display: flex; flex-direction: column; min-width: 0;
  text-align: left; font-family: inherit; cursor: pointer;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.assembly:hover { box-shadow: var(--shadow-1); }
.assembly:active { transform: scale(.99); }
.assembly.in-cart {
  border-color: var(--color-accent-dark);
  box-shadow: 0 0 0 2px var(--color-accent-dark);
}
.assembly__check {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--color-accent-dark); color: #fff;
  font-size: .8rem; font-weight: 700;
  display: none; align-items: center; justify-content: center;
}
.assembly.in-cart .assembly__check { display: flex; }
.assembly__media {
  aspect-ratio: 4 / 3; width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-surface);
}
.assembly__media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.assembly__body {
  padding: var(--space-md); flex: 1;
  display: flex; flex-direction: column;
}
.assembly__name {
  font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-0);
  color: var(--color-text);
}
.assembly__code {
  display: block; font-family: var(--font-ui); font-size: .78rem;
  color: var(--color-text-muted); margin-top: 2px;
}
.assembly__components { list-style: none; padding: 0; margin: var(--space-sm) 0 0; }
.assembly__comp {
  display: flex; align-items: baseline; gap: var(--space-xs);
  padding: var(--space-2xs) 0;
  border-bottom: 1px dotted var(--color-border);
  font-family: var(--font-ui); font-size: .8rem; color: var(--color-text-muted);
}
.assembly__comp:last-child { border-bottom: 0; }
.assembly__comp-qty {
  font-weight: 700; color: var(--color-accent); flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════════════
   SEARCH — results dropdown (inside .hpanel--search)
════════════════════════════════════════════════════════════════════ */
.search-wrap { max-width: 40rem; margin-inline: auto; }

.search-results {
  display: none;
  margin-top: var(--space-sm);
  max-height: min(58vh, 460px);
  overflow: hidden auto;                         /* x: hidden — no sideways drift */
  overscroll-behavior: contain;
}
.search-results.is-active { display: block; }

.search-results__note {
  text-align: center; padding: var(--space-lg) var(--space-md);
  font-style: italic; color: var(--color-text-muted); font-size: var(--fs--1);
}

.sresult {
  display: flex; align-items: center; gap: var(--space-sm);
  width: 100%; text-align: left;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease);
}
.sresult + .sresult { margin-top: 2px; }
.sresult:hover { background: var(--color-card); }
.sresult:focus-visible {
  outline: none; border-color: var(--focus); background: var(--color-card);
}

.sresult__img {
  width: 46px; height: 46px; flex-shrink: 0;
  object-fit: contain; border-radius: var(--radius-sm);
}
.sresult__img--ph { background: var(--color-border); }

.sresult__body { flex: 1; min-width: 0; }
.sresult__name {
  font-family: var(--font-ui); font-size: var(--fs--1); line-height: 1.35;
  color: var(--color-text);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}
.sresult__name b { font-weight: 700; color: var(--color-accent-dark); }
.sresult__meta {
  display: flex; align-items: center; gap: var(--space-xs); margin-top: 1px;
}
.sresult__code {
  font-family: var(--font-ui); font-size: .68rem;
  letter-spacing: .5px; color: var(--color-text-muted);
}
.sresult__tag {
  font-family: var(--font-ui); font-size: .58rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--color-accent);
  border: 1px solid var(--color-border); border-radius: var(--radius-pill);
  padding: 1px 7px;
}

.sresult__action {
  flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted); font-size: 1.15rem; line-height: 1;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.sresult__action::before { content: "+"; }
.sresult.is-added .sresult__action {
  background: var(--color-accent); border-color: var(--color-accent); color: #fff;
}
.sresult.is-added .sresult__action::before { content: "✓"; font-size: .9rem; }

/* ════════════════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════════════════ */
.site-footer {
  text-align: center;
  padding: var(--space-lg) var(--gutter) var(--space-2xl);
  font-family: var(--font-ui); font-size: .72rem;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: rgb(247 244 240 / .5);
}

/* ════════════════════════════════════════════════════════════════════
   SECTIONS OVERLAY — big left-aligned list (inside .hpanel--nav)
════════════════════════════════════════════════════════════════════ */
.navmenu {
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding: var(--space-xl) var(--gutter) var(--space-2xl);
}
.navmenu__list { list-style: none; margin: 0; padding: 0; }
.navmenu__link {
  display: flex; align-items: baseline; gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgb(247 244 240 / .12);
  text-decoration: none; color: var(--color-brand-contrast);
}
.navmenu__num {
  font-style: italic; font-size: var(--fs-0);
  color: var(--color-accent); min-width: 2.4em; flex-shrink: 0;
}
.navmenu__name {
  font-family: var(--font-heading); font-weight: 700;
  font-size: var(--fs-2); line-height: 1.1;
  transition: color var(--dur-fast) var(--ease);
}
.navmenu__link:hover .navmenu__name,
.navmenu__link.is-current .navmenu__name { color: var(--color-accent); }
/* staggered rise as the overlay unrolls */
.hpanel--nav.is-open .navmenu__link {
  animation: nav-rise var(--dur-slow) var(--ease) backwards;
}
.hpanel--nav.is-open li:nth-child(1)  .navmenu__link { animation-delay: 60ms; }
.hpanel--nav.is-open li:nth-child(2)  .navmenu__link { animation-delay: 95ms; }
.hpanel--nav.is-open li:nth-child(3)  .navmenu__link { animation-delay: 130ms; }
.hpanel--nav.is-open li:nth-child(4)  .navmenu__link { animation-delay: 165ms; }
.hpanel--nav.is-open li:nth-child(5)  .navmenu__link { animation-delay: 200ms; }
.hpanel--nav.is-open li:nth-child(6)  .navmenu__link { animation-delay: 235ms; }
.hpanel--nav.is-open li:nth-child(7)  .navmenu__link { animation-delay: 270ms; }
.hpanel--nav.is-open li:nth-child(8)  .navmenu__link { animation-delay: 305ms; }
.hpanel--nav.is-open li:nth-child(9)  .navmenu__link { animation-delay: 340ms; }
.hpanel--nav.is-open li:nth-child(n+10) .navmenu__link { animation-delay: 375ms; }
@keyframes nav-rise { from { opacity: 0; transform: translateY(1.2rem); }
                      to   { opacity: 1; transform: translateY(0); } }

/* Desktop: the section names run smaller — the fluid display size is
   oversized on a wide viewport. */
@media (min-width: 48rem) {
  .navmenu__name { font-size: var(--fs-1); }
  .navmenu__link { padding: var(--space-xs) 0; }
}

/* ════════════════════════════════════════════════════════════════════
   CART — content inside .hpanel--cart
════════════════════════════════════════════════════════════════════ */
.cart { width: 100%; max-width: 34rem; margin-inline: auto; }
.cart__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}
.cart__title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: var(--fs-1); color: var(--color-accent-dark);
}
.cart__scroll { display: block; }
.cart__body { padding: var(--space-md) var(--space-lg); }
.cart__empty {
  text-align: center; font-style: italic; color: var(--color-text-muted);
  line-height: 1.8; margin-top: var(--space-xl);
}
.cart__foot {
  border-top: 1px solid var(--color-border);
  padding: var(--space-md) var(--space-lg);
  padding-bottom: max(var(--space-md), env(safe-area-inset-bottom));
  background: var(--color-surface);
}
.cart__done { padding: var(--space-xl) var(--space-lg); }

/* ── Cart items ───────────────────────────────────────────────────── */
.cart-cat-header {
  font-family: var(--font-ui); font-size: .72rem; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--color-accent);
  padding: var(--space-md) 0 var(--space-2xs);
  border-bottom: 1px solid var(--color-border);
}
.cart-section-header {
  font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-0);
  color: var(--color-accent-dark);
  padding: var(--space-md) 0 var(--space-xs);
  border-bottom: 2px solid var(--color-accent);
  margin-top: var(--space-sm);
}
.cart-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-areas: "img info" "img controls";
  column-gap: var(--space-sm); row-gap: var(--space-xs);
  align-items: center;
  padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-border);
}
.cart-item__img {
  grid-area: img; align-self: start;
  width: 52px; height: 52px;
  object-fit: contain; background: #fff;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
}
.cart-item__info { grid-area: info; min-width: 0; }
.cart-item__name {
  font-family: var(--font-ui); font-weight: 600;
  font-size: .85rem; color: var(--color-text); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item__code {
  display: block; font-family: var(--font-ui); font-size: .72rem;
  color: var(--color-text-muted); margin-top: 1px;
}
.cart-item__controls {
  grid-area: controls;
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
}
.cart-item__btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--color-border); color: var(--color-text);
  font-size: 1.1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.cart-item__btn:hover { background: var(--color-accent); color: #fff; }
.cart-item__qty {
  width: 44px; height: 32px; text-align: center;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-weight: 600; font-size: .9rem;
  -moz-appearance: textfield; appearance: textfield;
}
.cart-item__qty::-webkit-outer-spin-button,
.cart-item__qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-item__qty:focus { outline: none; border-color: var(--color-accent); }
.cart-item__remove {
  width: 36px; height: 36px; flex-shrink: 0; margin-left: 2px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted); border-radius: var(--radius-sm);
}
.cart-item__remove:hover { color: var(--color-danger); background: rgb(0 0 0 / .05); }
.cart-item__remove svg { width: 16px; height: 16px; }
.cart-item__qty-display {
  font-family: var(--font-ui); font-weight: 600; font-size: .85rem;
  color: var(--color-text-muted); flex-shrink: 0;
}

/* ── Cart: assembly groups ────────────────────────────────────────── */
.cart-assembly {
  border: 1.5px solid var(--color-accent); border-radius: var(--radius-sm);
  margin-bottom: var(--space-md); overflow: hidden;
}
.cart-assembly__head {
  background: var(--color-accent); color: #fff;
  display: flex; align-items: center; gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
}
.cart-assembly__name {
  flex: 1; min-width: 0; font-family: var(--font-ui); font-weight: 600;
  font-size: .85rem;
}
.cart-assembly__qty { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.cart-assembly__qty .cart-item__btn {
  width: 28px; height: 28px;
  background: rgb(255 255 255 / .2); color: #fff;
}
.cart-assembly__qty .cart-item__btn:hover { background: rgb(255 255 255 / .4); }
.cart-assembly__qty .cart-item__qty {
  width: 38px; height: 28px;
  background: rgb(255 255 255 / .15);
  border-color: rgb(255 255 255 / .45); color: #fff;
}
.cart-assembly__remove {
  width: 32px; height: 32px; flex-shrink: 0; color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: .85;
}
.cart-assembly__remove:hover { opacity: 1; }
.cart-assembly__remove svg { width: 16px; height: 16px; }
.cart-item--component {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 1px solid rgb(0 0 0 / .06); background: var(--color-card);
}
.cart-item--component .cart-item__info { flex: 1; }
.cart-item--component:last-child { border-bottom: 0; }

/* ── Quote form ───────────────────────────────────────────────────── */
.quote { display: flex; flex-direction: column; gap: var(--space-sm); }
.quote__group-title {
  font-family: var(--font-ui); font-weight: 600; font-size: .72rem;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--color-accent-dark);
}
.quote__group-title:not(:first-child) { margin-top: var(--space-xs); }
.field { display: flex; flex-direction: column; gap: var(--space-2xs); }
.field__label {
  font-family: var(--font-ui); font-size: .76rem; font-weight: 500;
  color: var(--color-text-muted);
}
.field__input {
  width: 100%; min-width: 0;
  padding: var(--space-xs) var(--space-sm);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  background: #fff; font-family: var(--font-ui); font-size: 1rem;  /* 16px */
  color: var(--color-text);
}
.field__input:focus { outline: none; border-color: var(--color-accent); }
.field__input[aria-invalid="true"] { border-color: var(--color-danger); }
.field__err {
  font-family: var(--font-ui); font-size: .74rem; color: var(--color-danger);
}
/* dates stack on phones — side-by-side is too cramped for the date glyph
   + calendar icon; they go in a row only once the cart is wide enough */
.quote__dates { display: flex; flex-direction: column; gap: var(--space-sm); }
.quote__dates .field { flex: 1; min-width: 0; }
/* reset native appearance — iOS Safari otherwise sizes date inputs from
   their content (ignoring width) and renders the value at its own larger
   font, so they overflow the screen and dwarf the text inputs */
.quote__dates .field__input { -webkit-appearance: none; appearance: none; }
.quote__dates .field__input::-webkit-date-and-time-value { text-align: left; margin: 0; }
@media (min-width: 34rem) { .quote__dates { flex-direction: row; } }
.quote__check {
  display: flex; align-items: center; gap: var(--space-sm);
  font-family: var(--font-ui); font-size: .88rem;
  min-height: 44px; cursor: pointer;
}
.quote__check input {
  width: 20px; height: 20px; flex-shrink: 0;
  accent-color: var(--color-accent-dark); cursor: pointer;
}
.quote__error {
  font-family: var(--font-ui); font-size: .8rem; color: var(--color-danger);
  min-height: 1.2em;
}
.quote__submit {
  width: 100%; min-height: 48px; padding: var(--space-sm);
  background: var(--color-accent-dark); color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-weight: 600; font-size: .82rem;
  letter-spacing: 1.5px; text-transform: uppercase;
  transition: background var(--dur-fast) var(--ease);
}
.quote__submit:hover { background: var(--color-accent); }
.quote__clear {
  width: 100%; min-height: 44px; padding: var(--space-xs);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-weight: 600; font-size: .72rem;
  letter-spacing: 1px; text-transform: uppercase; color: var(--color-text-muted);
}
.quote__clear:hover { border-color: var(--color-accent-dark); color: var(--color-accent-dark); }
.quote__success {
  background: #E7EFE9; border: 1px solid var(--color-brand);
  border-radius: var(--radius-sm); padding: var(--space-sm) var(--space-md);
  font-size: .85rem; color: var(--color-accent-dark); line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════════════
   PRINT — A4 landscape PDF export
   Screen layout is overridden here into a paginated print document.
   Per-category running headers come from named @page rules injected
   by gen_catalogue_mobile.py into the document <head>.
════════════════════════════════════════════════════════════════════ */
@media print {

  @page {
    size: A4 landscape;
    margin: 0 0 9mm 0;
    @bottom-left   { content: ""; background: #F7F4F0; }
    @bottom-right  { content: ""; background: #F7F4F0; }
    @bottom-center {
      content: "LST Location  ·  Catalogue 2026";
      background: #F7F4F0;
      font-family: 'Montserrat', Arial, sans-serif;
      font-size: 7pt; font-weight: 300;
      color: #7A6E63; letter-spacing: 2.5px;
      text-transform: uppercase; vertical-align: middle;
    }
  }
  @page :first {
    @bottom-left   { background: #F7F4F0; content: ""; }
    @bottom-center { background: #F7F4F0; content: ""; }
    @bottom-right  { background: #F7F4F0; content: ""; }
  }

  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html, body { background: #F7F4F0 !important; }
  body { font-size: 9pt; }

  /* Hide all interactive / screen-only chrome */
  .skip-link, .site-header, .hpanel, .to-top,
  .product__tooltip, .product__check, .assembly__check,
  .site-footer { display: none !important; }

  /* Reset screen panel framing */
  .panel { margin: 0; border-radius: 0; max-width: none; }

  /* ── Cover — one A4 landscape page ─────────────────────────────── */
  .cover {
    height: 198mm; padding: 14mm 18mm;
    justify-content: center;
    page-break-after: always; break-after: page; overflow: hidden;
  }
  .cover__intro, .guarantee { display: none !important; }
  .cover__logo { max-height: 70mm; max-width: 240mm; margin-bottom: 10mm; }
  .cover__title { font-size: 26pt; }
  .cover__rule { margin: 8mm auto; }
  .cover__contact { font-size: 9pt; }

  /* ── Story — one A4 landscape page ─────────────────────────────── */
  .story {
    height: 198mm; padding: 12mm 16mm;
    page-break-after: always; break-after: page; overflow: hidden;
  }
  .story__grid { grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .story__col--fr { padding-right: 20px; border-right: 1px solid #C9BFB2; }
  .story__col--en { padding-left: 20px; }
  .story__heading { font-size: 15pt; }
  .story__rule { margin: 6px 0 10px; }
  .story__subheading { font-size: 11pt; margin-bottom: 8px; }
  .story__section-title { font-size: 8pt; margin-top: 10px; }
  .story__body { font-size: 9pt; line-height: 1.55; }
  .story__closing { font-size: 9pt; margin-top: 10px; line-height: 1.55; }

  /* ── Table of contents — one A4 landscape page ─────────────────── */
  .toc {
    height: 198mm; padding: 14mm 18mm;
    page-break-after: always; break-after: page; overflow: hidden;
  }
  .toc__heading { font-size: 24pt; }
  .toc__rule { margin: 6px 0 18px; }
  .toc__item { min-height: 0; padding: 7px 0; break-inside: avoid; }
  .toc__name { font-size: 10pt; }

  /* ── Category sections ─────────────────────────────────────────── */
  .category {
    padding: 0 0 8mm;                /* side margins from @page rule */
    page-break-before: always; break-before: page;
  }
  .category__header { display: none !important; }   /* name is in green page band */
  .category__intro { font-size: 8.5pt; line-height: 1.5; max-width: none; margin-bottom: 5mm; }
  .subcategory { margin-top: 0; }
  .subcategory ~ .subcategory { margin-top: 6mm; }
  .subcategory__title {
    font-size: 9pt; letter-spacing: 1.5px;
    padding-top: 4mm; padding-bottom: 6px; margin-bottom: 12px;
    break-after: avoid-page; page-break-after: avoid;
  }
  .product-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 3mm 5mm;
    align-items: start;
  }
  .product {
    border: 0; border-radius: 0; background: transparent;
    text-align: center;
    break-inside: avoid; page-break-inside: avoid;
  }
  .product__media {
    width: 100%; aspect-ratio: 1 / 1; max-height: 38mm;
    background: transparent;
  }
  .product__media img { padding: 1.5mm; }
  .product__body { padding: 1.5mm 1mm 0; gap: 0.5mm; align-items: center; }
  .product__name { font-size: 6.5pt; line-height: 1.3; }
  .product__code { font-size: 7pt; }

  /* ── Assemblies ────────────────────────────────────────────────── */
  .assemblies { page-break-before: always; break-before: page; }
  .assemblies__intro { font-size: 9pt; margin-bottom: 8mm; }
  .assembly-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 12px; }
  .assembly { break-inside: avoid; page-break-inside: avoid; }
  .assembly__body { padding: 10px; }
}

/* ════════════════════════════════════════════════════════════════════
   SCREEN — outer page rhythm
════════════════════════════════════════════════════════════════════ */
@media screen {
  main { padding-inline: var(--gutter); }
}
