.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100000;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #322D29;

}

.modal-container {
  position: relative;
  max-width: 1130px;
  width: 100%;
  max-height: 90vh;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  animation: modalAppear 0.3s ease;
  border: 0.5px solid #DFDAD8;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  transition: color 0.3s;
  width: 50px;
  height: 50px;
  right: 20px;
  top: 20px;
  background: #FFFFFF;
  border-radius: 42px;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 30px;
  overflow-y: auto;
  max-height: calc(90vh - 80px);
}

.modal-container .loading-spinner {
  text-align: center;
}

/* Стили для контента товара в модальном окне */


.product-modal-content {
  display: grid;
  grid-template-columns: 378px 1fr;
  gap: 44px;
}

.product-modal-content .gallery {
  width: 100%;
  max-height: 496px;
  border-radius: 16px;
  overflow: hidden;
}

.product-modal-content .gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  overflow: hidden;
}

.product-modal-content .slider .prev-arrow,
.product-modal-content .slider .next-arrow {
  position: absolute;
  top: 50%;
  width: 32px;
  height: 32px;
  transform: translateY(-50%);
  border-radius: 40px;
  background-color: #fff;
  cursor: pointer;
}

.product-modal-content .slider .prev-arrow svg,
.product-modal-content .slider .next-arrow svg {
  width: 32px;
  height: 32px;
}

.product-modal-content .slider .prev-arrow:hover svg path,
.product-modal-content .slider .next-arrow:hover svg path {
  stroke: #000;
}

.product-modal-content .slider .prev-arrow {
  z-index: 2;
  left: 16px;
}

.product-modal-content .slider .next-arrow {
  z-index: 2;
  right: 16px;
}


.product-modal-content .name {
  font-family: 'Orchidea Pro';
  font-style: normal;
  font-weight: 400;
  font-size: 36px;
  line-height: 36px;
  color: #322D29;
  margin-bottom: 9px;
}

.product-modal-content .subtitle {
  font-family: 'Euclid Circular A';
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 140%;
  color: #65625F;
  margin-bottom: 24px;
}

.product-modal-content .price {
  font-family: 'Euclid Circular A';
  font-style: normal;
  font-weight: 500;
  font-size: 22px;
  line-height: 120%;
  color: #322D29;
  margin-bottom: 24px;
}

.product-modal-content .link {
  display: inline-block;
  font-family: 'Euclid Circular A';
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 20px;
  font-feature-settings: 'liga' off;
  color: #FFFFFF;
  flex-direction: row;
  justify-content: center;
  padding: 14px 60px;
  gap: 10px;
  background: #A78D76;
  border-radius: 51px;
  margin-bottom: 24px;
}

.product-modal-content .link:hover {
  background: #8f755e;
}

.product-modal-content .description {
  font-family: 'Euclid Circular A';
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 155%;
  color: #65625F;
  margin-bottom: 24px;
}

.product-modal-content .specifications {
  font-family: 'Euclid Circular A';
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 155%;
  color: #65625F;
}


.specifications .line {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.specifications .title {
  flex-shrink: 0;
  font-family: 'Euclid Circular A';
}

.specifications .dots {
  flex-grow: 1;
  border-bottom: 1px dashed #DFDAD8;
  margin: 0 8px;
  height: 1em;
  min-width: 20px;
}

.specifications .value {
  font-family: 'Euclid Circular A';
  text-align: right;
}


@media (max-width: 782px) {
  .product-modal-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .product-modal-content .gallery {
    height: 300px;
  }

  .product-modal-content .slick-slider {
    height: 300px;
  }

  .product-modal-content {
    grid-template-columns: 1fr;
  }

  .modal-body {
    padding: 12px;
  }

  .modal-close {
    width: 32px;
    height: 32px;
    top: 8px;
    right: 8px;
  }

  .modal {
    align-items: start;
    padding-top: 48px;
  }
  .modal-body {
    max-height: calc(90vh - 10px);
  }
}
