* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', -apple-system, Roboto, sans-serif;
}

body {
  background-color: #f4f6f9;
  color: #1a202c;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================
   HEADER
   ========================================== */
.header {
  background-color: #ffffff;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 15px 0;
}

.header-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo {
  font-size: 28px;
  font-weight: 900;
  color: #0056ff;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.logo span { color: #1a202c; }

.market-place {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  text-align: center;
}

.header-phones-block {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-shrink: 0;
}

.header-phone-btn {
  background-color: #28a745;
  color: white;
  padding: 10px 16px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}
.header-phone-btn:hover { 
  background-color: #218838; 
  transform: translateY(-1px);
}

/* ==========================================
   ГЛАВНЫЙ ЭКРАН (HERO SECTION)
   ========================================== */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.hero p {
  font-size: 18px;
  color: #94a3b8;
  max-width: 800px;
  margin: 0 auto 35px;
}

.main-site-link {
  color: #38bdf8;
  text-decoration: underline;
  font-weight: 700;
}
.main-site-link:hover {
  color: #7dd3fc;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-price {
  background-color: #0056ff;
  color: white;
  padding: 16px 30px;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(0, 86, 255, 0.4);
}
.btn-price:hover { background-color: #0040c7; }

.btn-whatsapp {
  background-color: #25d366;
  color: white;
  padding: 16px 30px;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}
.btn-whatsapp:hover { background-color: #1ebd58; }

/* ==========================================
   КАТАЛОГ КАТЕГОРИЙ
   ========================================== */
.catalog-section { padding: 60px 0; }

.section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 40px;
  text-transform: uppercase;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.category-card {
  background: white;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.category-img {
  height: 150px;
  background-color: #ffffff;
  border-radius: 4px;
  margin-bottom: 15px;
  overflow: hidden;
}
.category-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #ffffff;
  padding: 5px;
}

.category-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  min-height: 48px;
}

.category-card p {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 15px;
  flex-grow: 1;
}

.btn-ask {
  background: #f1f5f9;
  color: #0056ff;
  border: none;
  padding: 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s;
}
.category-card:hover .btn-ask { background: #0056ff; color: white; }

.map-section {
  background-color: #ffffff;
  padding: 60px 0;
  border-top: 1px solid #e2e8f0;
}

.map-box {
  display: flex;
  gap: 40px;
  align-items: center;
}

.map-info { flex: 1; }
.map-info h2 { font-size: 26px; margin-bottom: 15px; text-transform: uppercase;}
.map-info ul { list-style: none; margin-bottom: 25px; }
.map-info li { margin-bottom: 10px; font-size: 15px; padding-left: 20px; position: relative; }
.map-info li::before { content: "📍"; position: absolute; left: 0; }

.map-image {
  flex: 1;
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 6px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.map-image img { 
  width: 100%; 
  height: 100%; 
  object-fit: contain;
  background-color: #ffffff; 
}

.map-phone-btn {
  background-color: #28a745;
  color: white !important;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
  text-transform: uppercase;
}

.map-phone-btn:hover {
  background-color: #218838;
  transform: translateY(-1px);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background-color: #0f172a;
  color: white;
  padding: 40px 0;
  text-align: center;
}
.footer p { font-size: 14px; color: #94a3b8; margin-bottom: 10px; }
.footer .footer-link {
  color: #38bdf8;
  text-decoration: underline;
}

@media (max-width: 850px) {
  .header {
    padding: 8px 0;
  }
  .header-box {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  .logo {
    font-size: 20px;
    margin-bottom: 0 !important;
  }
  .market-place {
    font-size: 11px;
    padding: 4px 8px;
    margin: 0 !important;
  }
  .header-phones-block {
    width: auto !important;
    display: flex !important;
    flex-direction: row !important;
  }
  .header-phone-btn {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    font-size: 16px;
    text-indent: -9999px;
    overflow: hidden;
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .header-phone-btn::before {
    content: "📞";
    text-indent: 0;
    position: absolute;
    display: block;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .hero h1 { 
    font-size: 26px; 
  } 
  .hero p { 
    font-size: 15px; 
  }

  .map-phone-btn {
    width: 100%;
    max-width: 340px;
    justify-content: center;
    margin: 10px auto 0;
  }

  .hero-buttons { 
    flex-direction: column; 
    width: 100%; 
    max-width: 500px;
    margin: 0 auto;
    gap: 12px;
  }
  .btn-price, .btn-whatsapp { 
    width: 100%; 
    text-align: center; 
    padding: 14px 20px;
  }

  .category-grid { 
    grid-template-columns: repeat(2, 1fr); 
  }
  
  .map-box { 
    flex-direction: column; 
    text-align: center; 
  }
  .map-info li { padding-left: 0; }
  .map-info li::before { display: none; }
  .map-info .map-phone-block { justify-content: center; }
}

@media (max-width: 550px) {
  .category-grid { 
    grid-template-columns: 1fr; 
  }
  .hero h1 { 
    font-size: 22px; 
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background-color: #ffffff;
  width: 90%;
  max-width: 650px;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-window {
  transform: translateY(0);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}
.modal-close-btn:hover { color: #0f172a; }

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.avito-link {
  background: linear-gradient(135deg, #005bff 0%, #ff0055 100%);
  color: white !important;
  font-weight: 700;
  text-align: center;
  padding: 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 91, 255, 0.2);
}
.avito-link:hover { opacity: 0.9; }

.price-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 14px 16px;
  border-radius: 6px;
  text-decoration: none;
  color: #1e293b !important;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s, border-color 0.2s;
  text-transform: none;
}

.price-file-item:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.price-file-item::before {
  content: "📊";
  font-size: 18px;
}

.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-track { background: #f1f5f9; }
.modal-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
