/* Квест — каталог. Палитра и шрифт взяты с questgifts.ru и логотипа: бирюзовый ключ и глубокий синий. */
:root {
  color-scheme: light;
  --deep: #005070;        /* синий логотипа */
  --ink: #0c3446;         /* текст и тёмные поверхности: тот же синий, но глубже */
  --teal: #00a090;        /* бирюзовый логотипа */
  --teal-strong: #007f73; /* кнопки: белый текст проходит по контрасту */
  --sage: #58ac9b;
  --mist: #eaf4f2;
  --mist-2: #d9ebe8;
  --page: #f4f8f7;
  --card: #ffffff;
  --line: #d3e3e0;
  --muted: #557079;
  --sun: #ff751f;         /* тёплый акцент: счётчик заказа */
  --sand: #fff1e3;
  --danger: #b3261e;
  --r-card: 16px;
  --r-ctl: 10px;
  --wrap: 1320px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 88px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-strong); }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(26px, 3.2vw, 38px); }
h2 { font-size: 22px; } h3 { font-size: 17px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }

/* ---- шапка ---- */
.strip { background: var(--deep); color: #dff2ef; font-size: 13.5px; }
.strip .wrap { display: flex; gap: 20px; align-items: center; justify-content: space-between; min-height: 36px; flex-wrap: wrap; }
.strip a { color: #fff; text-decoration: none; }
.strip a:hover { color: #bfeee6; text-decoration: underline; }
.strip .contacts { display: flex; gap: 20px; flex-wrap: wrap; }
.site-head { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.logo { flex: none; display: block; }
.logo img { height: 46px; width: auto; }
.search { flex: 1; display: flex; max-width: 680px; position: relative; }
.search input[aria-expanded="true"] { border-bottom-left-radius: 0; border-bottom-right-radius: 0; background: #fff; }
.search input { width: 100%; height: 46px; padding: 0 56px 0 18px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--page); font: inherit; color: var(--ink); }
.search input::placeholder { color: #7d949b; }
.search input:focus { outline: none; border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(0,160,144,.15); }
.search button { position: absolute; right: 5px; top: 5px; width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--teal-strong); color: #fff; cursor: pointer; display: grid; place-items: center; }
.search button:hover { background: var(--deep); }
.cartlink { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px 0 14px; border-radius: 12px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; }
.cartlink:hover { background: var(--deep); color: #fff; }
.cartlink .badge { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--sun); color: var(--ink); font-size: 13px; font-weight: 800; display: grid; place-items: center; }
.cartlink .badge[data-empty="true"] { background: rgba(255,255,255,.2); color: #fff; }
.cartlink.bump .badge { animation: bump .5s ease; }
@keyframes bump { 30% { transform: scale(1.45); } 60% { transform: scale(.92); } }
.btn.filters-btn { display: none; }

/* ---- кнопки и поля ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 0; border-radius: var(--r-ctl); background: var(--teal-strong); color: #fff; font: 700 15px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--deep); color: #fff; }
.btn.ghost { background: transparent; color: var(--deep); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--teal); color: var(--teal-strong); background: #fff; }
.btn.small { height: 38px; padding: 0 14px; font-size: 14px; }
.btn.done { background: var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.field input, .field textarea, .field select, select.sel { min-width: 0; max-width: 100%; font: 400 15px var(--font); color: var(--ink); padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--r-ctl); background: #fff; width: 100%; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus, select.sel:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(0,160,144,.15); }
.qty { display: inline-flex; height: 44px; border: 1.5px solid var(--line); border-radius: var(--r-ctl); background: #fff; overflow: hidden; flex: none; }
.qty button { width: 34px; border: 0; background: transparent; color: var(--deep); font: 600 20px var(--font); cursor: pointer; }
.qty button:hover { background: var(--mist); }
.qty input { width: 56px; border: 0; text-align: center; font: 700 15px var(--font); color: var(--ink); background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; background: var(--mist); }
.qty.small { height: 38px; } .qty.small button { width: 28px; } .qty.small input { width: 44px; }
.buy { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.buy .btn { flex: 1; min-width: 110px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; background: var(--mist); color: var(--deep); font-size: 13.5px; font-weight: 600; text-decoration: none; }
a.chip:hover { background: var(--mist-2); color: var(--deep); }
.stock { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--teal-strong); }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.stock.order { color: #a4500f; } .stock.order::before { background: var(--sun); }

/* ---- главный экран каталога ---- */
.hero { position: relative; overflow: hidden; background: var(--mist); border-bottom: 1px solid var(--line); }
.hero .wrap { position: relative; padding-top: 34px; padding-bottom: 30px; }
.hero h1 { max-width: 25ch; }
.hero p { max-width: 60ch; margin: 12px 0 18px; color: #2f5360; font-size: 16.5px; }
.hero .cats { display: flex; flex-wrap: wrap; gap: 8px; max-width: 880px; }
.hero .cats a { display: inline-flex; gap: 7px; align-items: baseline; padding: 6px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: 14px; color: var(--ink); }
.hero .cats a:hover { border-color: var(--teal); color: var(--teal-strong); }
.hero .cats small { color: var(--muted); font-weight: 600; }
.hero .key { position: absolute; right: -30px; top: 50%; width: 460px; height: 212px; transform: translateY(-50%) rotate(-8deg); color: var(--sage); opacity: .3; pointer-events: none; }

/* ---- раскладка каталога ---- */
.layout { display: grid; grid-template-columns: 296px minmax(0, 1fr); gap: 28px; padding: 24px 0 56px; align-items: start; }
.side { position: sticky; top: var(--side-top, 100px); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 16px 12px; margin-bottom: 14px; }
.panel > h2 { font-size: 16px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.reset { font-size: 13px; font-weight: 600; }
.quick { display: grid; gap: 10px; }
.quick label { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.quick input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--teal-strong); }
select.sel { padding-right: 10px; }

nav.tree details > summary, nav.tree .leaf { display: flex; align-items: baseline; gap: 6px; padding: 5px 0; }
nav.tree summary { cursor: pointer; list-style: none; }
nav.tree summary::-webkit-details-marker { display: none; }
nav.tree summary::before { content: ""; flex: none; width: 7px; height: 7px; margin: 0 6px 1px 3px; border-right: 2px solid var(--sage); border-bottom: 2px solid var(--sage); transform: rotate(-45deg); transition: transform .15s; }
nav.tree details[open] > summary::before { transform: rotate(45deg); }
nav.tree .leaf { padding-left: 20px; }
nav.tree ul { margin: 0; padding: 0 0 0 18px; list-style: none; border-left: 1.5px solid var(--mist-2); margin-left: 6px; }
nav.tree a { flex: 1; text-decoration: none; color: var(--ink); font-size: 14.5px; line-height: 1.35; }
nav.tree a:hover { color: var(--teal-strong); }
nav.tree a.on { color: var(--teal-strong); font-weight: 800; }
.cnt { flex: none; margin-left: auto; padding-left: 8px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.toggle { display: flex; align-items: center; gap: 10px; padding: 4px 0 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14.5px; }
.toggle .box { width: 17px; height: 17px; flex: none; border: 1.5px solid #8fb0b3; border-radius: 5px; display: grid; place-items: center; font-size: 11px; line-height: 1; color: #fff; }
.toggle.sel .box { background: var(--teal-strong); border-color: var(--teal-strong); }
.toggle:hover { color: var(--teal-strong); }
.fgroup { border-top: 1px solid var(--mist-2); padding: 9px 0; }
.fgroup:first-of-type { border-top: 0; }
.fgroup > summary { cursor: pointer; font-weight: 700; font-size: 14.5px; list-style: none; display: flex; align-items: center; gap: 8px; }
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary::after { content: "+"; margin-left: auto; color: var(--sage); font-weight: 600; font-size: 18px; line-height: 1; }
.fgroup[open] > summary::after { content: "–"; }
.fvals { list-style: none; margin: 8px 0 0; padding: 0; max-height: 252px; overflow: auto; scrollbar-width: thin; }
.fvals a { display: flex; align-items: center; gap: 10px; padding: 3px 0; text-decoration: none; color: var(--ink); font-size: 14px; }
.fvals a:hover { color: var(--teal-strong); }
.fvals .box { width: 17px; height: 17px; flex: none; border: 1.5px solid #8fb0b3; border-radius: 5px; display: grid; place-items: center; font-size: 11px; line-height: 1; color: #fff; }
.fvals a.sel { font-weight: 700; } .fvals a.sel .box { background: var(--teal-strong); border-color: var(--teal-strong); }
.more > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--deep); padding: 8px 0 2px; }
.badge-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--teal-strong); color: #fff; font-size: 12px; display: inline-grid; place-items: center; }

.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .count { font-weight: 700; }
.toolbar .sort { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.toolbar select.sel { width: auto; padding: 8px 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.chips .chip { background: #fff; box-shadow: inset 0 0 0 1.5px var(--teal); }
.chips .chip::after { content: "×"; font-size: 17px; line-height: 1; color: var(--teal-strong); }

/* ---- карточки товаров ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--sage); box-shadow: 0 10px 28px -14px rgba(0,80,112,.35); }
.card .pic { display: block; aspect-ratio: 1; background: #fff; }
.card .pic img { width: 100%; height: 100%; object-fit: contain; }
.card .pic .none { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.card .body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .name { font-weight: 700; font-size: 14.5px; line-height: 1.35; color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card .name:hover { color: var(--teal-strong); }
.card .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .price { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.card .price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.card .act { margin-top: auto; padding-top: 10px; }
.card .act > .btn { width: 100%; }
.btn.icon { width: 44px; min-width: 44px; padding: 0; flex: none; }
.btn.icon.small { width: 38px; min-width: 38px; }
.buy.compact { flex-wrap: nowrap; gap: 8px; justify-content: space-between; }
.card .buy.compact .btn.icon { flex: none; }
.card .qty.small button { width: 28px; } .card .qty.small input { width: 40px; }

.pager { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 32px; flex-wrap: wrap; }
.pager .num, .pager .step { min-width: 44px; height: 44px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: var(--r-ctl); font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.pager a.num, .pager a.step { background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.pager a.num:hover, .pager a.step:hover { border-color: var(--teal); color: var(--teal-strong); }
.pager .num.cur { background: var(--ink); color: #fff; }
.pager .step.off { color: #b5c6c9; }
.pager .gap { min-width: 24px; text-align: center; color: var(--muted); font-weight: 700; }
.pager-note { text-align: center; font-size: 13.5px; margin: 10px 0 0; }
.toolbar .sort.per { margin-left: auto; } .toolbar .sort.per + .sort { margin-left: 0; }
.empty { background: #fff; border: 1.5px dashed var(--line); border-radius: var(--r-card); padding: 48px 24px; text-align: center; }
.empty svg { width: 120px; height: 56px; color: var(--sage); margin: 0 auto 12px; }

/* ---- карточка товара ---- */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 18px 0 6px; font-size: 14px; color: var(--muted); align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--teal-strong); text-decoration: underline; }
.crumbs i { width: 6px; height: 6px; border-right: 1.5px solid #93b0b3; border-top: 1.5px solid #93b0b3; transform: rotate(45deg); margin: 0 6px 0 2px; }
.pdp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; padding: 10px 0 28px; align-items: start; }
.gallery { position: sticky; top: 100px; }
a.zoom { display: block; cursor: zoom-in; }
a.zoom.main { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
a.zoom.main img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; margin-top: 12px; }
.thumbs a.zoom { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.thumbs a.zoom:hover { border-color: var(--teal); }
.thumbs img { aspect-ratio: 1; width: 100%; object-fit: contain; }
.pdp h1 { margin-bottom: 12px; }
.pdp .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pricebox { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.pricebox .price { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.pricebox .from { font-size: 15px; color: var(--muted); font-weight: 600; }
.buybox { margin: 18px 0 8px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); }
.buybox .buy .btn { height: 48px; }
.buybox .buy .qty { height: 48px; }
.note { font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }
.alert { background: var(--sand); border-left: 4px solid var(--sun); padding: 10px 14px; border-radius: 0 10px 10px 0; margin: 12px 0; font-size: 14.5px; }
.desc { max-width: 68ch; overflow-wrap: anywhere; } .desc p { margin: 0 0 .7em; }
.pdp > div { min-width: 0; }
dl.facts { margin: 22px 0 0; display: grid; grid-template-columns: minmax(120px, 34%) 1fr; border-top: 1px solid var(--line); }
dl.facts dt, dl.facts dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
dl.facts dt { color: var(--muted); padding-right: 14px; }
section.variants { padding: 6px 0 56px; }
section.variants h2 { margin-bottom: 14px; }
.vtable { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.vrow { display: grid; grid-template-columns: 56px minmax(96px, .8fr) minmax(0, 2fr) 110px 110px minmax(230px, 1.1fr); gap: 14px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--mist-2); }
.vrow:first-child { border-top: 0; }
.vrow.head { background: var(--mist); font-size: 13.5px; font-weight: 700; color: var(--muted); padding-top: 9px; padding-bottom: 9px; }
.vrow .thumb { width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.vrow .thumb img { width: 100%; height: 100%; object-fit: contain; }
.vrow .code { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.vrow .vname { font-size: 14.5px; }
.vrow .vname small { display: block; color: var(--muted); font-size: 13px; }
.vrow .vprice { font-weight: 800; }
.vrow .buy { flex-wrap: nowrap; } .vrow .buy .btn { min-width: 0; padding: 0 14px; flex: 1; }
.vrow.dim { background: #fbfdfc; }
.vtable.noimg .vrow { grid-template-columns: minmax(96px, .8fr) minmax(0, 2fr) 110px 110px minmax(230px, 1.1fr); }
.vtable.noimg .thumb, .vtable.noimg .vrow.head > span:first-child { display: none; }
.vlist { margin-top: 18px; } .vlist > summary { cursor: pointer; font-weight: 700; color: var(--deep); padding: 6px 0 12px; }
.mx { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.mx-scroll { overflow-x: auto; }
.mx-table { border-collapse: collapse; width: 100%; min-width: 560px; }
.mx-table th, .mx-table td { padding: 8px 10px; text-align: center; border-top: 1px solid var(--mist-2); }
.mx-table thead th { border-top: 0; background: var(--mist); font-size: 13.5px; font-weight: 800; color: var(--deep); }
.mx-table tbody th { text-align: left; font-weight: 700; font-size: 14.5px; min-width: 190px; }
.mx-table tbody th .thumb { display: inline-block; vertical-align: middle; width: 44px; height: 44px; margin-right: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.mx-table tbody th .thumb img { width: 100%; height: 100%; object-fit: contain; }
.mx-table .cname { vertical-align: middle; }
.mx-table input { width: 64px; height: 40px; text-align: center; font: 700 15px var(--font); color: var(--ink); border: 1.5px solid var(--line); border-radius: 9px; background: #fff; -moz-appearance: textfield; }
.mx-table input::-webkit-outer-spin-button, .mx-table input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mx-table input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,160,144,.18); }
.mx-table input.has { border-color: var(--teal-strong); background: var(--mist); }
.mx-table small { display: block; margin-top: 3px; font-size: 12px; color: #a4500f; font-weight: 600; }
.mx-table small.in { color: var(--teal-strong); }
.mx-table .na { color: #b5c6c9; }
.mx-bar { position: sticky; bottom: 0; display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fff; border-top: 1.5px solid var(--line); }
.mx-sum { font-weight: 700; }

/* ---- заказ ---- */
.page-title { padding: 28px 0 18px; }
.checkout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 28px; padding-bottom: 64px; align-items: start; }
.lines, .summary, .checkout > * { min-width: 0; }
.lines { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); }
.line { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; padding: 16px; border-top: 1px solid var(--mist-2); align-items: center; }
.line:first-child { border-top: 0; }
.line .thumb { width: 76px; height: 76px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.line .thumb img { width: 100%; height: 100%; object-fit: contain; }
.line .ttl { font-weight: 700; text-decoration: none; color: var(--ink); line-height: 1.35; }
.line .ttl:hover { color: var(--teal-strong); }
.line .vari { color: var(--muted); font-size: 13.5px; }
.line .ctl { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.line .sum { font-weight: 800; font-size: 17px; }
.line .unit { font-size: 13px; color: var(--muted); }
.line form.upd { display: flex; gap: 8px; align-items: center; }
.linkbtn { border: 0; background: none; padding: 0; font: 600 13.5px var(--font); color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--danger); }
.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; position: sticky; top: 100px; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.summary .total b { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.summary form { display: grid; gap: 12px; }
.summary .btn { height: 50px; font-size: 16px; }
.err { background: #fdecea; color: var(--danger); border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 14.5px; margin-bottom: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.thanks { max-width: 620px; margin: 64px auto 96px; text-align: center; }
.thanks svg { width: 150px; height: 70px; color: var(--teal); margin: 0 auto 18px; }
.thanks p { font-size: 17px; color: #2f5360; }

/* ---- подвал ---- */
.foot { background: #fff; border-top: 3px solid var(--teal); margin-top: 24px; }
.foot .wrap { display: flex; gap: 32px; justify-content: space-between; flex-wrap: wrap; padding-top: 32px; padding-bottom: 32px; }
.foot img { height: 44px; margin-bottom: 10px; }
.foot p { margin: 4px 0; font-size: 14.5px; }
.foot a { color: var(--ink); }
.foot .small { color: var(--muted); font-size: 13px; }

/* ---- уведомление и просмотр картинок ---- */
.toast { position: fixed; z-index: 60; right: 20px; bottom: 20px; max-width: min(400px, calc(100vw - 32px)); background: var(--ink); color: #fff; border-radius: 14px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; box-shadow: 0 18px 40px -12px rgba(0,30,45,.55); transform: translateY(24px); opacity: 0; pointer-events: none; transition: transform .22s ease, opacity .22s ease; }
.toast.show { transform: none; opacity: 1; pointer-events: auto; }
.toast.error { background: var(--danger); }
.toast .t { font-size: 14.5px; line-height: 1.35; } .toast .t b { display: block; }
.toast a { color: #8be8da; font-weight: 700; white-space: nowrap; }
dialog#lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; }
dialog#lightbox::backdrop { background: rgba(6,28,40,.82); }
#lb-img { position: absolute; inset: 0; margin: auto; width: min(92vw, 88vh, 1000px); height: min(92vw, 88vh, 1000px); object-fit: contain; background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); transition: opacity .12s; }
#lb-img.loading { opacity: .35; }
.lb-close, .lb-nav { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 28px; line-height: 1; cursor: pointer; padding: 0; backdrop-filter: blur(6px); }
.lb-close { top: 18px; right: 18px; } .lb-nav { top: 50%; margin-top: -24px; } .lb-nav.prev { left: 18px; } .lb-nav.next { right: 18px; }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.3); }
.lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; font-weight: 600; }
dialog#filters { border: 0; padding: 0; width: min(420px, 100vw); height: 100vh; max-height: 100vh; margin: 0 0 0 auto; background: var(--page); }
dialog#filters::backdrop { background: rgba(6,28,40,.6); }
dialog#filters .top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--line); }
dialog#filters .inner { padding: 14px; }

/* ---- адаптив ---- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .side.desktop { display: none; }
  .btn.filters-btn { display: inline-flex; }
  .pdp { grid-template-columns: 1fr; gap: 22px; } .gallery { position: static; }
  .checkout { grid-template-columns: minmax(0, 1fr); } .summary { position: static; }
  .hero .key { opacity: .18; }
}
@media (max-width: 760px) {
  .pager .num.far { display: none; } .pager .num, .pager .step { min-width: 40px; height: 40px; padding: 0 8px; }
  .vtable .vrow, .vtable.noimg .vrow { grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "th nm" "th pr" "bu bu"; gap: 4px 12px; padding: 12px 14px; }
  .vtable.noimg .vrow { grid-template-columns: minmax(0, 1fr); grid-template-areas: "nm" "pr" "bu"; }
  .vtable .vrow .buy { flex-wrap: nowrap; } .vtable .vrow .buy .btn { flex: 1; min-width: 0; }
  .toolbar .sort.per { margin-left: 0; } .toolbar .sort { font-size: 13px; }
  .site-head .wrap { flex-wrap: wrap; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .logo img { height: 38px; } .search { order: 3; flex-basis: 100%; max-width: none; }
  .cartlink span.t { display: none; } .cartlink { padding: 0 12px; }
  .strip .contacts a.opt { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card .qty.small button { width: 26px; } .card .qty.small input { width: 34px; padding: 0; } .buy.compact { gap: 6px; }
  .card .body { padding: 2px 12px 12px; } .card .price { font-size: 17px; }
  .vrow { grid-template-columns: 52px 1fr; grid-template-areas: "th nm" "th pr" "bu bu"; gap: 4px 12px; }
  .vrow.head { display: none; } .vrow > .thumb { grid-area: th; } .vrow .vname { grid-area: nm; } .vrow .vprice { grid-area: pr; }
  .vrow .code, .vrow .vstock { display: none; } .vrow .buy { grid-area: bu; margin-top: 6px; }
  .line { grid-template-columns: 60px minmax(0, 1fr); padding: 14px; gap: 12px; } .line .ttl { overflow-wrap: anywhere; } .line .thumb { width: 60px; height: 60px; } .line .ctl { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 8px 16px; } .line .ctl .sum { margin-left: auto; } .line .ctl .unit { flex-basis: 100%; text-align: right; order: 5; margin-top: -4px; } .line .ctl form:last-child { order: 6; }
  .pricebox .price { font-size: 28px; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---- подсказки поиска ---- */
.suggest { position: absolute; z-index: 45; top: 100%; left: 0; right: 0; background: #fff; border: 1.5px solid var(--teal); border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; box-shadow: 0 22px 40px -18px rgba(0,50,70,.45); max-height: min(70vh, 640px); overflow: auto; padding: 6px 0 4px; }
.sg-h { padding: 10px 18px 4px; font-size: 13px; font-weight: 800; color: var(--muted); }
.sg-cat, .sg-item, .sg-all { display: grid; align-items: center; gap: 12px; padding: 8px 18px; color: var(--ink); text-decoration: none; }
.sg-cat { grid-template-columns: minmax(0, 1fr) auto; }
.sg-cat small { display: block; color: var(--muted); font-size: 12.5px; }
.sg-cat .n { color: var(--muted); font-size: 12.5px; }
.sg-item { grid-template-columns: 48px minmax(0, 1fr) auto; }
.sg-item .th { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.sg-item .th img { width: 100%; height: 100%; object-fit: contain; }
.sg-item .nm { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.sg-item .ar { color: var(--muted); font-size: 12.5px; }
.sg-item .pr { text-align: right; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sg-item .pr small { display: block; font-size: 12px; font-weight: 700; color: #a4500f; }
.sg-item .pr small.in { color: var(--teal-strong); }
.sg-cat[aria-selected="true"], .sg-item[aria-selected="true"], .sg-cat:hover, .sg-item:hover { background: var(--mist); }
.sg-all { justify-content: center; font-weight: 800; color: var(--teal-strong); border-top: 1px solid var(--mist-2); margin-top: 6px; padding: 12px 18px; }
.sg-all:hover, .sg-all[aria-selected="true"] { background: var(--mist); }
.sg-empty { padding: 18px; color: var(--muted); }
.suggest mark { background: rgba(0,160,144,.2); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---- карусель «Похожие товары» ---- */
.similar { padding: 4px 0 56px; }
.rail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.rail-btns { display: flex; gap: 8px; }
.rail-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--deep); display: grid; place-items: center; cursor: pointer; }
.rail-btn:hover:not([disabled]) { border-color: var(--teal); color: var(--teal-strong); }
.rail-btn[disabled] { opacity: .35; cursor: default; }
.rail { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 2px 8px; margin: 0 -2px; }
.rail::-webkit-scrollbar { display: none; }
.rcard { flex: 0 0 214px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.rcard:hover { border-color: var(--sage); box-shadow: 0 10px 28px -14px rgba(0,80,112,.35); }
.rcard .pic { display: block; aspect-ratio: 1; background: #fff; }
.rcard .pic img { width: 100%; height: 100%; object-fit: contain; }
.rcard > span:not(.pic) { padding: 0 14px; }
.rcard .name { font-weight: 700; font-size: 14.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.rcard .price { font-size: 19px; font-weight: 800; }
.alert.sale { background: var(--mist); border-left-color: var(--teal); }
.alert.twin { background: var(--mist); border-left-color: var(--sage); }
@media (max-width: 760px) { .rcard { flex-basis: 168px; } .rail-btns { display: none; } .suggest { position: fixed; left: 8px; right: 8px; top: 140px; max-height: calc(100vh - 160px); border-radius: 14px; border-top: 1.5px solid var(--teal); } }
