:root {
  --container: 1200px;
  --accent: #ff4a4a;
  --blue: #0a3d91;
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --text: #0f172a;
  --muted: #64748b;
  --bg: #ffffff;
  --line: #e2e8f0;
  --card: #f8fafc;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(10, 61, 145, 0.12);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  margin: 0;
  scroll-behavior: smooth;
}
body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #0f172a;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  font-weight: 800;
  letter-spacing: 0.3px;
  font-size: 1.25rem;
}
/* Logo image in header */
.brand img.logo {
  height: 40px;
  display: block;
}

@media (max-width: 768px) {
  .brand img.logo {
    height: 34px;
  }
}

/* Hero inner layout for index page */
.product-hero .hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 768px) {
  .product-hero .hero-inner {
    grid-template-columns: 1fr;
  }

  .product-hero .hero-image {
    margin-top: 1rem;
  }
}

.product-hero .hero-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav a {
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  opacity: 0.9;
  font-weight: 500;
  transition: all 0.3s ease;
}
nav a:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.phone {
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
}
.phone:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Burger */
.burger {
  display: none;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}
.burger:hover {
  background: rgba(255, 255, 255, 0.15);
}
.burger i {
  font-size: 24px;
}

/* Mobile menu */
.mobile-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: 78vw;
  max-width: 360px;
  background: #0f172a;
  color: #fff;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 60;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}
.mobile-panel header {
  position: unset;
  border: 0;
  background: #0f172a;
}
.mobile-panel .list {
  display: flex;
  flex-direction: column;
  padding: 24px;
  flex-grow: 1;
}
.mobile-panel .list a {
  color: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 1.125rem;
  transition: all 0.3s ease;
}
.mobile-panel .list a:hover {
  background: rgba(255, 255, 255, 0.1);
}
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 55;
}
body.menu-open .mobile-panel {
  transform: translateX(0);
}
body.menu-open .scrim {
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}
.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: #fff;
  filter: brightness(1);
}

/* Sections */
section {
  padding: 80px 0;
}
.h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--text);
}
.sub {
  color: var(--muted);
  font-size: 1.125rem;
  margin: 0 0 2rem;
  line-height: 1.6;
}

/* Product page styles */
.product-hero {
  padding: 100px 0 60px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
}

.product-details {
  padding: 80px 0;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.spec-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.spec-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.spec-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.spec-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.spec-item li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
  color: var(--muted);
}

.spec-item li:last-child {
  border-bottom: none;
}

/* Gallery */
.gallery-section {
  padding: 80px 0;
  background: #f8fafc;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Table styles */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.spec-table th {
  background: var(--primary);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.spec-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table tr:hover {
  background: #f8fafc;
}

/* Telegram float */
.telegram-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #229ed9;
  color: #fff;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: 0.3s;
  z-index: 9999;
}
.telegram-float:hover {
  background: #1c8ec5;
  transform: scale(1.1);
  color: #fff;
}

/* Contact CTA (shared) - moved from index.html so every page uses same styles */
.contact-cta {
  padding: 80px 0;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  text-align: center;
}

.contact-cta h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.contact-cta p {
  font-size: 1.125rem;
  color: #e2e8f0;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: white;
  color: #1e40af;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.125rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  color: #1e40af;
}

/* Footer */
footer {
  padding: 60px 0 40px;
  background: #0f172a;
  color: #9aa3b2;
}
footer .container {
  padding: 0 20px;
}

.social-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}
.social-row a {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  transition: 0.3s;
}
.social-row a:hover {
  transform: translateY(-2px);
  background: var(--primary);
  color: #fff;
}

/* Лайтбокс */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
#lightbox img {
  max-width: 94vw;
  max-height: 90vh;
  border-radius: 10px;
  object-fit: contain;
}
#lightbox.closezone {
  cursor: zoom-out;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 1.5rem 0;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.breadcrumbs ol {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
  align-items: center;
}

.breadcrumbs a {
  color: var(--muted);
  transition: color 0.3s ease;
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--muted);
}

/* Адаптив */
@media (max-width: 1000px) {
  .container {
    padding: 0 24px;
  }

  .h2 {
    font-size: 2rem;
  }

  .specs-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav {
    height: 64px;
  }

  .brand {
    font-size: 1.125rem;
  }

  nav ul {
    display: none;
  }

  .burger {
    display: flex;
  }

  .phone {
    padding: 6px 12px;
    font-size: 0.875rem;
  }

  /* Show phone number on mobile in header (clickable) */
  .phone span {
    display: inline-block;
    margin-left: 6px;
    white-space: nowrap;
  }

  section {
    padding: 60px 0;
  }

  .h2 {
    font-size: 1.75rem;
  }

  .sub {
    font-size: 1rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .spec-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  .h2 {
    font-size: 1.5rem;
  }

  .btn {
    padding: 14px 24px;
    font-size: 0.9375rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .telegram-float {
    width: 56px;
    height: 56px;
    font-size: 28px;
    right: 16px;
    bottom: 16px;
  }
}

/* Additional responsive fixes for product pages */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

/* Ensure grid-2 collapses on small screens */
@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  /* Tighter images on small screens */
  .main-image img {
    max-height: 50vh;
    height: auto;
  }
}

/* Prevent long strings from breaking layout */
body,
.container,
.product-hero,
.product-details,
.spec-section,
.card {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Defensive: hide accidental horizontal overflow while keeping vertical scroll */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
