* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --main-color: #00a651;
  --border-color: #333333;
  --text-color: white;
  --activ-color: rgb(44, 136, 88);
  --text-activ: rgb(232, 232, 232);
}

.header {
  padding: 20px 0;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  height: 100%;
}
.header__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  width: 100px;
}
.header__logo img {
  width: 100%;
  border-radius: 20px;
}
.header__nav {
  display: flex;
  gap: 50px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.header__nav__link {
  text-decoration: none;
  color: var(--text-color);
  background-color: var(--main-color);
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 18px;
  transition: 0.3s;
}

.header__nav__link:hover {
  color: var(--text-activ);
  background-color: var(--activ-color);
}

.phone {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 2px solid var(--border-color);
  padding: 10px 20px;
  border-radius: 10px;
}

.phone-icon {
  width: 18px;
}

.header__bar {
  display: flex;
  align-items: center;
  margin: 0 auto;
  justify-content: center;
  max-width: 550px;
}
.form__search {
  position: relative;
  width: 100%;
}
.form__search__field {
  width: 100%;
  height: 45px;
  padding-left: 10px;
  border: 2px solid var(--main-color);
  border-radius: 5px;
  outline: none;
  color: #232323;
}
.header__form__btn {
  position: absolute;
  top: 0;
  right: 0px;
  width: 45px;
  height: 45px;
  border: none;
  background: var(--main-color);
  border-radius: 0 5px 5px 0;
  cursor: pointer;
  transition: 0.3s;
}
.header__form__btn:hover {
  background-color: var(--activ-color);
}
.header__form__btn:before {
  content: "\f002";
  font-family: FontAwesome;
  font-size: 16px;
  color: #ffffff;
}

.header__btn,
.main__btn {
  color: var(--text-color);
  background-color: var(--main-color);
  padding: 10px 25px;
  font-size: 16px;
  border: var(--main-color);
  border-radius: 8px;
  transition: 0.3s;
}
.header__btn:hover {
  color: var(--text-activ);
  background-color: var(--activ-color);
}
.main__btn:hover {
  color: var(--text-activ);
  background-color: var(--activ-color);
}
/* --- МОДАЛКА --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: none; /* скрыто по умолчанию */
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: hidden; /* скролл внутри модалки */
  padding: 40px 20px;
}

.modal-content {
  background-color: #fff;
  border-radius: 12px;
  max-width: 1100px;
  width: 100%;
  height: 650px; /* фиксированная высота */
  padding: 25px 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 25px;
  overflow-y: auto; /* скролл внутри окна */
}

/* Кнопка закрытия */
.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 22px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: color 0.3s;
}

.close-btn:hover {
  color: var(--main-color);
}

/* Список категорий и брендов */
.categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  padding-right: 0;
  max-height: none;
  overflow: visible;
}

/* Каждый столбец категории/бренда */
.categories-list > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 200px;
  flex-shrink: 0;
}

/* Заголовок категории/бренда */
.category-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
  color: #000; /* черный */
  user-select: none;
}

/* Подкатегории/бренды */
.subcategory-list {
  list-style: none;
  margin: 0;
  padding-left: 0;
  max-height: none;
  overflow: visible;
}

.subcategory-list li {
  position: relative;
  padding: 6px 8px;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s;
}

/* Подсветка при наведении на контейнер */
.subcategory-list li:hover,
.subcategory-list li:focus {
  background-color: rgba(200, 200, 200, 0.3);
}
.subcategory-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px; /* ширина линии */
  height: 100%;
  background-color: var(--main-color); /* зелёная линия */
  opacity: 0; /* по умолчанию прозрачна */
  border-radius: 4px 0 0 4px;
  transition: opacity 0.2s;
}

.subcategory-list li:hover::before,
.subcategory-list li:focus::before {
  opacity: 1; /* показываем линию при наведении */
}

/* Ссылки внутри */
.subcategory-list li a {
  color: inherit;
  text-decoration: none;
  display: block;
  width: 100%;
}

/* Контейнер для загруженных товаров */
#productsContainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

#productsContainer .product-item {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

#productsContainer .product-item:hover {
  background-color: var(--main-color);
  color: white;
  transform: translateY(-2px);
}

.contacts-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 16px;
  font-family: "Segoe UI", Arial, sans-serif;
  align-items: center;
  justify-content: center;
}
.contacts-container {
  display: flex;
  gap: 65px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}
.contacts-form-block,
.contacts-info-block {
  flex: 1 1 340px;
  min-width: 290px;
}
.contacts-title {
  color: var(--main-color);
  font-weight: 700;
  margin-bottom: 18px;
  text-align: left;
  border-bottom: 2px solid #e4e4e4;
  padding-bottom: 6px;
  letter-spacing: 0.5px;
}
.order-form {
  display: flex;
  flex-direction: column;
  gap: 27px;
  padding: 14px 0;
}
.order-form input,
.order-form textarea {
  border: 1.5px solid #e4e4e4;
  border-radius: 7px;
  padding: 11px 17px;
  font-size: 16px;
  background: var(--text-color);
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.order-form input:focus,
.order-form textarea:focus {
  border-color: var(--main-color);
  box-shadow: 0 2px 8px #e2f7e0;
  outline: none;
}
.order-form textarea {
  min-height: 70px;
  resize: vertical;
}
.order-form__submit {
  background: var(--main-color);
  color: var(--text-color);
  font-size: 18px;
  font-weight: 500;
  border: none;
  width: 200px;
  border-radius: 9px;
  padding: 10px 0;
  margin-top: 3px;
  cursor: pointer;
  transition: background 0.18s;
}
.order-form__submit:hover,
.order-form__submit:focus {
  background: var(--activ-color);
}
.order-form__response {
  margin-top: 8px;
  color: var(--main-color);
  font-size: 14px;
  min-height: 16px;
}
.contacts-info-block p {
  font-size: 18px;
  color: var(--border-color);
  margin: 0 0 15px 0;
}
.contacts-map {
  margin-top: 18px;
}
@media (max-width: 900px) {
  .contacts-container {
    flex-direction: column;
    gap: 22px;
    align-items: stretch;
  }
  .contacts-form-block,
  .contacts-info-block {
    min-width: 0;
  }
}

.site-footer {
  background-color: var(--main-color); /* насыщенный зелёный */
  color: var(--text-color); /* почти черный для текста */
  padding: 36px 0;
  font-family: Arial, sans-serif;
  font-size: 18px;
  margin-top: 75px;
}

.footer__container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px;

  display: flex;
  gap: 150px; /* расстояние между колонками */
  align-items: flex-start;
  flex-wrap: nowrap; /* чтобы строки не переносились */
}

.footer__block {
  min-width: 140px;
  flex-shrink: 0;
}

.footer__logo-block {
  flex: 0 0 60px; /* фиксированная ширина и высота блока логотипа */
}

.footer__logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 20px;
  display: block;
}

/* Заголовки разделов */
.footer__block h4 {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--border-color);
}

/* Стили для контактных данных */
.footer__contact p {
  margin: 8px 0;
  font-weight: 400;
}

.footer__contact a {
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.footer__contact a:hover,
.footer__contact a:focus {
  border-color: var(--text-activ);
}

/* Списки */
.footer__block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer__socials {
  display: flex;
  gap: 12px; /* расстояние между иконками */
  align-items: center;
}

.footer__social-icon {
  width: 55px;
  height: 55px;
  object-fit: contain;
  transition: opacity 0.2s, transform 0.2s;
}

.footer__socials a:hover .footer__social-icon {
  opacity: 0.7;
  transform: scale(1.2);
}

.footer__block ul li {
  margin-bottom: 12px;
}

/* Ссылки */
.footer__block ul a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 400;
  transition: opacity 0.2s;
}

.footer__block ul a:hover,
.footer__block ul a:focus {
  opacity: 0.7;
  text-decoration: underline;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
  .footer__container {
    flex-wrap: wrap;
    gap: 30px;
  }

  .footer__logo-block {
    margin-bottom: 12px;
  }

  .footer__block {
    min-width: 100%;
  }
}
/* ===================== АДАПТИВКА CONTACT.PHP ===================== */

/* Планшеты (до 1024px) */
@media (max-width: 1024px) {
  .header__nav {
    gap: 25px;
  }

  .header__nav__link {
    font-size: 16px;
    padding: 8px 14px;
  }

  .phone {
    padding: 6px 14px;
    font-size: 15px;
  }

  .contacts-container {
    flex-direction: column;
    align-items: stretch;
    gap: 40px;
  }

  .contacts-map iframe {
    width: 100%;
    height: 280px;
  }

  .footer__container {
    flex-wrap: wrap;
    gap: 40px;
  }
}

/* Смартфоны (до 768px) */
@media (max-width: 768px) {
  .header__row {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .header__nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .header__nav__link {
    font-size: 14px;
    padding: 6px 10px;
  }

  .phone {
    font-size: 14px;
    padding: 5px 10px;
  }

  .contacts-section {
    padding: 20px 12px;
  }

  .contacts-title {
    text-align: center;
    font-size: 18px;
  }

  .order-form input,
  .order-form textarea {
    font-size: 14px;
    padding: 8px 12px;
  }

  .order-form__submit {
    width: 100%;
    font-size: 16px;
    padding: 10px;
  }

  .contacts-map iframe {
    height: 250px;
  }

  .footer__container {
    flex-direction: column;
    gap: 25px;
    text-align: center;
    align-items: center;
  }

  .footer__block h4 {
    font-size: 16px;
  }

  .footer__socials {
    justify-content: center;
  }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
  .header__logo img {
    width: 70px;
  }

  .header__nav__link {
    font-size: 13px;
    padding: 5px 8px;
  }

  .phone {
    font-size: 13px;
  }

  .contacts-title {
    font-size: 16px;
  }

  .contacts-info-block p {
    font-size: 15px;
  }

  .order-form input,
  .order-form textarea {
    font-size: 13px;
  }

  .order-form__submit {
    font-size: 14px;
    padding: 8px;
  }

  .footer__logo {
    width: 90px;
    height: 90px;
  }

  .footer__social-icon {
    width: 16px;
    height: 16px;
  }
}
