/* ============== monument.css ============== */
/* Общие стили для страницы каталога памятников */

/* Навигация по категориям */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 20px auto 30px;
  padding: 0 15px;
  max-width: 1400px;
}

.category-nav-link {
  display: inline-block;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s;
  cursor: pointer;
}

.category-nav-link:hover,
.category-nav-link.active {
  background: #007aff;
  border-color: #007aff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Заголовки секций */
.section-title {
  color: white;
  font-size: 28px;
  font-weight: 600;
  margin: 40px 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #007aff;
  display: inline-block;
}

/* Сетка каталога */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  padding: 10px 0 20px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Карточка товара */
.catalog-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
}

.catalog-item:hover {
  transform: translateY(-2px);
  border-color: #007aff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.catalog-item-image {
  position: relative;
  height: 180px;
  overflow: hidden;
  cursor: pointer;
}

.catalog-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.catalog-item:hover .catalog-item-image img {
  transform: scale(1.05);
}

.catalog-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.catalog-item:hover .catalog-item-overlay {
  opacity: 1;
}

.catalog-item-overlay i {
  color: white;
  font-size: 28px;
  background: rgba(0, 122, 255, 0.8);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 15px;
}

.catalog-item-info h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: white;
  line-height: 1.3;
}

.catalog-item-info p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 10px;
  flex: 1;
}

.catalog-item-price {
  color: #ffd700;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Кнопки */
.add-to-cart-small {
  background-color: #007aff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  box-sizing: border-box;
}

.add-to-cart-small i {
  font-size: 16px;
}

.add-to-cart-small:hover {
  background-color: #005bb5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

/* Иконка корзины в шапке */
.header-left {
  display: flex;
  align-items: center;
  width: 100%;
}

.cart-icon {
  position: relative;
  cursor: pointer;
  padding: 10px;
  color: white;
  font-size: 24px;
  transition: opacity 0.3s;
  margin-left: auto;
}

.cart-icon:hover {
  opacity: 0.8;
}

.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #007aff;
  color: white;
  font-size: 12px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Заголовок страницы */
.page-title {
  color: white;
  text-align: center;
  font-size: 36px;
  font-weight: 600;
  margin: 20px 0 30px;
  letter-spacing: 1px;
}

/* Кнопка назад */
.back-button {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  margin-right: 15px;
  padding: 8px;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Блок дополнительной информации */
.catalog-more-info {
  background: #000;
  border-radius: 0;
  padding: 30px 20px;
  max-width: 1400px;
  margin: 40px auto 30px;
  text-align: center;
  color: #fff;
  box-shadow: none;
  clear: both;
  width: 100%;
  box-sizing: border-box;
}

.catalog-more-info h3 {
  font-size: 28px;
  margin-bottom: 15px;
  color: #007aff;
  font-weight: 600;
}

.catalog-more-info p {
  font-size: 16px;
  line-height: 1.5;
  margin: 10px 0;
  color: #ddd;
}

.contact-info-block {
  margin-top: 25px;
  padding-top: 15px;
}

.contact-phone {
  margin: 15px 0;
  font-size: 24px;
  font-weight: 600;
}

.contact-phone i {
  margin-right: 10px;
  color: #007aff;
}

.contact-phone a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.contact-phone a:hover {
  color: #007aff;
}

.contact-messengers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.contact-messengers span {
  color: #ccc;
  font-size: 16px;
}

.contact-messengers a {
  color: #fff;
  font-size: 32px;
  transition: all 0.3s;
  line-height: 1;
}

.contact-messengers a:hover {
  color: #007aff;
  transform: scale(1.2);
}

/* Модальное окно детального просмотра */
.product-detail-modal .modal-content {
  max-width: 900px;
  width: 90%;
  background: #1e1e1e;
  border-radius: 20px;
  overflow: hidden;
}

.product-detail-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #2a2a2a;
  border-bottom: 1px solid #3a3a3a;
}

.product-detail-modal .modal-header h3 {
  margin: 0;
  color: white;
  font-size: 20px;
  font-weight: 500;
}

.modal-back {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.modal-back:hover {
  background: rgba(255, 255, 255, 0.1);
}

.product-detail-body {
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
  gap: 30px;
}

.product-detail-image {
  flex: 1 1 300px;
  max-width: 400px;
  margin: 0 auto;
}

.product-detail-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.product-detail-info {
  flex: 1 1 300px;
  color: white;
}

.product-detail-info h4 {
  font-size: 24px;
  margin: 0 0 15px;
  color: #fff;
}

.product-detail-description {
  font-size: 16px;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 20px;
  white-space: pre-line;
}

.product-detail-price {
  font-size: 28px;
  font-weight: 600;
  color: #ffd700;
  margin-bottom: 25px;
}

#detailAddToCart {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  background: #007aff;
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

#detailAddToCart:hover {
  background: #005bb5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

/* Адаптация для разных экранов */

/* Для больших экранов */
@media (min-width: 1920px) {
  .catalog-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
  }

  .catalog-item-image {
    height: 200px;
  }
}

/* Для средних экранов */
@media (max-width: 1400px) {
  .catalog-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }
}

/* Для ноутбуков */
@media (max-width: 1200px) {
  .catalog-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .catalog-item-image {
    height: 160px;
  }
}

/* Для планшетов */
@media (max-width: 992px) {
  .catalog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .category-nav-link {
    padding: 10px 20px;
    font-size: 14px;
  }

  .page-title {
    font-size: 30px;
  }

  .section-title {
    font-size: 24px;
  }
}

/* Для маленьких планшетов */
@media (max-width: 768px) {
  .header-left {
    flex-wrap: wrap;
  }

  .cart-icon {
    font-size: 22px;
  }

  .page-title {
    font-size: 26px;
    margin-bottom: 20px;
  }

  .back-button {
    font-size: 20px;
    margin-right: 10px;
  }

  .category-nav {
    gap: 8px;
    margin: 15px auto 20px;
  }

  .category-nav-link {
    padding: 8px 16px;
    font-size: 13px;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .catalog-item-image {
    height: 140px;
  }

  .catalog-item-info h4 {
    font-size: 16px;
  }

  .catalog-item-info p {
    font-size: 12px;
  }

  .catalog-item-price {
    font-size: 16px;
  }

  .add-to-cart-small {
    padding: 8px 10px;
    font-size: 13px;
  }

  .catalog-more-info h3 {
    font-size: 22px;
  }

  .catalog-more-info p {
    font-size: 14px;
  }

  .contact-phone {
    font-size: 20px;
  }

  .contact-messengers a {
    font-size: 28px;
  }
}

/* Для мобильных */
@media (max-width: 576px) {
  .page-title {
    font-size: 22px;
    margin-bottom: 15px;
  }

  .category-nav {
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }

  .category-nav-link {
    width: 100%;
    text-align: center;
    padding: 10px;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .catalog-item-image {
    height: 120px;
  }

  .catalog-item-info {
    padding: 10px;
  }

  .catalog-item-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
  }

  .catalog-item-info p {
    font-size: 11px;
    line-height: 1.3;
    margin-bottom: 8px;
  }

  .catalog-item-price {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .add-to-cart-small {
    padding: 6px 8px;
    font-size: 12px;
    gap: 5px;
  }

  .add-to-cart-small i {
    font-size: 12px;
  }

  .catalog-more-info {
    padding: 20px 15px;
    margin: 30px auto 20px;
  }

  .catalog-more-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .catalog-more-info p {
    font-size: 13px;
    margin: 8px 0;
  }

  .contact-phone {
    font-size: 18px;
    margin: 10px 0;
  }

  .contact-messengers {
    gap: 15px;
  }

  .contact-messengers span {
    width: 100%;
    margin-bottom: 5px;
    font-size: 14px;
  }

  .contact-messengers a {
    font-size: 24px;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 400px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .catalog-item-image {
    height: 180px;
  }

  .catalog-item {
    max-width: 280px;
    margin: 0 auto;
    width: 100%;
  }
}

/* Touch оптимизация */
.modal-back,
.modal-close,
#detailAddToCart,
.add-to-cart-small,
.catalog-item-overlay,
.category-nav-link {
  touch-action: manipulation;
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.catalog-section {
  animation: fadeIn 0.5s ease-out;
}

.catalog-item {
  animation: fadeIn 0.5s ease-out;
  animation-fill-mode: both;
}

.catalog-item:nth-child(1) {
  animation-delay: 0.05s;
}
.catalog-item:nth-child(2) {
  animation-delay: 0.1s;
}
.catalog-item:nth-child(3) {
  animation-delay: 0.15s;
}
.catalog-item:nth-child(4) {
  animation-delay: 0.2s;
}
.catalog-item:nth-child(5) {
  animation-delay: 0.25s;
}
.catalog-item:nth-child(6) {
  animation-delay: 0.3s;
}
.catalog-item:nth-child(7) {
  animation-delay: 0.35s;
}
.catalog-item:nth-child(8) {
  animation-delay: 0.4s;
}
.catalog-item:nth-child(9) {
  animation-delay: 0.45s;
}
.catalog-item:nth-child(10) {
  animation-delay: 0.5s;
}
/* ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ МОБИЛЬНОЙ ВЕРСИИ */
/* Исправление сетки для мобильных устройств */
@media (max-width: 576px) {
  /* Принудительно делаем 2 колонки */
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }

  /* Убираем ограничение максимальной ширины для карточек */
  .catalog-item {
    max-width: none !important;
    width: 100% !important;
  }

  /* Уменьшаем высоту изображений */
  .catalog-item-image {
    height: 140px;
  }
}

/* Исправление для очень маленьких экранов */
@media (max-width: 400px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px;
  }

  .catalog-item-image {
    height: 120px;
  }
}

/* Стили для модального окна на мобильных устройствах */
@media (max-width: 768px) {
  .product-detail-modal .modal-content {
    width: 95%;
    max-width: 95%;
    margin: 10px auto;
  }

  .product-detail-modal .modal-header {
    padding: 12px 15px;
  }

  .product-detail-modal .modal-header h3 {
    font-size: 18px;
  }

  .product-detail-body {
    padding: 15px;
    gap: 15px;
  }

  .product-detail-image {
    max-width: 100%;
  }

  .product-detail-image img {
    max-height: 250px;
    object-fit: contain;
  }

  .product-detail-info h4 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .product-detail-description {
    font-size: 14px;
    line-height: 1.5;
  }

  .product-detail-price {
    font-size: 22px;
    margin-bottom: 15px;
  }

  #detailAddToCart {
    padding: 12px;
    font-size: 16px;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
  .product-detail-modal .modal-header h3 {
    font-size: 16px;
  }

  .product-detail-body {
    padding: 10px;
    gap: 10px;
  }

  .product-detail-image img {
    max-height: 200px;
  }

  .product-detail-info h4 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .product-detail-description {
    font-size: 13px;
  }

  .product-detail-price {
    font-size: 20px;
  }

  #detailAddToCart {
    padding: 10px;
    font-size: 15px;
  }

  .modal-back,
  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}
/* ============== СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА ДЕТАЛЬНОГО ПРОСМОТРА ============== */

/* Основное модальное окно */
.product-detail-modal .modal-content {
  max-width: 500px;
  width: 90%;
  background: #1a1a1a;
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid rgba(255, 215, 0, 0.3);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 215, 0, 0.2);
  animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Шапка модального окна */
.product-detail-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #2a2a2a;
  border-bottom: 2px solid #007aff;
  position: relative;
}

.product-detail-modal .modal-header h3 {
  margin: 0;
  color: white;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex: 1;
  text-align: center;
}

/* Кнопка назад */
.modal-back {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-back:hover {
  background: #007aff;
  transform: scale(1.1);
  border-color: #007aff;
}

/* Кнопка закрытия */
.product-detail-modal .modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.product-detail-modal .modal-close:hover {
  background: #ff3b30;
  transform: scale(1.1);
  border-color: #ff3b30;
}

/* Тело модального окна */
.product-detail-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Контейнер для изображения с рамкой */
.product-detail-image {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid #ffd700;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 215, 0, 0.3);
  background: #000;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  transition: transform 0.3s;
}

.product-detail-image:hover img {
  transform: scale(1.02);
}

/* Декоративный элемент - уголки рамки */
.product-detail-image::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 30px;
  border-top: 3px solid #ffd700;
  border-left: 3px solid #ffd700;
  z-index: 2;
  pointer-events: none;
}

.product-detail-image::after {
  content: "";
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-bottom: 3px solid #ffd700;
  border-right: 3px solid #ffd700;
  z-index: 2;
  pointer-events: none;
}

/* Информация о товаре */
.product-detail-info {
  color: white;
  padding: 10px 5px;
}

.product-detail-info h4 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 15px;
  color: #ffd700;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
  padding-bottom: 10px;
}

.product-detail-description {
  font-size: 15px;
  line-height: 1.6;
  color: #e0e0e0;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.5);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.product-detail-price {
  font-size: 28px;
  font-weight: 700;
  color: #ffd700;
  margin-bottom: 20px;
  text-align: center;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Кнопка добавления в корзину */
#detailAddToCart {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  background: linear-gradient(135deg, #007aff, #005bb5);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.4);
}

#detailAddToCart:hover {
  background: linear-gradient(135deg, #005bb5, #004080);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.6);
}

#detailAddToCart i {
  font-size: 20px;
}

/* ============== МОБИЛЬНЫЕ СТИЛИ ============== */
@media (max-width: 768px) {
  .product-detail-modal .modal-content {
    width: 95%;
    border-radius: 20px;
  }

  .product-detail-modal .modal-header {
    padding: 12px 15px;
  }

  .product-detail-modal .modal-header h3 {
    font-size: 16px;
  }

  .modal-back,
  .product-detail-modal .modal-close {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .product-detail-body {
    padding: 15px;
    gap: 15px;
  }

  .product-detail-image {
    border-width: 2px;
  }

  .product-detail-image::before,
  .product-detail-image::after {
    width: 20px;
    height: 20px;
    border-width: 2px;
  }

  .product-detail-info h4 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .product-detail-description {
    font-size: 14px;
    padding: 12px;
  }

  .product-detail-price {
    font-size: 24px;
    padding: 10px;
  }

  #detailAddToCart {
    padding: 14px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .product-detail-modal .modal-content {
    width: 98%;
    border-radius: 16px;
  }

  .product-detail-body {
    padding: 12px;
  }

  .product-detail-image {
    border-width: 2px;
  }

  .product-detail-image::before,
  .product-detail-image::after {
    width: 15px;
    height: 15px;
  }

  .product-detail-info h4 {
    font-size: 18px;
  }

  .product-detail-description {
    font-size: 13px;
    padding: 10px;
  }

  .product-detail-price {
    font-size: 22px;
  }

  #detailAddToCart {
    padding: 12px;
    font-size: 15px;
  }
}
/* ============== МОДАЛЬНОЕ ОКНО (image-preview-modal) ============== */
.image-preview-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Полупрозрачный фон */
  z-index: 10000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px); /* Легкое размытие фона */
}

.image-preview-modal.active {
  display: flex;
}

.image-preview-overlay {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.image-preview-container {
  position: relative;
  display: inline-block;
  max-width: 90vw;
  max-height: 90vh;
  background: transparent; /* Прозрачный фон контейнера */
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2); /* Полупрозрачная рамка */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Контейнер для изображения - без отступов */
.image-preview-image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent; /* Прозрачный фон */
  max-width: 100%;
  max-height: 90vh;
}

.image-preview-container img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent; /* Прозрачный фон */
  border: none;
  border-radius: 8px; /* Легкое скругление */
}

/* Кнопка закрытия (крестик) */
.image-preview-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.image-preview-close:hover {
  background: rgba(255, 59, 48, 0.8);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

/* Мобильные стили */
@media (max-width: 768px) {
  .image-preview-container {
    border-radius: 10px;
  }

  .image-preview-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .image-preview-close {
    width: 32px;
    height: 32px;
    font-size: 16px;
    top: 8px;
    right: 8px;
  }
}
