@import url("https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700&display=swap");

:root {
  --ink: #17191c;
  --ink-2: #2b3036;
  --steel: #5b636c;
  --mute: #7d858e;
  --paper: #f7f7f5;
  --white: #ffffff;
  --line: #e2e4e7;
  --field-line: #c5cad0;
  --placeholder: #eeefec;
  --accent: #a8402a;
  --accent-hover: #8e3422;
  --accent-ink: #ffffff;
  --ok: #1f7a3d;
  --warn: #8a5a00;
  --danger: #b42318;
  --radius: 2px;
  --max: 1160px;
  --font-display: "Golos Text", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 72px 0; }
.section--tight { padding: 40px 0; }
.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.lede { color: var(--steel); font-size: 1.06rem; max-width: 62ch; }
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: -0.015em;
  margin: 40px 0 10px;
}
.crumbs { font-size: 14px; color: var(--mute); margin-top: 24px; }
.crumbs a { text-decoration: none; }

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  font-size: 18px;
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}
.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 15px;
}
.nav a {
  text-decoration: none;
  color: var(--ink-2);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover,
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 14px; font-size: 15px; }
.header-actions a { text-decoration: none; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

.cart-count,
.compare-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  margin-left: 4px;
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius);
}
.cart-count.is-bumped { animation: bump 0.45s ease; }
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ---------- Buttons & fields ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { opacity: 0.88; }
.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: 3px solid #d9a58f; outline-offset: 2px; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--field-line); }
.btn--ghost:hover { opacity: 1; background: var(--white); }
.btn--light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.6); }
.btn--small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label,
.field__label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
}
.field textarea { min-height: 96px; resize: vertical; }
.field__hint { font-size: 13px; color: var(--mute); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .field--full { grid-column: 1 / -1; }

.choice-group { display: grid; gap: 10px; margin-bottom: 18px; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--ink); background: var(--white); box-shadow: inset 3px 0 0 var(--ink); }
.choice input { margin-top: 4px; }
.choice small { display: block; color: var(--steel); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 14px 0; }

.notice {
  padding: 14px 16px;
  border-left: 3px solid var(--ink);
  background: var(--white);
  margin: 0 0 18px;
  font-size: 15px;
}
.notice--ok { border-left-color: var(--ok); }
.notice--warn { border-left-color: var(--warn); }
.notice--err { border-left-color: var(--danger); }

/* ---------- Home: hero ---------- */
.hero {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 64px;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 20px;
  max-width: 16ch;
}
.hero__sub { font-size: 1.1rem; color: var(--steel); max-width: 46ch; margin-bottom: 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

.facts {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 8px 26px;
}
.facts__title { font-size: 14px; font-weight: 600; color: var(--steel); margin: 16px 0 4px; }
.facts__item { padding: 16px 0; border-top: 1px solid var(--line); }
.facts__item:first-of-type { border-top: 0; }
.facts__item strong { display: block; font-size: 17px; margin-bottom: 2px; }
.facts__item span { color: var(--steel); font-size: 15px; }

/* ---------- Home sections ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.steps { counter-reset: step; list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 0; }
.steps li {
  counter-increment: step;
  padding: 18px 0 18px 56px;
  border-top: 1px solid var(--line);
  position: relative;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--mute);
}
.steps strong { display: block; margin-bottom: 4px; }

.audience { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--ink); }
.audience > div { padding: 28px 28px 28px 0; }
.audience > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.audience h3 { font-size: 1.1rem; font-weight: 700; }

.band {
  background: var(--ink);
  color: var(--white);
  padding: 56px 0;
}
.band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.band .lede { color: #c9cfd5; margin: 0; }
.band .section__title { margin: 0 0 8px; }

/* ---------- Catalog ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 22px;
}
.toolbar__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 38px;
  padding: 0 14px;
  background: var(--white);
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.search {
  min-width: 240px;
  min-height: 38px;
  padding: 0 12px;
  font: inherit;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--white);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.product {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.product:hover { border-color: var(--steel); }
.product__art {
  text-decoration: none;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: var(--placeholder);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--mute);
}
.product__cat { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mute); }
.product__name { font-weight: 600; font-size: 16px; margin: 0; }
.product__short { font-size: 14px; color: var(--steel); margin: 0; }
.product__price { font-weight: 700; font-size: 18px; margin-top: auto; }
.product__price small { font-weight: 400; font-size: 13px; color: var(--mute); }
.product__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.product__actions .btn { flex: 1; }
.toggle-compare[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.empty { color: var(--steel); padding: 40px 0; }

/* ---------- Product page ---------- */
.product-view { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 24px; align-items: start; }
.product-view .product__art { font-size: 14px; aspect-ratio: 1 / 1; }
.price-big { font-family: var(--font-display); font-size: 2rem; font-weight: 700; margin: 12px 0; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--white); }
.qty button { width: 42px; height: 46px; border: 0; background: none; font: inherit; font-size: 18px; cursor: pointer; }
.qty input { width: 56px; height: 46px; border: 0; text-align: center; font: inherit; background: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0; }
.specs { width: 100%; border-collapse: collapse; margin: 16px 0 0; background: var(--white); }
.specs th,
.specs td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
.specs th { width: 40%; color: var(--steel); font-weight: 500; }
.mini-form { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--ink); max-width: 620px; }

/* ---------- Compare ---------- */
.compare-wrap { overflow-x: auto; margin-top: 24px; background: var(--white); border: 1px solid var(--line); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare th,
.compare td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 15px; }
.compare thead th { font-family: var(--font-display); font-size: 14px; font-weight: 600; background: #fafaf8; }
.compare tbody th { width: 180px; color: var(--steel); font-weight: 500; }
.compare .btn { margin-top: 6px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--steel); text-decoration: underline; cursor: pointer; }

/* ---------- Cart & checkout ---------- */
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; margin-top: 24px; }
.panel { background: var(--white); border: 1px solid var(--line); padding: 22px; }
.panel h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; }
.cart-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line:first-child { padding-top: 0; }
.cart-line__art {
  width: 64px;
  height: 64px;
  background: var(--placeholder);
  border-radius: var(--radius);
}
.cart-line__name { font-weight: 600; margin: 0; }
.cart-line__meta { font-size: 13px; color: var(--steel); margin: 2px 0 8px; }
.cart-line__side { text-align: right; display: grid; gap: 8px; justify-items: end; }
.totals { display: grid; gap: 10px; margin: 0 0 18px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.totals .is-discount { color: var(--ok); font-weight: 600; }
.totals .is-total { font-weight: 700; font-size: 18px; padding-top: 10px; border-top: 1px solid var(--line); }
.checkout-section { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.checkout-section:last-of-type { border-bottom: 0; }
.checkout-section > h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.order-status {
  display: inline-block;
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
  background: #efefea;
}
.order-status[data-status="paid"] { background: #dcf1e3; color: var(--ok); }
.order-status[data-status="failed"],
.order-status[data-status="canceled"] { background: #fde7e5; color: var(--danger); }
.sim-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
pre.json {
  overflow-x: auto;
  background: var(--ink);
  color: #e8ecef;
  padding: 16px;
  font-size: 12px;
  border-radius: var(--radius);
}
details summary { cursor: pointer; font-weight: 600; margin: 14px 0 8px; }

/* ---------- Content pages ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.2rem; font-weight: 700; margin-top: 36px; }
.prose ul { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.two-text { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.two-text article { border-top: 1px solid var(--ink); padding-top: 18px; }
.two-text h3 { font-size: 1.05rem; font-weight: 700; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.big-phone { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #c9cfd5;
  padding: 48px 0 32px;
  font-size: 15px;
  margin-top: auto;
}
.site-footer .brand { color: var(--white); font-size: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.footer-grid nav { display: grid; gap: 8px; align-content: start; }
.footer-grid a { text-decoration: none; color: #e6eaed; }
.footer-grid a:hover { text-decoration: underline; }
.footer-note { margin-top: 32px; padding-top: 18px; border-top: 1px solid #2c3137; font-size: 13px; color: #98a1aa; }
.footer-reset {
  margin-top: 12px;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  color: #e6eaed;
  background: none;
  border: 1px solid #3a4048;
  border-radius: var(--radius);
  cursor: pointer;
}
.footer-reset:hover { border-color: #e6eaed; }

/* ---------- Product extras ---------- */
.perks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; font-size: 15px; }
.perks li::before { content: "—"; color: var(--mute); margin-right: 8px; }
.toolbar__controls { display: flex; flex-wrap: wrap; gap: 8px; }
.sort {
  min-height: 38px;
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-header { position: sticky; }
  .site-header__inner .header-actions { margin-left: 0; }
  .hero__inner,
  .split,
  .product-view,
  .two-col,
  .contact-row,
  .two-text,
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .audience { grid-template-columns: 1fr; }
  .audience > div,
  .audience > div + div { padding: 22px 0; border-left: 0; border-top: 1px solid var(--line); }
  .audience > div:first-child { border-top: 0; }
}
@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .hero { padding: 48px 0 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 100%; }
  .search { min-width: 0; width: 100%; }
  .compare-wrap { margin-left: -20px; margin-right: -20px; border-left: 0; border-right: 0; }
  .header-actions .link-count { display: none; }
  .brand { font-size: 16px; }
  .site-header__inner { gap: 10px; }
  .header-actions { gap: 8px; }
  .header-actions .btn--small { padding: 0 10px; }
  .nav-toggle { padding: 8px 10px; }
}

.toast {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;
  width: fit-content;
  margin: 0 auto;
  z-index: 50;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(20, 23, 27, 0.18);
  animation: rise 0.3s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
