* {
  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: 0;
  width: 45px;
  height: 45px;
  border: none;
  background: var(--main-color);
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}
.header__form__btn:before {
  content: "\f002";
  font-family: FontAwesome;
  font-size: 16px;
  color: #fff;
}

.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);
}

/* Плашка выбора города (расположение) */
#location-selector {
  position: absolute;
  top: 10px;       /* отступ сверху */
  right: 10px;     /* отступ справа */
  z-index: 1000;
  font-size: 14px;
}

#location-selector select {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  background-color: #fff;
  cursor: pointer;
}


.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);
}

.main {
  padding: 30px;
}
.bg__block {
  position: relative;
  min-height: 600px; /* увеличьте при необходимости */
  overflow: hidden;
}

.bg__layer {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url("img/зп.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  background-attachment: scroll;
  z-index: 0;
  pointer-events: none;
}

.content__wrapper {
  position: relative;
  z-index: 1;
  padding-top: 100px; /* Этот отступ отодвинет карусель и все содержимое ниже */
}

.carousel-wrapper {
  position: relative;
  width: 720px;
  margin: 0 auto;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 15px;
}

.cards-container {
  width: 700px;

  position: relative;
  height: 400px;
}

.card {
  width: 700px;
  height: 400px;
  background: var(--text-color);
  border-radius: 14px;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  display: flex;
  align-items: center;
  padding: 20px 30px;
  box-sizing: border-box;
}

.card.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  position: relative;
}

.card-content-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 30px;
  align-items: center;
}

/* Левая часть: текстовая */
.card-text-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--border-color);
}

/* Заголовок */
.card-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 25px 0;
  color: var(--main-color);
  user-select: text;
  text-align: left;
}

/* Список */
.parts-list {
  list-style: none;
  margin: 0 0 30px 0;
  padding-left: 0;
  font-size: 18px;
  line-height: 1.7;
}
.parts-list-link {
  text-decoration: none;
  color: black;
  transition: color 0.3s ease;
}

.parts-list li {
  margin-bottom: 12px;
  transition: color 0.3s ease;
  cursor: default;
}

.parts-list-link:hover {
  color: var(--main-color);
}

/* Кнопка */
.catalog-btn {
  width: 160px;
  padding: 14px;
  background: var(--main-color);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--btn-hover-shadow);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  align-self: flex-start;
  user-select: none;
}

.catalog-btn:hover,
.catalog-btn:focus {
  background: var(--activ-color);
  box-shadow: 0 6px 20px var(--btn-hover-shadow);
  outline: none;
}

/* Правая часть: картинка */
.card-image {
  width: 260px;
  height: 260px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
}

.card-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

/* Кнопки переключения */

.slider-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(134, 133, 133, 0.94);
  color: var(--text-color);
  font-size: 28px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease, color 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.slider-btn:hover {
  background: rgba(156, 156, 156, 0.94);
  color: var(--text-activ);
}

.slider-btn:disabled {
  opacity: 0.3;
  cursor: default;
  box-shadow: none;
}

/* Размещение кнопок */
.slider_btn_prev {
  position: absolute;
  left: -60px;
  top: 50%;
  transform: translateY(-50%);
}

.slider_btn_next {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
}

.block__sep {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* заголовок слева */
  margin: 100px 0;
}
.sep__text {
  color: var(--main-color);
  margin-bottom: 20px;
  margin-left: 150px;
}

.sep__line {
  background-color: var(--border-color);
  height: 3px;
  width: 90%;
  margin: 0 auto;
}

.carousel {
  position: relative;
  max-width: 1200px;
  margin: 40px auto;
  user-select: none;
}

.carousel-window {
  overflow: hidden;
  border-radius: 16px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
  gap: 10px;
  padding: 15px 0;
  box-sizing: border-box;
}

.carousel-slide {
  flex: 0 0 calc((100% - 20px) / 3); /* 3 слайда с учётом 2 gaps по 10px = 20px */
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-slide);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  box-sizing: border-box;
  transition: box-shadow 0.3s;
}

.carousel-slide:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.image-wrapper {
  width: 200px;
  height: 200px;
  overflow: hidden;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-wrapper img {
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
  user-select: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background-color: rgba(220, 220, 220, 0.666);
  color: var(--border-color);
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s;
}

.carousel-btn:hover:enabled {
  background-color: rgba(200, 200, 200, 0.727);
  color: var(--text-activ);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: default;
  background-color: var(--btn-bg);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

/* Адаптивность: на планшете 2 слайда */
@media (max-width: 768px) {
  .carousel-slide {
    flex: 0 0 calc((100% - 10px) / 2);
  }
}

/* На телефоне 1 слайд */
@media (max-width: 480px) {
  .carousel-slide {
    flex: 0 0 100%;
  }
}

.company__row {
  display: flex;
  align-items: center;
  gap: 100px;
  position: relative;
  width: 100%;
}
.company__logo {
  flex: 0 0 300px;
}

.company__logo img {
  width: 100%;
  border-radius: 15px;
  float: left;
}
.company__content {
  flex: 1 1 auto;
}
.company__text {
  font-size: 24px;
  margin: 0;
}

.company__btn {
  font-size: 16px;
  background: var(--main-color);
  color: var(--text-color);
  padding: 15px;
  border-radius: 10px;
  border: none;
  width: 150px;
  transition: 0.3s;
  position: absolute;
  right: 20px;
  /* Чтобы кнопка стояла на уровне нижней границы картинки: */
  bottom: 0;
}
.company__btn:hover {
  background: var(--activ-color);
  color: var(--text-activ);
}

.contacts-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 16px;
  font-family: "Segoe UI", Arial, sans-serif;
}
.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;
}

.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;
}

/* ===================== АДАПТИВКА ===================== */

/* Планшеты: ширина до 1024px */
@media (max-width: 1024px) {
  .header__nav {
    gap: 25px;
  }
  .header__nav__link {
    font-size: 16px;
    padding: 8px 15px;
  }
  .phone {
    padding: 8px 15px;
    font-size: 16px;
  }
  .carousel-wrapper {
    width: 100%;
  }
  .cards-container {
    width: 100%;
  }
  .card {
    width: 100%;
    height: auto;
    flex-direction: column;
    padding: 15px;
  }
  .card-content-wrapper {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
  .card-text-area {
    text-align: center;
  }
  .card-image {
    width: 100%;
    max-width: 300px;
    height: auto;
  }
  .carousel-slide {
    flex: 0 0 calc((100% - 10px) / 2);
  }
  .company__row {
    flex-direction: column;
    gap: 25px;
  }
  .company__btn {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
  }
}

/* Смартфоны: ширина до 768px */
@media (max-width: 768px) {
  .header__row {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  .header__nav {
    flex-wrap: wrap;
    gap: 12px;
  }
  .header__nav__link {
    font-size: 14px;
    padding: 6px 12px;
  }
  .phone {
    font-size: 14px;
    padding: 6px 12px;
  }
  .carousel-wrapper {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }
  .cards-container {
    width: 100%;
  }
  .card {
    width: 100%;
    height: auto;
    flex-direction: column;
    padding: 10px;
  }
  .card-content-wrapper {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
  .card-text-area {
    text-align: center;
  }
  .card-image {
    width: 100%;
    max-width: 250px;
    height: auto;
  }
  .carousel-slide {
    flex: 0 0 100%;
  }
  .company__row {
    flex-direction: column;
    gap: 20px;
  }
  .company__logo {
    width: 100%;
    max-width: 200px;
  }
  .company__btn {
    width: 100%;
    position: relative;
    margin-top: 10px;
  }
  .contacts-container {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }
  .contacts-form-block,
  .contacts-info-block {
    min-width: 0;
    width: 100%;
  }
  .bg__layer {
    background-position: center center;
  }
  .footer__container {
    flex-direction: column;
    gap: 20px;
  }
  .footer__block {
    min-width: 100%;
  }
  .footer__socials {
    justify-content: flex-start;
  }
}

/* Очень маленькие экраны: ширина до 480px */
@media (max-width: 480px) {
  .header__nav {
    flex-direction: column;
    gap: 8px;
  }
  .header__nav__link {
    font-size: 12px;
    padding: 5px 10px;
  }
  .phone {
    font-size: 12px;
    padding: 5px 10px;
  }
  .card-title {
    font-size: 20px;
  }
  .parts-list {
    font-size: 14px;
  }
  .order-form input,
  .order-form textarea {
    font-size: 14px;
    padding: 8px 10px;
  }
  .order-form__submit {
    width: 100%;
    font-size: 16px;
  }
  .carousel-track {
    gap: 5px;
  }
  .carousel-slide {
    flex: 0 0 100%;
  }
  .image-wrapper img {
    max-width: 150px;
    max-height: 150px;
  }
  .company__text {
    font-size: 18px;
  }
}
