/* Оформление каталога «Континент-Класс» — макет V01 «Реестр».

   Двухколоночная страница: постоянный перечень разделов слева, каталог справа.
   Плотная деловая подача — расчёт на человека, который переносит строку
   в спецификацию, а не разглядывает витрину.

   В отличие от макета здесь добавлена адаптация под узкий экран: директор
   школы нередко открывает ссылку с телефона.
*/

:root {
  --navy: #16243f;
  --navy-2: #20325a;
  --line: #d6dbe4;
  --line-2: #e8ebf0;
  --text: #1c2431;
  --muted: #5c6b84;
  --accent: #a51c1c;
  --bg: #f4f6f9;
  --wrap: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", Tahoma, Verdana, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ── шапка ───────────────────────────────── */
.topline { background: var(--navy); color: #c6cfdd; font-size: 12.5px; }
.topline .wrap { display: flex; justify-content: space-between; gap: 16px;
  padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.topline b { color: #fff; font-weight: 600; }

header.site { background: #fff; border-bottom: 2px solid var(--navy);
  position: sticky; top: 0; z-index: 20; }
.head { display: flex; align-items: center; gap: 20px; padding: 14px 16px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo .mark { width: 44px; height: 44px; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; letter-spacing: -.5px; flex: 0 0 44px; }
.logo .nm { font-size: 21px; font-weight: 700; color: var(--navy); letter-spacing: -.2px; }
.logo .sl { font-size: 12.5px; color: #63708a; letter-spacing: .02em; }

nav.main { display: flex; gap: 18px; margin-left: 8px; flex-wrap: wrap; }
nav.main a { font-size: 14px; color: #2b3549; padding: 4px 0;
  border-bottom: 2px solid transparent; }
nav.main a:hover, nav.main a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }

.head .phones { margin-left: auto; text-align: right; }
.head .phones .p { font-size: 18px; font-weight: 700; color: var(--navy); letter-spacing: -.2px; }
.head .phones .n { font-size: 12px; color: #77839a; }

.btn { display: inline-block; padding: 10px 18px; background: var(--accent); color: #fff;
  font-size: 13.5px; font-weight: 600; border: 0; cursor: pointer; }
.btn:hover { background: #8d1717; }

/* ── хлебные крошки ──────────────────────── */
.crumbs { font-size: 12.5px; color: #77839a; padding: 12px 0 0; }
.crumbs a:hover { color: var(--accent); }
.crumbs i { font-style: normal; margin: 0 6px; }

/* ── первый экран ────────────────────────── */
.intro { background: #fff; border-bottom: 1px solid var(--line); }
.intro .wrap { display: grid; grid-template-columns: 1fr 340px; gap: 40px;
  padding-top: 30px; padding-bottom: 34px; }
.intro h1 { font-size: 27px; line-height: 1.25; color: var(--navy); font-weight: 700;
  margin-bottom: 12px; letter-spacing: -.3px; }
.intro p { font-size: 14.5px; color: #3d4757; margin-bottom: 10px; max-width: 740px; }
.facts { border-left: 3px solid var(--navy); padding-left: 18px; align-self: start; }
.facts .row { display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px dotted var(--line); }
.facts .row:last-child { border-bottom: 0; }
.facts .k { color: var(--muted); }
.facts .v { font-weight: 700; color: var(--navy); text-align: right; }

/* ── две колонки ─────────────────────────── */
.cols { display: grid; grid-template-columns: 264px 1fr; gap: 28px;
  padding-top: 22px; padding-bottom: 40px; align-items: start; }

aside .box { background: #fff; border: 1px solid var(--line); margin-bottom: 16px; }
aside .box h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  background: var(--navy); color: #fff; padding: 9px 14px; font-weight: 600; }
.catlist { list-style: none; max-height: 620px; overflow-y: auto; }
.catlist li { border-bottom: 1px solid var(--line-2); }
.catlist li:last-child { border-bottom: 0; }
.catlist a { display: flex; justify-content: space-between; gap: 8px;
  padding: 8px 14px; font-size: 13px; color: #2b3549; }
.catlist a:hover { background: #eef2f8; color: var(--accent); }
.catlist a[aria-current] { background: #eef2f8; color: var(--accent); font-weight: 600; }
.catlist a em { font-style: normal; color: #8b95a8; font-size: 12px; }
.catlist .all { padding: 10px 14px; font-size: 12.5px; color: #6b7688; background: #f7f9fc; }
.catlist .all b { color: var(--navy); }

/* Разделов больше сотни, поэтому они разложены по двум группам: мебель
   и учебное оборудование. Заголовок группы держится при прокрутке списка,
   иначе, уехав вниз, читатель перестаёт понимать, где находится. */
.catgroup + .catgroup { border-top: 3px solid var(--line); }
.catgroup > .gh { position: sticky; top: 0; z-index: 1; cursor: pointer;
  display: flex; align-items: center; gap: 8px; list-style: none;
  padding: 9px 14px; background: #eef2f8; border-bottom: 1px solid var(--line);
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--navy); -webkit-user-select: none; user-select: none; }
.catgroup > .gh::-webkit-details-marker { display: none; }
.catgroup > .gh:hover { background: #e4eaf4; }
.catgroup > .gh:focus-visible { outline: 2px solid var(--navy-2); outline-offset: -2px; }
/* Уголок слева: вправо — группа свёрнута, вниз — раскрыта. */
.catgroup > .gh::before { content: ''; flex: 0 0 auto; width: 6px; height: 6px;
  margin-right: 2px; border-right: 2px solid #7c88a0; border-bottom: 2px solid #7c88a0;
  transform: rotate(-45deg); transition: transform .15s ease; }
.catgroup[open] > .gh::before { transform: rotate(45deg); }
.catgroup > .gh span { flex: 1 1 auto; }
.catgroup > .gh em { flex: 0 0 auto; font-style: normal; font-weight: 600;
  color: #8b95a8; font-size: 11px; letter-spacing: 0; }
.catgroup .catlist { max-height: 420px; }
.catlist .more a { color: var(--accent); font-weight: 600; }
.catall { padding: 10px 14px; font-size: 12.5px; color: #6b7688; background: #f7f9fc;
  border-top: 1px solid var(--line); }
.catall b { color: var(--navy); }

/* Заголовок группы на странице каталога: отделяет мебель от оборудования
   заметнее, чем обычный заголовок раздела. */
.grouphead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin: 30px 0 16px; padding: 10px 14px; background: var(--navy); color: #fff; }
.grouphead:first-child { margin-top: 0; }
.grouphead h2 { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .01em; }
.grouphead span { font-size: 12px; color: #b9c4d8; }
.aside-note { padding: 14px; font-size: 12.5px; color: #4a5568; line-height: 1.55; }
.aside-note b { color: var(--navy); }

/* ── каталог ─────────────────────────────── */
.sec-h { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-h h1, .sec-h h2, .sec-h h3 { font-size: 19px; color: var(--navy); font-weight: 700; }
.sec-h span { font-size: 12.5px; color: #78829a; }
.sec-h .sp { flex: 1; height: 1px; background: var(--line); min-width: 20px; }

.searchbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.searchbar input, .searchbar select {
  padding: 9px 12px; border: 1px solid var(--line); font-size: 13.5px;
  font-family: inherit; background: #fff; color: var(--text); }
.searchbar input { flex: 1 1 300px; }
.searchbar select { flex: 0 1 260px; }
.searchbar input:focus, .searchbar select:focus { outline: 2px solid var(--navy-2); outline-offset: -1px; }
.found { font-size: 12.5px; color: #78829a; margin-bottom: 12px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card { background: #fff; border: 1px solid var(--line); display: flex; gap: 14px; padding: 14px; }
.card:hover { border-color: var(--navy-2); }
.card .ph { width: 118px; height: 118px; flex: 0 0 118px; border: 1px solid var(--line-2); background: #fff; }
.card .ph img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card .ph.empty { display: flex; align-items: center; justify-content: center;
  color: #a4adbd; font-size: 11.5px; text-align: center; padding: 6px; }
.card .bd { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card .cat { font-size: 11.5px; color: #7c8598; text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 4px; }
.card .nm { font-size: 14px; line-height: 1.35; font-weight: 600; color: #17202e; margin-bottom: 8px; }
.card .sku { font-family: Consolas, "Courier New", monospace; font-size: 12.5px; color: #2b3549;
  background: #eff2f7; display: inline-block; padding: 2px 7px; border: 1px solid #dde3ec;
  margin-bottom: auto; max-width: 100%; overflow-wrap: anywhere; }
.card .pr { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line-2); }
.card .pr .val { font-size: 19px; font-weight: 700; color: var(--navy); white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.card .pr .from { font-size: 11.5px; color: #7c8598; display: block; font-weight: 400; letter-spacing: .02em; }
.card .pr .go { font-size: 12.5px; color: var(--accent); font-weight: 600;
  border-bottom: 1px solid #e3b6b6; white-space: nowrap; }

/* ── страница товара ─────────────────────── */
.product { background: #fff; border: 1px solid var(--line); padding: 20px; }
.product .vh { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 18px; flex-wrap: wrap; }
.product .vh .ph { width: 260px; height: 260px; flex: 0 0 260px; border: 1px solid var(--line-2); }
.product .vh .ph img { width: 100%; height: 100%; object-fit: contain; display: block; }
.product .vh .ph.empty { display: flex; align-items: center; justify-content: center;
  color: #a4adbd; font-size: 13px; text-align: center; padding: 14px; }
.product .vh .info { flex: 1; min-width: 260px; }
.product .vh .cat { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
  color: #7c8598; margin-bottom: 6px; }
.product .vh h1 { font-size: 22px; color: var(--navy); line-height: 1.25; margin-bottom: 10px; }
.product .vh .descr { font-size: 13.5px; color: #4a5568; max-width: 640px; }
.product .vh .descr p { margin-bottom: 6px; }

table.vt { width: 100%; border-collapse: collapse; font-size: 13px; }
table.vt caption { text-align: left; font-size: 12.5px; color: #78829a; padding-bottom: 8px; }
table.vt th { background: #eef2f7; text-align: left; padding: 7px 10px; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .05em; color: #4e5a70;
  border: 1px solid var(--line); font-weight: 600; }
table.vt td { padding: 7px 10px; border: 1px solid var(--line-2); }
table.vt td.sku { font-family: Consolas, "Courier New", monospace; color: var(--navy);
  font-weight: 600; width: 210px; overflow-wrap: anywhere; }
table.vt td.price { text-align: right; font-weight: 700; color: var(--navy);
  width: 130px; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.vt tr:nth-child(even) td { background: #fafbfd; }
.tablewrap { overflow-x: auto; }

.specs { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 6px; }
.specs th { text-align: left; font-weight: 400; color: var(--muted);
  padding: 6px 16px 6px 0; vertical-align: top; width: 38%; }
.specs td { padding: 6px 0; }

.sub-h { font-size: 15px; color: var(--navy); font-weight: 700; margin: 20px 0 8px; }

/* ── заказ ───────────────────────────────── */
.order { background: var(--navy); color: #fff; margin-top: 8px; }
.order .wrap { display: grid; grid-template-columns: 1fr 380px; gap: 50px;
  padding-top: 30px; padding-bottom: 30px; }
.order h2 { font-size: 22px; margin-bottom: 10px; font-weight: 700; }
.order p { color: #c2ccdd; font-size: 14px; margin-bottom: 8px; max-width: 640px; }
.order ol { margin: 12px 0 0 18px; color: #c2ccdd; font-size: 13.5px; }
.order ol li { margin-bottom: 5px; }
.order .callbox { background: #fff; color: var(--text); padding: 20px; align-self: start; }
.order .callbox .lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: #7c8598; }
.order .callbox .p { font-size: 24px; font-weight: 700; color: var(--navy);
  letter-spacing: -.5px; margin: 2px 0 10px; }
.order .callbox .p2 { font-size: 17px; font-weight: 600; color: #33415c; margin-bottom: 14px; }
.order .callbox .btn { width: 100%; text-align: center; padding: 12px; }

/* ── текстовые страницы ──────────────────── */
.page { background: #fff; border: 1px solid var(--line); padding: 26px 30px; }
.page h1 { font-size: 24px; color: var(--navy); margin-bottom: 14px; }
.page p { margin-bottom: 12px; max-width: 74ch; font-size: 14.5px; color: #33415c; }
.page b { color: var(--navy); }

/* ── подвал ──────────────────────────────── */
footer.site { background: #0f1a2e; color: #8f9cb3; font-size: 12.5px; margin-top: 8px; }
footer.site .cols-f { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 34px;
  padding-top: 26px; padding-bottom: 26px; }
footer.site b { color: #fff; display: block; margin-bottom: 8px; font-size: 13px; }
footer.site p { margin-bottom: 5px; }
footer.site ul { list-style: none; }
footer.site li { margin-bottom: 5px; }
footer.site a:hover { color: #fff; }
.copy { border-top: 1px solid #1e2b45; padding: 12px 0; font-size: 12px; color: #6f7c93; }

.hidden { display: none !important; }

/* ── узкий экран ─────────────────────────── */
@media (max-width: 1000px) {
  .cols { grid-template-columns: 1fr; gap: 18px; }
  .intro .wrap { grid-template-columns: 1fr; gap: 22px; }
  .order .wrap { grid-template-columns: 1fr; gap: 26px; }
  footer.site .cols-f { grid-template-columns: 1fr 1fr; gap: 24px; }
  .catlist, .catgroup .catlist { max-height: 300px; }
  aside { order: 2; }
}

@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; }
  .intro h1 { font-size: 22px; }
  .head { gap: 12px; }
  .head .phones { margin-left: 0; text-align: left; width: 100%; }
  nav.main { width: 100%; margin-left: 0; gap: 14px; }
  .product .vh .ph { width: 100%; flex: 1 1 auto; height: auto; aspect-ratio: 1; }
  footer.site .cols-f { grid-template-columns: 1fr; }
  table.vt td.sku { width: auto; }
}

@media print {
  .topline, nav.main, .searchbar, .order, footer.site .cols-f { display: none; }
  body { background: #fff; }
  .card, .product { break-inside: avoid; border-color: #bbb; }
}

/* ── галерея товара ──────────────────────── */
.gal { width: 260px; flex: 0 0 260px; }
.gal .ph { width: 260px; height: 260px; border: 1px solid var(--line-2); cursor: zoom-in; background: #fff; }
.gal .ph img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumbs .th { width: 58px; height: 58px; padding: 0; border: 1px solid var(--line);
  background: #fff; cursor: pointer; }
.thumbs .th img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumbs .th:hover { border-color: var(--navy-2); }
.thumbs .th.on { border-color: var(--accent); border-width: 2px; }
.galhint { font-size: 11.5px; color: #8b95a8; margin-top: 8px; }

/* ── просмотр во весь экран ──────────────── */
.lightbox { position: fixed; inset: 0; background: rgba(12, 18, 30, .92); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 40px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff;
  cursor: default; }
.lbclose { position: absolute; top: 14px; right: 20px; width: 44px; height: 44px;
  border: 0; background: transparent; color: #fff; font-size: 34px; line-height: 1;
  cursor: pointer; }
.lbclose:hover { color: var(--accent); }

@media (max-width: 700px) {
  .gal, .gal .ph { width: 100%; flex: 1 1 auto; }
  .gal .ph { height: auto; aspect-ratio: 1; }
  .lightbox { padding: 16px; }
}

/* ── выбор цвета ─────────────────────────── */
.colorpick { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.cp-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.cp-lab { font-size: 12.5px; color: var(--muted); min-width: 118px; padding-top: 4px; }
.cp-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.sw { width: 28px; height: 28px; border: 2px solid #fff; outline: 1px solid var(--line);
  padding: 0; cursor: pointer; }
.sw:hover { outline-color: var(--navy-2); }
.sw.on { outline: 2px solid var(--navy); outline-offset: 0; }
.cp-note { font-size: 11.5px; color: #8b95a8; }
.cp-cur { font-size: 12.5px; color: var(--navy); font-weight: 600; padding-top: 5px; }

/* ── заявка (корзина) ────────────────────── */
.cartlink { position: relative; }
.cartlink [data-cart-count] { display: inline-block; min-width: 19px; height: 19px;
  padding: 0 5px; background: var(--accent); color: #fff; border-radius: 10px;
  font-size: 11.5px; line-height: 19px; text-align: center; font-weight: 700;
  vertical-align: 1px; }
.cartlink [data-cart-count].empty { display: none; }

.btn.small { padding: 5px 12px; font-size: 12.5px; }
.btn.done { background: #1d7a3c; }

.cart-total { display: flex; align-items: baseline; gap: 16px; margin: 14px 0 4px;
  font-size: 15px; flex-wrap: wrap; }
.cart-total b { font-size: 20px; color: var(--navy); font-variant-numeric: tabular-nums; }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer;
  font-size: 12.5px; font-family: inherit; padding: 0; text-decoration: underline; }
.muted { color: #8b95a8; font-size: 12px; }

.orderform { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.orderform label { display: flex; flex-direction: column; gap: 5px;
  font-size: 12.5px; color: var(--muted); }
.orderform input, .orderform textarea {
  padding: 9px 12px; border: 1px solid var(--line); font-size: 14px;
  font-family: inherit; color: var(--text); background: #fff; }
.orderform input:focus, .orderform textarea:focus {
  outline: 2px solid var(--navy-2); outline-offset: -1px; }
.orderform .wide { grid-column: 1 / -1; }
.orderform .req { color: var(--accent); }
.formfoot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.formfoot .hint { font-size: 12.5px; color: var(--muted); max-width: 52ch; }
#cart-msg { font-size: 14px; }
#cart-msg.ok { color: #1d7a3c; font-weight: 600; }
#cart-msg.err { color: var(--accent); font-weight: 600; }
table.vt input.qty { width: 74px; padding: 5px 8px; border: 1px solid var(--line);
  font-family: inherit; font-size: 13px; }

@media (max-width: 700px) {
  .orderform { grid-template-columns: 1fr; }
}

/* ── отметки перечней ─────────────────────
   Номер пункта приказа 838 и номер в реестре Минпромторга — то, ради чего
   контрактный управляющий открывает карточку. Поэтому они стоят перед ценой
   и оформлены заметно, а не строкой в общей таблице характеристик. */
.marks { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }
.mark { flex: 1 1 260px; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: #fbfcfe; padding: 9px 12px; }
.mark .k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: #78829a; font-weight: 600; }
.mark .v { display: block; font-size: 15px; font-weight: 700; color: var(--navy);
  margin-top: 2px; font-variant-numeric: tabular-nums; }
.mark .d { display: block; font-size: 12px; color: #4a5568; margin-top: 4px; line-height: 1.45; }
