/* ===== Заказ АКБ — «технический лист заказа» ===== */
:root {
  --bg: #edf0f4;
  --card: #ffffff;
  --ink: #18284a;          /* тёмно-синий из логотипа */
  --ink-2: #22396a;
  --blue: #17588f;         /* синяя стрелка логотипа */
  --blue-soft: #e7eff8;
  --gray: #64666b;         /* серая подпись логотипа */
  --text: #18233b;
  --muted: #5e6675;
  --line: #d3dae3;
  --line-soft: #e6eaee;
  --accent: #f26f1b;        /* оранжевый «AKB» из логотипа */
  --accent-dark: #d65b0c;
  --accent-ink: #ffffff;
  --accent-soft: #fff2e7;
  --ok: #12805c;
  --err: #c62a1d;
  --info: #17588f;
  --agm: #17588f;
  --efb: #12805c;
  --radius: 2px;
  --shadow: 0 1px 0 rgba(24, 40, 74, .07), 0 8px 24px rgba(24, 40, 74, .07);
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "IBM Plex Sans Condensed", "IBM Plex Sans", "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-family: var(--font-display); font-weight: 700; letter-spacing: .005em; }
h1 { font-size: clamp(26px, 3.2vw, 38px); text-transform: uppercase; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
.wrap { max-width: 1380px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono, .art { font-family: var(--mono); }
.center { text-align: center; justify-content: center; }
.hp { position: absolute; left: -9999px; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; stroke-linejoin: miter; flex: none; }
.eyebrow { font: 500 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-dark); margin-bottom: 10px; }

/* ----- кнопки и поля ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--radius); border: 1.5px solid transparent; font: 600 15px var(--font); text-decoration: none; cursor: pointer; transition: background .12s, border-color .12s, color .12s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-line { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-line-dark { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-danger { background: #fff; border-color: #efc4bf; color: var(--err); }
.btn-danger:hover { background: #fdf0ee; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.added { background: var(--ok); color: #fff; }

input, select, textarea { font: inherit; color: inherit; width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; outline: none; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(242, 111, 27, .2); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
label > input, label > select, label > textarea { margin-top: 5px; font-size: 15px; color: var(--text); font-weight: 400; }
label.radio, label.check { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 8px; cursor: pointer; }

/* ----- служебная строка и шапка ----- */
.strip { background: var(--ink); background-image: linear-gradient(90deg, var(--ink) 55%, var(--blue)); color: #b9c4d6; font: 13px var(--mono); }
.strip-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 34px; }
.strip a { color: #e7ecf2; text-decoration: none; }
.strip a:hover { color: #fff; text-decoration: underline; }
.strip-right { display: flex; gap: 20px; align-items: center; }
.strip-me { color: #fff !important; font-weight: 600; }
.strip-me::before { content: "● "; color: var(--accent); }
.head { background: var(--card); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 28px; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.show-xs { display: none; }
.brand-logo { height: 52px; width: auto; display: block; }
.brand-text { display: grid; gap: 3px; }
.brand-name { font: 800 25px/1 "Montserrat", var(--font); letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.brand-name em { font-style: normal; color: var(--accent); }
.brand-name small { font-size: inherit; color: var(--blue); }
.brand-tag { font: 600 9.5px/1 "Montserrat", var(--font); text-transform: uppercase; letter-spacing: .07em; color: var(--gray); white-space: nowrap; }
.find { flex: 1; display: flex; align-items: center; max-width: 640px; height: 46px; border: 2px solid var(--ink); background: #fff; }
.find svg { margin: 0 4px 0 12px; color: var(--muted); }
.find input { border: 0; height: 100%; font: 14px var(--mono); padding: 0 10px; }
.find input:focus { box-shadow: none; }
.find button { height: 100%; border: 0; background: var(--ink); color: #fff; padding: 0 22px; font: 600 14px var(--font); cursor: pointer; }
.find button:hover { background: var(--accent); }
.order-btn { margin-left: auto; display: grid; text-decoration: none; background: var(--accent); color: #fff; padding: 7px 18px; min-width: 190px; border-radius: var(--radius); }
.order-btn:hover, .order-btn.on { background: var(--accent-dark); }
.order-btn-label { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.order-btn-val { font: 600 16px var(--mono); white-space: nowrap; }
.order-btn.bump { animation: bump .45s; }
@keyframes bump { 40% { transform: scale(1.05); } }
.head-row > .btn { margin-left: auto; }

/* ----- приветственный блок для гостей ----- */
.sheet-hero { border-bottom: 2px solid var(--ink); background-color: #f7f8f9;
  background-image: linear-gradient(rgba(14,26,43,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(14,26,43,.06) 1px, transparent 1px);
  background-size: 24px 24px; }
.sheet-hero-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: end; padding-top: 48px; padding-bottom: 44px; }
.sheet-hero h1 { font-size: clamp(32px, 5vw, 64px); line-height: .98; margin-bottom: 18px; max-width: 760px; }
.sheet-hero p { font-size: 17px; max-width: 600px; margin: 0 0 26px; color: var(--ink-2); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.sheet-hero-facts { margin: 0; display: grid; border: 2px solid var(--ink); background: #fff; }
.sheet-hero-facts div { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.sheet-hero-facts div:last-child { border-bottom: 0; }
.sheet-hero-facts dt { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sheet-hero-facts dd { margin: 0; font: 600 34px/1 var(--mono); color: var(--ink); }
.sheet-hero-facts div:first-child dd { color: var(--accent); }
.sheet-hero-text { animation: rise .5s both; }
.sheet-hero-facts { animation: rise .5s .12s both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ----- вкладки марок ----- */
.tabs { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.tabs-row { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.tabs a { flex: none; padding: 14px 14px 12px; text-decoration: none; font: 600 14px var(--font-display); text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a sup { font: 500 10px var(--mono); margin-left: 4px; color: #93a0af; vertical-align: 4px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }

/* ----- фильтры ----- */
.catalog { padding-top: 22px; padding-bottom: 60px; }
.filters { display: grid; gap: 10px; background: var(--card); border: 1px solid var(--line); padding: 16px 18px; margin-bottom: 22px; }
.fgroup { display: flex; align-items: center; gap: 10px; }
.flabel { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
.fchips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chip { font: 500 13px var(--mono); padding: 5px 9px; border: 1px solid var(--line); text-decoration: none; background: #fff; border-radius: var(--radius); }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.frange { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; }
.frange input { width: 64px; padding: 5px 8px; font: 13px var(--mono); }
.frange i { font-style: normal; color: var(--muted); }
.filters select { width: auto; padding: 6px 10px; font-size: 14px; }

/* ----- фильтр: строки «подпись | плитки», одинаковые плитки и отступы ----- */
.frow { display: grid; grid-template-columns: 104px 1fr; gap: 6px 10px; align-items: start; }
.frow > .flabel { line-height: 42px; }
.fcase { display: grid; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.ftiles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ftile { --h: 42px; position: relative; display: inline-flex; flex-direction: column; justify-content: center; align-items: flex-start; height: var(--h); padding: 0 12px; margin: 0; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); text-decoration: none; color: var(--text); cursor: pointer; line-height: 1.15; white-space: nowrap; }
.ftile:hover { border-color: var(--ink); }
.ftile b { font: 600 14px var(--font); }
.ftile small { font: 10px var(--mono); color: var(--muted); margin-top: 2px; }
.ftile sup { font: 500 10px var(--mono); color: var(--muted); top: 0; }
.ftile input { position: absolute; opacity: 0; pointer-events: none; }
.ftile.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.ftile.on small, .ftile.on sup { color: #c9d2dd; }
.ftile-ah { align-items: center; min-width: 74px; }
.ftile-ah b { font-family: var(--mono); font-weight: 500; }
.flabel-inline { margin: 0 4px 0 14px; }
.frange { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; height: 42px; }
.frange input { width: 64px; height: 42px; padding: 0 8px; font: 13px var(--mono); }
.ctype { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 9px; align-content: center; padding: 0 10px 0 9px; }
.ctype b { grid-column: 2; font-family: var(--font-display); }
.ctype small { grid-column: 2; }
.ctype sup { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.ftiles > .ctype:first-child { grid-template-columns: auto; padding: 0 14px; }
.ftiles > .ctype:first-child b { grid-column: 1; }
.ctype.on { background: #fff; color: var(--text); border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
.ctype.on small, .ctype.on sup { color: var(--muted); }
.case-ico { grid-row: 1 / span 2; align-self: center; display: block; border: 2px solid var(--ink); border-radius: 1px; position: relative; background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 5px / 100% 2px; }
.case-ico::before, .case-ico::after { content: ""; position: absolute; top: -5px; width: 4px; height: 3px; background: var(--ink); }
.case-ico::before { left: 3px; } .case-ico::after { right: 3px; background: var(--accent); }
.case-ico-l { width: 28px; height: 19px; }
.case-ico-lb { width: 28px; height: 15px; }
.case-ico-d { width: 24px; height: 22px; }
.case-ico-b { width: 18px; height: 22px; }
.case-ico-t { width: 32px; height: 20px; }
.ctype.on .case-ico { border-color: var(--accent); }
.csize { min-width: 84px; padding: 0 8px; }
.csize b { font-family: var(--mono); display: flex; width: 100%; justify-content: space-between; gap: 6px; }
.csize-sep { width: 1px; height: 30px; background: var(--line); margin: 0 4px; }
.stock-toggle { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.stock-toggle i { width: 30px; height: 18px; border-radius: 9px; background: var(--line); position: relative; transition: background .15s; }
.stock-toggle i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; }
.stock-toggle.on { border-color: var(--ok); }
.stock-toggle.on i { background: var(--ok); }
.stock-toggle.on i::after { left: 14px; }
.stock-toggle:hover { border-color: var(--ink); }
.ctype.on .case-ico { border-color: var(--accent); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 14px; border: 1px solid var(--line); background: #fff; }
.seg label { margin: 0; display: flex; justify-content: center; gap: 6px; align-items: center; padding: 9px; cursor: pointer; color: var(--text); font-size: 14px; border-right: 1px solid var(--line); }
.seg label:last-child { border-right: 0; }
.seg label:has(input:checked) { background: var(--ink); color: #fff; }
.seg-inline { display: inline-flex; margin: 0; }
.seg-inline label { padding: 0; border-right: 1px solid var(--line); }
.seg-inline input { position: absolute; opacity: 0; pointer-events: none; }
.seg-inline span { padding: 6px 11px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.seg-inline label:hover span { background: var(--bg); }
.seg-inline label:has(input:checked) span { background: var(--ink); color: #fff; }
.switch { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 38px; height: 22px; background: var(--line); position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }

.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 12px; }
.results-head h2 { font-size: 30px; text-transform: uppercase; margin: 0 0 2px; }
.results-tools { display: flex; gap: 8px; align-items: center; }
.sort { width: auto; height: 38px; padding: 0 10px; font-size: 14px; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); background: #fff; }
.view-toggle button { width: 38px; height: 36px; border: 0; background: none; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.view-toggle button + button { border-left: 1px solid var(--line); }
.view-toggle button.on { background: var(--ink); color: #fff; }
.empty { background: var(--card); border: 1px dashed #b8c2cd; padding: 40px; text-align: center; color: var(--muted); }

/* ----- каталог-ведомость ----- */
.ledger { --cols: 64px minmax(240px, 1fr) 54px 64px 56px 72px 116px 80px 128px 178px; background: var(--card); border: 1px solid var(--ink); }
.ledger-head, .row { display: grid; grid-template-columns: var(--cols); align-items: center; column-gap: 12px; padding: 0 14px 0 10px; }
.ledger-head { background: var(--ink); color: #c9d2dd; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; height: 36px; position: sticky; top: 49px; z-index: 5; }
.ledger-head .r, .c-num, .c-price { text-align: right; }
.row { min-height: 76px; border-top: 1px solid var(--line-soft); position: relative; transition: background .1s; }
.row:first-of-type { border-top: 0; }
.row:nth-child(odd) { background: #fafbfc; }
.row:hover { background: var(--accent-soft); }
.row:hover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.c-img { display: block; width: 64px; height: 48px; background: #fff; border: 1px solid var(--line-soft); }
.c-img img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.c-name { min-width: 0; padding: 10px 0; }
.row-title { display: block; font-weight: 600; text-decoration: none; line-height: 1.3; }
.row-title:hover { color: var(--accent-dark); text-decoration: underline; }
.row-sub { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.art { font-size: 12.5px; color: var(--ink-2); background: var(--line-soft); padding: 1px 6px; }
.bdg { font: 600 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; color: #fff; }
.bdg-agm { background: var(--agm); }
.bdg-efb { background: var(--efb); }
.bdg-sale { background: transparent; color: var(--accent-dark); outline: 1px solid var(--accent); }
.c-num, .c-mono { font: 500 14px var(--mono); }
.c-size { font-size: 12.5px; color: var(--muted); }
.c-body { font-size: 13px; }
.pol { font: 600 12px var(--mono); padding: 2px 6px; border: 1.5px solid currentColor; }
.pol-r { color: #c62a1d; }
.pol-l { color: #1d5fd1; }
.pol-x { color: var(--muted); }
.st { font: 500 12.5px var(--mono); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.st::before { content: ""; width: 7px; height: 7px; background: currentColor; }
.st-yes { color: var(--ok); }
.st-no { color: #a2741a; }
.c-price { font: 600 16px var(--mono); white-space: nowrap; }
.c-price .muted { font: 13px var(--font); }
.lock { font: 500 12px var(--font); color: var(--muted); text-decoration: none; border-bottom: 1px dashed; }
.lock:hover { color: var(--accent-dark); }
.c-buy { display: flex; gap: 6px; justify-content: flex-end; }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line); height: 36px; background: #fff; }
.qty button { width: 28px; height: 100%; border: 0; background: transparent; font: 16px var(--mono); cursor: pointer; color: var(--muted); }
.qty button:hover { background: var(--bg); color: var(--text); }
.qty input { width: 40px; border: 0; text-align: center; padding: 0; height: 100%; -moz-appearance: textfield; font: 600 14px var(--mono); }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty input:focus { box-shadow: none; }
.btn-add { height: 36px; padding: 0 14px; font-size: 14px; min-width: 100px; }
.c-act { display: contents; }

/* ----- плитки ----- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.tile { background: var(--card); display: flex; flex-direction: column; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.tile-img { display: block; position: relative; height: 0; padding-top: 75%; border-bottom: 1px solid var(--line-soft); }
.tile-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.tile-body { padding: 12px 14px 8px; flex: 1; }
.tile-title { display: block; font-weight: 600; text-decoration: none; line-height: 1.3; margin: 8px 0 10px; }
.tile-title:hover { color: var(--accent-dark); }
.tile-specs { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border: 1px solid var(--line-soft); }
.tile-specs div { padding: 5px 6px; border-right: 1px solid var(--line-soft); }
.tile-specs div:last-child { border-right: 0; }
.tile-specs dt { font: 500 10px var(--mono); text-transform: uppercase; color: var(--muted); }
.tile-specs dd { margin: 0; font: 600 13px var(--mono); }
.tile-buy { padding: 10px 14px 14px; }
.tile-price { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.tile-price b { font: 600 19px var(--mono); }
.tile .buy { display: flex; gap: 6px; }
.tile .buy .btn { flex: 1; }

/* ----- пагинация ----- */
.pager { display: flex; gap: 0; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 42px; height: 40px; display: grid; place-items: center; text-decoration: none; font: 600 14px var(--mono); }
.pager a { background: var(--card); border: 1px solid var(--line); margin-left: -1px; }
.pager a.on { background: var(--ink); color: #fff; border-color: var(--ink); position: relative; }

/* ----- нижняя строка заказа ----- */
.dock { position: sticky; bottom: 0; z-index: 30; background: var(--ink); color: #fff; box-shadow: 0 -8px 24px rgba(24,40,74,.2); }
.dock-row { display: flex; align-items: center; gap: 22px; height: 62px; }
.dock-label { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: #93a0af; }
.dock-val { font: 500 15px var(--mono); }
.dock-sum { font: 600 22px var(--mono); margin-left: auto; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(16px); background: var(--ink); color: #fff; padding: 12px 18px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; transition: .2s; z-index: 100; display: flex; gap: 14px; align-items: center; border-left: 4px solid var(--accent); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast a { color: #ffb59f; }

/* ----- страницы ----- */
.page { padding-top: 28px; padding-bottom: 56px; }
.narrow { max-width: 520px; }
.panel { background: var(--card); border: 1px solid var(--line); padding: 24px; border-radius: var(--radius); }
.auth { border-top: 4px solid var(--accent); }
.auth h1 { margin-bottom: 8px; font-size: 28px; }
.auth > p { margin-top: 0; }
.crumbs { font: 13px var(--mono); color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs span { margin: 0 6px; }
.section-title { margin-top: 44px; text-transform: uppercase; }
.flash { padding: 12px 16px; margin: 16px 0; font-weight: 500; border-left: 4px solid; }
.flash-ok { background: #e3f3ec; color: #0c5a40; }
.flash-error { background: #fbe9e7; color: #8a1e14; }
.flash-info { background: #e7eefb; color: #173f86; }

/* ----- товар ----- */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; }
.gallery-main { position: relative; height: 0; padding-top: 75%; overflow: hidden; background: #fff; border: 1px solid var(--ink); }
.gallery-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 22px; }
.gallery-thumbs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.gallery-thumbs button { width: 80px; height: 60px; padding: 3px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.gallery-thumbs button.on { border: 2px solid var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.product-info h1 { font-size: clamp(22px, 2.6vw, 30px); text-transform: none; }
.admin-edit { display: inline-block; font-size: 13px; font-weight: 600; color: var(--info); margin: 6px 0 12px; }
.buybox { background: var(--card); border: 1px solid var(--ink); padding: 20px; margin: 16px 0 24px; }
.buybox .buy { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.buybox .qty { height: 44px; }
.buybox-lock { display: flex; gap: 14px; align-items: flex-start; color: var(--muted); }
.buybox-lock b { color: var(--text); }
.buybox-lock svg { width: 28px; height: 28px; color: var(--accent); }
.buybox-stock { margin-top: 6px; }
.price { font: 600 20px var(--mono); }
.price.big { font-size: 34px; margin-bottom: 2px; }
.price-none { color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.price-none.big { font-size: 20px; color: var(--text); }
.spec-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); }
.spec-table th, .spec-table td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line-soft); font-size: 14px; vertical-align: top; }
.spec-table tr:nth-child(even) { background: #fafbfc; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { color: var(--muted); font-weight: 500; width: 44%; }
.spec-table td { font: 500 14px var(--mono); word-break: break-word; }
.descr { margin-top: 20px; line-height: 1.65; }

/* ----- корзина ----- */
.checkout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.cart-list { background: var(--card); border: 1px solid var(--ink); }
.cart-row { display: grid; grid-template-columns: 64px 1fr auto 120px 32px; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.cart-row img { width: 64px; height: 48px; object-fit: contain; background: #fff; border: 1px solid var(--line-soft); }
.cart-name a { font-weight: 600; text-decoration: none; }
.cart-name a:hover { text-decoration: underline; }
.cart-sum { text-align: right; font: 600 15px var(--mono); white-space: nowrap; }
.cart-del { border: 0; background: none; font-size: 22px; color: var(--muted); cursor: pointer; width: 32px; height: 32px; }
.cart-del:hover { background: #fbe9e7; color: var(--err); }
.cart-total { text-align: right; padding: 16px; font-size: 15px; background: var(--bg); }
.cart-total b { font: 600 26px var(--mono); margin-left: 10px; }
.checkout-form { position: sticky; top: 64px; border-top: 4px solid var(--accent); }
.checkout-form h3 { margin-bottom: 16px; text-transform: uppercase; }
.done { text-align: center; padding: 48px 16px; }
.done-icon { width: 72px; height: 72px; background: var(--accent); display: grid; place-items: center; margin: 0 auto 20px; color: #fff; }
.done-icon svg { width: 36px; height: 36px; stroke-width: 2.6; }
.done .buy { justify-content: center; margin-top: 24px; display: flex; gap: 10px; }

/* ----- кабинет ----- */
.account-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.orders { display: grid; gap: 8px; }
.order { padding: 0; }
.order summary { display: grid; grid-template-columns: 80px 1fr auto 150px; gap: 14px; align-items: center; padding: 14px 20px; cursor: pointer; list-style: none; }
.order summary::-webkit-details-marker { display: none; }
.order-no { font: 600 15px var(--mono); }
.order-sum { text-align: right; font: 600 16px var(--mono); }
.order .table { margin: 0 20px; width: calc(100% - 40px); }
.order-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; }
.status { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; background: var(--bg); white-space: nowrap; }
.status-new { background: #fff1d6; color: #7a5200; }
.status-confirmed { background: #e7eefb; color: #173f86; }
.status-shipped { background: #efe8fb; color: #4f2795; }
.status-done { background: #e3f3ec; color: #0c5a40; }
.status-canceled { background: #eef0f2; color: var(--muted); }
.inline-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.inline-form label { margin: 0; flex: 1; min-width: 200px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; font-size: 14px; vertical-align: middle; }
.table th { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.table .num { text-align: right; white-space: nowrap; font-family: var(--mono); }

/* ----- подвал ----- */
.foot { background: #fff; border-top: 3px solid var(--ink); box-shadow: inset 0 3px 0 var(--accent); color: var(--muted); padding: 28px 0; font-size: 14px; }
.foot-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: start; }
.foot-name { font: 700 18px var(--font-display); text-transform: uppercase; color: var(--ink); margin-bottom: 4px; }
.foot-logo { display: block; width: 200px; height: auto; margin: -6px 0 8px -4px; }
.foot-contacts { display: grid; gap: 4px; text-align: center; font-family: var(--mono); }
.foot-contacts a { color: var(--ink); font-weight: 600; text-decoration: none; }
.foot-note { text-align: right; font-size: 13px; }

/* для админки (общие элементы) */
.logo-mark { width: 42px; height: 42px; background: var(--accent); display: grid; place-items: center; flex: none; }
.logo-mark svg { width: 28px; height: 28px; }
.logo-mark svg rect { fill: #fff; stroke: none; }
.logo-mark svg rect:first-child { fill: none; stroke: #fff; stroke-width: 2.2; }
.logo-mark svg path { stroke: #fff; }
.install .checks { list-style: none; padding: 0; margin: 0 0 20px; font-family: var(--mono); }
.install .checks li { padding: 4px 0; }
.install .checks .ok { color: var(--ok); }
.install .checks .bad { color: var(--err); }

/* ----- адаптив ----- */
@media (max-width: 1180px) {
  .ledger { --cols: 56px minmax(200px, 1fr) 48px 56px 50px 64px 76px 124px 164px; }
  .c-size, .ledger-head span:nth-child(7) { display: none; }
}
@media (max-width: 960px) {
  .hide-sm { display: none; }
  .head-row { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; gap: 12px 16px; }
  .find { order: 3; flex-basis: 100%; max-width: none; }
  .order-btn { min-width: 0; }
  .sheet-hero-grid { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; padding-bottom: 32px; }
  .product { grid-template-columns: 1fr; gap: 24px; }
  .checkout { grid-template-columns: 1fr; }
  .checkout-form { position: static; }
  /* ведомость → карточки-строки */
  .ledger-head { display: none; }
  .ledger { border: 0; background: transparent; display: grid; gap: 8px; }
  .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px; background: #fff !important; border: 1px solid var(--line); }
  .row:hover::before { display: none; }
  .c-img { flex: none; }
  .c-name { flex: 1 1 calc(100% - 80px); padding: 0; }
  .c-num, .c-pol, .c-mono, .c-stock { display: flex; flex-direction: column; text-align: left; flex: none; }
  .row .c-num::before, .row .c-pol::before, .row .c-mono::before, .row .c-stock::before { content: attr(data-l); font: 500 10px var(--mono); text-transform: uppercase; color: var(--muted); margin-bottom: 1px; }
  .c-size { display: none; }
  .c-act { display: flex; flex: 1 0 100%; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
  .c-price { text-align: left; }
}
@media (max-width: 640px) {
  .strip-note { display: none; }
  .brand-logo { height: 40px; }
  .brand-name { font-size: 19px; }
  .brand-tag { font-size: 7.5px; }
  .head .btn-accent { padding: 0 14px; font-size: 14px; }
  .hide-xs { display: none; } .show-xs { display: inline; }
  .brand { min-width: 0; flex: 1; }
  .head-row { flex-wrap: wrap; }
  .results-head { flex-direction: column; align-items: stretch; }
  .filters { gap: 12px; padding: 12px; }
  .frow { grid-template-columns: 1fr; gap: 6px; }
  .frow > .flabel { line-height: 1.2; }
  .flabel-inline { flex-basis: 100%; margin: 6px 0 0; }
  .ctype small { display: none; }
  .ctype .case-ico, .ctype sup { grid-row: 1; }
  .csize-sep { display: none; }
  .ftile { padding: 0 10px; }
  .csize { min-width: 0; }
  .results-tools { flex-wrap: wrap; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile .buy { flex-direction: column; }
  .tile .buy .qty { justify-content: space-between; }
  .tile-specs { grid-template-columns: repeat(2, 1fr); }
  .tile-specs div:nth-child(2) { border-right: 0; }
  .tile-specs div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .dock-row { gap: 12px; height: 58px; }
  .dock-label { display: none; }
  .dock-sum { font-size: 18px; }
  .dock .btn { padding: 0 14px; }
  .cart-row { grid-template-columns: 52px 1fr 32px; }
  .cart-row img { width: 52px; height: 40px; }
  .cart-row .qty { grid-column: 2; justify-self: start; }
  .cart-row .cart-sum { grid-column: 2 / 4; text-align: left; }
  .cart-row .cart-del { grid-row: 1; grid-column: 3; }
  .order summary { grid-template-columns: auto 1fr; }
  .order-sum { text-align: left; }
  .foot-row { grid-template-columns: 1fr; }
  .foot-contacts, .foot-note { text-align: left; }
  .panel { padding: 18px; }
}

/* администратор на витрине: фото перетаскиванием */
[data-admin-drop] { position: relative; }
.admin-dragging [data-admin-drop]::after { content: "+ фото"; position: absolute; inset: 6px; display: grid; place-items: center; border: 2px dashed var(--accent); background: rgba(255,255,255,.55); color: var(--accent-dark); font: 600 13px var(--mono); text-transform: uppercase; letter-spacing: .06em; pointer-events: none; z-index: 2; }
[data-admin-drop].drop-over::after { content: "Отпустите — фото добавится"; background: var(--accent-soft); border-style: solid; text-align: center; padding: 6px; }
[data-admin-drop].drop-busy::after { content: "Загрузка…"; position: absolute; inset: 6px; display: grid; place-items: center; background: rgba(255,255,255,.8); font: 600 13px var(--mono); z-index: 2; }
[data-admin-drop].drop-done { outline: 3px solid var(--ok); outline-offset: -3px; }
.admin-drop-hint { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: #fff; padding: 10px 16px; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.c-img[data-admin-drop] { display: block; }
@media (max-width: 440px) { .is-client .brand-tag { display: none; } .brand-text { min-width: 0; } }
