/* ==========================================================================
   ESTILOS PARA SISTEMA DE PAGOS
   ========================================================================== */

/* --- Opciones de Envío --- */
.shipping-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.shipping-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.shipping-option:hover {
  border-color: #02b8ac;
  background-color: #f8fffe;
}

.shipping-option input[type="radio"] {
  margin-right: 12px;
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.shipping-option input[type="radio"]:checked + .shipping-info {
  font-weight: 600;
}

.shipping-option:has(input:checked) {
  border-color: #02b8ac;
  background-color: #f0fffe;
  box-shadow: 0 2px 8px rgba(2, 184, 172, 0.15);
}

.shipping-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shipping-info strong {
  font-size: 15px;
  color: #333;
}

.shipping-info small {
  font-size: 13px;
  color: #666;
}

.shipping-price {
  font-size: 16px;
  font-weight: bold;
  color: #02b8ac;
}

/* --- Nota de Seguridad --- */
.security-note {
  background: #f0f9ff;
  border-left: 4px solid #0288d1;
  padding: 12px 15px;
  border-radius: 4px;
  font-size: 14px;
  color: #01579b;
  margin-bottom: 20px;
}

/* --- Métodos de Pago --- */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.payment-method-option {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.payment-method-option:hover {
  border-color: #02b8ac;
  background-color: #f8fffe;
}

.payment-method-option.active {
  border-color: #02b8ac;
  background-color: #f0fffe;
  box-shadow: 0 2px 12px rgba(2, 184, 172, 0.2);
}

.payment-method-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.payment-method-option label {
  cursor: pointer;
  display: block;
  width: 100%;
}

.payment-method-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-method-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.accepted-cards {
  display: flex;
  gap: 8px;
  align-items: center;
}

.accepted-cards img {
  height: 24px;
  width: auto;
  object-fit: contain;
}

/* --- Contenido de Métodos de Pago --- */
.payment-content {
  margin-top: 20px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.card-payment-info {
  margin-bottom: 20px;
}

.card-payment-info p {
  margin: 8px 0;
  font-size: 14px;
  color: #555;
}

.payment-benefits {
  list-style: none;
  padding: 0;
  margin: 15px 0 0 0;
}

.payment-benefits li {
  padding: 6px 0;
  font-size: 13px;
  color: #4caf50;
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-benefits li::before {
  content: '✓';
  font-weight: bold;
  color: #4caf50;
}

/* --- Información de Pago Manual --- */
.manual-payment-info {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.manual-payment-info h4 {
  margin-top: 0;
  color: #333;
  font-size: 16px;
  margin-bottom: 15px;
}

.manual-payment-info ol {
  padding-left: 20px;
  margin: 15px 0;
}

.manual-payment-info ol li {
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}

.manual-payment-info strong {
  color: #02b8ac;
  font-weight: 600;
}

.bank-details {
  list-style: none;
  padding: 0;
  background: #f5f5f5;
  border-radius: 6px;
  padding: 15px;
  margin: 15px 0;
}

.bank-details li {
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #e0e0e0;
}

.bank-details li:last-child {
  border-bottom: none;
}

.payment-note {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
  color: #856404;
  margin-top: 15px;
  line-height: 1.6;
}

/* --- Botón de Pago --- */
.payment-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #02b8ac 0%, #019a8f 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(2, 184, 172, 0.3);
}

.payment-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 184, 172, 0.4);
  background: linear-gradient(135deg, #019a8f 0%, #017a73 100%);
}

.payment-btn:active {
  transform: translateY(0);
}

.payment-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-icon {
  font-size: 20px;
}

/* --- Spinner de Carga --- */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Resumen del Pedido Mejorado --- */
.summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.summary-item:last-of-type {
  border-bottom: none;
}

.summary-item-image {
  position: relative;
  flex-shrink: 0;
}

.summary-item-image img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.summary-item-quantity {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #02b8ac;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid white;
}

.summary-item-details {
  flex: 1;
}

.summary-item-details h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: #333;
}

.summary-item-price {
  font-size: 15px;
  font-weight: 600;
  color: #02b8ac;
}

.summary-totals {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #e0e0e0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 15px;
  font-size: 14px;
  color: #555;
}

.summary-row.total-final {
  background: linear-gradient(135deg, #f0fffe 0%, #e8f9f8 100%);
  margin: 10px -15px -15px -15px;
  padding: 15px;
  border-radius: 0 0 8px 8px;
  font-size: 18px;
  font-weight: bold;
  color: #02b8ac;
}

/* --- Info Summary Box --- */
.info-summary-box {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 25px;
  font-size: 14px;
  line-height: 1.8;
}

.info-summary-box strong {
  color: #02b8ac;
}

.info-summary-box hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 12px 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .checkout-container {
    flex-direction: column;
  }

  .checkout-summary-column {
    position: static;
    height: auto;
    order: 1;
  }

  .checkout-form-column {
    order: 2;
  }

  .shipping-option {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .shipping-price {
    align-self: flex-end;
  }

  .payment-method-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .accepted-cards {
    align-self: flex-end;
  }

  .summary-item-image img {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .payment-btn {
    font-size: 14px;
    padding: 14px;
  }

  .manual-payment-info {
    padding: 15px;
  }

  .bank-details {
    padding: 12px;
  }
}