/* Quick-view modal — used on shop + category pages */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 26, 29, 0.7);
  cursor: pointer;
}
.modal-dialog {
  position: relative;
  background: var(--cream-50);
  border-radius: 14px;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: var(--shadow-lg);
}
.modal-media {
  aspect-ratio: 3/4;
  background: var(--surface);
}
.modal-body {
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
}
.modal-eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-mini);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-500);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 6px 0 0;
  color: var(--ink-800);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.modal-meta {
  color: var(--text-muted);
  font-size: var(--fs-small);
  margin-top: 8px;
}
.modal-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink-800);
  margin-top: 12px;
}
.modal-desc {
  margin-top: 16px;
  font-size: var(--fs-small);
  line-height: 1.65;
}
.modal-cta {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.modal-cta .btn {
  padding: 12px 22px;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: var(--cream-50);
  border: 1px solid var(--border);
  font-size: 22px;
  line-height: 1;
  color: var(--ink-800);
  cursor: pointer;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast) var(--ease-silk);
}
.modal-close:hover,
.modal-close:focus-visible {
  background: var(--ink-800);
  color: var(--cream-50);
  border-color: var(--ink-800);
  outline: none;
}
body.modal-open { overflow: hidden; }

@media (max-width: 640px) {
  .modal { padding: 0; }
  .modal-dialog {
    grid-template-columns: 1fr;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  .modal-media {
    aspect-ratio: 16/10;
  }
  .modal-body { padding: 24px 20px 24px; }
}

/* Hidden cards stay hidden across grid layout */
.product-card[hidden] { display: none !important; }

/* Inline SVG placeholders fill the card + modal media slots */
.product-card__media { position: relative; }
.product-card__media svg,
.modal-media svg {
  display: block;
  width: 100%;
  height: 100%;
}
