/* Base styles */
:root {
  --primary: #1e3a8a;
  --primary-hover: #1e40af;
  --text: #1f2937;
  --text-light: #6b7280;
  --background: #f9fafb;
  --white: #ffffff;
  --border: #e5e7eb;
}
* {
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.header {
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 50;
}

.header-content {
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}

.desktop-nav {
  display: none;
}

.contact-info {
  display: none;
}

.menu-button {
  background: var(--primary);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(30,58,138,0.08);
  transition: background 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 100;
}
.menu-button .icon {
  stroke: #fff;
  width: 1.5rem;
  height: 1.5rem;
}
.menu-button:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 16px rgba(30,58,138,0.12);
}

.mobile-menu {
  display: none;
  padding: 1rem 0;
}

.mobile-menu.active {
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Hero Section */
.hero {
  height: 100vh;
  background-image: url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?ixlib=rb-1.2.1&auto=format&fit=crop&w=2000&q=80');
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  padding-top: 5rem;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  color: var(--white);
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
}

.cta-button:hover {
  background: var(--primary-hover);
}

/* Products Section */
.products {
  padding: 5rem 0;
  background: var(--background);
}

.products h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--white);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  cursor: pointer;
}

.product-card:hover {
  transform: scale(1.05);
}

.product-image {
  height: 12rem;
  position: relative;
}

/* Для карточек категорий (categories) — как было */
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-icon {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-icon svg {
  width: 3rem;
  height: 3rem;
  color: var(--white);
}

.product-content {
  padding: 1.5rem;
}

.product-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.product-content p {
  color: var(--text-light);
}

/* Reviews Section */
.reviews {
  padding: 5rem 0;
  background: var(--white);
}

.reviews h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.review-card {
  background: var(--background);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stars {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.star {
  color: #fbbf24;
  width: 1.25rem;
  height: 1.25rem;
}

.review-footer {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.author {
  font-weight: 500;
}

.platform {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Contact Section */
.contact {
  padding: 5rem 0;
  background: var(--background);
}

.contact h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

.contact-grid {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.1);
}

.submit-button {
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem;
  border: none;
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
}

.submit-button:hover {
  background: var(--primary-hover);
}

.form-privacy-hint {
  font-size: 0.72rem;
  color: #a0aec0;
  margin-top: 0.18rem;
  text-align: left;
}

/* Footer */
.footer {
  background: #111827;
  color: var(--white);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
}

.footer-section p {
  color: #9ca3af;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section ul a:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #374151;
  text-align: center;
  color: #9ca3af;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  padding: 1rem;
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--white);
  border-radius: 0.5rem;
  width: 100%;
  max-width: 80rem; /* Increased from 64rem to 80rem */
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  position: sticky;
  top: 0;
  background: var(--white);
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 9999px;
  transition: background-color 0.3s;
}

.close-button:hover {
  background: var(--background);
}

.modal-body {
  padding: 1.5rem;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Increased from 280px to 350px */
  gap: 2rem;
}

.product-item {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-item img {
  width: 100%;
  height: 12rem;
  object-fit: contain;
}

.product-item-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.product-item p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.specs-list {
  list-style-type: disc;
  margin-left: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.product-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
}

.price {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary);
  min-width: 120px; /* Ensure price has minimum width */
  text-align: left;
}

.quote-button {
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
  white-space: nowrap; /* Prevent button text from wrapping */
}

.quote-button:hover {
  background: var(--primary-hover);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  gap: 1rem;
}

.pagination-button {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
}

.pagination-button:hover:not([disabled]) {
  background: var(--primary-hover);
}

.pagination-button[disabled] {
  background: var(--text-light);
  cursor: not-allowed;
  opacity: 0.7;
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--text);
}

/* Responsive Design */
@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
    gap: 2rem;
  }

  .desktop-nav a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
  }

  .desktop-nav a:hover {
    color: var(--primary);
  }

  .contact-info {
    display: flex;
    gap: 1.5rem;
  }

  .contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
  }

  .contact-link:hover {
    color: var(--primary);
  }

  .menu-button {
    display: none;
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  /* Ensure only 3 products per row at most */
  .product-list {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    max-width: 100%;
  }
}
@media (max-width: 767px) {
  .container {
    padding: 0 6px;
    max-width: 100vw;
  }
  .header-content {
    flex-direction: column;
    height: auto;
    gap: 10px;
    align-items: flex-start;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .footer-section {
    margin-bottom: 1.2rem;
  }
  .hero {
    height: auto;
    min-height: 60vh;
    padding: 4rem 0 2rem 0;
  }
  .hero-content {
    padding: 0 0.5rem;
    text-align: center;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .modal-content {
    width: 98vw;
    min-width: 0;
    padding: 0.5rem;
    max-width: 100vw;
  }
  .contact-grid {
    flex-direction: column;
  }
  .contact-info {
    order: 2;
  }
  .contact-form {
    order: 1;
  }
  .review-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .product-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .product-card {
    min-width: 0;
  }
  .contact-details {
    gap: 0.5rem;
  }
  .contact-item {
    font-size: 1rem;
    gap: 0.5rem;
  }
  .form-group input,
  .form-group textarea {
    font-size: 1rem;
  }
  .map-link img {
    max-width: 100vw;
    height: auto;
  }
  .footer-bottom {
    font-size: 0.95rem;
    padding-top: 1rem;
  }
  .mobile-menu .contact-link, .mobile-menu .contact-item {
    font-size: 1.15rem;
    color: var(--primary);
    font-weight: 500;
    gap: 0.7rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
  }
  .mobile-menu .icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
    stroke: var(--primary);
  }
  .mobile-menu .contact-link span, .mobile-menu .contact-item span {
    color: var(--primary);
  }
  .footer-section ul {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 500;
  }
  .footer-section ul li {
    margin-bottom: 0.7rem;
  }
  .menu-button {
    position: absolute;
    top: 18px;
    right: 18px;
    margin: 0;
  }
  .icon {
    width: 1.5rem;
    height: 1.5rem;
  }
  .contact-info.mobile-visible {
    margin-bottom: 0;
    padding-bottom: 0;
  }
  .contact-map {
    max-width: 100vw;
    margin: 14px 0 0 0;
    border-radius: 10px;
  }
  .contact-divider {
    margin: 18px 0 12px 0;
  }
  .contact-details {
    gap: 0.7rem;
  }
  .contact-info.mobile-visible {
    order: 1;
  }
  .contact-info {
    display: block;
    background: none;
    border: none;
    padding: 0;
  }
  .header .contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: var(--primary);
    font-size: 1.08rem;
    font-weight: 500;
    margin-top: 0.5rem;
  }
  .header .contact-link {
    color: var(--primary);
    font-size: 1.08rem;
    font-weight: 500;
    gap: 0.4rem;
    padding: 0.1rem 0.2rem;
    display: flex;
    align-items: center;
  }
  .header .contact-link span {
    color: var(--primary);
    font-weight: 500;
  }
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
}

.contact-map {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 18px auto 0 auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.contact-divider {
  border: none;
  border-top: 1.5px solid var(--border);
  margin: 28px 0 18px 0;
}

/* Для карточек товаров (productCatalog) */
.product-img-contain {
  width: 100%;
  height: 12rem;
  object-fit: contain;
  background: #f8f8f8;
  display: block;
  margin: 0 auto;
}

.full-width-btn {
  display: block;
  width: 100%;
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 0;
  border-radius: 0.375rem;
  text-align: center;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
  margin-top: 1rem;
  font-size: 1.1rem;
}

.full-width-btn:hover {
  background: var(--primary-hover);
}