/* ===== Overlay Detalle de Producto ===== */
.product-detail {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
  overflow:hidden;
  background: rgba(0,0,0,.6);
  z-index: 1000;
}
.product-detail[aria-hidden="false"] { display: flex; }

.product-detail__panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: min(100%, 1100px);
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - max(16px,env(safe-area-inset-top)) - max(16px,env(safe-area-inset-bottom)));
  background: #0e0e0e;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 16px;
  overflow: auto;
}
@media (min-width: 900px) {
  .product-detail__panel {
    grid-template-columns: 1.1fr .9fr;
    gap: 24px;
    padding: 20px;
  }
}

.product-detail__close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 22px;
  cursor: pointer;
}

.product-detail__media {
  background: #0a0a0a;
  border-radius: 14px;
  display: grid;
  place-items: center;
  min-height: 280px;
}
.product-detail__media img {
  width: 100%;
  height: 100%;
  max-height: 70vh;
  max-height: 70dvh;
  object-fit: contain;
}

.product-detail__info { display: flex; flex-direction: column; gap: 12px; }
.pd-name  { margin:.2em 0 0; font-size: clamp(20px,3.2vw,28px); }
.pd-price { margin:0; color:#ddd; font-weight:600; }
.pd-desc  { margin:.2em 0 0; color:#cfcfcf; line-height:1.5; }

.pd-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-top:8px; }
.pd-size, .pd-qty {
  background:#111; border:1px solid rgba(255,255,255,.12); color:#fff;
  border-radius:10px; padding:8px 10px;
}
.pd-size-label, .pd-qty-label { display:flex; flex-direction:column; gap:6px; font-size:14px; color:#cfcfcf; }
.btn-primary {
  background:#fff; color:#000; font-weight:700; border:0; border-radius:14px;
  padding:10px 16px; cursor:pointer; transition:transform .2s ease, opacity .2s ease;
}
.btn-primary:active { transform:scale(.98); }
.btn-primary:hover  { opacity:.92; }

/* ===== Toast ===== */
.toast{
  position:fixed; left:50%; bottom:24px;
  bottom:max(24px,env(safe-area-inset-bottom));
  transform:translateX(-50%) translateY(20px);
  background:#111; border:1px solid rgba(255,255,255,.12);
  padding:10px 14px; border-radius:12px;
  opacity:0; pointer-events:none;
  transition:opacity .25s ease, transform .25s ease; z-index:1200;
}
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
