:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-alt: #f0f4fb;
  --text: #111827;
  --muted: #5b6473;
  --line: #dbe2ef;
  --brand: #0f172a;
  --brand-soft: #1e293b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
}

.top-nav a:hover {
  border-color: #b6c0d2;
}

.hero {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
}

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-copy p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
}

.hero-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.hero-gallery img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.btn-primary {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  border-radius: 12px;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 700;
  color: #ffffff;
  background: var(--brand);
}

.btn-primary:hover {
  background: var(--brand-soft);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 40px;
}

.section-block {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
}

.section-head {
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.product-card .price {
  margin-top: auto;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.btn-gradient {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  background-image: url("gradient.jpg");
  background-size: cover;
  background-position: center;
}

.btn-gradient:hover {
  filter: brightness(0.98);
}

.section-cta {
  text-align: center;
}

.section-cta h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.section-cta p {
  margin: 0 0 16px;
  color: var(--muted);
}

.btn-catalog {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid #c5cee0;
  background: #f2f6ff;
  color: #22304f;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-catalog:hover {
  background: #e7eefb;
}

.catalog-header {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.catalog-header h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 42px);
}

.catalog-header p {
  margin: 0;
  color: var(--muted);
}

.catalog-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 40px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}

.catalog-sidebar,
.catalog-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
}

.catalog-sidebar h3 {
  margin: 0 0 12px;
}

.catalog-nav {
  display: grid;
  gap: 8px;
}

.catalog-nav-btn {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.catalog-nav-btn.active {
  border-color: #9fb0cf;
  background: #eef3ff;
}

.catalog-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.catalog-crumb {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  padding: 6px 10px;
}

.catalog-crumb.btn {
  cursor: pointer;
  color: #2f405f;
  background: #f7faff;
}

.catalog-current-head h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.02em;
}

#catalog-current-desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  max-width: 860px;
}

.subcategory-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.subcategory-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.subcategory-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.subcategory-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.catalog-products-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.catalog-product-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.catalog-product-card h4 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.catalog-product-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.catalog-price {
  margin-top: auto;
  font-size: 22px;
  font-weight: 800;
}

.empty-block {
  margin-top: 12px;
  border: 1px dashed #c8d3e8;
  border-radius: 12px;
  padding: 14px;
  color: var(--muted);
  background: #fbfcff;
  font-size: 14px;
}

.faq-container {
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 40px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
}

.faq-item h3 {
  margin: 0 0 8px;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
}

.footer-inner {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner p {
  margin: 6px 0;
}

.payment-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e4ebf7;
  z-index: 1000;
}

.payment-modal-content {
  width: min(420px, calc(100% - 24px));
  background: #ffffff;
  color: var(--text);
  border-radius: 16px;
  border: 1px solid #d2d9e7;
  padding: 22px;
  text-align: center;
}

.payment-modal-content h3 {
  margin: 0 0 14px;
}

.payment-options {
  display: grid;
  gap: 10px;
}

.btn-payment {
  height: 42px;
  border: 1px solid #c5cee0;
  background: #f2f6ff;
  color: #22304f;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
}

.btn-close-modal {
  margin-top: 12px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #d3dae8;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  padding: 0 14px;
}

.btn-close-modal:hover,
.btn-payment:hover {
  filter: brightness(0.98);
}

header:not(.hero):not(.catalog-header) {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 12px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
}

header:not(.hero):not(.catalog-header) h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 42px);
}

header:not(.hero):not(.catalog-header) p {
  margin: 0 0 14px;
  color: var(--muted);
}

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .catalog-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .hero,
  .section-block,
  .catalog-header,
  .catalog-sidebar,
  .catalog-content {
    padding: 16px;
    border-radius: 14px;
  }

  .hero-gallery img {
    height: 140px;
  }

  .card-grid,
  .catalog-products-grid,
  .subcategory-grid {
    grid-template-columns: 1fr;
  }
}
