/* =========================
   MODAL ROOT
========================= */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.product-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =========================
   BACKDROP
========================= */
.modal-overlay {
  position: absolute;
  inset: 0;

  background: rgba(0, 0, 0, 0.7);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  opacity: 0;

  transition: opacity 0.25s ease;
}

.product-modal.active .modal-overlay {
  opacity: 1;
}

/* =========================
   MODAL CONTENT
========================= */
.modal-content {
  position: relative;

  width: 90%;
  max-width: 700px;
  max-height: 90vh;

  overflow-y: auto;

  background: rgba(20, 20, 20, 0.55);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 18px;

  padding: 24px;

  z-index: 2;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);

  transform: translateY(20px) scale(0.96);
  opacity: 0;

  transition: all 0.25s ease;
}

.product-modal.active .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* =========================
   MEDIA (IMAGE / VIDEO)
========================= */
.modal-media {
  width: 100%;
  aspect-ratio: 16 / 9;

  overflow: hidden;

  margin-bottom: 20px;

  border-radius: 12px;

  background: #000;
}

/* IMAGE (fallback) */
.modal-image {
  width: 100%;
  height: 100%;

  object-fit: cover;

  display: block;
}

/* VIDEO */
.modal-video {
  width: 100%;
  height: 100%;

  object-fit: contain;

  background: #000;
}

/* =========================
   TEXT CONTENT
========================= */
.modal-title {
  font-size: 24px;
  font-weight: 600;

  color: #fff;

  margin-bottom: 14px;
}

.modal-price {
  font-size: 20px;
  font-weight: 600;

  color: #fff;

  margin-bottom: 16px;
}

.modal-description {
  font-size: 15px;
  line-height: 1.7;

  color: rgba(255, 255, 255, 0.72);
}

/* =========================
   CLOSE BUTTON
========================= */
#product-modal .modal-content {
  background: rgba(15, 15, 15, 0.92);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  border: 1px solid rgba(255, 255, 255, 0.08);

  color: #fff;
}

/* =========================
   MODAL CLOSE BUTTON
========================= */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;

  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  margin: 0;

  border: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);

  color: #fff;

  font-size: 28px;
  font-size: 28px;
  line-height: 1;
  padding-bottom: 5px;

  cursor: pointer;

  transition:
    background 0.25s ease,
    transform 0.2s ease;
}

/* Hover */
.modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.05);
}

/* Remove default browser weird spacing */
.modal-close span,
.modal-close::before,
.modal-close::after {
  line-height: 1;
}

/* =========================
   SCROLL LOCK
========================= */
body.modal-open {
  overflow: hidden;
}

/* Hide scrollbar but keep scrolling */
.modal-content {
  overflow-y: auto;

  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.modal-content::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}
