/* Общая вёрстка пробного магазина. Цвета и шрифты задаёт каждый вариант через переменные. */
:root {
  --bg: #fff; --ink: #1d1d1d; --muted: #777; --line: #e6e2dc; --card: #fff; --soft: #f4f1ec;
  --accent: #2f3a2f; --accent-ink: #fff; --sale: #c0392b; --new: #2e7d5b;
  --r: 14px; --r-img: 12px; --r-btn: 999px; --head: Georgia, serif; --body: system-ui, sans-serif;
  --wrap: 1240px; --shadow: 0 10px 30px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h4 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
svg { width: 22px; height: 22px; flex: none; }

/* полоса «пробный вариант» */
.ribbon { background: #111; color: #ddd; font: 12px/1.4 system-ui, sans-serif; text-align: center; padding: 6px 12px; }
.ribbon a { color: #fff; text-decoration: underline; }

/* шапка */
.hdr { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.hdr-in { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { font-family: var(--head); font-size: 24px; font-weight: 700; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.logo svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 22px; font-size: 14.5px; flex: 1; }
.nav a { padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover, .nav a.on { border-color: currentColor; }
.search { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-btn); padding: 0 6px 0 16px; height: 42px; width: 260px; background: var(--card); }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; font-size: 14px; }
.search button { display: grid; place-items: center; width: 32px; height: 32px; color: var(--muted); }
.h-icons { display: flex; gap: 6px; }
.h-ico { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; }
.h-ico:hover { background: var(--soft); }
.cart-n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font: 700 11px/18px system-ui; text-align: center; padding: 0 5px; }
.burger { display: none; width: 42px; height: 42px; place-items: center; }
.nav-shade { display: none; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 26px; border-radius: var(--r-btn); background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14.5px; border: 1.5px solid var(--accent); transition: .2s; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.big { height: 54px; font-size: 16px; padding: 0 32px; }
.btn.icon { width: 54px; height: 54px; padding: 0; }
.btn svg { width: 18px; height: 18px; }

/* плитки товаров */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.tile { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r); overflow: hidden; transition: .25s; position: relative; }
.tile:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.t-img { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--soft); border-radius: var(--r-img); }
.t-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tile:hover .t-img img { transform: scale(1.04); }
.badge { position: absolute; top: 10px; left: 10px; font: 700 11px/1 system-ui, sans-serif; padding: 6px 9px; border-radius: 6px; color: #fff; background: var(--accent); letter-spacing: .02em; text-transform: uppercase; }
.badge.new { background: var(--new); }
.badge.sale { left: auto; right: 10px; background: var(--sale); }
.t-body { padding: 12px 4px 4px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.t-price { display: flex; align-items: baseline; gap: 8px; }
.t-price b { font-size: 18px; }
s { color: var(--muted); font-size: 13px; }
.t-name { font-size: 14.5px; line-height: 1.35; }
.t-name:hover { text-decoration: underline; }
.t-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.t-vols { margin-left: auto; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex: none; }
.t-rate { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.stars { color: #e3a83b; letter-spacing: 1px; }
.stars s { color: #d8d4cd; text-decoration: none; font-size: inherit; }
.t-add { margin-top: auto; height: 40px; border-radius: var(--r-btn); border: 1.5px solid var(--accent); color: var(--accent); font-weight: 600; font-size: 14px; transition: .2s; }
.t-add:hover { background: var(--accent); color: var(--accent-ink); }

/* блоки главной */
.block { margin: 70px 0; }
.block-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.block-head h2 { margin: 0; }
.block-head a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.block-head a svg { width: 16px; height: 16px; }
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.review { margin: 0; background: var(--card); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); }
.r-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.r-top a { text-align: right; text-decoration: underline; }
.review blockquote { margin: 0; flex: 1; }
.review figcaption { font-size: 13.5px; color: var(--muted); }
.arts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.art-card { display: flex; flex-direction: column; gap: 8px; }
.a-img { aspect-ratio: 4/3; overflow: hidden; border-radius: var(--r-img); background: var(--soft); }
.a-img img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.art-card:hover img { transform: scale(1.05); }
.a-tag { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.art-card b { font-family: var(--head); font-size: 20px; font-weight: 600; line-height: 1.25; }
.a-more { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.a-more svg { width: 15px; height: 15px; }
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.perk { display: flex; gap: 14px; align-items: flex-start; }
.perk svg { width: 30px; height: 30px; }
.perk b { display: block; margin-bottom: 2px; }
.perk span { font-size: 13.5px; color: var(--muted); }
.sub-form { display: flex; gap: 10px; max-width: 460px; }
.sub-form { flex-wrap: wrap; }
.sub-form input { flex: 1 1 180px; min-width: 0; height: 48px; border-radius: var(--r-btn); border: 1px solid var(--line); padding: 0 20px; background: var(--card); }

/* каталог */
.page { padding-top: 22px; padding-bottom: 70px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs a:hover { color: var(--ink); }
.crumbs b { font-weight: 500; color: var(--ink); }
.cat-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.cat-head h1 { margin-bottom: 8px; }
.cat-chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 26px; }
.chip { height: 40px; padding: 0 18px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--card); font-size: 14px; transition: .2s; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cat-layout { display: grid; grid-template-columns: 250px 1fr; gap: 34px; align-items: start; }
.cat-layout.nosidebar { grid-template-columns: 1fr; }
.filters { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 6px; }
.f-head { display: none; }
.f-box { padding: 16px 0; border-bottom: 1px solid var(--line); }
.f-box h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.f-box small { color: var(--muted); font-size: 12px; }
.f-link { display: block; padding: 4px 0; }
.f-link:hover { text-decoration: underline; }
.chk { display: flex; align-items: center; gap: 10px; padding: 5px 0; cursor: pointer; font-size: 14.5px; }
.chk span { display: inline-flex; align-items: center; gap: 8px; }
.chk input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.f-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.f-pills .chk { padding: 0; }
.f-pills .chk input { position: absolute; opacity: 0; pointer-events: none; }
.f-pills .chk span { height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-btn); font-size: 13.5px; background: var(--card); }
.f-pills .chk input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.f-reset { margin-top: 14px; height: 40px; }
.toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 18px; }
.f-open { display: none; height: 40px; margin-right: auto; }
.sort { font-size: 14px; color: var(--muted); }
.sort select { border: 1px solid var(--line); border-radius: 10px; height: 38px; padding: 0 10px; background: var(--card); color: var(--ink); }
.empty { text-align: center; padding: 60px 20px; }
.empty.big { padding: 90px 20px; }
.e-ico svg { width: 64px; height: 64px; opacity: .35; margin: 0 auto 16px; }

/* карточка товара */
.pd > *, .cat-layout > *, .cart-layout > *, .bento > *, .hero-in > * { min-width: 0; }
.pd { display: grid; grid-template-columns: 1.05fr 1fr; gap: 50px; align-items: start; }
.gallery { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 92px; max-width: 500px; width: 100%; }
.g-main { position: relative; aspect-ratio: 3/4; border-radius: var(--r); overflow: hidden; background: var(--soft); }
.g-main img { width: 100%; height: 100%; object-fit: cover; }
.g-thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumb { width: 70px; flex: none; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; opacity: .6; border: 2px solid transparent; transition: .2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on, .thumb:hover { opacity: 1; border-color: var(--accent); }
.buy h1 { font-size: clamp(26px, 3vw, 36px); }
.b-rate { display: flex; align-items: center; gap: 10px; font-size: 14px; flex-wrap: wrap; }
.b-rate a { text-decoration: underline; color: var(--muted); }
.b-rate .muted { margin-left: auto; font-size: 13px; }
.b-price { display: flex; align-items: center; gap: 12px; margin: 20px 0 26px; }
.b-price b { font-size: 34px; font-family: var(--head); }
.b-price s { font-size: 17px; }
.b-price .badge { position: static; }
.opt { margin-bottom: 22px; }
.opt h4 { font-weight: 500; color: var(--muted); display: flex; gap: 6px; align-items: baseline; }
.opt h4 b { color: var(--ink); font-weight: 600; }
.sz-link { margin-left: auto; font-size: 13px; text-decoration: underline; color: var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { min-width: 64px; height: 44px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; transition: .15s; }
.pill:hover { border-color: var(--ink); }
.pill.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.pill.off { opacity: .45; text-decoration: line-through; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swb { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 2px solid transparent; transition: .15s; }
.swb .sw { width: 34px; height: 34px; }
.swb.on { border-color: var(--accent); }
.swb.off { opacity: .35; }
.warn { color: var(--sale); font-size: 13.5px; margin: 8px 0 0; }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.b-act { display: flex; gap: 10px; margin: 28px 0 24px; }
.b-act .btn.big { flex: 1; }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-btn); height: 54px; background: var(--card); }
.qty button { width: 42px; height: 100%; font-size: 20px; }
.qty span { min-width: 24px; text-align: center; font-weight: 600; }
.b-info { list-style: none; padding: 18px 0 0; margin: 0; display: grid; gap: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.b-info li { display: flex; gap: 14px; }
.b-info span { color: var(--muted); }
.b-info b { color: var(--ink); font-weight: 600; }
.p-tabs { margin-top: 60px; scroll-margin-top: 90px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { padding: 14px 18px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--ink); }
.tab-body { padding: 26px 0; max-width: 860px; }
.tab-body p { margin: 0 0 12px; }
.chars { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.chars div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.chars dt { color: var(--muted); }
.chars dd { margin: 0; text-align: right; font-weight: 500; }
.dlv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 12px; }
.dlv div { background: var(--soft); border-radius: var(--r); padding: 18px; }
.dlv p { margin: 0; font-size: 14px; color: var(--muted); }
table.sz { width: 100%; border-collapse: collapse; font-size: 14px; }
table.sz th, table.sz td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: center; }

/* корзина */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.c-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.c-row { display: grid; grid-template-columns: 84px 1fr auto 120px 32px; gap: 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.c-img img { width: 84px; height: 108px; object-fit: cover; border-radius: 10px; }
.c-info { display: flex; flex-direction: column; gap: 4px; }
.c-info a { font-weight: 600; }
.c-info .muted { font-size: 13.5px; }
.c-row .qty { height: 42px; }
.c-row .qty button { width: 34px; }
.c-sum { text-align: right; display: flex; flex-direction: column; }
.c-del { color: var(--muted); }
.c-del svg { width: 18px; height: 18px; }
.order { margin-top: 40px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--muted); }
.fields input { height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; background: var(--card); color: var(--ink); font-size: 15px; }
.radios { display: grid; gap: 10px; margin-bottom: 24px; }
.radio { display: flex; gap: 12px; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; background: var(--card); }
.radio:has(input:checked) { border-color: var(--accent); }
.radio input { accent-color: var(--accent); width: 18px; height: 18px; }
.radio span { display: flex; flex-direction: column; }
.radio small { color: var(--muted); }
.agree { font-size: 13.5px; display: flex; gap: 8px; align-items: center; }
.agree a { text-decoration: underline; }
.summary { position: sticky; top: 92px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.summary > div { display: flex; justify-content: space-between; font-size: 14.5px; }
.sale-row span:last-child { color: var(--sale); }
.summary .total { border-top: 1px solid var(--line); padding-top: 14px; font-size: 18px; }
.summary .total b { font-size: 24px; }

/* текстовые страницы */
.text-page { max-width: 860px; }
.text-page .lead { font-size: 19px; }
.text-page h2 { margin-top: 36px; }
.article .a-hero { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--r); margin: 20px 0 26px; }
.article p { font-size: 17px; }

/* подвал */
.ftr { background: var(--soft); margin-top: 40px; padding: 56px 0 20px; font-size: 14px; }
.ftr-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.3fr; gap: 30px; }
.ftr h5 { margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.ftr-in > div { display: flex; flex-direction: column; gap: 8px; }
.ftr-in a:hover { text-decoration: underline; }
.f-brand p { color: var(--muted); max-width: 260px; }
.chips-s { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-s span { font: 700 11.5px/1 system-ui, sans-serif; padding: 7px 9px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); }
.ftr-low { display: flex; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 18px; color: var(--muted); font-size: 13px; }
.ftr-low span { margin-right: auto; }

/* всплывашки */
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; align-items: center; gap: 12px; background: #1d1d1d; color: #fff; padding: 12px 14px; border-radius: 14px; max-width: 380px; font-size: 13.5px; transform: translateY(150%); transition: .35s; box-shadow: 0 14px 40px rgba(0,0,0,.25); }
.toast.on { transform: none; }
.toast img { width: 44px; height: 56px; object-fit: cover; border-radius: 8px; }
.toast a { margin-left: auto; padding: 8px 12px; border-radius: 999px; background: #fff; color: #111; font-weight: 600; white-space: nowrap; }
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.m-box { position: relative; background: var(--bg); color: var(--ink); border-radius: var(--r); padding: 32px; max-width: 520px; width: 100%; text-align: center; }
.m-box table { text-align: center; margin: 10px 0; }
.m-x { position: absolute; top: 12px; right: 12px; }
.ok-ico svg { width: 54px; height: 54px; color: var(--accent); margin: 0 auto 10px; }

/* ── планшет ── */
@media (max-width: 1100px) {
  .nav { display: none; }
  .burger { display: grid; }
  .hdr-in { gap: 14px; }
  .search { margin-left: auto; }
  body.nav-open .nav { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 85vw); background: var(--bg); z-index: 60; padding: 80px 28px; gap: 6px; font-size: 18px; box-shadow: var(--shadow); }
  body.nav-open .nav-shade { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.35); }
  .ftr-in { grid-template-columns: 1fr 1fr 1fr; }
  .f-brand { grid-column: 1 / -1; }
  .grid.four { grid-template-columns: repeat(2, 1fr); }
  .perks { grid-template-columns: 1fr 1fr; }
  .dlv { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .cat-layout { grid-template-columns: 1fr; }
  .filters { display: none; }
  .f-open { display: inline-flex; }
  body.filters-open .filters { display: flex; position: fixed; inset: 0; z-index: 70; background: var(--bg); padding: 16px 22px 30px; overflow: auto; }
  body.filters-open .f-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 6px; font-size: 18px; }
  .pd { grid-template-columns: 1fr; gap: 26px; }
  .gallery { position: static; max-width: none; }
  .thumb { width: 60px; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .arts { grid-template-columns: 1fr 1fr; }
  .chars { grid-template-columns: 1fr; }
}
/* ── телефон ── */
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hdr-in { height: 60px; }
  .logo { font-size: 20px; }
  .search { display: none; }
  .h-icons { margin-left: auto; }
  .grid, .grid.four { grid-template-columns: 1fr 1fr; gap: 12px; }
  .t-body { padding: 8px 2px 2px; }
  .t-price b { font-size: 16px; }
  .t-name { font-size: 13.5px; }
  .t-vols { margin-left: 0; width: 100%; }
  .t-add { height: 36px; font-size: 13px; }
  .badge { top: 6px; left: 6px; font-size: 10px; padding: 5px 6px; }
  .badge.sale { right: 6px; }
  .block { margin: 46px 0; }
  .block-head { margin-bottom: 18px; }
  .arts { grid-template-columns: 1fr; }
  .perks { grid-template-columns: 1fr; }
  .dlv { grid-template-columns: 1fr; }
  .c-row { grid-template-columns: 70px 1fr auto; grid-template-areas: "i n d" "i q s"; gap: 8px 12px; }
  .c-img { grid-area: i; } .c-img img { width: 70px; height: 90px; }
  .c-info { grid-area: n; } .c-row .qty { grid-area: q; justify-self: start; height: 36px; }
  .c-sum { grid-area: s; } .c-del { grid-area: d; justify-self: end; }
  .fields { grid-template-columns: 1fr; }
  .b-price b { font-size: 28px; }
  .b-act { flex-wrap: wrap; }
  .b-act .btn.big { flex: 1 1 100%; order: -1; }
  .b-act .qty { flex: 1; }
  .ftr-in { grid-template-columns: 1fr 1fr; }
  .toast { left: 12px; right: 12px; bottom: 12px; }
}
