/* =====================================================
   MODAL OVERLAY
===================================================== */
.modal{
  display:none;
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.82);
  z-index: 5000; /* above chat widget */
  padding: 24px 12px;
  overflow:auto;
}

/* =====================================================
   MODAL BOX
===================================================== */
.modal-content{
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 4vh auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  border: 1px solid rgba(0,0,0,.08);

  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 18px;
}

/* Close */
.modal .close{
  position:absolute;
  top: 10px;
  right: 14px;
  font-size: 30px;
  line-height: 1;
  color: #222;
  opacity: .55;
  cursor:pointer;
}
.modal .close:hover{ opacity: 1; }

/* =====================================================
   IMAGE AREA
===================================================== */
#modalImageContainer{
  display:flex;
  justify-content:center;
  align-items:center;
  background: #f7f7f7;
  border-radius: 14px;
  min-height: 320px;
  border: 1px solid rgba(0,0,0,.06);
  padding: 10px;
}

#modalImageContainer img,
.modalImage{
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}

/* =====================================================
   DETAILS
===================================================== */
.modal-details{
  display:flex;
  flex-direction: column;
  gap: 10px;
  color: #0f1111;
  padding: 6px 6px;
}

#modalTitle{
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
}

#modalDescription{
  margin: 0;
  color: #565959;
  font-size: 14px;
  line-height: 1.5;
  max-height: 220px;
  overflow:auto;
  padding-right: 6px;
}

#modalRating{ color: #f0c14b; font-size: 14px; }

#modalPrice{
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  color: #b12704;
}

/* Button */
#modalBuyButton{
  margin-top: auto;
  width: 100%;
  padding: 12px 14px;
  background: #ffd814;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  font-weight: 900;
  cursor:pointer;
}
#modalBuyButton:hover{ background:#f7ca00; }

/* =====================================================
   MOBILE
===================================================== */
@media (max-width: 768px){
  .modal-content{
    grid-template-columns: 1fr;
  }
  #modalImageContainer{ min-height: 240px; }
}
