/* === Modal Backdrop === */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal.open {
  display: block;
}

/* === Modal Box === */
.modal-content {
  background: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  height: 500px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

/* === Modal Header === */
.modal-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
}

/* === Modal Body === */
.modal-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* === Image Carousel Container === */
.image-carousel {
  position: relative;
  width: 100%;
  height: 250px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

/* === Modal Image === */
.modal-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

/* === Carousel Arrows === */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: rgba(255,255,255,0.8);
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s ease;
}

.carousel-btn:hover {
  color: #27ae60;
}

.left-btn {
  left: 10px;
}

.right-btn {
  right: 10px;
}

/* === Close Button === */
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

.close:hover {
  color: #000;
}

/* === Modal Text Content === */
.modal-content-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  margin-top: 10px;
}

.modal-author,
.modal-date {
  font-size: 0.85rem;
  color: #7f8c8d;
  margin-bottom: 8px;
}

.modal-counter {
  font-size: 0.85rem;
  color: #7f8c8d;
  margin-top: 10px;
  text-align: right;
}

/* === Product Details Inside Modal === */
.product-details {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: #34495e;
}

.product-price {
  font-weight: bold;
  color: #27ae60;
}

.product-category {
  font-style: italic;
  color: #7f8c8d;
}

/* === Responsive Modal === */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
}
