/* ==========================================================================
   Checkout (checkout.html). Usa las variables, tipografías y botones de style.css.
   ========================================================================== */
.co-page { min-height: 100vh; background: radial-gradient(70% 40% at 80% 0%, rgba(230, 182, 85, 0.07), transparent 70%), var(--bg); }

/* ---------- barra superior ---------- */
.co-top { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 10px var(--gutter); background: rgba(8, 8, 11, 0.86); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.co-top__logo img { display: block; height: 36px; width: auto; }
.co-steps { display: flex; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.co-steps li { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 600 13px/1 var(--font-head); }
.co-steps li + li::before { content: ""; width: 34px; height: 1px; margin-right: 4px; background: var(--line-2); }
.co-steps b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 11.5px; }
.co-steps li.is-current { color: var(--ink); }
.co-steps li.is-current b { border-color: var(--gold); color: var(--gold-2); box-shadow: 0 0 0 3px rgba(230, 182, 85, 0.15); }
.co-steps li.is-done b { border-color: transparent; background: var(--gold); color: #1a1405; }
.co-secure { display: flex; align-items: center; gap: 7px; margin: 0; color: #bbf7d0; font: 600 12.5px/1 var(--font-head); }
.co-secure svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* aviso de modo demostración */
.co-demo { max-width: 1180px; margin: 14px auto 0; padding: 10px 16px; border-radius: 12px; border: 1px dashed rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.07); color: #fde68a; font-size: 13px; line-height: 1.45; width: calc(100% - 2 * var(--gutter)); }
.co-demo b { color: #fef3c7; }

/* ---------- distribución ---------- */
.co { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; max-width: 1180px; margin: 0 auto; padding: 22px var(--gutter) 40px; }
.co-main { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.co-sum { grid-column: 2; grid-row: 1; position: sticky; top: 76px; }

/* ---------- pasos ---------- */
.co-step { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, 0.02); transition: border-color 0.3s, background 0.3s; }
.co-step.is-open { border-color: rgba(230, 182, 85, 0.3); background: rgba(255, 255, 255, 0.03); }
.co-step.is-locked { opacity: 0.55; }
.co-step__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.co-step__head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font: 800 17px/1.2 var(--font-head); }
.co-step__head h2 b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 12px; }
.co-step.is-open .co-step__head h2 b { border-color: var(--gold); color: var(--gold-2); }
.co-step.is-done .co-step__head h2 b { border-color: transparent; background: var(--gold); color: #1a1405; font-size: 0; }
.co-step.is-done .co-step__head h2 b::after { content: "✓"; font-size: 13px; }
.co-step__done { flex: 1; min-width: 0; margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-step__edit { margin-left: auto; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--gold-2); font: 700 12.5px var(--font-head); cursor: pointer; }
.co-step__edit:hover { background: rgba(230, 182, 85, 0.1); }
.co-step__body { padding: 2px 20px 20px; }
.co-step:not(.is-open) .co-step__body { display: none; }

/* ---------- campos ---------- */
.co-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px 12px; }
.co-field { grid-column: span 3; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.co-field--full { grid-column: span 6; }
.co-field--wide { grid-column: span 4; }
.co-field--narrow { grid-column: span 1; }
.co-field--side { grid-column: span 2; }
/* para qué pedimos el dato, debajo del campo */
.co-field .co-why { margin-top: -1px; color: var(--muted); font: 400 12px/1.35 var(--font-body); opacity: 1; }
.co-more { grid-column: 1 / -1; justify-self: start; min-height: 32px; padding: 4px 0; border: 0; background: none; color: var(--gold-2); font: 600 13px/1 var(--font-head); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.co-field > span { font: 600 12px/1 var(--font-head); color: var(--muted); letter-spacing: 0.02em; }
.co-field small { font-weight: 500; opacity: 0.75; }
.co-field input, .co-field select {
  width: 100%; height: 44px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--line-2); background: #111117; color: var(--ink);
  font: 500 15px var(--font-body); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.co-field select { appearance: none; padding-right: 34px; background: #111117 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a49c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat; }
.co-field input::placeholder { color: #949087; }
/* provincia o localidad que sale sola del código postal (una sola posible): se ve, pero no se cambia acá */
.co-field.is-fixed input, .co-field.is-fixed select { border-style: dashed; background-color: transparent; color: var(--ink); cursor: default; }
.co-field.is-fixed select { pointer-events: none; background-image: none; }
.co-field select:disabled { color: var(--muted); }
.co-field .co-hint { color: var(--muted); font: 400 12px/1.35 var(--font-body); opacity: 1; }
.co-field input:focus, .co-field select:focus { border-color: rgba(230, 182, 85, 0.7); box-shadow: 0 0 0 3px rgba(230, 182, 85, 0.13); }
.co-field.is-bad input, .co-field.is-bad select { border-color: rgba(239, 68, 68, 0.75); }
.co-field em { min-height: 0; color: #fca5a5; font: normal 500 12px var(--font-body); }
.co-field em:empty { display: none; }
.co-check { display: flex; align-items: center; gap: 9px; margin-top: 14px; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.co-check input { width: 17px; height: 17px; accent-color: var(--gold); }
.co-next { margin-top: 18px; min-width: 240px; }
.co-error { margin: 12px 0 0; color: #fca5a5; font-size: 13px; }
.co-error:empty { display: none; }

/* código postal */
.co-cp { display: grid; grid-template-columns: minmax(0, 240px) auto 1fr; align-items: end; gap: 10px 12px; }
.co-cp .co-field { grid-column: auto; }
.co-cp .btn { height: 44px; align-self: start; margin-top: 18px; }
.co-cp .co-field:has(em:not(:empty)) ~ .btn { align-self: start; }
.co-cp__help { align-self: center; margin-top: 18px; padding-block: 4px; color: var(--muted); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
.co-cp__help:hover { color: var(--ink); }

/* ---------- opciones (envío y pago) ---------- */
.co-options { display: grid; gap: 8px; margin-top: 16px; }
.co-options:empty { display: none; }
.co-group { margin: 10px 0 2px; color: var(--muted); font: 700 11px/1 var(--font-head); letter-spacing: 0.16em; text-transform: uppercase; }
.co-opt { position: relative; display: grid; grid-template-columns: 22px 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: #101016; cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.co-opt:hover { border-color: rgba(255, 255, 255, 0.26); }
.co-opt input { position: absolute; opacity: 0; pointer-events: none; }
.co-opt__radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); transition: border-color 0.2s, box-shadow 0.2s; }
.co-opt:has(input:checked) { border-color: rgba(230, 182, 85, 0.75); background: rgba(230, 182, 85, 0.06); }
.co-opt:has(input:checked) .co-opt__radio { border-color: var(--gold); box-shadow: inset 0 0 0 4px #101016, inset 0 0 0 10px var(--gold); }
.co-opt:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.co-opt.is-disabled { opacity: 0.45; cursor: not-allowed; }
.co-opt__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.co-opt__icon svg { width: 21px; height: 21px; fill: none; stroke: var(--gold-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.co-opt__icon--mp { background: #009ee3; border-color: transparent; color: #fff; font: 900 11px/1 var(--font-head); letter-spacing: -0.02em; }
.co-opt__txt { min-width: 0; }
.co-opt__txt b { display: block; font: 700 14.5px/1.25 var(--font-head); }
.co-opt__txt small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.co-opt__tag { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; vertical-align: 1px; font: 700 10px/1.4 var(--font-head); letter-spacing: 0.04em; white-space: nowrap; }
.co-opt__tag--demo { background: rgba(251, 191, 36, 0.12); color: #fde68a; border: 1px solid rgba(251, 191, 36, 0.3); }
.co-opt__tag--save { background: rgba(74, 222, 128, 0.12); color: #bbf7d0; border: 1px solid rgba(74, 222, 128, 0.3); }
.co-opt__tag--cuotas { background: rgba(230, 182, 85, 0.12); color: var(--gold-2); border: 1px solid rgba(230, 182, 85, 0.38); }
.co-opt__price { text-align: right; font: 800 15px/1.2 var(--font-head); white-space: nowrap; }
.co-opt__price s { display: block; color: var(--muted); font: 500 12px var(--font-body); }
.co-opt__price.is-free { color: #86efac; }
.co-brands { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.co-brands span { padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); font: 600 10.5px/1.3 var(--font-head); }
/* detalle debajo de la opción elegida */
.co-opt__more { grid-column: 3 / -1; display: none; margin-top: 4px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.co-opt:has(input:checked) .co-opt__more { display: block; }

/* sucursales */
.co-branches { margin-top: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.co-branches h3 { margin: 0 0 10px; font: 700 13.5px var(--font-head); }
.co-branches .co-opt { grid-template-columns: 22px minmax(0, 1fr); }
/* Correo Argentino: la provincia de las sucursales (sale del código postal; se puede cambiar) */
.co-branch-prov { margin-bottom: 14px; max-width: 320px; }
.co-track { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 12px; }
.co-track span { color: var(--muted); font-size: 13px; }
.co-track b { font: 700 16px/1.3 ui-monospace, Consolas, monospace; letter-spacing: 0.04em; overflow-wrap: anywhere; }

/* dirección */
.co-address { margin: 16px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.co-address legend { padding: 0 6px; font: 700 13.5px var(--font-head); }

/* carga */
.co-loading { display: flex; align-items: center; gap: 10px; padding: 14px 4px; color: var(--muted); font-size: 13.5px; }
.co-loading i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(230, 182, 85, 0.25); border-top-color: var(--gold); animation: co-spin 0.8s linear infinite; }
@keyframes co-spin { to { transform: rotate(360deg); } }

/* ---------- resumen ---------- */
.co-sum__toggle { display: none; }
.co-sum__body { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #0c0c10; }
.co-sum__title { margin: 0 0 12px; font: 800 17px var(--font-head); }
.co-items { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; max-height: 330px; overflow-y: auto; }
.co-item { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.co-item__img { position: relative; width: 54px; height: 54px; border-radius: 12px; background: radial-gradient(circle at 50% 60%, #22222a, #121218); border: 1px solid var(--line); }
.co-item__img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.co-item__img b { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #1a1405; font: 800 11px/20px var(--font-head); text-align: center; }
.co-item p { margin: 0; font: 700 13px/1.25 var(--font-head); }
.co-item small { color: var(--muted); font-size: 12px; }
.co-item__price { font: 700 13.5px var(--font-head); white-space: nowrap; }
.co-sum__edit { display: inline-block; margin-top: 8px; padding-block: 4px; color: var(--muted); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
.co-sum__edit:hover { color: var(--ink); }
.co-ship-bar { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.co-ship-bar:empty { display: none; }
.co-ship-bar b { color: var(--ink); }
.co-ship-bar span { display: block; height: 5px; margin-top: 7px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.co-ship-bar i { display: block; height: 100%; transform-origin: 0 50%; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); transition: transform 0.5s var(--ease-out); }
.co-ship-bar.is-done { color: #bbf7d0; }
.co-ship-bar.is-done i { background: linear-gradient(90deg, #22c55e, #86efac); }
.co-totals { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.co-totals dt { color: var(--muted); }
.co-totals dd { margin: 0; text-align: right; font: 600 14px var(--font-head); }
.co-totals .is-save { color: #86efac; }
.co-totals .co-total { padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font: 800 16px var(--font-head); }
.co-totals dd.co-total { font: 900 24px/1 var(--font-head); }
.co-totals .co-hint { grid-column: 1 / -1; margin: 6px 0 0; padding: 7px 10px; border-radius: 10px; background: rgba(74, 222, 128, 0.08); border: 1px solid rgba(74, 222, 128, 0.25); color: #86efac; font: 500 12.5px/1.35 var(--font-body); text-align: center; }
.co-totals .co-hint b { color: #bbf7d0; }
.co-totals .co-note { grid-column: 1 / -1; color: var(--muted); font: 400 12px/1.4 var(--font-body); text-align: left; }
.co-code { margin-top: 14px; }
/* las cuotas, debajo del total y en dorado (antes en gris y más chicas: no se veían) */
.co-totals .co-cuotas { grid-column: 1 / -1; margin-top: -2px; color: var(--gold-2); font: 600 13px var(--font-body); font-variant-numeric: tabular-nums; text-align: right; }
.co-totals .co-cuotas b { font-weight: 800; }
.co-trust { display: grid; gap: 9px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--muted); font-size: 12.5px; }
.co-trust li { display: flex; align-items: center; gap: 10px; }
.co-trust svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--gold-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- confirmación ---------- */
.co-done { grid-column: 1 / -1; max-width: 680px; width: 100%; margin: 0 auto; text-align: center; }
.co-done__check { display: grid; place-items: center; width: 74px; height: 74px; margin: 10px auto 18px; border-radius: 50%; background: radial-gradient(circle, rgba(74, 222, 128, 0.25), rgba(74, 222, 128, 0.05)); border: 1px solid rgba(74, 222, 128, 0.45); }
.co-done__check svg { width: 36px; height: 36px; fill: none; stroke: #86efac; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.co-done__check--wait { background: radial-gradient(circle, rgba(230, 182, 85, 0.25), rgba(230, 182, 85, 0.05)); border-color: rgba(230, 182, 85, 0.45); }
.co-done__check--wait svg { stroke: var(--gold-2); }
.co-done h1 { margin: 0; font: 900 clamp(26px, 3vw, 34px)/1.15 var(--font-head); }
.co-done__id { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.co-done__id b { color: var(--gold-2); font-family: var(--font-head); letter-spacing: 0.04em; }
.co-done__lead { margin: 14px auto 0; max-width: 52ch; color: var(--muted); font-size: 15px; line-height: 1.55; }
.co-card { margin-top: 22px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #0c0c10; text-align: left; }
.co-card h2 { margin: 0 0 12px; font: 800 15px var(--font-head); }
.co-bank { display: grid; gap: 8px; margin: 0; }
.co-bank div { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.co-bank dt { color: var(--muted); font-size: 12.5px; }
.co-bank dd { margin: 0; font: 700 14px var(--font-head); word-break: break-all; }
.co-bank button { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: none; color: var(--gold-2); font: 700 12px var(--font-head); cursor: pointer; }
.co-bank button:hover { background: rgba(230, 182, 85, 0.1); }
.co-pending { padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.06); color: #fde68a; font-size: 13px; line-height: 1.5; }
.co-amount { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.co-amount b { font: 900 24px var(--font-head); color: #86efac; }
.co-done__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
/* reintentar el pago / elegir otro medio: arriba del resumen, que es lo que hay que hacer */
.co-done__actions--top { margin: 18px 0 22px; }
/* aviso dentro de las opciones de envío (sin envío a ese código postal, o el correo no respondió) */
.co-options > .co-pending { margin: 0 0 4px; }
.co-pending a { color: inherit; font-weight: 700; }
.co-pending .co-more { display: inline; margin: 0; padding: 0; color: inherit; font-weight: 700; text-decoration: underline; }
.co-mini { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13.5px; }
.co-mini li { display: flex; justify-content: space-between; gap: 12px; }
.co-mini li span:first-child { color: var(--muted); }

/* ---------- pie ---------- */
.co-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 20px; padding: 22px var(--gutter) calc(26px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.co-foot a { display: inline-flex; align-items: center; min-height: 26px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.co-foot a:hover { color: var(--ink); }
.co-legal { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.co-legal a { color: var(--muted); }

/* ---------- celular ---------- */
@media (max-width: 920px) {
  .co { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 14px; }   /* minmax(0,…): que el contenido largo no estire la columna */
  .co-main, .co-sum { grid-column: 1; }
  .co-sum { grid-row: 1; position: static; }
  .co-main { grid-row: 2; }
  .co-sum__toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #0c0c10; color: var(--ink); font: 700 14px var(--font-head); cursor: pointer; }
  .co-sum__toggle span { flex: 1; text-align: left; color: var(--gold-2); }
  .co-sum__toggle small { color: var(--muted); font-weight: 500; }
  .co-sum__toggle svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; transition: transform 0.3s; }
  .co-sum__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .co-sum__body { display: none; margin-top: 8px; }
  .co-sum.is-open .co-sum__body { display: block; }
  .co-top { grid-template-columns: auto 1fr; }
  .co-secure { display: none; }
  .co-steps span { display: none; }
  .co-steps li + li::before { width: 18px; }
}
@media (max-width: 560px) {
  .co-grid { grid-template-columns: repeat(2, 1fr); }
  .co-field, .co-field--wide { grid-column: span 2; }
  .co-field--narrow { grid-column: span 1; }
  .co-cp { grid-template-columns: 1fr auto; }
  .co-cp__help { grid-column: 1 / -1; margin-top: 0; }
  .co-opt { grid-template-columns: 22px 36px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .co-opt__icon { width: 36px; height: 36px; }
  .co-next { width: 100%; min-width: 0; }
  .co-bank div { grid-template-columns: 1fr auto; }
  .co-bank dt { grid-column: 1 / -1; }
  .co-step__head { padding: 14px 16px; }
  .co-step__body { padding: 2px 16px 16px; }
}
