:root {
  --container-max-width: 1460px;
  --container-padding: 24px;
  --sidebar-width: 300px;
  --sidebar-gap: 24px;
  --section-gap: 40px;
  --grid-columns: 4;
  --grid-gap: 12px;
  --content-max-width: 800px;
  --border-radius: 8px;
  --content-top-padding: 48px;
  --header-height: 104px;
  --header-topbar-height: 28px;
  --header-logo-row-height: 76px;
  --header-nav-height: 48px;
  --logo-width: 200px;
  --logo-height: 40px;
  --search-width: 280px;
  --search-height: 50px;
  --header-icon-size: 20px;
  --header-elements-gap: 24px;
  --header-border-bottom: 3px;
  --menu-item-height: 40px;
  --menu-font-size: 14px;
  --menu-padding-x: 18px;
  --menu-icon-size: 16px;
  --menu-icon-gap: 12px;
  --menu-border-radius: 0px;
  --menu-item-gap: 6px;
  --menu-divider-width: 1px;
  --menu-nested-indent: 12px;
  --font-base-size: 14px;
  --h1-size: 44px;
  --h2-size: 28px;
  --h3-size: 26px;
  --nav-font-size: 17px;
  --item-title-size: 18px;
  --item-price-size: 24px;
  --line-height: 1.45;
  --font-weight-heading: 500;
  --letter-spacing: 0.2px;
  --accent-color: #b91c1c;
  --active-bg: #fef2f2;
}

* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--font-base-size, 15px);
  line-height: var(--line-height, 1.5);
  letter-spacing: var(--letter-spacing, 0px);
  margin: 0;
  color: #1e293b;
  background: #f8fafc;
}
.container {
  max-width: var(--container-max-width, 1280px);
  padding: 0 var(--container-padding, 20px);
  margin: 0 auto;
}

/* Header & Topbar */
.topbar {
  min-height: var(--header-topbar-height, 32px);
  background: var(--topbar-bg, #f1f5f9);
  color: var(--topbar-text, #475569);
  font-size: 12px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0;
}
.site-header {
  background: var(--header-bg, #ffffff);
  border-bottom: var(--header-border-bottom, 1px) solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.header-main-row {
  min-height: var(--header-logo-row-height, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--header-elements-gap, 16px);
  padding: 10px 0;
  flex-wrap: wrap;
}
.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #0f172a;
}
.brand-logo-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--border-radius, 8px);
  background: var(--accent-color, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}
.brand-title {
  font-weight: 800;
  font-size: 20px;
  color: var(--accent-color, #1d4ed8);
  line-height: 1.1;
}
.brand-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* Search */
.header-search {
  position: relative;
  width: 100%;
  max-width: var(--search-width, 380px);
}
.header-search input {
  width: 100%;
  height: var(--search-height, 42px);
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius, 8px);
  padding: 0 38px 0 14px;
  font-size: 14px;
  outline: none;
  background: #f8fafc;
}
.header-search input:focus {
  border-color: var(--accent-color, #1d4ed8);
  background: #ffffff;
}
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius, 8px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.search-results-dropdown a {
  display: block;
  padding: 9px 14px;
  color: #1e293b;
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
}
.search-results-dropdown a:hover {
  background: var(--active-bg, #eff6ff);
  color: var(--accent-color, #1d4ed8);
}

/* Contacts & Messengers */
.header-contacts {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.msg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--border-radius, 8px);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.15s;
}
.msg-tg { background: #e0f2fe; color: #0284c7; }
.msg-wa { background: #dcfce7; color: #16a34a; }
.msg-max { background: #f3e8ff; color: #7e22ce; }
.msg-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-primary {
  background: var(--accent-color, #1d4ed8);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--border-radius, 8px);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-primary:hover {
  background: var(--accent-hover, #1e40af);
}

/* Horizontal Nav */
.header-nav-bar {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  min-height: var(--header-nav-height, 44px);
  display: flex;
  align-items: center;
}
.header-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 8px 0;
}
.header-nav-links a {
  text-decoration: none;
  color: #334155;
  font-size: var(--nav-font-size, 14px);
  font-weight: 600;
}
.header-nav-links a:hover {
  color: var(--accent-color, #1d4ed8);
}

/* Layout Grid */
.layout-grid {
  display: flex;
  gap: var(--sidebar-gap, 28px);
  padding-top: var(--content-top-padding, 24px);
  padding-bottom: 60px;
  align-items: flex-start;
}
.sidebar {
  width: var(--sidebar-width, 260px);
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius, 8px);
  padding: 14px;
}
.catalog-header {
  min-height: var(--catalog-title-height, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
  padding: 0 8px 10px 8px;
  border-bottom: 2px solid var(--accent-color, #1d4ed8);
  margin-bottom: 12px;
}
.menu-group { margin-bottom: 14px; }
.menu-group-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius, 8px);
  padding: 10px;
  margin-bottom: 12px;
}
.menu-group-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-color, #1d4ed8);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.sidebar-item {
  min-height: var(--menu-item-height, 40px);
  font-size: var(--menu-font-size, 14px);
  padding: 6px var(--menu-padding-x, 12px);
  border-radius: var(--menu-border-radius, 6px);
  margin-bottom: var(--menu-item-gap, 2px);
  border-bottom: var(--menu-divider-width, 0px) solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: var(--menu-icon-gap, 10px);
  text-decoration: none;
  color: #1e293b;
  transition: all 0.15s ease;
}
.sidebar-item:hover, .sidebar-item.active {
  background: var(--active-bg, #eff6ff);
  color: var(--accent-color, #1d4ed8);
  font-weight: 600;
}
.hover-slide .sidebar-item:hover { padding-left: calc(var(--menu-padding-x, 12px) + 5px); }
.hover-border_left .sidebar-item:hover { border-left: 3px solid var(--accent-color, #1d4ed8); }

/* Main Content */
.main-content {
  max-width: var(--content-max-width, 960px);
  flex-grow: 1;
  min-width: 0;
}
.hero-banner {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 5px solid var(--accent-color, #1d4ed8);
  border-radius: var(--border-radius, 8px);
  padding: 24px 28px;
  margin-bottom: var(--section-gap, 36px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}
h1 { font-size: var(--h1-size, 32px); font-weight: var(--font-weight-heading, 700); margin: 0 0 12px 0; color: #0f172a; line-height: 1.2; }
h2 { font-size: var(--h2-size, 24px); font-weight: var(--font-weight-heading, 700); margin: 0 0 16px 0; color: #0f172a; }
h3 { font-size: var(--h3-size, 19px); font-weight: var(--font-weight-heading, 600); margin: 0 0 8px 0; }

/* Advantages */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: var(--section-gap, 36px);
}
.adv-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius, 8px);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.adv-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--active-bg, #eff6ff);
  color: var(--accent-color, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--grid-gap, 18px);
  margin-bottom: var(--section-gap, 36px);
}
.product-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius, 8px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s, box-shadow 0.15s;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  border-color: var(--accent-color, #1d4ed8);
}
.product-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--active-bg, #eff6ff);
  color: var(--accent-color, #1d4ed8);
  margin-bottom: 10px;
  align-self: flex-start;
}
.product-title {
  font-size: var(--item-title-size, 16px);
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  margin-bottom: 8px;
  display: block;
}
.product-meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 14px;
}
.product-price {
  font-size: var(--item-price-size, 20px);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
}

/* Order Form & FAQ */
.order-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius, 8px);
  padding: 24px;
  margin-bottom: var(--section-gap, 36px);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius, 8px);
  font-size: 14px;
}
.faq-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius, 8px);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  color: #0f172a;
}
.faq-item p {
  margin: 10px 0 0 0;
  font-size: 14px;
  color: #475569;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 40px 0 70px 0;
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.site-footer a { color: #94a3b8; text-decoration: none; display: block; margin-bottom: 6px; }
.site-footer a:hover { color: #ffffff; }

/* Mobile First & Sticky Bottom Bar */
.mobile-menu-toggle {
  display: none;
  background: var(--active-bg, #eff6ff);
  color: var(--accent-color, #1d4ed8);
  border: 1px solid var(--accent-color, #1d4ed8);
  padding: 8px 12px;
  border-radius: var(--border-radius, 8px);
  font-weight: 700;
  cursor: pointer;
}
.mobile-sticky-bar {
  display: none;
}
@media (max-width: 768px) {
  .layout-grid { flex-direction: column; }
  .sidebar { width: 100%; display: none; }
  .sidebar.open { display: block; }
  .mobile-menu-toggle { display: inline-flex; align-items: center; gap: 6px; }
  .header-search { max-width: 100%; order: 3; }
  .mobile-sticky-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #cbd5e1;
    padding: 8px 10px;
    gap: 8px;
    z-index: 60;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  }
  .mobile-sticky-bar a, .mobile-sticky-bar button {
    flex: 1;
    text-align: center;
    padding: 9px 6px;
    font-size: 12px;
    border-radius: 6px;
    font-weight: 700;
  }
}
