:root { --accent:#2750E8; --bg:#F2F4F3; --text:#0F1B2D; --ink:#0F1B2D; --muted:#586577; --line:#D9DFDD; --surface:#FFFFFF; }
* { box-sizing: border-box; }
body { margin:0; font:16px/1.5 Onest,system-ui,-apple-system,"Segoe UI",sans-serif; background:var(--bg); color:var(--text); }
header, main { max-width:1180px; margin:0 auto; padding:16px; }
header { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
header nav { display:flex; gap:16px; align-items:center; }
a { color:var(--accent); }
.logo { font-weight:700; font-size:20px; text-decoration:none; color:var(--text); }
.card { background:#fff; border-radius:12px; padding:24px; box-shadow:0 1px 3px rgba(0,0,0,.08); }
form p { margin:0 0 12px; display:flex; flex-direction:column; gap:4px; }
input { padding:10px; border:1px solid #d0d5dd; border-radius:8px; font:inherit; }
button, .btn { background:var(--accent); color:#fff; border:0; border-radius:8px; padding:10px 18px; font:inherit; cursor:pointer; text-decoration:none; display:inline-block; }
button.link { background:none; color:var(--accent); padding:0; }
.errorlist { color:#b42318; margin:0; padding-left:18px; font-size:14px; }
.helptext { color:var(--muted); font-size:13px; }
table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:8px; border-bottom:1px solid #e5e7eb; }
.messages { list-style:none; padding:0; }

/* ---- каталог ---- */
.muted { color: var(--muted); font-size: 14px; }
h1 { font-size: 26px; margin: 0 0 8px; }
.catalog { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.search input { width: 100%; }
.cats { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.cats__item { padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 15px; }
.cats__item:hover { background: #e9edf5; }
.cats__item.is-active { background: var(--accent); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid #d0d5dd; color: var(--text); text-decoration: none; font-size: 14px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-top: 12px; }
.pcard { background: #fff; border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.pcard__img { aspect-ratio: 1; background: #f1f3f6; display: flex; align-items: center; justify-content: center; }
.pcard__img img { width: 100%; height: 100%; object-fit: contain; }
.noimg { color: var(--muted); font-size: 13px; }
.pcard__body { padding: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard__name { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__meta { font-size: 12px; color: var(--muted); }
.pcard__price { margin-top: auto; font-weight: 700; font-size: 17px; }
.pcard__price small, .pdetail__price small { font-weight: 400; color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin: 24px 0; }
.crumbs { font-size: 13px; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.crumbs a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.crumbs a:hover { border-color: var(--accent); color: var(--ink); }
.crumbs span.cur { border-radius:999px; padding:5px 12px; white-space:nowrap; background:var(--ink); color:#fff; }
.crumbs a.cur { background: var(--ink); border-color: var(--ink); color: #fff; }
.crumbs .sep { color: #B5BDBB; }
@media (max-width: 760px) {
  .crumbs { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .crumbs::-webkit-scrollbar { display: none; }
}
.pdetail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.gallery__main { aspect-ratio: 1; background: #f1f3f6; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery__thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 1px solid #e5e7eb; }
.pdetail__price { font-size: 30px; font-weight: 700; margin: 12px 0; }
.pdetail__desc { grid-column: 1 / -1; }
.props th { width: 45%; color: var(--muted); font-weight: 400; }
.related-title { margin-top: 32px; }
@media (max-width: 760px) {
  .catalog, .pdetail { grid-template-columns: 1fr; }
  .cats { flex-direction: row; flex-wrap: wrap; }
}

.legal { max-width:860px; margin:0 auto; line-height:1.6; }
.legal h2 { margin-top:1.6em; }
.site-footer { text-align:center; padding:24px; font-size:13px; }
.site-footer a { color:inherit; opacity:.7; }

/* шапка как на главной странице */
header.bar { max-width:none; padding:0; position:sticky; top:0; z-index:5; background:var(--bg); border-bottom:1px solid var(--line); display:block; }
.bar .bar-in { max-width:1180px; margin:0 auto; padding:12px 16px; display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
.bar .logo { display:flex; align-items:center; gap:8px; margin-right:auto; }
.bar .logoimg { height:28px; width:auto; display:block; }
.bar .tagline { font-size:12px; letter-spacing:.07em; text-transform:uppercase; font-weight:600; color:var(--muted); padding-left:14px; border-left:1px solid var(--line); line-height:1.3; max-width:230px; }
.bar .tabs { display:flex; gap:4px; }
.bar .tab { padding:8px 14px; border-radius:999px; color:var(--muted); font-weight:600; text-decoration:none; }
.bar .tab[aria-current="page"] { background:var(--ink); color:var(--bg); }
.bar .cartbtn { border:1px solid var(--line); background:var(--surface); padding:8px 14px; border-radius:999px; font-weight:600; color:var(--ink); text-decoration:none; white-space:nowrap; }
.bar .cartbtn #cartn { font-variant-numeric:tabular-nums; }
.bar .btn-cta { background:var(--accent); color:#fff; padding:8px 16px; border-radius:999px; font-weight:600; text-decoration:none; white-space:nowrap; }
.bar .btn-ghost { border:1px solid var(--line); background:var(--surface); padding:8px 14px; border-radius:999px; font-weight:600; text-decoration:none; color:var(--ink); white-space:nowrap; }
@media (max-width:640px) {
  body { padding-bottom:84px; }
  .bar .bar-in { padding:8px 16px; flex-wrap:nowrap; }
  .bar .logoimg { height:24px; }
  .bar .tagline, .bar .btn-ghost { display:none; }
  .bar .btn-cta { padding:7px 12px; font-size:14px; }
  .bar .cartbtn { padding:7px 12px; font-size:14px; }
  .bar .bar-in { gap:8px; }
  .bar .tabs { position:fixed; left:0; right:0; bottom:0; z-index:8; background:var(--surface); border-top:1px solid var(--line); padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px)); gap:4px; }
  .bar .tab { flex:1; text-align:center; padding:11px 6px; font-size:15px; border-radius:12px; }
}

/* карточка товара */
.pdetail.card { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:20px; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); gap:24px; }
.pdetail .gallery__main { background:#fff; border-radius:12px; display:flex; align-items:center; justify-content:center; padding:8px; }
.pdetail .gallery__main img { max-width:100%; max-height:380px; object-fit:contain; }
.pdetail h1 { font-size:22px; line-height:1.25; margin:0 0 6px; }
.pdetail__price { display:flex; align-items:baseline; flex-wrap:wrap; gap:10px; margin-top:12px; }
.pp-now { font-size:30px; font-weight:700; }
.pp-old { color:var(--muted); font-size:16px; }
.pp-badge { background:#DDF3EA; color:#0E7A55; padding:2px 10px; border-radius:999px; font-size:13px; font-weight:600; }
.pp-note { margin:2px 0 12px; font-size:14px; }
.pdetail .props { width:100%; border-collapse:collapse; font-size:14px; margin:8px 0; }
.pdetail .props th, .pdetail .props td { text-align:left; padding:8px 0; border-bottom:1px solid var(--line); font-weight:400; }
.pdetail .props th { color:var(--muted); width:42%; }
.pdetail__desc { margin:12px 0; font-size:15px; line-height:1.6; }
.buybar { display:flex; gap:10px; align-items:center; margin-top:14px; flex-wrap:wrap; }
.buybar [hidden] { display:none !important; }
.buybar__sum { display:none; flex-direction:column; line-height:1.2; flex:0 0 auto; }
.buybar__sum small { color:var(--muted); font-size:12px; }
.btn-buy { flex:1; background:var(--accent); color:#fff; border:0; border-radius:12px; height:44px; font:inherit; font-weight:600; cursor:pointer; padding:0 18px; max-width:320px; }
.cnt { flex:1; max-width:460px; display:flex; align-items:stretch; gap:6px; }
.cnt__m { flex:1; min-width:0; display:flex; align-items:center; background:var(--accent); color:#fff; border-radius:12px; height:44px; overflow:hidden; }
.cnt__m button { width:40px; height:44px; border:0; background:none; color:inherit; font:inherit; font-size:22px; cursor:pointer; flex:0 0 auto; padding:0; }
.cnt .cnt__x { flex:0 0 auto; width:48px; border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:12px; font:inherit; font-size:12px; font-weight:700; cursor:pointer; padding:0; }
.cnt .cnt__x:hover { border-color:var(--accent); }
.cnt__v { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; line-height:1.1; min-width:0; }
.cnt__in { width:100%; min-width:0; border:0; background:none; color:inherit; font:inherit; font-weight:700; font-size:15px; text-align:center; padding:0; -moz-appearance:textfield; }
.cnt__in::-webkit-outer-spin-button, .cnt__in::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.cnt__v small { font-size:11px; opacity:.85; }
.plan-note { margin-top:14px; background:#FFF1D6; color:#8A5A00; border-radius:12px; padding:10px 14px; font-size:14px; }
.plan-note a { color:inherit; font-weight:700; }
@media (max-width:760px) {
  .pdetail.card { grid-template-columns:minmax(0,1fr); padding:14px; gap:14px; }
  .pdetail .gallery__main img { max-height:240px; }
  .pdetail h1 { font-size:18px; }
  .pp-now { font-size:26px; }
  .buybar { position:fixed; left:0; right:0; bottom:calc(60px + env(safe-area-inset-bottom,0px)); z-index:7; margin:0; background:var(--surface); border-top:1px solid var(--line); padding:8px 12px; gap:8px; }
  .buybar__sum { display:flex; }
  .btn-buy, .cnt { max-width:none; }
  .cnt { gap:4px; }
  .cnt__m button { width:30px; font-size:19px; }
  .cnt .cnt__x { width:38px; font-size:11px; }
  .cnt__in { font-size:14px; }
  body { padding-bottom:150px; }
}

/* вход по телефону */
.authcard { max-width: 420px; margin: 48px auto; }
.authcard h1 { font-size: 22px; margin: 0 0 6px; }
.authcard label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); margin: 16px 0; }
.authcard .btn { width: 100%; }
.autherr { color: #b4231f; background: #fdeceb; border-radius: 8px; padding: 8px 12px; font-size: 14px; margin: 12px 0 0; }
.authdemo { font-size: 13px; color: #8A5A00; background: #FFF1D6; border-radius: 8px; padding: 8px 12px; margin: 14px 0 0; }
