/* ========================================
   Прицепы-Лодки.бел — Основной стиль
   Современный адаптивный дизайн
======================================== */

:root {
  --primary: #0a4d8c;
  --primary-dark: #073a6b;
  --primary-light: #1a6bb5;
  --accent: #f39c12;
  --accent-hover: #e67e22;
  --text: #000;
  --text-light: #222;
  --bg: #f5f7fa;
  --white: #ffffff;
  --border: #e0e6ed;
  --success: #27ae60;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* ========== HEADER ========== */
.header {
  background: var(--white);
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: var(--primary);
  color: var(--white);
  font-size: 0.85rem;
  padding: 8px 0;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.header-top a {
  color: var(--white);
  opacity: 0.9;
}

.header-top a:hover {
  opacity: 1;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 12px;
  flex-wrap: nowrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--primary);
  flex-shrink: 0;
  white-space: nowrap;
  text-transform: uppercase;
}

.logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
}

.nav a {
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav a:hover,
.nav a.active {
  background: var(--primary);
  color: var(--white);
}

.header-phone {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  white-space: nowrap;
}

.header-phone .phone {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}

.header-phone .phone:hover {
  color: var(--primary-light);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 156, 18, 0.35);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--primary);
}

.btn-white:hover {
  background: #f0f4f8;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  width: 26px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ========== HERO ========== */
.hero {
  background: linear-gradient(135deg, #0a4d8c 0%, #1a6bb5 50%, #0d5a9e 100%);
  color: var(--white);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 30px;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.hero-features {
  display: flex;
  gap: 30px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.hero-feature span {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  border: 1px solid rgba(255,255,255,0.2);
  text-align: center;
  max-width: 380px;
}

.hero-card .emoji {
  font-size: 5rem;
  margin-bottom: 15px;
}

.hero-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.hero-card p {
  opacity: 0.85;
  font-size: 0.95rem;
}

/* ========== SECTIONS ========== */
.section {
  padding: 70px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title p {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ========== CATEGORIES ========== */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.category-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
  position: relative;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.category-card .icon {
  height: 140px;
  background: linear-gradient(135deg, #e8f1fa, #d0e4f5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.category-card .body {
  padding: 25px 20px;
}

.category-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.category-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.category-card .btn::after {
content: "";
position: absolute;
inset:0;
z-index: 1;
}


/* ========== PRODUCTS ========== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.product-card .image {
  height: 200px;
  background: linear-gradient(145deg, #e8f1fa, #c5daf0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  position: relative;
}

.product-card .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.product-card .body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text);
}

.product-card .specs {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 15px;
  flex: 1;
}

.product-card .price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.product-card .price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

.product-card .price small {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
}

/* ========== ADVANTAGES ========== */
.advantages {
  background: var(--white);
}

.adv-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.adv-item {
  text-align: center;
  padding: 10px 6px;
  flex: 1 1 0;
  min-width: 0;
}

.adv-item .icon {
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  color: white;
  margin: 0 auto 12px;
}

.adv-item h3 {
  font-size: 0.98rem;
  margin-bottom: 6px;
  color: var(--primary);
}

.adv-item p {
  color: var(--text-light);
  font-size: 0.82rem;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .adv-grid {
    flex-wrap: wrap;
  }
  .adv-item {
    flex: 1 1 30%;
  }
}

@media (max-width: 560px) {
  .adv-item {
    flex: 1 1 45%;
  }
}

/* ========== CTA ========== */
.cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  text-align: center;
  padding: 60px 0;
}

.cta h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.cta p {
  opacity: 0.9;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

/* ========== FOOTER ========== */
.footer {
  background: #0c2d4a;
  color: #c8d6e5;
  padding: 50px 0 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 18px;
}

.footer p, .footer a {
  font-size: 0.95rem;
  line-height: 1.8;
}

.footer a:hover {
  color: var(--accent);
}

.footer-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
  display: block;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-legal {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 10px;
  line-height: 1.5;
}

/* ========== PAGE HEADER ========== */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 50px 0;
  text-align: center;
}

.page-header h1 {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.page-header p {
  opacity: 0.9;
  font-size: 1.1rem;
}

/* ========== CONTACT FORM ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-info {
  background: var(--white);
  border-radius: var(--radius);
  padding: 35px;
  box-shadow: var(--shadow);
}

.contact-info h3 {
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.contact-item {
  display: flex;
  gap: 15px;
  margin-bottom: 22px;
  align-items: flex-start;
}

.contact-item .icon {
  width: 44px;
  height: 44px;
  background: #e8f1fa;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  margin-bottom: 2px;
}

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 35px;
  box-shadow: var(--shadow);
}

.contact-form h3 {
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: #fafbfc;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(10, 77, 140, 0.12);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* ========== PRODUCT DETAIL ========== */
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.product-gallery {
  background: linear-gradient(145deg, #e8f1fa, #c5daf0);
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  overflow: hidden;
  width: 100%;
}

.product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.product-info {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-info h2 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 10px;
  line-height: 1.25;
}

.product-info .price {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--primary);
  margin: 15px 0;
}

.product-info .specs-list {
  margin: 20px 0;
  width: 100%;
}

.product-info .specs-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.product-info .specs-list li span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-info .specs-list li span:first-child {
  color: var(--text-light);
}

.product-info .specs-list li span:last-child {
  text-align: right;
  font-weight: 600;
}

.product-info .actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.content-block {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}

.content-block p {
  max-width: 100%;
}

/* ========== FILTERS ========== */
.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  align-items: start;
}

.filters {
  background: var(--white);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 90px;
  align-self: start;
  width: 100%;
  height: fit-content;
  z-index: 5;
}

.filters h3 {
  margin-bottom: 18px;
  color: var(--primary);
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 0.95rem;
}

.filter-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* ========== CONTENT PAGES ========== */
.content-block {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  max-width: 900px;
  margin: 0 auto;
}

.content-block h2 {
  color: var(--primary);
  margin: 30px 0 15px;
  font-size: 1.4rem;
}

.content-block h2:first-child {
  margin-top: 0;
}

.content-block p, .content-block li {
  margin-bottom: 12px;
  color: var(--text-light);
  line-height: 1.7;
}

.content-block ul {
  padding-left: 20px;
  list-style: disc;
}

.content-block ol {
  padding-left: 20px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content p {
    margin: 0 auto 30px;
  }
  .hero-buttons, .hero-features {
    justify-content: center;
  }
  .hero-image {
    display: flex;
    margin-top: 6px;
  }
  .hero-card {
    max-width: 460px;
    width: 100%;
    padding: 22px 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .contact-grid, .product-detail, .catalog-layout {
    grid-template-columns: 1fr;
  }
  .filters {
    position: static;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  }
  .nav.open {
    display: flex;
  }
  .burger {
    display: flex;
  }
  .header-phone {
    display: none;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .section-title h2 {
    font-size: 1.7rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== UTILS ========== */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }

.product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.product-card .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}
.product-card .image {
  position: relative;
}


/* ========== PRODUCT GALLERY ========== */
.product-gallery-wrap {
  min-width: 0;
  width: 100%;
}

.product-gallery {
  position: relative;
  background: #1a1a1a;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-gallery img#gallery-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: #0a4d8c;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: background 0.2s;
}

.gallery-nav:hover {
  background: #fff;
}

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gallery-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #eee;
  opacity: 0.75;
  transition: opacity 0.2s, border-color 0.2s;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  opacity: 1;
  border-color: var(--primary);
}

.product-card {
  cursor: pointer;
}

.product-card a.btn {
  position: relative;
  z-index: 2;
}


/* ========== MAP (Yandex) ========== */
.map-section {
  width: 100%;
}

.map-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-frame {
  position: relative;
  width: 100%;
  border-radius: var(--radius, 12px);
  overflow: hidden;
  box-shadow: var(--shadow, 0 4px 20px rgba(0,0,0,0.08));
  background: #e8eef5;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  max-height: 480px;
}

.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 768px) {
  .map-frame {
    aspect-ratio: 4 / 3;
    min-height: 260px;
  }
  .map-actions {
    width: 100%;
  }
  .map-actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }
}


.map-inline {
  margin-top: 16px;
  width: 100%;
}

.map-frame--compact {
  aspect-ratio: 4 / 3;
  min-height: 220px;
  max-height: 320px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.88rem;
}

.contact-info .map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 992px) {
  .map-frame--compact {
    min-height: 260px;
    max-height: 360px;
  }
}


/* ========== CATALOG TOOLBAR ========== */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.catalog-count {
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
}

.catalog-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: #333;
}

.catalog-sort-wrap select {
  padding: 8px 12px;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  background: #fff;
  font-size: 0.92rem;
  color: #222;
  cursor: pointer;
}

.filter-actions {
  margin-top: 18px;
}

.filters .btn-outline {
  background: transparent;
}


.filters-count {
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--primary, #0a4d8c);
}


/* ========== FAVORITES ========== */
.product-card {
  position: relative;
}
.fav-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: #bbb;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.fav-heart:hover { color: #e53935; }
.fav-heart.is-fav { color: #e53935; }
.fav-btn.is-fav {
  border-color: #e53935;
  color: #e53935;
}
.nav-fav {
  white-space: nowrap;
}
.nav a.nav-fav {
  padding-left: 8px;
  padding-right: 8px;
}
.fav-badge {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 10px;
  background: #e53935;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  vertical-align: middle;
}
.favorites-empty {
  text-align: center;
  padding: 40px 20px;
  color: #555;
}
.favorites-empty .btn { margin-top: 12px; }

/* ========== FAQ ========== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--white, #fff);
  border-radius: 12px;
  box-shadow: var(--shadow, 0 2px 12px rgba(0,0,0,0.06));
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 48px 18px 20px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary, #0a4d8c);
  cursor: pointer;
  position: relative;
}
.faq-q::after {
  content: '+';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: #555;
}
.faq-item.open .faq-q::after { content: '−'; }
.faq-a {
  display: none;
  padding: 0 20px 18px;
  color: #444;
  line-height: 1.55;
}
.faq-item.open .faq-a { display: block; }
.faq-note {
  margin-top: 28px;
  text-align: center;
  color: #555;
}

@media (max-width: 1100px) {
  .nav a {
    padding: 7px 7px;
    font-size: 0.85rem;
  }
  .logo {
    font-size: 1.05rem;
  }
  .header-phone .phone {
    font-size: 0.95rem;
  }
  .header-phone small {
    font-size: 0.75rem;
  }
}


.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.footer-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}


/* ========== MESSENGERS ========== */
.messenger-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.msg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff !important;
  text-decoration: none !important;
  transition: transform 0.15s, opacity 0.15s;
}
.msg-btn:hover { transform: translateY(-1px); opacity: 0.92; }
.msg-tg { background: #229ED9; }
.msg-vb { background: #7360f2; }
.msg-wa { background: #25D366; }
.msg-call { background: var(--primary, #0a4d8c); }

.messenger-links--product {
  margin-top: 14px;
}

/* Floating contact bar */
.float-messengers {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.float-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  text-decoration: none !important;
}
.float-call { background: #0a4d8c; font-size: 1.2rem; }
.float-tg { background: #229ED9; }
.float-vb { background: #7360f2; }
.float-wa { background: #25D366; }
.float-btn:hover { transform: scale(1.06); }

@media (min-width: 993px) {
  /* On desktop keep visible but slightly softer */
  .float-messengers { bottom: 24px; right: 24px; }
}


/* ========== MESSENGER CIRCLES (логотипы в кружках) ========== */
.msg-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none !important;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
  transition: transform 0.15s, box-shadow 0.15s;
}
.msg-circle img { width: 24px; height: 24px; display: block; }
.msg-circle:hover { transform: translateY(-2px) scale(1.06); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
.msg-circle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.msg-circle--tg { background: #229ED9; }
.msg-circle--vb { background: #7360f2; }
.msg-circle--wa { background: #25D366; }
.msg-circle--call { background: var(--primary, #0a4d8c); }

.messenger-links--circles { gap: 14px; align-items: flex-start; }
.messenger-links--circles .msg-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.msg-caption { font-size: 0.75rem; color: #555; }
.messenger-links--product { align-items: center; }
.msg-hint { font-size: 0.9rem; color: #555; margin-right: 2px; }

/* Плавающая панель */
.float-messengers { gap: 10px; }
.float-messengers .msg-circle { width: 52px; height: 52px; box-shadow: 0 4px 14px rgba(0,0,0,0.28); }
.float-messengers .msg-circle img { width: 27px; height: 27px; }
@media (max-width: 992px) {
  .float-messengers { right: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); gap: 8px; }
  .float-messengers .msg-circle { width: 48px; height: 48px; }
  body { padding-bottom: 8px; }
}

/* Окно заявки */
.lead-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lead-modal[hidden] { display: none; }
.lead-backdrop { position: absolute; inset: 0; background: rgba(7, 30, 55, 0.6); }
.lead-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 100%;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  box-sizing: border-box;
}
.lead-dialog h3 { margin: 0 28px 4px 0; color: var(--primary); font-size: 1.15rem; }
.lead-model {
  display: inline-block;
  background: #eef5fc;
  color: var(--primary-dark, #073a6b);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}
.lead-close {
  position: absolute; top: 8px; right: 10px;
  width: 36px; height: 36px;
  border: 0; background: transparent;
  font-size: 1.9rem; line-height: 1; color: #888; cursor: pointer; border-radius: 50%;
}
.lead-close:hover { background: #f1f1f1; color: #333; }
.lead-form label { display: block; font-size: 0.8rem; font-weight: 600; color: #111; margin-bottom: 8px; }
.lead-form input, .lead-form textarea {
  display: block; width: 100%; box-sizing: border-box;
  margin-top: 3px; padding: 8px 10px;
  border: 1.5px solid #d5dde6; border-radius: 10px;
  font: inherit; font-size: 0.95rem; font-weight: 400; color: #111;
}
.lead-form input:focus, .lead-form textarea:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(26,107,181,0.15); }
.lead-form textarea { resize: vertical; min-height: 52px; height: 52px; }
.lead-submit { width: 100%; padding: 10px; font-size: 1rem; cursor: pointer; }
.lead-submit:disabled { opacity: 0.7; cursor: default; }
.lead-status { min-height: 2.6em; margin: 6px 0 0; font-size: 0.8rem; line-height: 1.3; }
.lead-status.is-ok { color: #1b8a3b; font-weight: 600; }
.lead-status.is-error { color: #c62828; }
.lead-or { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; color: #444; font-size: 0.82rem; }
.lead-or::before, .lead-or::after { content: ""; flex: 1; height: 1px; background: #e3e8ee; }
.lead-circles { display: flex; justify-content: center; gap: 12px; }
.lead-circles .msg-circle { width: 42px; height: 42px; }
body.lead-open { overflow: hidden; }
.lead-open .float-messengers { display: none; }
@media (max-width: 480px) {
  .lead-modal { align-items: flex-end; padding: 0; }
  .lead-dialog { border-radius: 18px 18px 0 0; max-width: none; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
}

/* Мобильная нижняя панель связи (вместо колонки поверх контента) */
@media (max-width: 768px) {
  .float-messengers {
    left: 0; right: 0; bottom: 0;
    flex-direction: row;
    justify-content: space-evenly;
    gap: 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,0.97);
    border-top: 1px solid #e3e8ee;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  }
  .float-messengers .msg-circle { width: 46px; height: 46px; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
  .float-messengers .msg-circle img { width: 25px; height: 25px; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}

/* Страница товара: кнопки действий и мессенджеры */
.product-info .actions { align-items: stretch; }
.product-info .actions .btn { text-align: center; justify-content: center; cursor: pointer; }
.messenger-links--product .msg-hint { flex-basis: 100%; margin: 0 0 2px; }
.product-info .specs-list li { gap: 12px; }
.product-info .specs-list li span:first-child { overflow-wrap: normal; word-break: normal; hyphens: manual; }
@media (max-width: 600px) {
  .product-info .actions #product-write { flex: 1 1 100%; padding: 14px; font-size: 1.05rem; }
  .product-info .actions .btn-outline { flex: 1 1 calc(50% - 6px); padding-left: 10px; padding-right: 10px; }
}


/* ========== Страница товара: сгруппированный блок связи ========== */
.product-cta {
  margin-top: 22px;
  padding: 16px;
  background: #f5f9fd;
  border: 1px solid #dfe9f4;
  border-radius: 14px;
}
.product-cta .cta-main { display: flex; gap: 10px; flex-wrap: wrap; }
.product-cta .cta-main .btn { flex: 1 1 0; min-width: 140px; justify-content: center; text-align: center; cursor: pointer; white-space: nowrap; }
.product-cta .cta-main #product-write { flex: 1.4 1 0; }
.product-cta .js-call.is-revealed { background: var(--primary); color: #fff; user-select: all; }
.product-cta .cta-messengers { margin-top: 16px; padding-top: 14px; border-top: 1px dashed #cfdceb; }
.product-cta .cta-title { font-size: 0.88rem; font-weight: 600; color: #4a5a6a; margin-bottom: 10px; }
.product-cta .messenger-links { margin-top: 0; }
.msg-circle--mail { background: var(--accent, #f39c12); }
@media (max-width: 600px) {
  .product-cta { padding: 14px; }
  .product-cta .cta-main #product-write { flex: 1 1 100%; padding: 14px; font-size: 1.05rem; }
  .product-cta .cta-main .btn:not(#product-write) { flex: 1 1 calc(50% - 5px); min-width: 0; padding-left: 8px; padding-right: 8px; }
}

/* Всплывающая подсказка с номером (компьютер, кружок «Позвонить») */
.phone-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  z-index: 2100; display: flex; align-items: center; gap: 14px;
  background: #0b2f55; color: #fff; padding: 12px 16px; border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.3); font-size: 0.95rem;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.phone-toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.phone-toast strong { font-size: 1.05rem; user-select: all; }
.phone-toast-copy { border: 0; background: var(--accent, #f39c12); color: #fff; font-weight: 600; padding: 7px 12px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 0.85rem; }

/* Поле-ловушка для спам-ботов (людям не видно) */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.lead-circles { gap: 12px; }
.lead-circles .msg-circle { width: 48px; height: 48px; }

/* Плавающая панель связи — только на телефоне/планшете (на компьютере контакты есть в шапке и на странице) */
@media (min-width: 769px) {
  .float-messengers { display: none !important; }
}

/* Характеристики: слова не рвём посередине */
@media (max-width: 600px) {
  .product-info .specs-list li { grid-template-columns: fit-content(52%) minmax(0, 1fr); }
  .product-info .specs-list li span:last-child { overflow-wrap: break-word; word-break: normal; }
}


/* Улучшения интерфейса: поиск, мобильная ширина и удобные контакты */
@media (min-width: 993px) {
  .float-messengers { flex-direction: column !important; right: 18px; bottom: 50%; transform: translateY(50%); }
  .filters { top: 105px; max-height: calc(100vh - 125px); overflow-y: auto; overscroll-behavior: contain; }
}
.phone-toast { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, calc(-50% + 16px)); max-width: min(92vw, 520px); flex-wrap: wrap; justify-content: center; text-align: center; overflow-wrap: anywhere; }
.phone-toast.is-visible { transform: translate(-50%, -50%); }
.phone-toast strong { overflow-wrap: anywhere; }
@media (max-width: 768px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .container { padding-left: 16px; padding-right: 16px; }
  .contact-form, .contact-item, .contact-info, .contacts-content, .contact-layout, iframe, .map-container { max-width: 100%; min-width: 0; }
  .contact-form { padding: 20px 16px; }
  .messenger-links { flex-wrap: wrap; }
  .phone-toast { width: calc(100vw - 28px); gap: 8px; }
}

/* Контакты собраны в единую аккуратную панель */
.contact-info {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.contact-info > h3 { margin-bottom: 22px; color: var(--primary); }
.contact-info .contact-item > div:last-child { min-width: 0; overflow-wrap: anywhere; }
.contact-info .contact-item a { overflow-wrap: anywhere; }
.contact-info .map-inline { max-width: 100%; }
.contact-info .map-inline iframe { width: 100%; max-width: 100%; }
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 18px; }
  .contact-info { padding: 18px 14px; }
  .contact-info .contact-item { gap: 10px; }
  .contact-info .icon { flex: 0 0 38px; width: 38px; height: 38px; }
  .map-inline, .map-inline iframe { width: 100% !important; max-width: 100% !important; }
}

@media (min-width: 769px) { .float-messengers { display: flex !important; } }


/* Главная: более компактная вертикальная композиция на компьютере */
.home-page .hero {
  padding-top: 54px;
  padding-bottom: 62px;
}
.home-page section {
  padding-top: 48px;
  padding-bottom: 48px;
}
.home-page .section-title {
  margin-bottom: 30px;
}
@media (min-width: 993px) {
  .home-page .hero {
    padding-top: 54px;
    padding-bottom: 62px;
  }
  .home-page section {
    padding-top: 46px;
    padding-bottom: 46px;
  }
}
@media (max-width: 992px) {
  .home-page .hero {
    padding-top: 44px;
    padding-bottom: 48px;
  }
  .home-page section {
    padding-top: 38px;
    padding-bottom: 38px;
  }
}

.phone-toast { position: fixed; }
.phone-toast-close {
  position: absolute; top: 5px; right: 8px;
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: transparent; color: inherit; font-size: 24px; line-height: 1;
  cursor: pointer;
}
.phone-toast { padding-right: 38px; }


/* ========== ПОИСК: одинаковая полоса на всех страницах, под верхним баннером ========== */
.search-strip { padding: 30px 0 4px; }
.site-search {
  position: relative; display: flex; align-items: center; gap: 0;
  width: 100%; max-width: 720px; margin: 0 auto;
  background: #fff; border: 1.5px solid #d6e0eb; border-radius: 999px;
  box-shadow: 0 6px 22px rgba(10, 77, 140, 0.08);
  padding: 5px 5px 5px 18px;
  transition: border-color .2s, box-shadow .2s;
}
.site-search:focus-within { border-color: var(--primary-light); box-shadow: 0 8px 26px rgba(10, 77, 140, 0.16); }
.site-search-icon { flex: 0 0 20px; width: 20px; height: 20px; color: #7b8da1; margin-right: 10px; }
.site-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 1rem; color: #1f2d3d; padding: 11px 4px;
  -webkit-appearance: none; appearance: none;
}
.site-search input::placeholder { color: #8a99ab; }
.site-search button {
  flex: 0 0 auto; border: 0; border-radius: 999px; background: var(--primary); color: #fff;
  font: inherit; font-weight: 700; padding: 11px 26px; cursor: pointer; transition: background .2s;
}
.site-search button:hover { background: var(--primary-dark, #073a6b); }
@media (max-width: 600px) {
  .search-strip { padding: 22px 0 0; }
  .site-search { padding-left: 14px; }
  .site-search input { font-size: 16px; }
  .site-search button { padding: 11px 18px; }
}

/* Пустой результат поиска */
.catalog-empty { text-align: center; padding: 48px 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 20px; }
.catalog-empty[hidden] { display: none; }
.catalog-empty-icon { font-size: 2.6rem; margin-bottom: 6px; }
.catalog-empty h3 { color: var(--primary); margin-bottom: 8px; }
.catalog-empty p { color: #667; max-width: 460px; margin: 0 auto 18px; }
.catalog-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ========== ФОТО: просмотр на весь экран ========== */
.product-gallery.is-zoomable { cursor: zoom-in; }
.product-gallery.is-zoomable::after {
  content: "🔍 Увеличить"; position: absolute; right: 12px; bottom: 12px; z-index: 1;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 0.82rem; font-weight: 600;
  padding: 6px 11px; border-radius: 999px; pointer-events: none;
}
.lb { position: fixed; inset: 0; z-index: 3000; background: #070c12; display: flex; flex-direction: column; }
.lb[hidden] { display: none; }
.lb-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); color: #fff; flex: 0 0 auto; }
.lb-counter { margin-right: auto; font-weight: 600; font-size: 0.95rem; opacity: 0.9; }
.lb-btn {
  border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; width: 44px; height: 44px;
  border-radius: 50%; font-size: 1.5rem; line-height: 1; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; transition: background .2s;
}
.lb-btn:hover, .lb-btn:focus-visible { background: rgba(255, 255, 255, 0.28); outline: none; }
.lb-close { font-size: 2rem; }
.lb-zoom { font-size: 1.15rem; }
.lb-stage { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; -webkit-overflow-scrolling: touch; }
.lb-img {
  margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; cursor: zoom-in; user-select: none; -webkit-user-drag: none;
}
.lb.is-zoomed .lb-stage { display: block; }
.lb.is-zoomed .lb-img { max-width: none; max-height: none; cursor: zoom-out; margin: 0; }
.lb.is-loading .lb-img { opacity: 0.4; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; z-index: 2; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb.is-zoomed .lb-nav { display: none; }
.lb-caption { flex: 0 0 auto; color: rgba(255, 255, 255, 0.85); text-align: center; font-size: 0.9rem; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
body.lb-open { overflow: hidden; }
body.lb-open .float-messengers { display: none !important; }
@media (max-width: 600px) {
  .lb-nav { width: 44px; height: 44px; font-size: 1.7rem; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
}
/* Ошибки в форме заявки */
.lead-form input.is-invalid,
.lead-form input.is-invalid:focus,
.lead-form textarea.is-invalid {
  border-color: #c62828;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.12);
}
.lead-form .consent.is-invalid { color: #c62828; }
.lead-form .consent.is-invalid input { outline: 2px solid #c62828; outline-offset: 2px; }
/* Галочка согласия (вид как раньше) */
.consent,
.lead-form .consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 14px;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  color: #333;
  cursor: pointer;
}
.consent input,
.lead-form .consent input,
.contact-form .consent input {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  padding: 0;
  margin: 3px 0 0;
  border: 0;
  box-shadow: none;
  cursor: pointer;
  accent-color: #d97706;
}
.consent a,
.lead-form .consent a {
  color: #d97706;
  text-decoration: underline;
}