/* ============================================================
   АЛЬФА-ЛАБ — Каталог микробиологических материалов
   Design system: deep pine-green #00483C + warm paper + brass
   Fonts: Fraunces (display) + Inter (UI/body)
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --green-900: #05372E;
  --green-800: #00483C;   /* brand core */
  --green-700: #0A5A4A;
  --green-600: #157360;
  --green-100: #E4EFEA;
  --green-050: #EFF5F1;

  --brass-700: #8A6526;
  --brass-600: #A9853F;   /* premium accent */
  --brass-100: #F2E7D2;

  /* Neutrals — warm paper */
  --paper:     #FBF9F4;   /* page background */
  --surface:   #FFFFFF;   /* cards */
  --surface-2: #F5F2EA;   /* subtle fills */
  --ink:       #17221D;   /* headings */
  --body:      #384741;   /* body text */
  --muted:     #6B7A72;   /* secondary text */
  --line:      #E6E2D8;   /* hairline borders */
  --line-2:    #EFECE3;

  --danger:    #B4453B;
  --ok:        #2E7D57;

  /* Semantic */
  --bg: var(--paper);
  --primary: var(--green-800);
  --primary-ink: #FFFFFF;
  --accent: var(--brass-600);

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(20,40,32,.05), 0 1px 1px rgba(20,40,32,.04);
  --shadow-md: 0 6px 22px -8px rgba(16,52,40,.18), 0 2px 6px rgba(16,52,40,.06);
  --shadow-lg: 0 24px 60px -20px rgba(10,45,34,.32);

  /* Radius */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Layout */
  --maxw: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 76px;

  /* Motion */
  --ease: cubic-bezier(.22,.61,.36,1);
  --dur: 240ms;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--body);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--green-600); outline-offset: 2px; border-radius: 4px; }
[data-ic] { flex-shrink: 0; display: inline-flex; }

h1,h2,h3,h4 { font-family: var(--font-display); color: var(--ink); font-weight: 500; line-height: 1.12; letter-spacing: -.01em; font-optical-sizing: auto; }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* Utility */
.eyebrow {
  font-family: var(--font-sans);
  font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brass-700); display: inline-flex; align-items: center; gap: .6em;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--brass-600); display: inline-block; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); margin-top: 0; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ============================================================
   HEADER
   ============================================================ */
.topbar {
  background: var(--green-900); color: #CFE0D8;
  font-size: .82rem; letter-spacing: .01em;
}
.topbar .container { display: flex; gap: 24px; align-items: center; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: #CFE0D8; transition: color .2s; }
.topbar a:hover { color: #fff; }
.topbar .spacer { margin-left: auto; }
.topbar .tb-item { display: inline-flex; align-items: center; gap: 7px; }
.topbar svg { width: 15px; height: 15px; opacity: .85; }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251,249,244,.82);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 22px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; }
.brand .mark { color: var(--green-800); width: 42px; height: 42px; }
.brand .wordmark { display: flex; flex-direction: column; line-height: 1; }
.brand .wordmark b { font-family: var(--font-display); font-weight: 600; font-size: 1.32rem; color: var(--ink); letter-spacing: -.01em; }
.brand .wordmark span { font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }

.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a {
  padding: 9px 14px; border-radius: var(--r-sm); font-weight: 500; font-size: .95rem;
  color: var(--body); transition: background .2s, color .2s;
}
.main-nav a:hover { background: var(--green-050); color: var(--green-800); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink); transition: background .2s, color .2s; position: relative;
}
.icon-btn:hover { background: var(--green-050); color: var(--green-800); }
.icon-btn svg { width: 21px; height: 21px; }
.cart-count {
  position: absolute; top: 2px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--brass-600); color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--paper); line-height: 1;
}
.cart-count:empty, .cart-count[data-n="0"] { display: none; }

.burger { display: none; }

/* Search (header field + overlay) */
.search-field {
  flex: 1; max-width: 340px; display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; transition: border-color .2s, box-shadow .2s;
}
.search-field:focus-within { border-color: var(--green-600); box-shadow: 0 0 0 4px var(--green-050); }
.search-field svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.search-field input { border: none; outline: none; width: 100%; background: none; font-size: .95rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #F3F6F2 0%, var(--paper) 78%); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(680px 420px at 88% -8%, rgba(0,72,60,.10), transparent 70%),
    radial-gradient(520px 360px at 6% 108%, rgba(169,133,63,.10), transparent 70%);
}
.hero-grid {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  padding-block: clamp(52px, 8vw, 96px);
}
.hero-copy h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); font-weight: 500; letter-spacing: -.02em; }
.hero-copy h1 em { font-style: italic; color: var(--green-700); }
.hero-copy .lead { margin-top: 22px; font-size: clamp(1.05rem, 1.8vw, 1.28rem); color: var(--body); max-width: 30ch; }
.hero-cta { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { margin-top: 44px; display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats .stat b { font-family: var(--font-display); font-size: 2rem; color: var(--green-800); display: block; }
.hero-stats .stat span { font-size: .86rem; color: var(--muted); }

/* Hero visual — layered petri/molecule card */
.hero-visual { position: relative; aspect-ratio: 1/1; }
.hero-visual .disc {
  position: absolute; inset: 6% 6%; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #126152, var(--green-800) 60%, var(--green-900));
  box-shadow: var(--shadow-lg), inset 0 0 0 12px rgba(255,255,255,.04);
}
.hero-visual .disc::after {
  content:""; position:absolute; inset: 8%; border-radius:50%;
  border: 1px dashed rgba(255,255,255,.14);
}
.hero-visual .mark-xl { position: absolute; inset: 22%; color: #EAF3EE; opacity: .95; }
.hero-visual .chip {
  position: absolute; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 15px; box-shadow: var(--shadow-md); display: flex; gap: 11px; align-items: center;
}
.hero-visual .chip svg { width: 34px; height: 34px; color: var(--green-700); }
.hero-visual .chip b { display: block; font-family: var(--font-sans); font-weight: 700; font-size: .92rem; color: var(--ink); line-height: 1.15; }
.hero-visual .chip span { display: block; font-size: .76rem; color: var(--muted); line-height: 1.15; margin-top: 1px; }
.hero-visual .chip-1 { top: 8%; left: -4%; }
.hero-visual .chip-2 { bottom: 10%; right: -6%; }
.hero-visual .chip-3 { bottom: 30%; left: -8%; }

/* Trust strip */
.trust { border-block: 1px solid var(--line); background: var(--surface); }
.trust .container { display: flex; gap: clamp(20px,5vw,64px); align-items: center; justify-content: space-between; flex-wrap: wrap; padding-block: 22px; }
.trust .t-item { display: flex; gap: 12px; align-items: center; }
.trust .t-item svg { width: 24px; height: 24px; color: var(--green-700); flex-shrink: 0; }
.trust .t-item b { font-size: .95rem; color: var(--ink); font-weight: 600; }
.trust .t-item p { font-size: .8rem; color: var(--muted); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .12s var(--ease), background .2s, box-shadow .2s, color .2s, border-color .2s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-800); color: #fff; box-shadow: 0 8px 20px -10px rgba(0,72,60,.7); }
.btn-primary:hover { background: var(--green-700); box-shadow: 0 12px 26px -10px rgba(0,72,60,.7); }
.btn-accent { background: var(--brass-600); color: #fff; }
.btn-accent:hover { background: var(--brass-700); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green-600); color: var(--green-800); background: var(--green-050); }
.btn-quiet { color: var(--green-800); padding: 10px 14px; }
.btn-quiet:hover { background: var(--green-050); }
.btn-sm { padding: 9px 16px; font-size: .86rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============================================================
   CATEGORY SHOWCASE
   ============================================================ */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card {
  position: relative; text-align: left; padding: 24px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur), border-color var(--dur);
  display: flex; flex-direction: column; gap: 14px; min-height: 210px;
}
.cat-card::after {
  content:""; position:absolute; right:-30px; bottom:-30px; width:130px; height:130px; border-radius:50%;
  background: radial-gradient(circle, var(--green-050), transparent 70%); transition: transform var(--dur) var(--ease);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--green-100); }
.cat-card:hover::after { transform: scale(1.4); }
.cat-card .ci { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--green-050); color: var(--green-800); position: relative; z-index: 1; }
.cat-card .ci svg { width: 27px; height: 27px; }
.cat-card h3 { font-size: 1.18rem; position: relative; z-index: 1; }
.cat-card p { font-size: .88rem; color: var(--muted); position: relative; z-index: 1; margin-top: auto; }
.cat-card .cc-count { position: relative; z-index: 1; font-size: .8rem; font-weight: 600; color: var(--green-700); display: inline-flex; align-items: center; gap: 6px; }
.cat-card .cc-count svg { width: 15px; height: 15px; transition: transform .2s; }
.cat-card:hover .cc-count svg { transform: translateX(4px); }

/* ============================================================
   CATALOG (filters + product grid)
   ============================================================ */
.catalog-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 34px; align-items: start; }
.filters {
  position: sticky; top: calc(var(--header-h) + 16px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px;
}
.filter-group { padding: 14px 14px 18px; border-bottom: 1px solid var(--line-2); }
.filter-group:last-child { border-bottom: none; }
.filter-group h4 { font-family: var(--font-sans); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.filter-opt { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; transition: background .15s; font-size: .92rem; }
.filter-opt:hover { background: var(--green-050); }
.filter-opt input { accent-color: var(--green-800); width: 16px; height: 16px; }
.filter-opt .fo-count { margin-left: auto; font-size: .78rem; color: var(--muted); background: var(--surface-2); padding: 1px 8px; border-radius: 999px; }
.filter-opt input:checked ~ .fo-label { color: var(--green-800); font-weight: 600; }

.catalog-main { min-width: 0; }
.catalog-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.catalog-toolbar .result-count { font-size: .92rem; color: var(--muted); }
.catalog-toolbar .result-count b { color: var(--ink); }
.catalog-toolbar .tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.select {
  appearance: none; background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 38px 9px 16px; font-size: .88rem; font-weight: 500; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7A72' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chips:empty { margin-bottom: 0; }
.chip-tag { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; background: var(--green-050); color: var(--green-800); border-radius: 999px; font-size: .82rem; font-weight: 600; }
.chip-tag button { display: grid; place-items: center; color: var(--green-700); }
.chip-tag button svg { width: 13px; height: 13px; }
.chip-clear { font-size: .82rem; color: var(--danger); font-weight: 600; padding: 6px 4px; }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

.product-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column; transition: transform var(--dur) var(--ease), box-shadow var(--dur), border-color var(--dur);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--green-100); }
.pc-media { position: relative; aspect-ratio: 4/3; background: #fff; overflow: hidden; cursor: pointer; }
.pc-media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .5s var(--ease); }
.product-card:hover .pc-media img { transform: scale(1.04); }
.pc-cat-ic { position: absolute; bottom: 12px; left: 12px; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: grid; place-items: center; color: var(--green-800); }
.pc-cat-ic svg { width: 19px; height: 19px; }
.pc-media .pc-mfr { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92); backdrop-filter: blur(4px); color: var(--green-800); font-size: .72rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; letter-spacing: .01em; }
.pc-media .pc-docs { position: absolute; top: 12px; right: 12px; background: var(--brass-600); color: #fff; font-size: .7rem; font-weight: 700; padding: 5px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.pc-media .pc-docs svg { width: 13px; height: 13px; }
.pc-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.pc-cat { font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--brass-700); }
.pc-body h3 { font-family: var(--font-sans); font-weight: 700; font-size: 1.02rem; color: var(--ink); line-height: 1.3; cursor: pointer; overflow-wrap: anywhere; }
.pc-body h3:hover { color: var(--green-800); }
.pc-desc { font-size: .87rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-actions { margin-top: auto; padding-top: 14px; display: flex; gap: 8px; }
.pc-actions .btn { flex: 1; }
.pc-add { position: relative; }

/* Empty state */
.empty-state { text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: var(--r-lg); background: var(--surface); }
.empty-state svg { width: 52px; height: 52px; color: var(--green-600); margin: 0 auto 18px; opacity: .6; }
.empty-state h3 { font-size: 1.3rem; margin-bottom: 8px; }
.empty-state p { color: var(--muted); }

/* ============================================================
   MANUFACTURERS
   ============================================================ */
.mfr-band { background: linear-gradient(180deg, var(--surface), #F6F3EC); border-block: 1px solid var(--line); }
.mfr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mfr-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px;
  display: flex; flex-direction: column; gap: 12px; transition: transform var(--dur) var(--ease), box-shadow var(--dur);
  text-align: left; cursor: pointer;
}
.mfr-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.mfr-logo { width: 56px; height: 56px; border-radius: 14px; background: var(--green-800); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; letter-spacing: .01em; }
.mfr-card h3 { font-family: var(--font-sans); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.mfr-card p { font-size: .86rem; color: var(--muted); }
.mfr-card .mfr-more { margin-top: auto; font-size: .82rem; font-weight: 600; color: var(--green-700); display: inline-flex; align-items: center; gap: 6px; }
.mfr-card .mfr-more svg { width: 15px; height: 15px; transition: transform .2s; }
.mfr-card:hover .mfr-more svg { transform: translateX(4px); }

/* ============================================================
   DRAWER / MODAL / OVERLAY
   ============================================================ */
.overlay {
  position: fixed; inset: 0; background: rgba(14,28,22,.42); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity var(--dur), visibility var(--dur); z-index: 90;
}
.overlay.open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(440px, 92vw);
  background: var(--paper); z-index: 100; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform var(--dur) var(--ease); box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head > svg { width: 24px; height: 24px; color: var(--green-800); flex-shrink: 0; }
.drawer-head .close svg, .modal .close svg { width: 20px; height: 20px; }
.drawer-head h3 { font-family: var(--font-display); font-size: 1.3rem; }
.drawer-head .badge { background: var(--green-050); color: var(--green-800); font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.drawer-head .close, .modal .close { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s; }
.drawer-head .close:hover, .modal .close:hover { background: var(--surface-2); color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 22px; }
.drawer-foot { padding: 20px 22px; border-top: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 12px; }

/* Cart item */
.cart-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.cart-item .ci-img { width: 68px; height: 68px; border-radius: 12px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-info h4 { font-family: var(--font-sans); font-weight: 700; font-size: .92rem; color: var(--ink); line-height: 1.3; }
.cart-item .ci-info .ci-mfr { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.qty button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--green-800); transition: background .15s; }
.qty button:hover { background: var(--green-050); }
.qty input { width: 40px; text-align: center; border: none; outline: none; font-weight: 700; font-size: .9rem; background: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cart-item .ci-remove { color: var(--muted); align-self: flex-start; padding: 4px; transition: color .2s; }
.cart-item .ci-remove:hover { color: var(--danger); }
.cart-item .ci-remove svg { width: 17px; height: 17px; }

.cart-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.cart-empty svg { width: 46px; height: 46px; margin: 0 auto 16px; color: var(--green-600); opacity: .5; }

/* Modal */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; pointer-events: none; }
.modal {
  position: relative;
  background: var(--paper); border-radius: var(--r-xl); width: 100%; max-width: 920px; max-height: 92dvh;
  overflow: hidden; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(16px) scale(.98);
  transition: opacity var(--dur), transform var(--dur) var(--ease); pointer-events: auto; display: flex; flex-direction: column;
}
.modal.open { opacity: 1; transform: none; }
.modal-scroll { overflow-y: auto; }
/* Кнопка закрытия всегда в правом верхнем углу модалки */
.modal > .close, .modal-scroll > .close, .modal .form-head + .close { z-index: 6; }
.modal .close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: rgba(255,255,255,.85); backdrop-filter: blur(4px); z-index: 6; transition: background .2s, color .2s; }
.modal .close:hover { background: var(--surface-2); color: var(--ink); }

/* Product detail */
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; }
.pd-media { background: #fff; position: relative; min-height: 320px; }
.pd-media img { width: 100%; height: 100%; object-fit: contain; padding: 24px; position: absolute; inset: 0; }
.pd-info { padding: 34px; display: flex; flex-direction: column; }
.pd-info .close { position: absolute; top: 16px; right: 16px; background: rgba(255,255,255,.9); }
.pd-mfr { font-size: .82rem; font-weight: 700; color: var(--brass-700); letter-spacing: .04em; }
.pd-info h2 { font-family: var(--font-sans); font-weight: 700; font-size: 1.7rem; margin-top: 8px; line-height: 1.2; color: var(--ink); }
.pd-cat { display: inline-flex; margin-top: 12px; font-size: .78rem; font-weight: 600; color: var(--green-800); background: var(--green-050); padding: 5px 12px; border-radius: 999px; width: fit-content; }
.pd-section { margin-top: 22px; }
.pd-section h4 { font-family: var(--font-sans); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.pd-section p { font-size: .95rem; color: var(--body); }
.pd-files { display: flex; flex-direction: column; gap: 8px; }
.pd-file {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); transition: border-color .2s, background .2s;
}
.pd-file:hover { border-color: var(--green-600); background: var(--green-050); }
.pd-file .pf-ic { width: 38px; height: 38px; border-radius: 9px; background: var(--green-050); color: var(--green-800); display: grid; place-items: center; flex-shrink: 0; }
.pd-file .pf-ic svg { width: 19px; height: 19px; }
.pd-file .pf-meta { flex: 1; min-width: 0; }
.pd-file .pf-meta b { display: block; font-size: .88rem; color: var(--ink); font-weight: 600; }
.pd-file .pf-meta span { font-size: .76rem; color: var(--muted); }
.pd-file .pf-dl { color: var(--green-700); }
.pd-file .pf-dl svg { width: 19px; height: 19px; }
.pd-foot { margin-top: auto; padding-top: 26px; display: flex; gap: 12px; align-items: center; }
.pd-foot .qty { margin-top: 0; }

/* ============================================================
   FORMS
   ============================================================ */
.form-modal { max-width: 560px; }
.form-head { padding: 28px 32px 0; }
.form-head h2 { font-size: 1.6rem; font-family: var(--font-display); }
.form-head p { color: var(--muted); font-size: .95rem; margin-top: 8px; }
form.stack { padding: 24px 32px 32px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-size: .84rem; font-weight: 600; color: var(--ink); }
.field label .req { color: var(--danger); }
.field input, .field textarea, .field select {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface);
  font-size: .95rem; transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 4px var(--green-050); }
.field textarea { resize: vertical; min-height: 92px; }
.field .hint { font-size: .78rem; color: var(--muted); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field .err { font-size: .78rem; color: var(--danger); display: none; }
.field.invalid .err { display: block; }
.order-summary { background: var(--surface-2); border-radius: 14px; padding: 16px; font-size: .88rem; }
.order-summary .os-row { display: flex; justify-content: space-between; padding: 4px 0; }
.order-summary .os-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 700; color: var(--ink); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .8rem; color: var(--muted); }
.consent input { margin-top: 3px; accent-color: var(--green-800); }

/* success */
.form-success { padding: 48px 32px; text-align: center; }
.form-success .fs-ic { width: 72px; height: 72px; border-radius: 50%; background: var(--green-050); color: var(--green-800); display: grid; place-items: center; margin: 0 auto 20px; }
.form-success .fs-ic svg { width: 36px; height: 36px; }
.form-success h2 { font-size: 1.5rem; margin-bottom: 10px; }
.form-success p { color: var(--muted); margin-bottom: 24px; }

/* ============================================================
   CTA / FEEDBACK band
   ============================================================ */
.cta-band { position: relative; background: var(--green-800); color: #EAF3EE; border-radius: var(--r-xl); padding: clamp(38px, 6vw, 64px); overflow: hidden; }
.cta-band::before { content:""; position:absolute; right:-60px; top:-60px; width:320px; height:320px; border-radius:50%; background: radial-gradient(circle, rgba(255,255,255,.07), transparent 70%); }
.cta-band .mark-bg { position: absolute; right: 4%; bottom: -20%; width: 300px; color: rgba(255,255,255,.05); }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 18ch; }
.cta-band p { margin-top: 16px; color: #C7DBD2; max-width: 46ch; }
.cta-band .btn-row { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; position: relative; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--green-900); color: #B8CEC5; padding-top: clamp(48px, 7vw, 76px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; }
.footer-brand .mark { color: #EAF3EE; display: block; width: 38px; height: 38px; }
.footer-brand .mark svg { width: 100%; height: 100%; }
.footer-brand b { font-family: var(--font-display); font-size: 1.4rem; color: #fff; display: block; margin-top: 14px; }
.footer-brand p { margin-top: 12px; font-size: .9rem; max-width: 34ch; }
.footer-col h4 { font-family: var(--font-sans); color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; font-weight: 700; }
.footer-col a, .footer-col p { display: block; font-size: .9rem; color: #B8CEC5; padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-contact .fc-item { display: flex; align-items: flex-start; gap: 11px; font-size: .9rem; padding: 6px 0; }
.footer-contact .fc-item svg { width: 17px; height: 17px; color: #6FA593; flex-shrink: 0; margin-top: 1px; }
.footer-contact .fc-item a, .footer-contact .fc-item span:not([data-ic]) { padding: 0; display: block; line-height: 1.5; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: #7FA294; }
.footer-bottom a { color: #7FA294; }
.footer-bottom a:hover { color: #fff; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  background: var(--ink); color: #fff; padding: 13px 20px; border-radius: 999px; font-size: .9rem; font-weight: 500;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px;
  animation: toastIn .3s var(--ease); pointer-events: auto;
}
.toast svg { width: 18px; height: 18px; color: #7FE0B8; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ============================================================
   MOBILE NAV (bottom bar + slide menu)
   ============================================================ */
.mobile-menu {
  position: fixed; inset: 0 0 0 auto; width: min(340px, 88vw); height: 100dvh; background: var(--paper);
  z-index: 100; transform: translateX(100%); transition: transform var(--dur) var(--ease);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; padding: 22px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu .mm-head { display: flex; align-items: center; margin-bottom: 20px; }
.mobile-menu .mm-head .close { margin-left: auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; }
.mobile-menu a { padding: 14px 12px; border-radius: 12px; font-size: 1.05rem; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line-2); }
.mobile-menu a:hover { background: var(--green-050); }

/* ============================================================
   REVEAL animation
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mfr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
/* Навигацию прячем в бургер раньше, чтобы шапка не комкалась; поиск остаётся */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .burger { display: grid; }
  .header-inner { gap: 16px; }
  .search-field { max-width: 420px; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 420px; margin-inline: auto; width: 100%; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .pd-grid { grid-template-columns: 1fr; }
  .pd-media { min-height: 240px; aspect-ratio: 16/10; }
}
@media (max-width: 760px) {
  .main-nav, .search-field, .header-actions .desktop-only { display: none; }
  .burger { display: grid; }
  .cat-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mfr-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust .container { justify-content: flex-start; gap: 22px; }
  .field.row2 { grid-template-columns: 1fr; }
  .topbar .tb-hide { display: none; }
}
@media (max-width: 560px) {
  /* Чипы держим внутри экрана — без вылета за края */
  .hero-visual { max-width: 330px; margin-block: 8px 18px; }
  .hero-visual .chip { padding: 9px 12px; gap: 9px; }
  .hero-visual .chip svg { width: 22px; height: 22px; }
  .hero-visual .chip b { font-size: .82rem; }
  .hero-visual .chip span { font-size: .7rem; }
  .hero-visual .chip-1 { top: 2%; left: 0; }
  .hero-visual .chip-2 { bottom: 4%; right: 0; }
  .hero-visual .chip-3 { bottom: 30%; left: 0; }
}
/* Кнопки на всю ширину на мобильных (карточки, hero, CTA-блок) */
@media (max-width: 600px) {
  .hero-cta, .cta-band .btn-row, .pc-actions { flex-direction: column; align-items: stretch; }
  .hero-cta .btn, .cta-band .btn-row .btn, .pc-actions .btn { width: 100%; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .pd-info, .form-head, form.stack { padding-inline: 22px; }
  /* Убираем подпись под названием, чтобы шапка помещалась и иконки не вылезали */
  .brand .wordmark span { display: none; }
  .header-actions { gap: 4px; }
}

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