.purchase-modal-open { overflow: hidden; }
.purchase-modal-overlay[hidden] { display: none; }
.purchase-modal-overlay {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center;
  padding: 20px; background: rgba(24, 37, 43, .66);
}
.purchase-modal-panel {
  box-sizing: border-box;
  position: relative; width: min(920px, 100%); max-height: min(92vh, 900px); overflow-y: auto;
  border-radius: 24px; background: #fff; box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
  padding: clamp(24px, 4vw, 44px); color: #243941;
}
.purchase-modal-close {
  position: absolute; top: 14px; right: 18px; border: 0; background: transparent;
  font-size: 32px; line-height: 1; cursor: pointer; color: #243941;
}
.purchase-modal-heading h2 { margin: 4px 42px 8px 0; font-size: clamp(1.3rem, 3vw, 2rem); }
.purchase-modal-brand { margin: 0; color: #577b82; }
.purchase-modal-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; margin-top: 24px; }
.purchase-modal-image { display: grid; place-items: center; min-height: 260px; margin: 0; border-radius: 18px; background: #f5f8f7; }
.purchase-modal-image img { max-width: 100%; max-height: 350px; object-fit: contain; }
.purchase-modal-image figcaption { margin: 8px 12px 12px; color: #526b6e; font-size: .85rem; text-align: center; }
.purchase-modal-options fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.purchase-modal-options legend { margin-bottom: 10px; font-weight: 700; }
.purchase-kind, .purchase-amount {
  min-width: 76px; margin: 0 8px 8px 0; padding: 10px 16px; border: 1px solid #9bb7b8;
  border-radius: 999px; background: #fff; color: #243941; cursor: pointer;
}
.purchase-kind.is-selected, .purchase-amount.is-selected { background: #2b666d; border-color: #2b666d; color: white; }
.purchase-modal-price { font-size: 1.3rem; font-weight: 700; }
.purchase-final-link { display: inline-block; margin: 14px 0; padding: 14px 20px; border-radius: 12px; background: #2b666d; color: #fff; text-decoration: none; font-weight: 700; }
.purchase-unavailable { color: #637779; font-weight: 700; }
.purchase-disclosure { font-size: .85rem; color: #526b6e; }
.purchase-modal-panel :focus-visible { outline: 3px solid #dd8a53; outline-offset: 3px; }
@media (max-width: 640px) {
  .purchase-modal-overlay { padding: 10px; align-items: end; }
  .purchase-modal-panel { max-height: 94dvh; border-radius: 22px 22px 0 0; padding: 28px 20px; }
  .purchase-modal-grid { grid-template-columns: 1fr; gap: 16px; }
  .purchase-modal-image { min-height: 180px; }
  .purchase-modal-image img { max-height: 220px; }
}
