/* ===========================
   AJ BROTECH'S — checkout.css
   =========================== */

.checkout-body {
  background: linear-gradient(135deg, #060618 0%, var(--black) 60%, #060618 100%);
  min-height: 100vh;
}

/* Checkout nav extra */
.checkout-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.security-pill {
  background: rgba(0,204,102,0.12);
  border: 1px solid rgba(0,204,102,0.3);
  color: #00cc66;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
}

/* Main layout */
.checkout-main {
  padding: 48px 20px 80px;
}

.checkout-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

/* ===== Steps ===== */
.checkout-steps {
  display: flex;
  align-items: center;
  margin-bottom: 36px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.4;
}

.step.active { opacity: 1; }

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,102,255,0.15);
  border: 2px solid rgba(0,102,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
}

.step.active .step-num {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  box-shadow: 0 0 12px rgba(0,102,255,0.5);
}

.step span { font-size: 12px; color: rgba(255,255,255,0.5); font-weight: 600; white-space: nowrap; }
.step.active span { color: white; }

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.1);
  margin: 0 12px;
  margin-bottom: 22px;
  border-radius: 1px;
}

/* ===== Form Sections ===== */
.form-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.form-section-title {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-group:last-child { margin-bottom: 0; }

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  padding: 12px 16px;
  outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-group select option { background: #0a0a30; color: white; }

.form-group input::placeholder { color: rgba(255,255,255,0.3); }

.form-group input:focus,
.form-group select:focus {
  border-color: var(--blue);
  background: rgba(0,102,255,0.07);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.15);
}

.form-group input.valid { border-color: #00cc66; }
.form-group input.invalid,
.form-group select.invalid { border-color: #ff4444; }

.field-error {
  font-size: 12px;
  color: #ff6666;
  min-height: 16px;
}

.form-group-half { max-width: 240px; }

/* Input with icon */
.input-icon-wrap { position: relative; }
.input-icon-wrap input { padding-right: 48px; width: 100%; }

.input-card-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  pointer-events: none;
}

.cvv-hint {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  cursor: help;
  color: rgba(255,255,255,0.5);
}

/* ===== Payment Tabs ===== */
.payment-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.payment-tab {
  padding: 14px 8px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.6);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  min-height: 80px;
}

.payment-tab:hover {
  border-color: rgba(0,102,255,0.4);
  background: rgba(0,102,255,0.06);
  color: white;
}

.payment-tab.active {
  background: rgba(0,102,255,0.12);
  border-color: var(--blue);
  color: white;
  box-shadow: 0 0 12px rgba(0,102,255,0.25);
}

/* Logos en tabs — mismo tamaño forzado */
.tab-logo {
  width: 64px;
  height: 32px;
  object-fit: contain;
  display: block;
}

/* MP logo: cajita que contiene el fondo blanco de forma limpia */
.mp-logo-wrap {
  background: white;
  border-radius: 8px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,188,255,0.3);
  border: 1px solid rgba(0,188,255,0.4);
}

.tab-logo-mp {
  width: 72px;
  height: 26px;
  object-fit: contain;
  display: block;
}

/* Addi: ya tiene colores propios, solo controlamos tamaño */
.tab-logo-addi {
  width: 56px;
  height: 28px;
  filter: brightness(1.1);
}

/* Próximamente tag */
.coming-soon-tag {
  background: rgba(139,92,246,0.25);
  border: 1px solid rgba(139,92,246,0.4);
  color: #c4b5fd;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 50px;
  display: inline-block;
  white-space: nowrap;
  vertical-align: middle;
  margin-left: 2px;
}

/* Payment Panels */
.payment-panel { display: none; }
.payment-panel.active { display: block; }

/* ===== Card Preview ===== */
.card-preview {
  background: linear-gradient(135deg, #1a1a5e, #0044cc, #002288);
  border-radius: 14px;
  padding: 24px 26px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(0,102,255,0.2);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,0.12);
}

.card-preview::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.card-preview::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: 40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  pointer-events: none;
}

.card-chip {
  font-size: 28px;
  color: rgba(255,215,0,0.7);
  margin-bottom: 16px;
  letter-spacing: -2px;
}

.card-number-display {
  font-family: 'Bebas Neue', monospace;
  font-size: 22px;
  letter-spacing: 4px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.card-bottom {
  display: flex;
  align-items: flex-end;
  gap: 24px;
}

.card-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2px;
}

.card-holder-display,
.card-expiry-display {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-brand-display {
  margin-left: auto;
  font-size: 26px;
}

/* ===== PayPal Panel ===== */
.paypal-panel {
  text-align: center;
  padding: 32px 20px;
}

.paypal-logo { margin-bottom: 16px; }

.paypal-panel p {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  margin-bottom: 20px;
}

.paypal-btn-mock {
  background: #ffc439;
  color: #003087;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 32px;
  border-radius: 50px;
  display: inline-block;
  cursor: default;
  box-shadow: 0 4px 16px rgba(255,196,57,0.4);
  margin-bottom: 16px;
}

.paypal-note {
  font-size: 12px;
  color: rgba(255,255,255,0.4) !important;
}

/* ===== COD Panel ===== */
.cod-panel {
  text-align: center;
  padding: 32px 20px;
}

.cod-icon { font-size: 56px; margin-bottom: 16px; }

.cod-panel h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.cod-panel p {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  margin-bottom: 20px;
}

.cod-note {
  background: rgba(0,204,102,0.08);
  border: 1px solid rgba(0,204,102,0.2);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 2;
}

/* ===== Submit Area ===== */
.checkout-submit-wrap {
  text-align: center;
  margin-top: 8px;
}

.security-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.security-badge {
  background: rgba(0,204,102,0.08);
  border: 1px solid rgba(0,204,102,0.2);
  color: #00cc66;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
}

.checkout-submit-btn {
  width: 100%;
  max-width: 400px;
  font-size: 17px;
  padding: 18px 32px;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.checkout-terms {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

.checkout-terms a {
  color: #60a5fa;
  text-decoration: underline;
}

/* ===== Order Summary ===== */
.order-summary {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 100px;
}

.summary-title {
  font-size: 16px;
  font-weight: 700;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,102,255,0.06);
}

.summary-items { padding: 16px; max-height: 300px; overflow-y: auto; }

.summary-empty {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 20px;
}

.summary-empty a { color: #60a5fa; text-decoration: underline; }

.summary-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.summary-item:last-child { border-bottom: none; }

.summary-item-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.summary-item-info { flex: 1; min-width: 0; }
.summary-item-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.summary-item-qty { font-size: 12px; color: rgba(255,255,255,0.45); }
.summary-item-price { font-size: 14px; font-weight: 700; color: #60a5fa; flex-shrink: 0; }

.summary-totals {
  padding: 16px 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.1);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  padding: 6px 0;
}

.summary-total-row {
  font-size: 18px;
  font-weight: 700;
  color: white;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 12px;
  margin-top: 6px;
}

.summary-guarantees {
  padding: 16px 22px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guarantee-item {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

/* ===== Success Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: linear-gradient(145deg, #0d0d3a, #080820);
  border: 1px solid rgba(0,102,255,0.3);
  border-radius: 20px;
  padding: 48px 36px;
  text-align: center;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 40px rgba(0,102,255,0.2);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal-box { transform: scale(1); }

.modal-success-icon {
  font-size: 72px;
  margin-bottom: 20px;
  animation: pop 0.4s ease;
}

@keyframes pop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.modal-box h2 { font-family: 'Bebas Neue', sans-serif; font-size: 36px; letter-spacing: 2px; font-weight: 400; margin-bottom: 12px; }

.modal-box p { color: rgba(255,255,255,0.65); font-size: 15px; margin-bottom: 20px; line-height: 1.7; }

.modal-order-num {
  background: rgba(0,102,255,0.1);
  border: 1px solid rgba(0,102,255,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 14px;
  color: #60a5fa;
  font-weight: 700;
  margin-bottom: 16px;
  font-family: 'Bebas Neue', monospace;
  letter-spacing: 2px;
  font-size: 18px;
}

.modal-note { font-size: 13px !important; margin-bottom: 28px !important; }

.modal-btn { width: 100%; display: block; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .checkout-container { grid-template-columns: 1fr; }
  .checkout-summary-col { order: -1; }
  .order-summary { position: static; }
  .summary-items { max-height: none; }
}

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .checkout-main { padding: 24px 16px 60px; }
  .form-section { padding: 20px 16px; }
  .card-number-display { font-size: 15px; letter-spacing: 2px; }
  .form-group-half { max-width: 100%; }
  .modal-box { padding: 36px 20px; }
}

/* ===== Mercado Pago Panel ===== */
.mp-panel {
  text-align: center;
  padding: 28px 20px;
}

.mp-panel .mp-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.mp-panel h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--white);
}

.mp-panel p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}

.mp-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 4px;
}

.mp-method-tag {
  background: rgba(0,102,255,0.12);
  border: 1px solid rgba(0,102,255,0.3);
  color: #7ab3ff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 50px;
}

/* Próximamente tag en tab */
.coming-soon-tag {
  background: rgba(139,92,246,0.2);
  border: 1px solid rgba(139,92,246,0.4);
  color: #a78bfa;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 50px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Fila recargo COD */
.cod-fee-row {
  color: #f59e0b !important;
  font-size: 13px;
}

/* Nota warning en panel COD */
.cod-note-warning {
  background: rgba(245,158,11,0.08) !important;
  border-color: rgba(245,158,11,0.3) !important;
  color: rgba(255,255,255,0.8) !important;
}
.cod-note-warning strong { color: #f59e0b; }
