:root {
  --bg: #ffffff;
  --bg-alt: #f4f6f8;
  --ink: #16202a;
  --ink-soft: #4b5a68;
  --border: #e2e8ee;
  --brand: #0f6e5f;
  --brand-dark: #0b5347;
  --brand-soft: #e4f3ef;
  --accent: #d97706;
  --danger: #b3261e;
  --radius: 10px;
  --max-width: 1120px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Temporary notice banner */
.site-banner {
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
  padding: 8px 20px;
}

/* Header */
.site-header {
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
}
.brand img { height: 44px; width: auto; }
.brand:hover { text-decoration: none; opacity: 0.9; }

.main-nav { display: flex; gap: 24px; }
.main-nav a {
  color: #cfd8df;
  font-weight: 500;
  font-size: 0.95rem;
}
.main-nav a:hover, .main-nav a.active { color: #fff; text-decoration: none; }

.header-cta {
  background: var(--brand);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}
.header-cta:hover { background: var(--brand-dark); text-decoration: none; }

.header-cart {
  color: #cfd8df !important;
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-cart:hover { color: #fff !important; text-decoration: none; }
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.nav-toggle { display: none; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--ink) 0%, #1e3a34 100%);
  color: #fff;
  padding: 72px 0 64px;
}
.hero h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 0 18px;
  max-width: 720px;
}
.hero p.lead {
  font-size: 1.15rem;
  color: #d7e4e0;
  max-width: 620px;
  margin: 0 0 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .eyebrow { color: #8fe3cf; margin: 0 0 12px; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.btn-secondary { background: var(--brand-soft); color: var(--brand-dark); }
.btn-secondary:hover { background: #d5ece5; text-decoration: none; }
.btn:disabled, .btn.disabled { opacity: 0.55; cursor: not-allowed; }

/* Sections */
section { padding: 56px 0; }
section.alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin: 0 0 34px; }
.section-head h2 { font-size: 1.7rem; margin: 0 0 10px; }
.section-head p { color: var(--ink-soft); margin: 0; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 10px;
}

/* Grids & cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.card a.card-link { display: block; }
.card a.card-link:hover { text-decoration: none; border-color: var(--brand); }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eceef1;
  color: var(--ink-soft);
}
.badge-stock { background: var(--brand-soft); color: var(--brand-dark); }
.badge-soon { background: #fdf1de; color: var(--accent); }

/* Shop table (/kupit) */
.shop-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.shop-table th, .shop-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.shop-table th { color: var(--ink-soft); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
.shop-table th.sortable:hover { color: var(--ink); }
.shop-table th.sortable::after { content: ' ⇅'; opacity: 0.4; font-size: 0.75em; }

/* Product photo gallery */
.product-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.product-gallery img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Usecase icons */
.usecase-icon { display: block; margin-bottom: 16px; }
.usecase-hero { display: flex; align-items: flex-start; gap: 20px; }
.usecase-icon-lg { flex-shrink: 0; margin-top: 14px; }
@media (max-width: 640px) {
  .usecase-hero { flex-direction: column; gap: 6px; }
  .usecase-icon-lg { margin-top: 0; }
}

/* Product cards */
.product-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-card .top-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.product-card .specs-mini { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; color: var(--ink-soft); }
.product-card .specs-mini li { padding: 3px 0; }
.product-card .price { font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.product-card .price.tbd { font-weight: 500; font-size: 0.9rem; color: var(--ink-soft); }

/* Spec table */
.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table td { padding: 10px 4px; vertical-align: top; font-size: 0.95rem; }
.spec-table td:first-child { color: var(--ink-soft); width: 42%; }

/* Breadcrumbs */
.breadcrumbs { font-size: 0.85rem; color: var(--ink-soft); margin: 18px 0 0; }
.breadcrumbs a { color: var(--ink-soft); }

/* Content prose */
.prose h1 { font-size: 2rem; margin: 22px 0 16px; }
.prose h2 { font-size: 1.4rem; margin: 34px 0 12px; }
.prose p { margin: 0 0 16px; color: var(--ink-soft); }
.prose ul { color: var(--ink-soft); }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item h3 { margin: 0 0 8px; font-size: 1.02rem; }
.faq-item p { margin: 0; color: var(--ink-soft); }

/* Forms */
.form-grid { display: grid; gap: 16px; max-width: 520px; }
label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); }
.form-error { color: var(--danger); font-size: 0.88rem; margin-top: 4px; }

/* СДЭК: автокомплит города + список ПВЗ (без карты) */
.city-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  max-height: 260px;
  overflow-y: auto;
}
.city-suggestion-item { padding: 9px 12px; cursor: pointer; font-size: 0.92rem; }
.city-suggestion-item:hover { background: var(--brand-soft); }
.delivery-mode-toggle { display: flex; gap: 20px; margin: 4px 0 8px; }
.delivery-mode-toggle label { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.delivery-mode-toggle input { width: auto; }
.pvz-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 4px;
}
.pvz-item { padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 0.92rem; }
.pvz-item:last-child { border-bottom: none; }
.pvz-item:hover { background: var(--bg-alt); }
.pvz-item.selected { background: var(--brand-soft); border-left: 3px solid var(--brand); }
.pvz-status { padding: 10px 12px; color: var(--ink-soft); font-size: 0.9rem; margin: 0; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: #b9c4cb;
  padding: 48px 0 28px;
  margin-top: 40px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 30px;
  margin-bottom: 30px;
}
.site-footer h4 { color: #fff; font-size: 0.95rem; margin: 0 0 14px; }
.site-footer a { color: #b9c4cb; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-legal { border-top: 1px solid #2a3a41; padding-top: 20px; font-size: 0.8rem; color: #7c8a92; }

/* Table of use-cases / params icons */
.icon-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.icon-item { display: flex; gap: 12px; align-items: flex-start; }
.icon-dot {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

.cta-band {
  background: var(--brand);
  color: #fff;
  padding: 44px 0;
  text-align: center;
}
.cta-band h2 { margin: 0 0 10px; }
.cta-band p { color: #dcf0ea; margin: 0 0 22px; }

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .main-nav { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
}
