* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

header {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 120px;
  border-bottom: #00391F 2px solid;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  background-color: white;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

header img {
  max-height: 100px;
  width: auto;
}

.logo button {
  background-color: #EFEFEF;
  color: #00391F;
  border: 0.2px solid #dcdbdb;
  box-shadow: 0 0 5px 4px #EFEFEF;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
}

.pr {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 5px;
  position: relative;
}

.pr svg,
.pr span {
  display: inline-block;
}

.pr svg {
  width: 20px;
  height: 20px;
  fill: #00391F;
  transition: transform 0.3s ease;
}

.pr:hover svg {
  transform: rotate(180deg);
}

/* .pr:hover svg, .pr:hover span {
  color: white;
} */
.pr:hover {
  background-color: #00391F;
  color: white;
}

.dropdown:hover .pr {
  background-color: #00391F;
  color: white;
}

.bb {
  display: none;
  position: relative;
}

.logo {
  flex: 0.5;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
}

nav {
  flex: 0.4;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

nav div {
  display: inline-block;
  text-align: center;
  padding: 10px;
  font-size: 16px;
  color: #00391F;
  border-radius: 5px;
  box-shadow: 0 0 5px 4px #EFEFEF;
  transition: background-color 2s;
}

nav div:hover {
  background-color: #00391F;
  color: white;
}

div a {
  text-decoration: none;
  color: inherit;
}

/* main */
main {
  margin-top: 120px;
  /* Adjusted for header height */
  width: 100%;
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-image: url(main1.png);
  background-size: cover;
  background-position: center;
}

main .h {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
}

main h1 {
  font-weight: lighter;
  font-size: 48px;
  letter-spacing: 5px;
  color: white;
  text-align: center;
  margin-top: 20px;
}

main p {
  color: white;
  text-align: center;
  font-size: 20px;
  font-weight: lighter;
}

main button {
  background-color: #00391F;
  color: white;
  border: 0.2px solid #dcdbdb;
  box-shadow: 0 0 3px 2px #EFEFEF;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
}

main button:hover {
  box-shadow: 0 0 4px 5px #EFEFEF;
}

/* переваги */
.icons-container {
  display: flex;
  flex-direction: row;
  align-items: start;
  justify-content: space-around;
  margin: 50px 0;
}

.icon-cont img {
  fill: #727272;
  display: block;
  height: 100px;
  width: 100px;
}

.icon-cont {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 170px;
  margin: 0 20px;
  /* border: 1px solid rgb(244, 197, 8);
  box-shadow: 3px 8px 8px 3px rgba(0, 0, 0, 0.2); */
}

.caption {
  text-align: center;
  color: #00391F;
  font-size: 16px;
  margin-top: 10px;
}

.caption span {
  font-weight: bold;
}

h2 {
  text-align: center;
  color: #00391F;
  font-size: 32px;
  font-weight: lighter;
  margin-top: 60px;
}

.line {
  width: 100px;
  height: 2px;
  background-color: rgb(244, 197, 8);
  margin: 0 auto 40px auto;
}

#categories {
  margin: 30px 0;
}

button a {
  text-decoration: none;
  color: inherit;
}

.showroom {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 600px;
  margin: 20px 0;
  background-image: url(main1.png);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;

}

.showroom h2 {
  color: white;
  font-size: 32px;
  margin-top: 20px;
}

.showroom p {
  color: white;
  font-size: 20px;
  font-weight: lighter;
  margin: 20px auto;
  text-align: center;
}

.showroom-image {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.showroom-image img {
  width: 350px;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* прокрутка популярних товарів */
.showroom-image-scroll {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  width: 100%;
  overflow: hidden;
  position: relative;
  height: 220px;
  /* підлаштуйте під ваші фото */
}

.showroom-image-scroll-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  animation: scroll-images 12s linear infinite;
  /* 12s - підлаштуйте під кількість фото та бажану швидкість */
}

@keyframes scroll-images {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.showroom-image-scroll img {
  width: 300px;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

/* контакт інфо */
.contact {
  display: flex;
  flex-direction: row;
  align-items: start;
  justify-content: space-evenly;
  box-sizing: border-box;
  color: white;
  margin: 20px 0;
  padding: 20px;
  width: 100%;
  height: auto;
}

iframe {
  flex: 0.7;
  display: block;
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0.25;
}

.c {
  align-self: flex-start;
  display: flex;
  flex-direction: row;
  align-items: start;
  justify-content: start;
  box-sizing: border-box;
  padding: 10px 0;
}

.c p {
  margin: 0;
  padding: 0 20px;
  color: #00391F;
}

.c img,
.c a {
  display: block;
  box-sizing: border-box;
}

.c img {
  height: 30px;
  width: 30px;
}


@media (max-width: 768px) {
  .icons-container {
    flex-direction: column;
    padding: 20px;
  }

  .icon-cont {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
  }

  .contact {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 1000px;
  }

  iframe {
    flex: 1;
    max-width: 600px;
    width: 100%;
  }

  .contact-info {
    flex: 1;
    max-width: 600px;
    width: 100%;
    margin-top: 30px;
  }
}


.dropdown {
  position: relative;
  z-index: 999;
}

/* dropdown-menu-container (головне випадаюче меню) */
.dropdown-menu-container {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 300px;
  border-radius: 5px;
  z-index: 9998;
  /* Трохи менше, ніж у .dropdown, але все ще високий */

  overflow-y: auto;
  /* Дозволяє прокрутку */
  max-height: 70vh;
  /* Максимальна висота, щоб прокрутка працювала */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;

  /* Приховуємо смуги прокрутки */
  &::-webkit-scrollbar {
    width: 0px;
    height: 0px;
    background: transparent;
  }

  scrollbar-width: none;
  -ms-overflow-style: none;

  /* Початковий стан: приховано та прозоро */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out,
  visibility 0.3s ease-in-out;
}

/* ЗАЛИШІТЬ ЦЕ ПРАВИЛО !!!
   Показуємо меню, коли .dropdown має клас 'active' (встановлюється JS за кліком) */
.dropdown.active .dropdown-menu-container {
  opacity: 1;
  visibility: visible;
}

/* Всі інші CSS правила залишаються без змін */


/* Стилі для самого списку UL всередині контейнера */
.dropdown-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  color: white;
  background-color: #00391F;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}

/* Стилі для кожного пункту основного меню */
.dropdown-menu li {
  position: relative;
  /* Важливо для позиціонування плюсика */
}

.dropdown-item {
  text-decoration: none;
  padding: 8px 12px;
  display: flex;
  /* Використовуємо flexbox для вирівнювання тексту та плюсика */
  justify-content: space-between;
  /* Рознесемо текст і плюсик по краях */
  align-items: center;
  /* Вирівняємо по центру вертикально */
  color: white;
  cursor: pointer;
}

.dropdown-item:hover {
  background-color: #005F3F;
}

/* Стилі для плюсика */
.plus-icon {
  font-size: 1.2em;
  /* Розмір плюсика */
  line-height: 1;
  /* Для кращого вирівнювання */
  color: white;
  transition: transform 0.3s ease-in-out;
  /* Анімація повороту */
  margin-left: 10px;
  /* Відступ від тексту */
}

/* Стилі для субменю (АКОРДЕОН) */
.dropdown-submenu {
  position: static;
  /* Це вже у вашому файлі, і це правильно для акордеона */
  background-color: #004d2f;
  /* Трохи темніший фон, щоб відрізняти від батьківського меню */
  color: white;
  list-style: none;
  padding: 0 0 0 20px;
  /* Внутрішній відступ для пунктів субменю */
  margin: 0;
  border-radius: 0 0 5px 5px;
  /* Округляємо тільки нижні кути */
  z-index: 9997;
  /* Трохи менше, ніж у головного меню, але все ще високий */

  /* КЕРУВАННЯ ВИДИМІСТЮ ТА АНІМАЦІЯ */
  display: none;
  /* Приховано за замовчуванням */
  overflow: hidden;
  /* Обрізаємо вміст, якщо потрібно, для transition */
  max-height: 0;
  /* Початкова висота для анімації */
  opacity: 0;
  /* Початкова прозорість */
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  /* Плавне розкриття */
  box-shadow: inset 0px 5px 5px -5px rgba(0, 0, 0, 0.3);
  /* Залишаємо тінь */
}

/* Коли li активний (клас додається JavaScript'ом), показуємо субменю */
.dropdown-menu li.active>.dropdown-submenu {
  display: block;
  /* Робимо видимим */
  max-height: 500px;
  /* Достатньо велике значення для розкриття всього вмісту */
  opacity: 1;
}

/* Поворот плюсика при активному стані */
.dropdown-menu li.active>.dropdown-item .plus-icon {
  transform: rotate(45deg);
  /* Повертаємо на 45 градусів (перетворюємо на хрестик) */
}

/* Стилі для посилань у підменю */
.dropdown-submenu li a {
  padding: 8px 12px;
  display: block;
  color: rgb(244, 197, 8);
  text-decoration: none;
}

.dropdown-submenu li a:hover {
  background-color: #005F3F;
}

.ab {
  border: 2px solid white;
  border-radius: 3px;
  margin: 5px;
}

@media (max-width: 1200px) {
  nav {
    display: none;
    /* Сховати навігацію на менших екранах */
  }

  header {
    justify-content: center;
  }

  .logo {
    flex: 1;
    justify-content: space-between;
    padding: 0 30px;
  }

  .dropdown-menu-container {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
  }

  .showroom {
    height: auto;
    padding: 20px;
  }
  .showroom-image {
    flex-direction: column;
    align-items: center;
  }

}

@media (max-width: 600px) {
  header img {
    max-height: 60px;
    width: auto;
  }

  .logo button {
    display: none;
  }

  .bb {
    display: block;
  }
  .dropdown-menu-container {
    position: absolute;
    top: 95%;
    right: 0;
    left: auto;
  }
}

@media (max-width: 340px) {
  .dropdown-menu-container {
    position: absolute;
    top: 95%;
    right: -40%;
    left: auto;
  }
}