/* ============================= */
/* ===== GRID ВЕЩЕЙ (ТОВАРЫ) ===== */
/* ===== НАЧАЛО БЛОКА ===== */

/* Общий контейнер секции товаров */
.products-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 10px 20px;
}

/* Грид товаров — 4 карточки в строке на ПК */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Картинки внутри карточек товаров */

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 14px;
  transition: 0.3s ease;
}

.product-card img:hover {
  transform: scale(1.05);
}


/* Увеличение картинки при наведении */
.product-card img:hover {
  transform: scale(1.05);
}

/* ===== Карточка товара (вставил окно) ===== */

.product-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;

  /* мягкая тень */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);

  transition: 0.3s;

  /* центрируем содержимое */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Анимация карточки при наведении */
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}



/* Неоморфный градиентный фон карточки */
.product-card {
  background: linear-gradient(145deg, #ffffff, #f3f3f3);
  border-radius: 22px;
  padding: 20px;

  box-shadow:
    15px 15px 20px rgba(0, 0, 0, 0.08),
    -8px -8px 20px rgba(255, 255, 255, 0.8);
}

/* ===== КОНЕЦ БЛОКА GRID ВЕЩЕЙ ===== */
/* ============================= */


/* ============================= */
/* ===== АДАПТИВ (RESPONSIVE) ===== */

@media (max-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================= */
/* ===== MODAL (ВСПЛЫВАЮЩЕЕ ОКНО) ===== */
/* ===== НАЧАЛО ===== */

.modal {
  display: none;

  /* фиксируем окно поверх страницы */
  position: fixed;
  inset: 0;

  background: rgba(0,0,0,0.6);

  /* центрирование контента */
  justify-content: center;
  align-items: center;

  z-index: 1000;

  padding: 20px;
  overflow-y: auto;
}

/* Контент модального окна */
.modal-content {
  background: white;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;

  overflow-y: auto;

  padding: 30px;
  border-radius: 20px;

  position: relative;
}

/* Заголовок модалки */
.modal-title {
  color: rgb(0,156,139);
  margin-bottom: 20px;
  text-align: center;
}

/* Кнопка закрытия окна — десктоп */
.close {
  position: absolute;
  top: 18px;
  right: 22px;

  width: 36px;
  height: 36px;

  display: flex;
  justify-content: center;
  align-items: center;

  font-size: 22px;
  line-height: 1;

  color: rgb(254,155,145);
  background: white;

  border-radius: 50%;

  cursor: pointer;

  box-shadow: 0 4px 12px rgba(0,0,0,0.08);

  transition: 0.25s ease;
}

/* hover эффект */
.close:hover {
  transform: scale(1.08);
}

@media (max-width: 768px) {
  .close {
    top: 12px;
    right: 12px;

    width: 42px;
    height: 42px;

    font-size: 24px;

    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  }
}

/* ===== УСЛУГИ ===== */

.services-grid {
  display: grid;

  /* ПК — 3 услуги в строке */
  grid-template-columns: repeat(3, 1fr);

  gap: 20px;
}

/* Карточка услуги */
.service-card {
  background: #ffffff;

  padding: 20px;
  border-radius: 18px;

  text-align: center;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);

  transition: all 0.3s ease;
  cursor: pointer;
}

/* Эффект при наведении */
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Текст услуги */
.service-card p {
  margin: 10px 0 8px;
  font-weight: 500;
}

/* Цена услуги */
.service-card span {
  color: rgb(0,156,139);
  font-weight: 600;
}

/* Изображение услуги */
.service-card img {
  width: 160px;
  height: 160px;

  object-fit: cover;
  border-radius: 20px;

  margin-bottom: 15px;

  max-width: 100%;
}

/* ===== Примечание в модальном окне ===== */

.modal-note {
  margin-top: 30px;

  font-size: 13px;
  color: #777;

  text-align: center;
  line-height: 1.5;
}

/* ===== Мобильная версия ===== */

@media (max-width: 768px) {

   /* 2 карточки в ряд (зафиксировано) */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* Уменьшаем карточку, чтобы помещалась в modal-content */
  .service-card {
    padding: 14px;
    border-radius: 16px;
  }

  /* Уменьшаем изображение */
  .service-card img {
    width: 110px;
    height: 110px;
    border-radius: 16px;
    margin-bottom: 10px;
  }

  /* Чуть компактнее текст */
  .service-card p {
    font-size: 14px;
    margin: 8px 0 6px;
  }

  .service-card span {
    font-size: 14px;
  }

  /* Модальное окно */
  .modal-content {
    padding: 48px;
    max-width: 95%;
  }
}
@media (max-width: 768px) {
  .modal-title {
    text-align: center;
    font-size: 18px;
    margin-bottom: 16px;
  }
}

/* ===== Красивый скролл в модалке ===== */

.modal-content {
  scrollbar-width: thin;
  scrollbar-color: rgb(0,156,139) transparent;
}

/* Chrome / Edge / Safari */
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: transparent;
  margin: 20px 0;
  border-radius: 20px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgb(0,156,139),
    rgb(254,155,145)
  );

  border-radius: 20px;
  border: 2px solid white;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  opacity: 0.85;
}

/* ============================= */
/* ===== АТЕЛЬЕ РЕМОНТ ===== */
/* ===== НАЧАЛО БЛОКА ===== */

.atelier-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Главный заголовок секции */
.atelier-section__title-main {
  margin: 0 0 20px 0;
  text-align: center;
}

/* Подзаголовок */
.atelier-section__title-sub {
  margin: 60px 0 40px 0;
  text-align: left;
}

/* ===== КОНЕЦ БЛОКА АТЕЛЬЕ ===== */