/* Checkout sheet — flujo app sin cambiar de página */

.checkout-sheet {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  pointer-events: none;
  visibility: hidden;
}

.checkout-sheet.is-open {
  pointer-events: auto;
  visibility: visible;
}

.checkout-sheet-panel {
  width: min(480px, 100%);
  height: 100%;
  background: var(--sh-cream, #ffffff);
  color: var(--sh-ink, #111);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
  transform: translateX(104%);
  transition: transform .4s cubic-bezier(.22, 1, .36, 1);
  overflow: hidden;
}

.checkout-sheet.is-open .checkout-sheet-panel {
  transform: none;
}

.checkout-sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #000000 0%, #111111 100%);
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 -24px 0 0 #000000;
}

.checkout-sheet-back,
.checkout-sheet-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 24px;
  line-height: 1;
}

.checkout-sheet-titles {
  flex: 1;
  min-width: 0;
}

.checkout-sheet-kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
  font-weight: 700;
}

.checkout-sheet-titles h2 {
  margin: 2px 0 0;
  font-family: var(--sh-serif, "Cormorant Garamond", Georgia, serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
}

.checkout-sheet-alert {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #e2c48a;
  background: #fbf6ee;
  color: #6a4e1e;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 8px;
}

.checkout-sheet-alert[hidden] {
  display: none !important;
}

.checkout-sheet-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.checkout-sheet-card {
  background: var(--sh-card, #fff);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.checkout-sheet-card h3 {
  margin: 0 0 8px;
  font-family: var(--sh-serif, "Cormorant Garamond", Georgia, serif);
  font-size: 20px;
  color: var(--sh-ink, #2B2924);
}

.checkout-sheet-lead {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--sh-muted, #7A7468);
  line-height: 1.45;
}

.checkout-sheet-lead a {
  color: var(--sh-olive, #000000);
  font-weight: 700;
}

.checkout-sheet-form label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--sh-muted, #7A7468);
  margin: 0 0 6px;
}

.checkout-sheet-form input,
.checkout-sheet-form textarea {
  width: 100%;
  margin-bottom: 12px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  background: var(--sh-card, #fff);
  color: var(--sh-ink, #2B2924);
}

.checkout-sheet-form input:focus,
.checkout-sheet-form textarea:focus {
  outline: none;
  border-color: var(--sh-olive, #000000);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.checkout-sheet-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkout-sheet-items {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkout-sheet-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.checkout-sheet-items li.is-empty {
  color: var(--sh-muted, #7A7468);
  justify-content: center;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 8px 0;
}

.checkout-sheet-empty-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--sh-muted, #7A7468);
  font-weight: 400;
}

.checkout-sheet-totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  padding-top: 10px;
}

.checkout-sheet-totals div {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--sh-muted, #7A7468);
}

.checkout-sheet-totals .is-total {
  font-weight: 700;
  color: var(--sh-ink, #2B2924);
  font-size: 15px;
}

.checkout-sheet-totals .is-total strong {
  color: var(--sh-olive, #000000);
  font-size: 18px;
}

.checkout-sheet-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--sh-muted, #7A7468);
}

.checkout-sheet-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
  margin-bottom: 20px;
}

.checkout-sheet-open .site-modal-backdrop {
  opacity: 1;
  visibility: visible;
  z-index: 10015;
}

@media (max-width: 720px) {
  .checkout-sheet {
    align-items: flex-end;
    justify-content: stretch;
  }

  .checkout-sheet-panel {
    width: 100%;
    max-height: calc(100dvh - 56px);
    max-height: calc(100vh - 56px);
    height: auto;
    min-height: min(68vh, calc(100dvh - 56px));
    border-radius: 22px 22px 0 0;
    transform: translateY(104%);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.16);
    overflow: hidden;
  }

  .checkout-sheet.is-open .checkout-sheet-panel {
    transform: none;
  }

  .checkout-sheet-head {
    padding-top: 14px;
    border-radius: 22px 22px 0 0;
    box-shadow: none;
  }

  .checkout-sheet-row {
    grid-template-columns: 1fr;
  }

  .checkout-sheet-form input,
  .checkout-sheet-form textarea {
    font-size: 16px; /* evita zoom iOS */
  }
}

.checkout-geo-row {
  margin: 10px 0 14px;
}

.checkout-geo-box {
  margin: 12px 0 16px;
  padding: 14px 14px 12px;
  border: 1px solid #111;
  background: #fafafa;
}

.checkout-geo-box.is-ok {
  border-color: #111;
  background: #fff;
}

.checkout-geo-box.is-error {
  border-color: #111;
  background: #fff8f8;
}

.checkout-geo-box.is-warn {
  border-color: #c9a227;
  background: #fffaf0;
}

.checkout-geo-box.is-loading {
  opacity: 0.92;
}

.checkout-geo-status strong {
  display: block;
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.checkout-geo-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
}

.checkout-geo-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--sh-muted, #666);
}

.checkout-sheet-pay[hidden] {
  display: none;
}

.checkout-sheet-pay-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 1rem;
}

.checkout-sheet-pay-total strong {
  font-size: 1.25rem;
}

.checkout-sheet-pay-actions .sh-btn {
  width: 100%;
  margin-top: 8px;
}

.checkout-sheet-pay-actions .checkout-sheet-note {
  margin-top: 12px;
  font-size: 0.88rem;
  color: #6b655c;
}

.checkout-pay-method {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.checkout-pay-method .sh-btn {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.checkout-pay-method-logo {
  height: 22px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
