/* ── MODAL (Product Detail) ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9992;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
}
.modal-box {
  background: var(--putih);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  animation: popIn 0.32s ease;
  border: 3px solid var(--kuning);
  position: relative;
  border-radius: 20px;
}
@keyframes popIn {
  from {
    transform: scale(0.88);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.modal-img {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  border-bottom: 3px solid var(--kuning);
}
.modal-body {
  padding: 28px 30px 0;
}
.modal-body h2 {
  font-family: "Fraunces", serif;
  font-size: 1.6rem;
  color: var(--coklat);
  margin-bottom: 8px;
  font-weight: 900;
}
.modal-manfaat {
  font-size: 0.87rem;
  color: var(--coklat-mid);
  line-height: 1.7;
  margin-bottom: 20px;
}
.modal-size-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--coklat-mid);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.modal-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.modal-size {
  background: var(--krem);
  border: 2px solid rgba(160, 98, 42, 0.3);
  border-radius: 8px;
  padding: 10px 16px;
  text-align: center;
  min-width: 90px;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-size:hover,
.modal-size.selected {
  background: var(--kuning);
  border-color: var(--kuning-deep);
}
.modal-size strong {
  display: block;
  color: var(--coklat);
  font-size: 0.9rem;
}
.modal-size span {
  font-size: 0.75rem;
  color: var(--coklat-mid);
}
.modal-platform-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--coklat-mid);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.modal-platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.modal-platform-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  justify-content: center;
}
.mpb-wa {
  background: #25d366;
  color: #fff;
}
.mpb-wa:hover {
  background: #1ebe5c;
}
.mpb-gofood {
  background: #ef3c44;
  color: #fff;
}
.mpb-gofood:hover {
  background: #c42e35;
}
.mpb-shopee {
  background: #ff5722;
  color: #fff;
}
.mpb-shopee:hover {
  background: #e64a19;
}
.mpb-cart {
  background: var(--kuning);
  color: var(--coklat);
}
.mpb-cart:hover {
  background: var(--kuning-deep);
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  position: absolute;
  top: 12px;
  right: 16px;
  color: var(--coklat-mid);
  transition: color 0.2s;
  z-index: 1;
}
.modal-close:hover {
  color: var(--coklat);
}
.modal-footer-space {
  height: 24px;
}

/* qty selector in modal */
.modal-qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.modal-qty-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--coklat-mid);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.modal-qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-qty-btn {
  width: 30px;
  height: 30px;
  background: var(--krem-dark);
  border: 2px solid var(--coklat-muda);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--coklat);
}
.modal-qty-btn:hover {
  background: var(--kuning);
}
.modal-qty-val {
  font-weight: 700;
  font-size: 1rem;
  color: var(--coklat);
  min-width: 28px;
  text-align: center;
}

.modal-qty-total {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--coklat); /* sesuaikan dengan warna tema */
}

@media (max-width: 768px) {
  #mName {
    font-size: 1.1rem;
  }
}
