html {
  scroll-behavior: smooth;
}


body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: black;
    color: white;
  }
  
  .page-container {
    max-width: 1920px;
    margin: 0 auto;
  }
  
  .header {
    position: relative;
    height: 800px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #f5f5f5;
    padding: 20px;
  }
  
  .logo {
    width: 300px;
    height: 99px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  nav a {
    color: #f5f5f5;
    margin: 0 10px;
    text-decoration: none;
  }
  
  .title {
    color: #FED507;
    font-size: 2em;
    margin-top: 250px;
  }
  
  .subtitle {
    font-size: 3em;
    margin-bottom: 20px;
  }
  
  .btn-shop, .btn-learn, .btn-read {
    background-color: #FED507;
    color: black;
    padding: 15px 30px;
    display: inline-block;
    margin: 10px;
    cursor: pointer;
  }
  
  .top-products, .featured, .about {
    padding: 60px 0;
    text-align: center;
  }
  
  .product-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
  }
  
  .product-card {
    width: 260px;
    height: 350px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-radius: 8px;
  }
  
  .product-card p {
    margin: 0;
    text-shadow: 0 3px 9px rgba(0, 0, 0.9);
  }
  
  .product-price {
    font-weight: bold;
    font-size: 1.1em;
  }
  
  .product-name {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
  }
  
  .price {
    background-color: #FED507;
    color: black;
    padding: 10px;
    width: 60px;
    text-align: center;
    border-radius: 4px;
  }
  
  /* Остальной CSS — без изменений */
  
  
  .gallery .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
    padding: 0 40px;
  }
  
  .gallery-item {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
  }
  
  footer {
    padding-top: 60px;
    color: #f5f5f5;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
  }
  
  .footer-col h4 {
    color: #e9bd8d;
  }
  
  .footer-col p {
    margin: 4px 0;
  }
  
  .news-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .news-img {
    width: 100px;
    height: 67px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-right: 10px;
  }
  
  .header {
    position: relative;
    height: 800px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #f5f5f5;
    padding: 0;
  }

  .header::before,
.header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-size: 200% 200%;
  animation: gradientMove 10s linear infinite;
  transition: opacity 1s ease;
}

/* Горизонтальный градиент (по умолчанию) */
.header::before {
  background: linear-gradient(to right, rgba(0, 0, 0, 1), transparent);
  opacity: 1;
}

/* Вертикальный градиент (изначально скрыт) */
.header::after {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 1), transparent);
  opacity: 0;
}

.header.scrolled::before {
  opacity: 0;
}

.header.scrolled::after {
  opacity: 1;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

  
  .header-top {
    box-sizing: border-box; /* <-- ВКЛЮЧАЕТ padding в ширину */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
  
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(17, 17, 17, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 0 0 12px 12px;
    padding: 10px 40px;
  }
  
  
  .nav-menu a {
    color: #f5f5f5;
    margin: 0 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
  }

  .nav:hover {
    cursor: pointer;
    text-decoration: underline;
  }
  
  .logo {
    height: 99px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  .header-content {
    position: absolute;
    top: -60px; /* отступ сверху */
    left: 40px; /* отступ слева */
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 2;
  }
  
  .title {
    color: #FED507;
    font-size: 2.8em;
    margin-bottom: 10px;
  }
  
  .subtitle {
    font-size: 3.6em;
    font-weight: bold;
    margin-bottom: 30px;
  }
  
  .header-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  
  .btn-shop, .btn-learn {
    background-color: #FED507;
    color: black;
    padding: 15px 30px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
  }
  
  .btn-shop:hover, .btn-learn:hover {
    background-color: #e6bd00;
  }
  .hidden {
    display: none;
  }
  
  .contacts {
    padding: 60px 40px;
    color: #fff;
    text-align: center;
  }
  
  .contacts p {
    margin: 10px 0;
    font-size: 16px;
  }
  
  .map-container {
    margin-top: 30px;
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
  }

  .scroll-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
  }
  
  .scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  
  @media (max-width: 768px) {
    .header-content {
      margin: 20px;
    }
  
    .title {
      font-size: 1.8em;
    }
  
    .subtitle {
      font-size: 2.4em;
    }
  
    .header-buttons {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
    }
  }
  
  /* Бургер */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  width: 30px;
  height: 25px;
  gap: 6px;
  z-index: 1100;
}

.burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: 0.4s;
}

/* Переход в крестик */
.burger.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.burger.open span:nth-child(2) {
  opacity: 0;
}
.burger.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Мобильное меню (по умолчанию скрыто) */
.nav-menu {
  display: flex;
  gap: 20px;
}

@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background-color: rgba(0, 0, 0, 0.97);
    flex-direction: column;
    align-items: flex-start;
    padding: 60px 20px;
    gap: 25px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .nav-menu.open {
    transform: translateX(0);
  }
}

.logo-desktop {
  background-image: url('images/logo-2.svg');
}

.logo-mobile {
  background-image: url('images/logo-mobile.svg');
}

/* По умолчанию скрыть мобильный логотип */
.logo-mobile {
  display: none;
}

/* На мобильных: скрыть десктопный логотип и показать мобильный */
@media (max-width: 768px) {
  .logo-desktop {
    display: none;
  }

  .logo-mobile {
    display: block;
    width: 40px;
  }
}

.price-wrapper {
  display: flex;
  align-items: center;
  gap: 140px;
}

.tooltip-icon {
  background-color: #FED507;
  color: black;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  line-height: 40px;
  cursor: pointer;
  transition: background 0.3s;
}

.tooltip-box {
  position: absolute;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  max-width: 200px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  white-space: normal;
}

.tooltip-icon:hover {
  background-color: #e6bd00;
}

.so-menu {
  display: none;
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

.product-card {
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  /* высота градиента — подкорректируйте по вкусу */
  height: 50%; 
  /* от чёрного внизу к прозрачному наверху */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Текст и цена поверх градиента */
.product-card p,
.product-card .price-wrapper {
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  .scroll-fade,
  .scroll-fade.visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* --- Modal styles --- */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
}

.gallery-modal .gm-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.gallery-modal img {
  display: block;
  /* 1) Правильно — vw, а не wv */
  max-width: 85vw;

  /* 2) Чтобы не вылезало по вертикали */
  max-height: 85vh;

  /* 3) Подстройка размеров по соотношению сторон */
  width: auto;
  height: auto;

  /* 4) Пригодится, чтобы всегда «вписывать» картинку */
  object-fit: contain;

  margin: 0 auto;
  border-radius: 4px;
}


.gallery-modal .gm-close {
  position: fixed;
  top: 20px; right: 30px;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 2100;
}

.gallery-modal .gm-prev,
.gallery-modal .gm-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 3rem;
  padding: 0 12px;
  cursor: pointer;
  user-select: none;
}

.gallery-modal .gm-prev { left: -50px; }
.gallery-modal .gm-next { right: -50px; }

/* адаптив: стрелки ближе к краям при очень узких экранах */
@media (max-width: 480px) {
  .gallery-modal .gm-prev { left: 10px; }
  .gallery-modal .gm-next { right: 10px; }
}

@media (max-width: 480px) {
  .gallery-modal img {
    max-width: 95vw;
  }
} 

@media (max-width: 480px) {
  .gm-image {
    max-width: 95vw;
  }
}