:root {
  --ink: #14213d;
  --ink-soft: #475467;
  --muted: #667085;
  --line: #e3e9f2;
  --bg: #f6f8fb;
  --accent: #1f5f8b;
  --accent-dark: #17496b;
  --green: #7cb342;
  --green-soft: #f0f7e6;
  --warn: #b54708;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  font-size: 15px;
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 14px; }
h1 { font-size: 32px; letter-spacing: -0.3px; }
h2 { font-size: 23px; }
p { margin: 0 0 10px; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.narrow { max-width: 640px; }

/* header */
.top { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; gap: 22px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #2f7fb5); color: #fff; font-weight: 700; font-size: 15px;
}
.brand-text b { display: block; font-size: 15px; }
.brand-text i { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.nav { display: flex; gap: 18px; margin-left: 8px; flex: 1; }
.nav a { color: var(--ink-soft); font-size: 14px; }
.nav a:hover { color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 14px; }
.top-phone { text-align: right; }
.top-phone a { display: block; font-weight: 700; font-size: 15px; }
.top-phone span { font-size: 11px; color: var(--muted); }
.cart-link { position: relative; font-size: 14px; color: var(--ink-soft); }
.cart-badge {
  position: absolute; top: -8px; right: -14px; background: var(--green); color: #fff;
  font-size: 10.5px; padding: 1px 6px; border-radius: 10px;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-ghost:hover { border-color: #c6d3e3; color: var(--accent); }
.btn-light { background: #fff; color: var(--accent); }
.btn-sm { padding: 8px 13px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 15.5px; }
.link { color: var(--accent); font-size: 14px; }
.link-danger { background: none; border: 0; color: #b42318; cursor: pointer; font-size: 13px; padding: 0; }

/* flashes */
.flashes { margin-top: 16px; }
.flash { padding: 11px 16px; border-radius: 10px; margin-bottom: 8px; font-size: 14px; }
.flash-error { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }
.flash-success { background: var(--green-soft); color: #3d6b12; border: 1px solid #d6e8be; }

/* hero */
.hero { background: linear-gradient(180deg, #f3f7fb 0%, #ffffff 100%); border-bottom: 1px solid var(--line); padding: 46px 0 40px; }
.hero-in { display: grid; grid-template-columns: 1.55fr 1fr; gap: 36px; align-items: start; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); font-weight: 700; margin-bottom: 12px; }
.hero h1 { font-size: 40px; max-width: 640px; }
.hero p { color: var(--ink-soft); max-width: 600px; font-size: 16px; }
.hero-actions { display: flex; gap: 12px; margin: 22px 0 26px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 26px; }
.hero-stats span { font-size: 12.5px; color: var(--muted); }
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: 0 8px 26px rgba(20, 33, 61, .06);
  display: flex; flex-direction: column; gap: 6px;
}
.hero-card-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.hero-manager { font-size: 19px; font-weight: 700; margin-top: 4px; }
.hero-phone { font-size: 21px; font-weight: 700; color: var(--ink); margin-top: 6px; }
.hero-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }

/* advantages */
.adv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px auto; }
.adv-item { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; }
.adv-item b { display: block; font-size: 14px; margin-bottom: 3px; }
.adv-item span { font-size: 12.5px; color: var(--muted); }

/* sections */
.section { margin: 38px auto; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.catcard {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff;
}
.catcard:hover { border-color: var(--accent); color: var(--accent); }
.catcard-name { font-weight: 600; font-size: 14px; }
.catcard-count { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* product cards */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pcard { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; color: var(--ink); display: flex; flex-direction: column; }
.pcard:hover { border-color: #b9cbe0; box-shadow: 0 6px 20px rgba(20, 33, 61, .07); }
.pcard-img { position: relative; aspect-ratio: 4 / 3; background: var(--bg); display: grid; place-items: center; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.pcard-glyph { font-size: 30px; font-weight: 700; color: #b7c9dc; letter-spacing: 1px; }
.pcard-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.pcard-sku { font-size: 11.5px; color: var(--muted); }
.pcard-name { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.pcard-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.price { font-weight: 700; font-size: 16px; }
.price-from { font-weight: 400; font-size: 11.5px; color: var(--muted); }
.price-unit { font-weight: 400; font-size: 12px; color: var(--muted); }
.price-request { font-size: 13px; color: var(--warn); }
.pcard-more { font-size: 12.5px; color: var(--accent); }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 20px; display: inline-block; }
.tag-order { position: absolute; top: 10px; left: 10px; background: #fff7e6; color: var(--warn); border: 1px solid #f5d9a8; }

/* band */
.band { background: var(--ink); color: #fff; padding: 34px 0; }
.band-in { display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.band h2 { font-size: 21px; margin-bottom: 8px; }
.band p { color: #c3cfdd; font-size: 13.5px; margin: 0; max-width: 820px; }

/* steps */
.steps-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.step span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green-soft); color: #3d6b12; font-weight: 700; margin-bottom: 8px; }
.step b { display: block; margin-bottom: 4px; }
.step p { margin: 0; color: var(--muted); font-size: 13px; }

/* page */
.page { padding: 26px 0 50px; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 6px; }
.prose { max-width: 820px; }
.prose p { color: var(--ink-soft); }
.prose-list { max-width: 820px; padding-left: 20px; color: var(--ink-soft); }
.prose-list li { margin-bottom: 6px; }

/* catalog */
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: start; }
.filters { border: 1px solid var(--line); border-radius: 12px; padding: 14px; position: sticky; top: 90px; }
.filters-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 8px; }
.filter-link { display: flex; justify-content: space-between; gap: 8px; padding: 7px 8px; border-radius: 8px; color: var(--ink-soft); font-size: 13.5px; }
.filter-link span { color: var(--muted); font-size: 12px; }
.filter-link:hover { background: var(--bg); color: var(--accent); }
.filter-link.is-active { background: #eaf2f9; color: var(--accent); font-weight: 600; }
.searchbar { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.searchbar input[type="search"] { flex: 1; min-width: 200px; }
.searchbar select { max-width: 190px; }
.catalog-main .pgrid { margin-top: 14px; }
.empty { border: 1px dashed var(--line); border-radius: 12px; padding: 26px; color: var(--muted); margin: 14px 0; }
.pager { display: flex; gap: 6px; margin-top: 22px; flex-wrap: wrap; }
.pager-item { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--ink-soft); }
.pager-item.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* forms */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px;
  font-family: inherit; font-size: 14px; color: var(--ink); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #cfe1f1; border-color: #9dc0dd; }
label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
label input, label textarea { margin-top: 5px; }
label.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
label.check input { width: auto; margin: 3px 0 0; }

/* product page */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 12px; }
    .product-media { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
    .product-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-placeholder { text-align: center; color: #b7c9dc; }
.product-placeholder span { font-size: 46px; font-weight: 700; display: block; }
.product-placeholder i { font-style: normal; font-size: 12px; color: var(--muted); }
.product-info h1 { font-size: 27px; }
.product-price { margin: 16px 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.price-big { font-size: 26px; font-weight: 700; }
.price-big span { font-size: 14px; font-weight: 400; color: var(--muted); }
.stock { font-size: 13.5px; margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-ok { background: #12b76a; }
.dot-warn { background: #f79009; }
.dot-off { background: #d0d5dd; }
.addto { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 12px; flex-wrap: wrap; }
.addto label { margin: 0; }
.addto input { width: 120px; }
.product-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.spec { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec th { text-align: left; color: var(--muted); font-weight: 400; padding: 7px 0; width: 45%; border-bottom: 1px solid var(--line); }
.spec td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.product-desc { margin-top: 34px; max-width: 820px; }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; }
.cart-name { color: var(--ink); font-weight: 600; }
.qty-input { width: 78px; display: inline-block; }
.cart-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.cart-total { font-size: 17px; }
.cart-note { margin-top: 18px; font-size: 12.5px; color: var(--muted); max-width: 760px; }
.cart-checkout { margin-top: 16px; }

/* checkout */
.checkout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: start; margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.checkout-form label.full { display: block; }
.checkout-sum { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--bg); }
.checkout-sum-title { font-weight: 700; margin-bottom: 10px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 8px 0; border-bottom: 1px solid #e8eef5; }
.sum-total { display: flex; justify-content: space-between; margin-top: 12px; font-size: 16px; }

/* done */
.done { text-align: center; padding: 40px 0; }
.done-icon { width: 62px; height: 62px; border-radius: 50%; background: var(--green-soft); color: #3d6b12; font-size: 30px; display: grid; place-items: center; margin: 0 auto 16px; }
.done-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* contacts */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 16px; }
.contacts-phone { font-size: 24px; font-weight: 700; }
.contacts-form form { max-width: 460px; }
.manager-card { margin: 20px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 3px; max-width: 380px; }

/* auth */
.auth-form { max-width: 380px; }
.auth-form.wide { max-width: 520px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.auth-form.wide label.full, .auth-form.wide button { grid-column: 1 / -1; }
.auth-links { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.forgot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.forgot input { width: 170px; }

/* cabinet */
.cabinet-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.cabinet-nav { display: flex; gap: 16px; font-size: 14px; }
.cabinet-nav a { color: var(--ink-soft); }
.cabinet-nav a.is-active { color: var(--accent); font-weight: 600; }
.cabinet-user { display: flex; gap: 10px; align-items: baseline; padding: 12px 0 18px; flex-wrap: wrap; }
.status { font-size: 12px; padding: 3px 10px; border-radius: 20px; white-space: nowrap; background: #eef2f8; color: var(--ink-soft); }
.status-new { background: #eaf2f9; color: #1f5f8b; }
.status-accepted { background: #f0f2ff; color: #4b4fbf; }
.status-paid { background: #eafaf1; color: #12805c; }
.status-ready { background: #fff7e6; color: #b54708; }
.status-shipped { background: #e8f4fd; color: #0b6bb0; }
.status-received { background: #eef7e6; color: #3d6b12; }
.order-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 28px; }
.docs { display: flex; gap: 10px; flex-wrap: wrap; }
.timeline { margin: 0; padding-left: 18px; font-size: 13.5px; }
.timeline li { margin-bottom: 12px; }
.timeline b { display: block; }

/* footer */
.foot { background: var(--ink); color: #c3cfdd; margin-top: 50px; padding: 34px 0; font-size: 13px; }
.foot-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.foot b { color: #fff; display: block; margin-bottom: 8px; }
.foot p { margin: 0 0 5px; }
.foot a { color: #c3cfdd; }
.foot .muted { color: #8fa1b8; }

@media (max-width: 980px) {
  .hero-in, .catalog, .checkout, .contacts, .product, .order-cols, .foot-in, .steps-in, .adv { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .nav { display: none; }
  .top-in { min-height: 64px; gap: 12px; }
  .top-phone { display: none; }
  .filters { position: static; }
  .form-grid, .auth-form.wide { grid-template-columns: 1fr; }
  .band-in { flex-direction: column; align-items: flex-start; }
}
