:root {
  --primary: #021d33;
  --primary-mid: #032c4a;
  --accent: #38bdf8;
  --accent2: #2563eb;
  --bg: #f0f4f8;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* =====================
   HEADER
===================== */
header {
  background: linear-gradient(90deg, var(--primary), var(--primary-mid));
  padding: 0 40px;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(56,189,248,0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

header img { height: 42px; object-fit: contain; }
header nav { display: flex; gap: 28px; }

header a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
  transition: color 0.25s;
}

header a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.25s;
}

header a:hover { color: var(--accent); }
header a:hover::after { width: 100%; }

/* =====================
   TÍTULO
===================== */
.page-header {
  text-align: center;
  padding: 44px 20px 28px;
}

.page-header span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--primary);
}

/* =====================
   LAYOUT
===================== */
.pago-wrapper {
  max-width: 1000px;
  margin: 0 auto 80px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

/* =====================
   PANEL IZQUIERDO
===================== */
.pago-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel-card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  border: 1px solid var(--border);
}

.panel-card-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-card-title i { color: var(--accent); }

/* =====================
   RESUMEN ITEMS
===================== */
.resumen-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  transition: all 0.25s;
}

.resumen-item:last-child { margin-bottom: 0; }

.resumen-item:hover {
  border-color: rgba(56,189,248,0.3);
  background: white;
}

.resumen-item img {
  width: 80px;
  height: 65px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: white;
}

.resumen-item-info { flex: 1; }
.resumen-item-info strong { font-size: 15px; display: block; margin-bottom: 4px; }
.resumen-item-info span { font-size: 13px; color: var(--muted); display: block; }

.resumen-item-precio {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

/* =====================
   MÉTODOS DE PAGO
===================== */
.metodos {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metodo {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 2px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  background: white;
}

.metodo:hover {
  border-color: var(--accent);
  background: rgba(56,189,248,0.04);
  transform: translateX(4px);
}

.metodo input[type="radio"] { display: none; }

.metodo input[type="radio"]:checked + .metodo-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  border-color: transparent;
}

.metodo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: all 0.25s;
}

.metodo-texto strong {
  display: block;
  font-size: 15px;
  margin-bottom: 2px;
}

.metodo-texto span {
  font-size: 13px;
  color: var(--muted);
}

.metodo:has(input:checked) {
  border-color: var(--accent);
  background: rgba(56,189,248,0.06);
  box-shadow: 0 4px 16px rgba(56,189,248,0.15);
}

/* =====================
   PANEL RESUMEN DERECHO
===================== */
.resumen-panel {
  background: var(--primary);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 8px 32px rgba(2,29,51,0.25);
  position: sticky;
  top: 90px;
  overflow: hidden;
}

.resumen-panel::before {
  content: "";
  position: absolute;
  top: -50px; right: -50px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(56,189,248,0.07);
  pointer-events: none;
}

.resumen-panel::after {
  content: "";
  position: absolute;
  bottom: -40px; left: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(56,189,248,0.04);
  pointer-events: none;
}

.resumen-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.resumen-linea {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  position: relative;
  z-index: 1;
}

.resumen-linea span:last-child {
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

.resumen-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 18px 0;
  position: relative;
  z-index: 1;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.total-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
}

.total-precio {
  font-size: 28px;
  font-weight: 900;
  color: white;
}

.btn-confirmar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.28s ease;
  position: relative;
  z-index: 1;
}

.btn-confirmar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(56,189,248,0.45);
}

.seguro-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  position: relative;
  z-index: 1;
}

/* =====================
   FOOTER
===================== */
footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
  border-top: 1px solid var(--border);
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
  header { padding: 0 16px; }

  .pago-wrapper {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }

  .resumen-panel { position: static; }
  .page-header h1 { font-size: 24px; }
}

@media (max-width: 480px) {
  header { flex-direction: column; height: auto; padding: 14px 16px; gap: 10px; }
  header nav { gap: 20px; }
}