/* ─────────────────────────────────────────────────────────────────
   Checkout · paso 2 (Pago) — Dinitos, cupones, tarjetas HiperDino,
   Cheque Mastercard y tarjeta de pago. Sobre checkout.css + tokens.
   ───────────────────────────────────────────────────────────────── */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.pay-main { align-items: stretch; gap: 8px; padding: 24px 40px 40px; }

/* Sección plegable */
.pay-sec__head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 12px;
  background: none; border: 0; color: var(--green-700); text-align: left;
}
.pay-sec__title { margin: 0; font-size: 32px; line-height: 36px; font-weight: 800; }
.pay-sec__chev { width: 28px; height: 28px; margin-right: 24px; transition: transform .25s ease; }
.pay-sec__head:hover .pay-sec__chev { transform: translateY(2px); }
.pay-sec:not(.is-open) .pay-sec__chev { transform: rotate(-90deg); }
.pay-sec:not(.is-open) .pay-sec__head:hover .pay-sec__chev { transform: rotate(-90deg) translateX(-2px); }
.pay-sec__body { display: flex; flex-direction: column; gap: 18px; padding-bottom: 20px; }
.pay-sec:not(.is-open) .pay-sec__body { display: none; }
.pay-sec__lead { margin: -6px 0 2px; font-size: 20px; line-height: 26px; color: var(--green-700); }

/* Fila tipo tarjeta (Dinitos, cupón, tarjetas, cheque) */
.pay-row {
  display: grid; align-items: center;
  grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) auto;
  column-gap: 24px;
  min-height: 90px;
  padding: 12px 40px 12px 40px;
  background: var(--white);
  border: 1.5px solid var(--green-700);
  border-radius: var(--r-lg);
  color: var(--ink-800);
  position: relative;
  transition: background .15s ease, border-color .15s ease, box-shadow .25s ease, transform .25s ease;
}
label.pay-row { cursor: pointer; }
label.pay-row:not(.is-locked):hover { background: var(--green-100); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.pay-row.is-on { background: var(--green-200); border-color: var(--green-700); }
.pay-row__img { justify-self: start; }
.pay-row__name { display: flex; flex-direction: column; gap: 6px; font-size: 20px; line-height: 24px; font-weight: 500; }
.pay-row__meta { font-size: 16px; line-height: 20px; font-weight: 700; color: var(--green-700); }
.pay-row__btn { min-width: 220px; font-size: 20px; min-height: 42px; }

/* Checkbox */
.check {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 1.5px solid #B3B3B3; border-radius: 4px;
  background: var(--white); color: var(--white);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.check svg { width: 18px; height: 18px; opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .2s cubic-bezier(.2,.7,.2,1.4); }
label.pay-row:not(.is-locked):hover .check { border-color: var(--green-700); }
.pay-row.is-on .check { background: var(--green-700); border-color: var(--green-700); }
.pay-row.is-on .check svg { opacity: 1; transform: scale(1); }
input:focus-visible + .check { outline: 2px solid var(--green-500); outline-offset: 2px; }

/* Dinitos */
.dinito-balance { margin: 0; font-size: 16px; color: var(--green-700); }
.dinito-balance b { font-weight: 800; transition: color .2s ease; }
.dinito-balance.is-bump b { color: var(--green-500); }
.dinito__icon { width: 46px; height: auto; margin-left: 10px; }
.dinito__sub { font-size: 20px; line-height: 24px; }
.dinito__sub--ok { color: var(--green-600); }
.dinito__sub--miss { color: var(--magenta); }
.dinito.is-locked { cursor: not-allowed; }
.dinito.is-locked .check { background: var(--ink-100); border-color: var(--ink-300); }
.dinito.is-locked:hover .dinito__sub--miss { text-decoration: underline; text-underline-offset: 3px; }

/* Cupón */
.coupon { grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.1fr) auto; }
.coupon__icon { width: 52px; height: auto; margin-left: 4px; }
.coupon__status { font-size: 20px; line-height: 24px; }
.coupon__status.is-ok { color: var(--green-700); font-weight: 700; }
.coupon__status.is-ok small { font-weight: 500; font-size: 16px; }
.coupon__remove { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--green-600); font: 600 15px/1 var(--font-sans); text-decoration: underline; text-underline-offset: 3px; }
.coupon__remove:hover { color: var(--green-900); }

.pay-input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1.5px solid var(--green-700); border-radius: var(--r-sm);
  font: 500 20px/1 var(--font-sans); color: var(--green-700);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pay-input::placeholder { color: var(--green-600); opacity: .6; }
.pay-input:hover { border-color: var(--green-500); }
.pay-input:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px var(--green-200); }
.pay-input.is-error { border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(212, 20, 90, .12); }
.pay-input:disabled { background: var(--ink-100); border-color: var(--ink-300); color: var(--ink-500); }

/* Tarjetas HiperDino */
.hcard { grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) auto auto; min-height: 74px; padding-top: 8px; padding-bottom: 8px; }
.hcard__img { width: 72px; height: auto; border-radius: 4px; transition: transform .25s ease; }
label.hcard:hover .hcard__img { transform: rotate(-3deg) scale(1.06); }
.hcard__num { display: flex; flex-direction: column; gap: 6px; font-size: 16px; color: var(--green-600); letter-spacing: .02em; }
.hcard__num b { font-size: 18px; font-weight: 700; color: var(--green-700); letter-spacing: 0; }
.hcard__add { font-size: 14px; color: var(--ink-900); }
.hcard.is-on .hcard__add { font-weight: 700; color: var(--green-700); }

/* Cheque Mastercard */
.cheque { grid-template-columns: 70px minmax(0, .8fr) minmax(0, 1.4fr) minmax(0, .9fr) auto; column-gap: 20px; padding-left: 40px; }
.cheque__logo { width: 60px; height: auto; }
.cheque__note { margin: 0; font-size: 14px; line-height: 18px; color: var(--green-600); }
.cheque .pay-input { font-size: 16px; height: 42px; }
.cheque .pay-row__btn { min-width: 160px; }
.cheque.is-ok .pay-row__btn:disabled { background: var(--green-700); color: var(--white); box-shadow: none; cursor: default; }

/* Resumen · filas extra (Dinitos, cupón, tarjeta) */
.summary__row--extra { font-size: 18px; animation: pay-row-in .3s ease both; }
.summary__row--extra strong { color: var(--magenta); }
.summary__row--extra.is-free strong { color: var(--green-600); }
@keyframes pay-row-in { from { transform: translateY(-4px); } }
.summary { padding-bottom: 12px; }

/* Tarjeta de pago */
.paycard { padding: 24px 40px 36px; }
.paycard__title { margin: 0 0 24px; font-size: 28px; line-height: 32px; font-weight: 700; color: var(--green-700); }
.paycard__list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 40px; transition: opacity .2s ease; }
.paycard__opt {
  display: flex; align-items: center; gap: 22px;
  min-height: 62px; padding: 0 8px; margin: 0 -8px;
  border-radius: var(--r-md);
  font-size: 24px; line-height: 28px; font-weight: 700; color: var(--green-700);
  cursor: pointer;
  transition: background .15s ease;
}
.paycard__opt:hover { background: var(--green-100); }
.paycard__opt:hover .radio { border-color: var(--green-700); }
.paycard__opt .radio { width: 22px; height: 22px; transition: background .15s ease, border-color .15s ease; }
.paycard__opt.is-on .radio { border-color: var(--green-700); background: var(--green-700); box-shadow: inset 0 0 0 3px var(--white); }
.paycard__visa { min-width: 180px; font-size: 26px; font-weight: 800; }
.paycard__del { padding: 0; border: 0; background: none; color: var(--green-600); font: 500 18px/1 var(--font-sans); text-decoration: underline; text-underline-offset: 3px; }
.paycard__del:hover { color: var(--magenta); }
.paycard.is-covered .paycard__list { opacity: .35; pointer-events: none; }
.paycard__covered { margin: -24px 0 20px; font-size: 16px; font-weight: 600; color: var(--green-600); }

/* Confirmación */
.pay-done { align-items: center; justify-content: center; gap: 20px; min-height: 520px; text-align: center; animation: pay-row-in .4s ease both; }
.pay-done[hidden] { display: none; }
.pay-done__text { margin: 0; max-width: 420px; font-size: 20px; line-height: 28px; color: var(--green-700); }
.pay-done .pill-btn--lg { max-width: 320px; }

/* ───────── ≤1100px: una columna ───────── */
@media (max-width: 1100px) {
  .pay-row, .coupon, .hcard, .cheque { padding-left: 20px; padding-right: 20px; column-gap: 16px; }
}

/* ───────── Mobile (≤720px) ───────── */
@media (max-width: 720px) {
  .pay-main { padding: 12px 14px 24px; }
  .pay-sec__title { font-size: 22px; line-height: 26px; }
  .pay-sec__chev { width: 22px; height: 22px; margin-right: 4px; }
  .pay-sec__lead { font-size: 14px; line-height: 19px; }
  .pay-sec__body { gap: 10px; }
  .pay-row, .hcard {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas: "img name check" "img meta check";
    column-gap: 12px; row-gap: 4px;
    min-height: 0; padding: 12px;
  }
  .pay-row__img { grid-area: img; }
  .pay-row__name { grid-area: name; font-size: 14px; line-height: 18px; gap: 2px; }
  .pay-row__meta, .hcard__num { grid-area: meta; font-size: 12px; line-height: 15px; }
  .check { grid-area: check; width: 22px; height: 22px; }
  .dinito__icon { width: 34px; margin-left: 0; }
  .dinito__sub { font-size: 14px; line-height: 18px; }
  .hcard__img { width: 48px; }
  .hcard__add { display: none; }
  .hcard__num b { font-size: 13px; }
  .coupon, .cheque {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas: "img name" "input input" "btn btn";
    row-gap: 10px;
  }
  .coupon .pay-row__img, .cheque .pay-row__img { grid-area: img; width: 40px; }
  .coupon .pay-row__name, .cheque .pay-row__name { grid-area: name; }
  .coupon .pay-input, .cheque .pay-input { grid-area: input; height: 40px; font-size: 14px; }
  .coupon .pay-row__btn, .cheque .pay-row__btn { grid-area: btn; min-width: 0; width: 100%; font-size: 15px; min-height: 40px; }
  .cheque { grid-template-areas: "img name" "note note" "input input" "btn btn"; }
  .cheque__note { grid-area: note; font-size: 12px; line-height: 16px; }
  .paycard { padding: 18px 16px 22px; }
  .paycard__title { font-size: 18px; line-height: 22px; margin-bottom: 12px; }
  .paycard__opt { font-size: 15px; line-height: 19px; gap: 12px; min-height: 48px; }
  .paycard__visa { min-width: 0; font-size: 16px; }
  .paycard__del { font-size: 13px; margin-left: auto; }
  .paycard__list { margin-bottom: 20px; }
  .paycard__covered { margin: -8px 0 14px; font-size: 13px; }
  .pay-done { min-height: 360px; padding: 32px 16px; }
  .pay-done img { width: 64px; }
  .pay-done__text { font-size: 15px; line-height: 21px; }
}
