/* Контейнер для сетки карточек */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1200px; 
  margin: 0 auto; /* Центрируем сетку на странице */
  padding: 30px 15px; /* Отступы сверху/снизу и по бокам для мобилок */
  box-sizing: border-box;
}

.uc-img-hidden {
    display: none;
}

/* Ограничение ширины модального окна */
.modal-content {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  max-width: 600px; 
  width: 90%;
  position: relative;
  font-family: var(--tf-main-font-family), Arial, sans-serif;
  box-sizing: border-box;
  animation: fadeIn 0.3s ease;
}

/* Настройка картинок внутри карточек, чтобы они не вылезали */
.product-card img {
  width: 100%;
  height: 200px; /* Фиксированная высота для ровности сетки */
  object-fit: cover; /* Картинка заполнит область без искажений */
  border-radius: 4px;
  margin-bottom: 10px;
}




.product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  transition: transform 0.2s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}


/* Стили модального окна */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.product-card, 
.modal-content {
  /* inherit заставит блок использовать шрифт, заданный в настройках Тильды */
    font-family: 'Open Sans';
  color: #333; /* основной цвет текста */
}

.product-card h3 {
  font-family: inherit;
  font-weight: 600; /* делаем заголовок жирнее */
}


.modal-close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 30px;
  cursor: pointer;
  color: #333;
  

}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media screen and (max-width: 480px), (orientation: landscape) and (max-height: 480px) {
   .product-grid {
  padding: 15px 15px; /* Отступы сверху/снизу и по бокам для мобилок */
 
}
}