/* Checkout 2 Premium - estilos base */
html, body { min-height: 100vh; }
body.page-template-page-checkout-2 { background: #f8fafc; }
.site-main { padding: 0; margin: 0; }
.pf-page { background: #f8fafc; min-height: 100vh; padding: 32px 24px; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial; }

/* Layout del contenedor principal - dos columnas */
.pf-container { 
  max-width: 1200px; 
  margin: 0 auto; 
  display: grid; 
  grid-template-columns: 1fr 400px; 
  gap: 48px; 
  align-items: start;
}
@media (max-width: 1024px) { 
  .pf-container { 
    grid-template-columns: 1fr; 
    gap: 32px;
  } 
}

/* Columna izquierda: Sección de facturación */
.pf-billing-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pf-billing-header {
  margin-bottom: 32px;
}

.pf-billing-title {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.pf-billing-subtitle {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
}

.pf-billing-form {
  margin-bottom: 32px;
}

/* Testimonial de Checkoutify Pro */
.pf-testimonial-section {
  margin-top: 32px;
}

.pf-testimonial-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.pf-testimonial-quote {
  margin-bottom: 16px;
}

.pf-quote-icon {
  color: #6366f1;
  margin-bottom: 12px;
}

.pf-testimonial-text {
  font-size: 16px;
  line-height: 1.6;
  color: #374151;
  margin: 0;
  font-style: italic;
}

.pf-testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pf-author-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.pf-author-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
}

.pf-author-title {
  color: #6b7280;
  font-size: 13px;
}

/* Columna derecha: Resumen del pedido */
.pf-order-summary-section {
  position: sticky;
  top: 32px;
}

.pf-order-summary-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pf-order-header {
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px;
}

.pf-order-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.pf-order-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 12px 0;
}

.pf-order-price {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.pf-order-billing {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 8px 0;
}

.pf-order-plan {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}



/* Totales del pedido */
.pf-order-totals {
  margin-bottom: 24px;
}

.pf-subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #6b7280;
}

.pf-promo-code {
  margin-bottom: 16px;
}

.pf-promo-link {
  color: #3b82f6;
  text-decoration: none;
  font-size: 14px;
}

.pf-promo-link:hover {
  text-decoration: underline;
}

/* Feedback / alerts under coupon */
.pf-alert {
  margin-top: 10px;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}
.pf-alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.pf-alert-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #7f1d1d;
}

.pf-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.pf-total-label {
  font-weight: 600;
  color: #1f2937;
}

.pf-total-amount {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}

/* Aviso de facturación discreto */
.pf-billing-notice {
  margin-top: 8px;
}

.pf-billing-notice-text {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.4;
  margin: 0;
  text-align: center;
  font-style: italic;
}

/* Coupon form (EDD) */
.pf-coupon-form { 
  margin-top: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}
.pf-coupon-label { 
  font-size: 14px; 
  color: #374151; 
  font-weight: 500; 
  margin-bottom: 8px; 
  display: block; 
}
.pf-coupon-row { 
  display: flex; 
  gap: 8px; 
}
.pf-coupon-input { 
  flex: 1; 
  padding: 10px 12px; 
  border: 1px solid #d1d5db; 
  border-radius: 8px; 
  font-size: 14px; 
  background: #ffffff; 
}
.pf-coupon-apply { 
  padding: 10px 16px; 
  border-radius: 8px; 
  border: none; 
  background: #3b82f6; 
  color: #fff; 
  font-weight: 600; 
  cursor: pointer; 
}
.pf-coupon-apply:hover { background: #2563eb; }

.pf-discount-active { 
  margin-top: 10px; 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
}
.pf-discount-chip { 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  background: #ecfdf5; 
  border: 1px solid #a7f3d0; 
  color: #065f46; 
  padding: 6px 10px; 
  border-radius: 9999px; 
}
.pf-discount-remove { display: inline; }
.pf-discount-remove-btn { 
  background: transparent; 
  border: none; 
  color: #065f46; 
  cursor: pointer; 
  font-size: 16px; 
  line-height: 1; 
}
.pf-promo-code { margin-top: 8px; }

/* Utility: hidden */
.hidden { display: none !important; }

/* Sección de garantía */
.pf-guarantee-section {
  background: #fef3c7;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.pf-guarantee-badge {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pf-guarantee-icon {
  color: #d97706;
  flex-shrink: 0;
  margin-top: 2px;
}

.pf-guarantee-title {
  font-weight: 600;
  color: #92400e;
  font-size: 14px;
  margin-bottom: 4px;
}

.pf-guarantee-text {
  color: #92400e;
  font-size: 13px;
  line-height: 1.4;
}

/* Soporte al cliente */
.pf-customer-support {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pf-support-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.pf-support-title {
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
  margin-bottom: 4px;
}

.pf-support-text {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.pf-support-rating {
  margin-bottom: 4px;
}

.pf-stars {
  color: #fbbf24;
  font-size: 14px;
}

.pf-support-author {
  color: #6b7280;
  font-size: 12px;
}

/* Estilos para formularios de WooCommerce/EDD */
.pf-billing-form .woocommerce-checkout,
.pf-billing-form .edd-checkout-wrap {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Ocultar carrito de EDD en la sección de facturación (lado izquierdo) */
.pf-billing-form #edd_checkout_cart,
.pf-billing-form .edd_cart,
.pf-billing-form .edd-cart {
  display: none !important;
}

/* Mejorar layout de información del usuario EDD Blocks - Forzar aplicación */
.pf-billing-form #edd_checkout_user_info.edd-blocks-form,
.pf-billing-form fieldset#edd_checkout_user_info.edd-blocks-form {
  display: block !important;
  font-size: 0 !important;
}

/* Email ocupa todo el ancho - reducir espaciado inferior */
.pf-billing-form #edd_checkout_user_info .edd-blocks-form__group-edd_email,
.pf-billing-form #edd-edd_email-wrap {
  width: 100% !important;
  margin-bottom: 12px !important;
  font-size: 14px !important;
}

/* Crear contenedor flex para nombre y apellido - perfectamente alineados */
.pf-billing-form #edd_checkout_user_info .edd-blocks-form__group-edd_first,
.pf-billing-form #edd-edd_first-wrap {
  display: inline-block !important;
  width: calc(50% - 8px) !important;
  margin-right: 16px !important;
  margin-bottom: 16px !important;
  vertical-align: top !important;
  font-size: 14px !important;
}

.pf-billing-form #edd_checkout_user_info .edd-blocks-form__group-edd_last,
.pf-billing-form #edd-edd_last-wrap {
  display: inline-block !important;
  width: calc(50% - 8px) !important;
  margin-bottom: 16px !important;
  vertical-align: top !important;
  font-size: 14px !important;
}

/* Asegurar que los inputs ocupen todo el ancho disponible */
.pf-billing-form #edd_checkout_user_info .edd-input {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Ajustar espaciado de descripciones */
.pf-billing-form #edd_checkout_user_info .edd-description {
  margin-top: 6px;
  margin-bottom: 0;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

/* Ajustar labels y inputs */
.pf-billing-form #edd_checkout_user_info .edd-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.pf-billing-form #edd_checkout_user_info .edd-input {
  width: 100%;
  box-sizing: border-box;
}

/* Responsive para pantallas pequeñas - Campos apilados verticalmente */
@media (max-width: 768px) {
  .pf-billing-form #edd_checkout_user_info .edd-blocks-form__group-edd_first,
  .pf-billing-form #edd-edd_first-wrap {
    width: 100% !important;
    display: block !important;
    margin-right: 0 !important;
    margin-bottom: 16px !important;
  }
  
  .pf-billing-form #edd_checkout_user_info .edd-blocks-form__group-edd_last,
  .pf-billing-form #edd-edd_last-wrap {
    width: 100% !important;
    display: block !important;
    margin-right: 0 !important;
    margin-bottom: 16px !important;
  }
  
  /* Restaurar font-size normal en móviles */
  .pf-billing-form #edd_checkout_user_info.edd-blocks-form,
  .pf-billing-form fieldset#edd_checkout_user_info.edd-blocks-form {
    font-size: 14px !important;
  }
}

.pf-billing-form .form-row {
  margin-bottom: 16px;
}

.pf-billing-form label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
  display: block;
}

.pf-billing-form input[type="text"],
.pf-billing-form input[type="email"],
.pf-billing-form input[type="tel"],
.pf-billing-form select,
.pf-billing-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  background: #ffffff;
  transition: border-color 0.2s;
}

.pf-billing-form input:focus,
.pf-billing-form select:focus,
.pf-billing-form textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pf-billing-form .woocommerce-checkout-payment,
.pf-billing-form .edd-checkout-payment {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

/* Botón de envío */
.pf-billing-form #place_order,
.pf-billing-form .edd-submit {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s;
}

.pf-billing-form #place_order:hover,
.pf-billing-form .edd-submit:hover {
  background: #2563eb;
}

/* Responsive */
@media (max-width: 768px) {
  .pf-page {
    padding: 16px;
  }
  
  .pf-billing-section,
  .pf-order-summary-card {
    padding: 20px;
  }
  
  .pf-container {
    gap: 24px;
  }
}
