/* =====================================================
   CHECKOUT — LLEVATELO STORE
   UX + MOBILE OPTIMIZADO (FINAL)
===================================================== */

body{
  background:#f6f6f6;
  font-family:system-ui, -apple-system, BlinkMacSystemFont;
}

/* =========================
   CONTENEDOR GENERAL
========================= */
.checkout-wrap{
  max-width:1200px;
  margin:30px auto;
  padding:0 15px;
}

/* =========================
   GRID
========================= */
.ck-grid{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap:20px;
  align-items:start;
}

/* =========================
   CARD
========================= */
.ck-card{
  background:#fff;
  border-radius:14px;
  padding:20px;
  box-shadow:0 6px 20px rgba(0,0,0,.06);
}

/* =========================
   TITULOS
========================= */
.ck-title,
.ck-sub{
  color:#ff7a00;
  margin-bottom:15px;
}

.ck-title{
  font-size:26px;
  font-weight:800;
}

.ck-sub{
  font-size:20px;
  font-weight:800;
}

/* =========================
   ITEMS CARRITO
========================= */
.ck-item{
  display:flex;
  align-items:center;
  gap:15px;
  margin-bottom:15px;
}

.ck-item img{
  width:60px;
  height:60px;
  object-fit:contain;
  background:#fafafa;
  border-radius:8px;
  border:1px solid #eee;
}

.ck-item-info strong{
  font-size:15px;
  line-height:1.3;
}

.ck-unit,
.ck-variant{
  font-size:13px;
  color:#666;
}

/* =========================
   TOTALES
========================= */
.ck-line{
  display:flex;
  justify-content:space-between;
  margin:8px 0;
  font-size:15px;
}

.ck-line:last-of-type{
  padding-top:10px;
  border-top:1px dashed #e5e5e5;
}

.ck-total{
  font-size:22px;
  font-weight:800;
  color:#111;
}

/* =========================
   DIRECCIONES / ENTREGA
========================= */
.addr{
  display:flex;
  gap:10px;
  border:1px solid #ddd;
  border-radius:12px;
  padding:12px;
  margin-bottom:10px;
  cursor:pointer;
  background:#fff;
  transition:.15s ease;
}

.addr input{
  margin-top:4px;
}

/* ✅ FEEDBACK VISUAL SELECCIONADO */
.addr:has(input:checked){
  border-color:#ff7a00;
  background:#fff8f1;
}

.addr input:checked{
  accent-color:#ff7a00;
}

.meta{
  font-size:13px;
  color:#555;
  line-height:1.35;
}

/* =========================
   BOTÓN PRINCIPAL
========================= */
.btn-primary{
  width:100%;
  background:linear-gradient(135deg,#ff7a00,#ff9800);
  border:none;
  padding:14px;
  color:#fff;
  font-size:16px;
  font-weight:700;
  border-radius:12px;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(255,122,0,.35);
  transition:.15s ease;
}

.btn-primary:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 20px rgba(255,122,0,.45);
}

/* =========================
   MONEDERO
========================= */
.wallet-toggle{
  border:1px solid #eee;
  border-radius:12px;
  padding:12px;
  margin-top:12px;
  display:flex;
  gap:10px;
  background:#fafafa;
}

.wallet-pill{
  display:inline-block;
  padding:3px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  background:#eaf7ef;
  color:#1e7e34;
  border:1px solid #cfeedd;
  margin-left:6px;
}

.wallet-warn{
  display:none;
  margin-top:8px;
  padding:10px 12px;
  border-radius:12px;
  background:#fff3cd;
  border:1px solid #ffeeba;
  color:#856404;
  font-weight:700;
}

/* =========================
   DEBUG (TECH)
========================= */
.ck-debug{
  background:#111;
  color:#0f0;
  padding:12px;
  border-radius:8px;
  font-size:12px;
  margin-top:15px;
  overflow:auto;
}

.tech-payments{
  display:flex;
  gap:10px;
  margin-bottom:15px;
}

.btn-simulate,
.btn-sandbox{
  background:#f4f4f4;
  border:1px solid #ddd;
  color:#333;
  padding:10px 14px;
  border-radius:8px;
  font-size:14px;
  cursor:pointer;
}

.btn-simulate:hover,
.btn-sandbox:hover{
  background:#eaeaea;
}

/* =====================================================
   MOBILE — UX OPTIMIZADO
===================================================== */
@media (max-width: 768px) {

  .checkout-wrap{
    margin:15px auto;
    padding:0 12px;
  }

  .ck-grid{
    grid-template-columns: 1fr;
    gap:16px;
  }

  .ck-card{
    padding:16px;
  }

  .ck-title{
    font-size:22px;
    margin-bottom:12px;
  }

  .ck-sub{
    font-size:18px;
    margin:16px 0 10px;
  }

  /* Items */
  .ck-item{
    align-items:flex-start;
    gap:12px;
  }

  .ck-item img{
    width:52px;
    height:52px;
    flex-shrink:0;
  }

  .ck-item-info strong{
    font-size:14px;
  }

  .ck-unit,
  .ck-variant{
    font-size:12px;
  }

  /* Totales */
  .ck-line{
    font-size:14px;
  }

  .ck-total{
    font-size:20px;
  }

  /* Direcciones */
  .addr{
    padding:10px;
    font-size:14px;
  }

  .meta{
    font-size:12px;
    line-height:1.4;
  }

  /* PayPal */
  .ck-paypal-wrap{
    margin-top:10px;
  }

  #paypal-button-container{
    width:100%;
  }

  /* Sticky total + pagar */
  .ck-sticky-pay{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    background:#fff;
    padding:12px 14px;
    box-shadow:0 -6px 20px rgba(0,0,0,.15);
    z-index:999;
  }

  .ck-sticky-pay .ck-total{
    font-size:18px;
  }
}

/* =====================================================
   FIX UX — BOTÓN "INICIAR SESIÓN PARA PAGAR"
===================================================== */

/* Contenedor del bloque de pago */
.ck-card h2.ck-sub + *{
  margin-top: 14px;
}

/* Botón iniciar sesión para pagar */
a.btn-sim,
a.btn-primary,
.btn-sim{
  margin-top: 18px;
}

/* Ajuste específico móvil */
@media (max-width: 768px){

  a.btn-sim,
  a.btn-primary,
  .btn-sim{
    margin-top: 22px;
  }
}

/* Fix UX botón login checkout */
.ck-card .btn-sim{
  margin-top:18px;
}

/* Mobile extra spacing */
@media (max-width: 768px){
  .ck-card .btn-sim{
    margin-top:24px;
  }
}

