/* === БАЗОВЫЙ СБРОС === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}



body {
  font-family: Arial, sans-serif;
  color: #333;
  line-height: 1.5;
 
}


/* === ШАПКА === */
.header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 80px;
}

.logo {
  flex: 1;
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  text-decoration: none;
  letter-spacing: 1px;
}

.logo span {
  color: #3498db;
}

.nav-wrapper {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 16px;
}

.nav-link:hover {
  color: #3498db;
}

.address-side {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.address-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8f9fa;
  color: #333;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: Arial, sans-serif;
}

.address-btn:hover {
  background: #e9ecef;
  color: #3498db;
  transform: translateY(-1px);
}

.location-icon {
  width: 25px;
  height: 25px;
  fill: #3498db;
}

/* === БАННЕР === */
.banner-wrapper {
  width: 100%;
}

.banner-image {
  display: block;
  width: 100%;
  height: auto;
}

/* === ОСНОВНОЙ ЗАГОЛОВОК === */
.main-title-section {
  padding: 60px 20px;
  text-align: center;
}

.main-title {
  font-size: 36px;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.2;
}

.subtitle-text {
  margin-top: 15px;
  font-size: 16px;
  color: #555;
}

/* === СЕТКА КАРТОЧЕК === */
.cards-grid {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 40px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
}

.card-link {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #eee;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Статичные карточки (Услуги, Контакты) — без hover-эффектов */
.static-card {
  cursor: default;
}

.static-card:hover {
  transform: none;
  box-shadow: none;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  padding: 20px;
  color: white;
  text-align: center;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
}

/* === ФУТЕР === */
.footer {
  background: #f5f5f5;
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
  color: #555;
}

/* === КНОПКА «НАВЕРХ» === */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #3498db;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(52,152,219,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  z-index: 999;
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.back-to-top:hover {
  background: #2980b9;
  transform: scale(1.1);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: white;
}

/* === МОДАЛЬНЫЕ ОКНА === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--anim-duration) ease,
    visibility 0s linear var(--anim-duration);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.modal-window {
  position: relative;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  overflow-y: auto;
  padding: 40px 30px 30px;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  opacity: 0;
  transition:
    transform var(--anim-duration) var(--anim-ease),
    opacity var(--anim-duration) ease;
}

.modal-overlay.active .modal-window {
  transform: scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: #666;
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
  padding: 5px;
  line-height: 1;
}

.modal-close:hover {
  color: #d9534f;
  transform: scale(1.1);
}

.modal-content h2,
.modal-window h2 {
  margin-bottom: 10px;
  color: #2c3e50;
  font-size: 28px;
}

.modal-content > p {
  margin-bottom: 25px;
  line-height: 1.6;
  color: #555;
}

/* === СЕТКА ТОВАРОВ === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  background: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.product-card img:hover {
  opacity: 0.85;
}

.product-card-body {
  padding: 14px;
}

.product-card-body h4 {
  font-size: 15px;
  color: #2c3e50;
  margin-bottom: 6px;
}

.product-card-body p {
  font-size: 13px;
  color: #777;
  line-height: 1.4;
  margin-bottom: 10px;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: #e67e22;
  margin-bottom: 10px;
}

/* === УПРАВЛЕНИЕ КОЛИЧЕСТВОМ === */
.qty-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  user-select: none;
}

.qty-btn:hover {
  background: #e0e0e0;
  transform: scale(1.05);
}

.qty-input {
  width: 48px;
  text-align: center;
  padding: 4px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* === КНОПКИ === */
.btn-3d {
  margin-top: 10px;
  width: 100%;
  padding: 8px 0;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.btn-3d:hover {
  background: #2980b9;
  transform: scale(1.02);
}

.add-to-cart-btn {
  margin-top: 8px;
  width: 100%;
  padding: 10px 0;
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.add-to-cart-btn:hover {
  background: #229954;
  transform: scale(1.02);
}

/* === БЕЙДЖ КОРЗИНЫ === */
.cart-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  background: #e74c3c;
  color: white;
  border-radius: 12px;
  font-size: 13px;
  min-width: 20px;
  text-align: center;
}

/* === КОРЗИНА === */
.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
  gap: 12px;
}

.cart-item-name {
  flex: 2;
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
}

.cart-item-price {
  flex: 1;
  font-size: 14px;
  color: #e67e22;
  font-weight: 700;
}

.cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-qty-btn {
  width: 28px;
  height: 28px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty-btn:hover {
  background: #e0e0e0;
  transform: scale(1.05);
}

.cart-qty-value {
  min-width: 32px;
  text-align: center;
  font-size: 14px;
}

.cart-remove-btn {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}

.cart-remove-btn:hover {
  color: #c0392b;
  transform: scale(1.1);
}

.cart-empty {
  text-align: center;
  padding: 40px 0;
  color: #999;
  font-size: 16px;
}

/* === ЛАЙТБОКС === */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 5000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--anim-duration) ease,
    visibility 0s linear var(--anim-duration);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform var(--anim-duration) var(--anim-ease);
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 42px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  padding: 5px 10px;
}

.lightbox-close:hover {
  color: #e74c3c;
  transform: scale(1.1);
}

/* === ОКНО УВЕДОМЛЕНИЙ === */
.notice-window {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  padding: 30px 35px;
  text-align: center;
  max-width: 380px;
  width: 90%;
  transform: scale(0.95);
  transition: transform var(--anim-duration) var(--anim-ease);
}

.modal-overlay.active .notice-window {
  transform: scale(1);
}

.notice-window h3 {
  color: #2c3e50;
  font-size: 20px;
  margin-bottom: 12px;
}

.notice-text {
  font-size: 15px;
  color: #2c3e50;
  line-height: 1.5;
  margin-bottom: 20px;
}

.notice-ok-btn {
  background: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 36px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: Arial, sans-serif;
}

.notice-ok-btn:hover {
  background: #2980b9;
  transform: scale(1.03);
}

/* === КАРТА === */
.contacts-map {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.contacts-map h2 {
  margin-bottom: 16px;
  font-size: 24px;
}

/* === ФОРМА ЗАКАЗА === */
#cartOrderForm h3 {
  margin: 20px 0 10px;
  color: #2c3e50;
  font-size: 20px;
}

#cartOrderForm p {
  font-size: 14px;
  color: #777;
  margin-bottom: 12px;
}

#cartOrderForm input,
#cartOrderForm textarea {
  font-family: Arial, sans-serif;
}

#cartTotal {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin: 20px 0;
  text-align: right;
}

/* === МЕДИАЗАПРОСЫ === */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-card img {
    height: 140px;
  }
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-menu {
    gap: 20px;
  }
  .nav-link {
    font-size: 14px;
  }
  .contacts-map {
    padding: 10px;
  }
  .header-container {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 20px;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .main-title {
    font-size: 26px;
  }
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-wrapper {
    justify-content: flex-start;
  }
  .address-side {
    justify-content: center;
  }
}

html {
  scroll-behavior: auto !important; /* Принудительно отключаем встроенный скролл браузера */
}