html {
  scroll-behavior: smooth;
}

/* Якщо шапка фіксована і блокує частину секції */
#catalog {
  scroll-margin-top: 120px; /* або висота шапки */
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  font-family: Arial, sans-serif;
  scroll-behavior: smooth;
}

/* Header section */
header {
  height: 60vh;
  position: relative;
  background: url('images/hero.jpg') center/cover no-repeat;
}

.header-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  backdrop-filter: blur(4px);
  background-color: rgba(0, 0, 0, 0.4); /* Прозора чорна з легким затемненням */
  padding: 10px 20px;
  display: flex;
  justify-content: center;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  width: 100%;
}

/* 🔄 НОВА ОБГОРТКА логотипу та назви */
.logo-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 45px;
  height: auto;
}

.branding h1 {
  font-size: 1.3rem;
  margin: 0;
  color: white;
}

.branding p {
  font-size: 0.8rem;
  margin: 0;
  color: #ddd;
}

/* Меню */
#nav-menu ul {
  display: flex;
  gap: 25px;
}

#nav-menu a {
  font-size: 1rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}


/* Бургер */
.burger {
  display: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* Мобільна адаптація */
@media (max-width: 768px) {
  .burger {
    display: block;
  }

  #nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
  }

  #nav-menu.open {
    max-height: 500px;
    opacity: 1;
  }

  #nav-menu ul {
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 15px;
  }
}

/* Старт контенту нижче шапки */
main {
  padding-top: 120px;
}



.section {
  padding: 60px 20px;
  max-width: 1000px;
  margin: auto;
}

/* Desktop nav */
@media (min-width: 768px) {
  .burger {
    display: none;
  }

  nav#nav-menu {
    display: block !important;
    max-height: none;
    opacity: 1;
    position: static;
    background: transparent;
  }

  nav#nav-menu ul {
    flex-direction: row;
    justify-content: center;
    padding: 0;
    gap: 30px;
  }

  nav#nav-menu a {
    padding: 10px 20px;
    font-size: 1rem;
  }

  #nav-menu a.active {
  border-bottom: 2px solid #fff;
  color: #ffd700;
}

  .header-overlay {
    flex-direction: column;
  }
  .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.product-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-card h3 {
  margin: 15px;
  font-size: 1.2rem;
}

.product-card p {
  margin: 0 15px 20px;
  color: #555;
  font-size: 0.95rem;
}

}
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}

.gallery img {
  width: 300px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s;
}

.gallery img:hover {
  transform: scale(1.05);
}

.map {
  margin-top: 20px;
}

/* ✅ При прокрутці зменшити шапку */
.header-overlay.scrolled {
  padding: 5px 20px;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  transition: all 0.3s ease;
}

.header-overlay.scrolled .logo {
  width: 35px;
}

.header-overlay.scrolled .branding h1 {
  font-size: 1.1rem;
}

.header-overlay.scrolled .branding p {
  font-size: 0.7rem;
}

/* Початковий стан - приховано */
.section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

/* Активна секція - з'являється */
.section.visible {
  opacity: 1;
  transform: translateY(0);
}

#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: none;
  background-color: #ffd700;
  color: #000;
  border: none;
  border-radius: 50%;
  padding: 12px 16px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: opacity 0.3s ease;
}

#backToTop:hover {
  background-color: #ffc300;
}

/* --- Small Circular Theme Toggle Button --- */
.theme-toggle {
  width: 26px;
  height: 26px;
  font-size: 0.9rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

body.dark .theme-toggle {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffd700;
}

body.dark .theme-toggle {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffd700;
}


/* Темна тема: застосовується до всього body */
body.dark {
  background-color: #121212;
  color: #f5f5f5;
}

body.dark header {
  background-color: #1e1e1e;
}

body.dark .product-card {
  background-color: #222;
  color: #eee;
}

body.dark .section {
  background-color: transparent;
}

body.dark #nav-menu a {
  color: #f5f5f5;
}

body.dark #nav-menu a.active {
  border-color: #ffd700;
  color: #ffd700;
}

body.dark #backToTop {
  background-color: #444;
  color: #ffd700;
}
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 14px;
  background-color: #eee;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background-color: #ffd700;
  color: #000;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.catalog-item {
  background-color: #fff;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.catalog-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
}

.catalog-item h3 {
  font-size: 1rem;
  margin-top: 10px;
}
.catalog-button-wrapper {
  text-align: center;
  margin-top: 20px;
}

.catalog-button {
  background-color: #ffc107;
  color: #000;
  padding: 10px 20px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.catalog-button:hover {
  background-color: #e0a800;
}
.scroll-adjust {
  scroll-margin-top: 120px; /* висота хедера */
}
/* Модальне вікно */
.modal {
  display: none; /* приховано */
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  text-align: center;
}

.modal-content h3 {
  margin: 10px 0 5px;
  font-size: 18px;
  color: #111;
}

.modal-content p {
  font-size: 14px;
  color: #333;
}

.modal-close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-content img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 15px;
}
body.dark .modal-content {
  background-color: #333;
  color: #fff;
}

body.dark .modal-content h3,
body.dark .modal-content p {
  color: #fff;
}

/* Основні стилі модального вікна */
.modal-title,
.modal-description {
  color: #000;
  opacity: 1;
}

/* Для темної теми — щоб текст був білим */
body.dark-theme .modal-title,
body.dark-theme .modal-description {
  color: #fff;
}
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg-color, #fff);
  color: var(--text-color, #000);
  padding: 30px;
  max-width: 600px;
  width: 90%;
  border-radius: 10px;
  position: relative;
  text-align: center;
}

.modal-content img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  margin-bottom: 20px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}

/* Text color fixes for light/dark themes */
.modal-title, .modal-description {
  color: #000;
}

body.dark-theme .modal-title,
body.dark-theme .modal-description {
  color: #fff;
}
/* Каталог: темна тема */
body.dark .catalog-item {
  background-color: #222;
  color: #fff;
}

body.dark .catalog-item h3 {
  color: #fff;
}

.site-footer {
  background-color: #f8f8f8;
  color: #333;
  padding: 30px 15px;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid #ddd;
}
.dark-mode .site-footer {
  background-color: #1c1c1c;
  color: #eee;
}

.dark-mode .site-footer a {
  color: #ccc;
}

.dark-mode .site-footer .social-icons img {
  filter: brightness(0.8);
}

.dark-mode .site-footer .social-icons img:hover {
  filter: brightness(1);
}

.site-footer a {
  color: #333;
  text-decoration: none;
  margin: 0 8px;
}

.site-footer .footer-links {
  margin: 10px 0;
}

.site-footer .social-icons {
  margin-top: 10px;
}

.site-footer .social-icons img {
  width: 24px;
  height: 24px;
  margin: 0 5px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.site-footer .social-icons img:hover {
  opacity: 1;
}

/* Dark mode styles */
.dark-mode .site-footer {
  background-color: #1c1c1c;
  color: #eee;
}

.dark-mode .site-footer a {
  color: #ccc;
}
.social-icons {
  margin-top: 10px;
}

.social-icons a {
  display: inline-block;
  margin: 0 8px;
  color: inherit;
  transition: transform 0.3s, color 0.3s;
}

.social-icons a:hover {
  transform: scale(1.2);
  color: #4267B2; /* Facebook Blue */
}

.dark-mode .social-icons a:hover {
  color: #f5f5f5;
}
