:root {
  --primary: #a9222c;
  --primary-hover: #8f1c24;
  --primary-soft: #fdf2f3;
  --dark: #1e2530;
  --dark-surface: #262f3d;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --border: #dbe2ea;
  --text: #202734;
  --muted: #5e6d82;
  --accent-gold: #c28830;
  --success: #15803d;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
  --max-w: 1220px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

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

/* Top bar */
.topbar {
  background: var(--dark);
  color: #c9d3e0;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.topbar a { color: #ffffff; font-weight: 600; }
.topbar a:hover { color: #ffa6ac; text-decoration: none; }

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dark);
  text-decoration: none !important;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0.02em;
  color: var(--dark);
}
.brand-text small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}
.nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.nav a:hover { color: var(--primary); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
  text-decoration: none !important;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(169, 34, 44, 0.24);
}
.btn-outline {
  background: var(--surface);
  color: var(--dark);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-xs { padding: 5px 10px; font-size: 12px; font-weight: 600; }

/* Hero */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 36px 0 32px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 28px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin: 0 0 8px;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--dark);
}
.hero p.lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 16px;
}
.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.pill {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(169, 34, 44, 0.16);
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.hero-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.hero-card h3 { margin: 0 0 10px; font-size: 16px; color: var(--dark); }
.hero-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.hero-card li { margin-bottom: 7px; }

/* Sections */
.section { padding: 34px 0; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}
.section-head h2 { margin: 0; font-size: 24px; font-weight: 800; color: var(--dark); }
.section-head p { margin: 0; color: var(--muted); font-size: 14px; }

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Product Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.card-img-wrap {
  aspect-ratio: 4 / 3;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  cursor: zoom-in;
}
.card-img-wrap img {
  max-height: 100%;
  object-fit: contain;
}
.card-placeholder {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 16px;
}
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--dark);
}
.card-specs-mini {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
  flex: 1;
}
.card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.price {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
}
.price-note { font-size: 12px; color: var(--muted); }
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Table */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--dark);
  font-size: 13px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbfc; }

/* Table thumbnail */
.thumb-btn {
  width: 48px;
  height: 48px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.thumb-btn:hover {
  border-color: var(--primary);
  transform: scale(1.06);
}
.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.thumb-empty {
  width: 48px;
  height: 48px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--muted);
  text-align: center;
}

/* Product Page */
.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0 12px;
}
.pdp-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  align-items: start;
}
.pdp-gallery {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
}
.pdp-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.pdp-box h1 { margin: 0 0 8px; font-size: 24px; line-height: 1.25; color: var(--dark); }
.pdp-sku { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.calc-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}
.calc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}
.qty-input {
  width: 90px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 16px;
}
.tag {
  background: #eef2f6;
  color: var(--dark);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
}
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 4px;
}
.color-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.color-chip:hover {
  border-color: var(--primary);
}
.color-chip.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}
.card-color-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.card-color-dot {
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.22);
  cursor: pointer;
  flex-shrink: 0;
  transition: box-shadow 0.12s ease;
}
.card-color-dot:hover {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(169, 34, 44, 0.55);
}
.card-color-dot.active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--primary);
}
.card-color-name {
  font-size: 11px;
  color: var(--muted);
  margin-left: 4px;
  font-weight: 600;
}
.rfq-btn-wrap {
  display: flex;
  width: 100%;
}
.rfq-btn-wrap > .btn {
  width: 100%;
}
.rfq-btn-wrap-xs {
  display: inline-flex;
  width: auto;
}
.rfq-btn-wrap-xs > .btn {
  width: auto;
}
.rfq-stepper {
  display: none;
  align-items: stretch;
  width: 100%;
  height: 36px;
  border: 1.5px solid var(--primary);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}
.rfq-stepper-xs {
  width: 98px;
  height: 29px;
  border-radius: 6px;
}
.rfq-step-btn {
  width: 32px;
  border: none;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.12s ease, color 0.12s ease;
}
.rfq-stepper-xs .rfq-step-btn {
  width: 26px;
  font-size: 14px;
}
.rfq-step-btn:hover {
  background: var(--primary);
  color: #fff;
}
.rfq-step-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: none;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  background: #fff;
  padding: 0 2px;
  -moz-appearance: textfield;
}
.rfq-stepper-xs .rfq-step-input {
  font-size: 12px;
}
.rfq-step-input::-webkit-outer-spin-button,
.rfq-step-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.rfq-step-input:focus {
  outline: none;
  background: #fff8f8;
}
.color-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}
.toast-msg {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--dark);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.2s ease;
}
.toast-msg.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* FAQ */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq-item h3 { margin: 0 0 6px; font-size: 15px; color: var(--dark); }
.faq-item p { margin: 0; color: var(--muted); font-size: 14px; }

/* Modals (RFQ + Lightbox) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: 10px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.modal-head h2 { margin: 0; font-size: 20px; color: var(--dark); }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

.lightbox-box {
  background: #fff;
  border-radius: 10px;
  max-width: 780px;
  width: 100%;
  padding: 16px;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.lightbox-box img {
  max-height: 75vh;
  margin: 0 auto;
  object-fit: contain;
}
.lightbox-caption {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
}
.lightbox-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* Footer */
.footer {
  background: var(--dark);
  color: #c9d3e0;
  padding: 34px 0;
  margin-top: 40px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}
.footer h4 { color: #fff; margin: 0 0 10px; font-size: 15px; }
.footer a { color: #c9d3e0; }
.footer a:hover { color: #fff; }

/* Articles / Guides */
.article-wrap {
  max-width: 860px;
  margin: 0 auto;
}
.article-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eef2f6;
}
.article-head {
  padding: 22px 26px;
}
.article-head h1 {
  margin: 6px 0 10px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  color: var(--dark);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.article-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  font-size: 16px;
  line-height: 1.68;
}
.article-body h2 {
  margin: 26px 0 10px;
  font-size: 21px;
  color: var(--dark);
}
.article-body h2:first-child { margin-top: 0; }
.article-body p { margin: 0 0 14px; }
.article-body ul { margin: 0 0 16px; padding-left: 20px; }
.article-body li { margin-bottom: 6px; }
.callout {
  border-left: 4px solid var(--primary);
  background: var(--primary-soft);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 18px 0;
  font-size: 15px;
}
.callout-gold {
  border-left-color: var(--accent-gold);
  background: #fef9ee;
}
.callout strong { color: var(--dark); }
.inline-product {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0;
}
.inline-product img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px;
  flex-shrink: 0;
  cursor: zoom-in;
}
.inline-product-info { flex: 1; font-size: 14px; }
.inline-product-info a { font-weight: 700; color: var(--dark); }
.inline-product-info a:hover { color: var(--primary); }

/* Contacts & Requisites (minimalist, symmetric) */
.contacts-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.contact-card-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.contact-card-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}
.contact-card-sub {
  font-size: 13px;
  color: var(--muted);
}
.req-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.req-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}
.req-head h2 { margin: 0; font-size: 18px; color: var(--dark); }
.req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.req-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 24px;
  border-bottom: 1px solid #eef2f6;
}
.req-item:nth-child(odd) {
  border-right: 1px solid #eef2f6;
}
.req-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.req-val {
  font-size: 14px;
  color: var(--dark);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .hero-grid, .grid-3, .pdp-grid, .footer-grid, .contacts-cards, .req-grid {
    grid-template-columns: 1fr;
  }
  .req-item:nth-child(odd) { border-right: none; }
  .inline-product { flex-direction: column; align-items: flex-start; }
  .article-body { padding: 18px; }
}
