/* Matches the "Katalog Yato · Babita" print look: black hero per section, red group bars, photo slot + spec table */
:root {
  --paper: #ffffff; --ink: #141414; --red: #d71920; --steel: #5d6168; --line: #dcdde0; --tint: #f3f3f4; --onred: #ffffff; --desk: #e9e9eb;
  --f-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --f-body: "Barlow", Arial, Helvetica, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--desk); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.45; }
img { max-width: 100%; }
a { color: inherit; }
.book > * { min-width: 0; }
.book { max-width: 1060px; margin: 0 auto; padding: 24px 16px 64px; display: flex; flex-direction: column; gap: 28px; }
.page { background: var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* toolbar */
.tools { position: sticky; top: 0; z-index: 10; background: var(--ink); color: var(--paper); border-bottom: 4px solid var(--red); }
.tools .in { max-width: 1060px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 12px 18px; align-items: center; flex-wrap: wrap; }
.logo { font-family: var(--f-display); font-weight: 800; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { height: 28px; width: auto; }
.logo span { color: var(--red); }
.search { flex: 1 1 260px; display: flex; min-width: 0; }
.search input { flex: 1; min-width: 0; padding: 9px 12px; border: 0; border-radius: 2px 0 0 2px; font: inherit; font-size: 14px; }
.search button, .pager a, .pager span, .secnav a { font-family: var(--f-display); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; border: 0; cursor: pointer; text-decoration: none; }
.search button { background: var(--red); color: var(--onred); padding: 0 16px; font-size: 14px; border-radius: 0 2px 2px 0; }
.nav { display: flex; gap: 16px; font-family: var(--f-display); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.nav a { text-decoration: none; color: #c9cacd; }
.nav a:hover { color: var(--paper); }

/* cover */
.cover { display: grid; grid-template-rows: auto 1fr auto; min-height: 520px; background: var(--ink); color: var(--paper); position: relative; overflow: hidden; }
.cover::after { content: ""; position: absolute; right: -80px; top: 0; bottom: 0; width: 46%; background: var(--red); transform: skewX(-12deg); }
.cover > * { position: relative; z-index: 1; }
.c-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px 32px; font-family: var(--f-display); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; }
.c-mid { padding: 0 32px; align-self: center; }
.c-mid h1 { font-family: var(--f-display); font-weight: 800; font-size: clamp(48px, 9vw, 112px); line-height: .86; margin: 0; text-transform: uppercase; letter-spacing: -.01em; }
.c-mid h1 span { display: block; color: var(--red); }
.c-mid p { max-width: 30em; margin: 18px 0 0; color: #c9cacd; font-size: 16px; }
.c-bot { display: flex; gap: 28px; flex-wrap: wrap; padding: 24px 32px; border-top: 1px solid #333; font-family: var(--f-mono); font-size: 13px; color: #c9cacd; }
.c-bot b { display: block; font-family: var(--f-display); font-size: 30px; color: var(--paper); font-weight: 700; }

/* toc */
.toc { padding: 32px; scroll-margin-top: 70px; }
.toc h2, .note h2 { font-family: var(--f-display); text-transform: uppercase; font-size: 28px; margin: 0 0 16px; letter-spacing: .02em; }
.toc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); column-gap: 32px; }
.toc-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.toc-row:hover .toc-t { color: var(--red); }
.toc-n { font-family: var(--f-display); font-weight: 800; font-size: 22px; color: var(--red); }
.toc-t { font-family: var(--f-display); font-weight: 700; font-size: 20px; text-transform: uppercase; min-width: 0; }
.toc-t em { display: block; font-family: var(--f-body); font-style: normal; font-weight: 400; font-size: 13px; text-transform: none; color: var(--steel); }
.toc-c { font-family: var(--f-mono); font-size: 12px; color: var(--steel); }
.toc-brand { grid-column: 1 / -1; font-family: var(--f-display); font-weight: 800; font-size: 22px; text-transform: uppercase; color: var(--red); padding: 18px 0 4px; border-bottom: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: baseline; }
.toc-brand small { font-family: var(--f-mono); font-weight: 400; font-size: 12px; color: var(--steel); text-transform: none; }
.toc-all { grid-column: 1 / -1; }

/* section */
.sec { background: var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,.12); display: flex; flex-direction: column; gap: 28px; padding-bottom: 32px; }
.hero { background: var(--ink); color: var(--paper); display: flex; align-items: flex-end; gap: 22px; padding: 56px 32px 28px; border-bottom: 8px solid var(--red); }
.hn { font-family: var(--f-display); font-weight: 800; font-size: 88px; line-height: .8; color: var(--red); }
.hero h2 { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(32px, 6vw, 56px); line-height: .9; margin: 0; }
.hero p { margin: 6px 0 0; color: #b9babd; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.gnav { padding-inline: 32px; display: flex; flex-wrap: wrap; gap: 6px; }
.gnav a { text-decoration: none; font-size: 13px; padding: 4px 10px; background: var(--tint); border: 1px solid var(--line); }
.gnav a:hover { border-color: var(--red); color: var(--red); }
.gnav small { font-family: var(--f-mono); color: var(--steel); }
.group { padding-inline: 32px; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 70px; }
.gbar { background: var(--red); color: var(--onred); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 7px 14px; }
.gbar h3 { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 21px; text-transform: uppercase; letter-spacing: .03em; }
.gcodes { font-family: var(--f-mono); font-size: 12px; }
.gbody { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.photo { margin: 0; }
.photo .pic { aspect-ratio: 1; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; overflow: hidden; }
.photo .pic img { width: 100%; height: 100%; object-fit: contain; }
.ph { aspect-ratio: 1; width: 100%; border: 1px solid var(--line); background: repeating-linear-gradient(135deg, var(--tint) 0 10px, var(--paper) 10px 20px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--steel); }
.ph span { font-family: var(--f-display); font-weight: 700; letter-spacing: .2em; font-size: 13px; }
.ph b { font-family: var(--f-mono); font-weight: 500; font-size: 12px; color: var(--ink); }
.secnav { padding-inline: 32px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.secnav a { background: var(--ink); color: var(--paper); padding: 8px 14px; font-size: 14px; }
.secnav a:hover { background: var(--red); }

/* tables */
.tblwrap { overflow-x: auto; min-width: 0; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th { background: var(--ink); color: var(--paper); font-family: var(--f-display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 12.5px; text-align: left; padding: 7px 10px; white-space: nowrap; }
td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr[data-href] { cursor: pointer; }
tbody tr:nth-child(even) td { background: var(--tint); }
tbody tr:hover td { background: #fde8e9; }
td.code { font-family: var(--f-mono); font-weight: 500; color: var(--red); white-space: nowrap; }
td.nm { min-width: 220px; }
td.nm a { text-decoration: none; }
td.bc { font-family: var(--f-mono); font-size: 12px; color: var(--steel); white-space: nowrap; }
td.u { white-space: nowrap; }
td.th { width: 44px; padding: 4px 6px; }
td.th img, td.th .mini { width: 36px; height: 36px; object-fit: contain; background: #fff; border: 1px solid var(--line); display: block; }
td.th .mini { background: repeating-linear-gradient(135deg, var(--tint) 0 5px, var(--paper) 5px 10px); }
.num { text-align: right; white-space: nowrap; }
td.strong { font-weight: 600; }

/* search */
.all-meta { padding-inline: 32px; font-family: var(--f-mono); font-size: 12px; color: var(--steel); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pager { display: flex; gap: 8px; justify-content: center; align-items: center; padding-inline: 32px; }
.pager a, .pager span.off { background: var(--ink); color: var(--paper); padding: 8px 16px; font-size: 14px; }
.pager span.off { opacity: .3; cursor: default; }
.pager .pn { font-family: var(--f-mono); font-size: 13px; color: var(--steel); padding: 0 8px; }
.empty { color: var(--steel); }

/* product */
.crumbs { font-family: var(--f-mono); font-size: 12px; color: var(--steel); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: -16px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.dbar { background: var(--red); color: var(--onred); display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; font-family: var(--f-mono); font-size: 13px; }
.dgrid { display: grid; grid-template-columns: 1fr 1fr; }
.dimg { aspect-ratio: 1; background: #fff; display: grid; place-items: center; border-right: 1px solid var(--line); }
.dimg img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 6px; padding: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.thumbs button { padding: 0; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.thumbs button[aria-current=true] { border-color: var(--red); }
.thumbs img { width: 52px; height: 52px; object-fit: contain; display: block; }
.dinfo { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.dinfo h1 { margin: 0; font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 32px; line-height: .95; }
.dprice { font-family: var(--f-display); font-weight: 800; font-size: 36px; }
.dprice small { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 12px; color: var(--steel); }
.dlinks a { display: inline-block; margin: 0 8px 8px 0; padding: 6px 12px; background: var(--ink); color: var(--paper); text-decoration: none; font-family: var(--f-display); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; }
.dlinks a:hover { background: var(--red); }
.dl { font-family: var(--f-mono); font-size: 12px; color: var(--steel); display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; }
.dl dd { margin: 0; color: var(--ink); }

/* notes, footer */
.note { padding: 28px 32px; }
.note p { max-width: 65ch; margin: 0 0 8px; color: var(--steel); }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-family: var(--f-mono); font-size: 12px; color: var(--steel); padding-inline: 4px; }

@media (max-width: 640px) {
  .nav { display: none; }
  .c-top, .c-mid, .c-bot, .toc, .note { padding-left: 20px; padding-right: 20px; }
  .hero { padding: 40px 20px 20px; } .hn { font-size: 60px; }
  .group, .all-meta, .pager, .gnav, .secnav { padding-inline: 16px; }
  .search { flex-basis: 100%; order: 3; }
  .gbody { grid-template-columns: minmax(0, 1fr); } .photo .pic, .photo .ph { width: 120px; }
  .dgrid { grid-template-columns: 1fr; } .dimg, .thumbs { border-right: 0; }
  .sm-hide { display: none; }
  td.nm { min-width: 0; }
  .book { padding: 16px 8px 48px; gap: 20px; }
  .group, .all-meta, .pager, .gnav, .secnav { padding-inline: 12px; }
}

/* B2B: account nav, prices, cart */
.nav { align-items: center; }
.nav form.inline { margin: 0; }
.navbtn { background: none; border: 0; padding: 0; color: #c9cacd; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.navbtn:hover { color: var(--paper); }
.cartlink b { display: inline-block; min-width: 20px; padding: 0 5px; margin-left: 4px; background: var(--red); color: var(--onred); text-align: center; border-radius: 10px; font-size: 12px; line-height: 18px; }
.disc { font-family: var(--f-mono); font-size: 11px; color: var(--red); display: block; }
.muted { color: var(--steel); }
.small { font-size: 13px; }
td.add { width: 40px; padding: 4px 6px; }
td.add form { margin: 0; }
td.add button { width: 30px; height: 30px; border: 0; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 18px; cursor: pointer; line-height: 1; }
td.add button:hover { background: var(--red); }
td.add button.done, .addbig button.done { background: #1f7a3a; }
.addbig { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.addbig label { font-family: var(--f-mono); font-size: 12px; color: var(--steel); display: flex; align-items: center; gap: 8px; }
input.qty { width: 70px; padding: 6px 8px; border: 1px solid var(--line); font: inherit; text-align: right; }
.btn { display: inline-block; background: var(--red); color: var(--onred); border: 0; padding: 10px 18px; font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--ink); }
.btn.ghost { background: var(--tint); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.linkbtn { background: none; border: 0; color: var(--steel); cursor: pointer; font-size: 16px; }
.linkbtn:hover { color: var(--red); }
.cart-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.note-field { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; font-family: var(--f-mono); font-size: 12px; color: var(--steel); }
.note-field textarea { font: inherit; font-family: var(--f-body); font-size: 14px; padding: 8px; border: 1px solid var(--line); }
tfoot td { border-bottom: 0; padding-top: 12px; font-family: var(--f-display); font-size: 17px; }
.ok-banner { background: #1f7a3a; color: #fff; padding: 12px 16px; margin: 0; font-weight: 600; }
.note-box { background: var(--tint); border-left: 4px solid var(--red); padding: 10px 14px; margin: 0; }
.status { font-family: var(--f-mono); font-size: 12px; padding: 2px 8px; background: var(--tint); border: 1px solid var(--line); white-space: nowrap; }
.status.s0 { background: #fde8e9; border-color: var(--red); color: var(--red); }
.status.s1 { background: #e8effd; border-color: #3f63c9; color: #2b4aa0; }
.status.s2 { background: #fff4d6; border-color: #c99a1d; color: #7a5a00; }
.status.s3 { background: #e5f4ea; border-color: #1f7a3a; color: #1f7a3a; }
.status.s4 { color: var(--steel); text-decoration: line-through; }

/* forms */
.form-page { padding: 32px; max-width: 520px; width: 100%; margin: 0 auto; }
.form-page h2 { font-family: var(--f-display); text-transform: uppercase; font-size: 28px; margin: 0 0 8px; }
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.form label, .fld { display: flex; flex-direction: column; gap: 4px; font-family: var(--f-mono); font-size: 12px; color: var(--steel); }
.form input, .form select, .form textarea, .fld input, .fld select, .fld textarea { font: inherit; font-family: var(--f-body); font-size: 15px; color: var(--ink); padding: 9px 10px; border: 1px solid var(--line); background: #fff; }
.form input:focus, .fld input:focus, .fld select:focus { outline: 2px solid var(--red); outline-offset: -1px; }
.err { background: #fde8e9; color: var(--red); padding: 10px 12px; margin: 0; border-left: 4px solid var(--red); }
.ok { background: #e5f4ea; color: #1f7a3a; padding: 10px 12px; margin: 0; border-left: 4px solid #1f7a3a; }

/* admin */
.admin-tabs { display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: -12px; }
.admin-tabs a { background: var(--ink); color: #c9cacd; padding: 10px 16px; text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.admin-tabs a.on, .admin-tabs a:hover { background: var(--red); color: var(--onred); }
.admin-box { padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.admin-box h2 { font-family: var(--f-display); text-transform: uppercase; font-size: 26px; margin: 0; }
.admin-box h2 small { font-family: var(--f-mono); font-size: 13px; text-transform: none; font-weight: 400; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { padding: 18px 22px; text-decoration: none; border-right: 1px solid var(--line); font-family: var(--f-mono); font-size: 12px; color: var(--steel); }
.stat b { display: block; font-family: var(--f-display); font-size: 34px; color: var(--ink); }
.stat:hover b { color: var(--red); }
.stat.hot { background: #fde8e9; }
.stat.hot b { color: var(--red); }
.split { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.split-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips a { text-decoration: none; font-size: 13px; padding: 5px 12px; background: var(--tint); border: 1px solid var(--line); }
.chips a.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips small { font-family: var(--f-mono); color: inherit; opacity: .7; }
table.edit td { vertical-align: middle; }
table.edit input:not([type]), table.edit input[name$="Title"], table.edit input[name$="TitleSq"], table.edit input[name$="TitleEn"], table.edit select { width: 100%; min-width: 160px; padding: 6px 8px; border: 1px solid var(--line); font: inherit; font-size: 14px; background: #fff; }
table.edit tbody tr:hover td { background: inherit; }
tr.off td { opacity: .5; }
.orig { display: block; font-size: 11px; margin-top: 2px; }
.nowrap { white-space: nowrap; }
.inline-add { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-add input { flex: 1 1 260px; padding: 8px 10px; border: 1px solid var(--line); font: inherit; }
.seg-form { display: inline-flex; border: 1px solid var(--ink); width: fit-content; }
.seg-form button { border: 0; background: #fff; padding: 9px 16px; font-family: var(--f-display); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.seg-form button.on { background: var(--red); color: var(--onred); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select, .bulkbar select, .bulkbar input { padding: 7px 9px; border: 1px solid var(--line); font: inherit; font-size: 14px; background: #fff; }
.filters input { flex: 1 1 220px; }
.bulkbar { position: sticky; top: 64px; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--ink); color: var(--paper); padding: 8px 10px; font-family: var(--f-mono); font-size: 12px; }
.bulkbar select { max-width: 280px; }
.bulkbar .short { width: 120px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 .wide { grid-column: 1 / -1; }
.form label.check, label.check { flex-direction: row; align-items: center; gap: 8px; }
.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pwbox { background: var(--ink); color: var(--paper); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; font-family: var(--f-mono); font-size: 13px; }
.pwbox code { font-size: 26px; letter-spacing: .08em; color: #fff; background: #000; padding: 6px 10px; width: fit-content; user-select: all; }
.pwbox small { color: #b9babd; }
@media (max-width: 760px) {
  .split, .grid2 { grid-template-columns: 1fr; }
  .admin-box { padding: 18px 14px; }
}
@media print {
  .tools, .admin-tabs, .foot, form, .btn, .crumbs { display: none !important; }
  body, .book { background: #fff; padding: 0; }
  .page, .sec { box-shadow: none; }
}
