/* ============================================================
 * Hyvä Checkout — rework limpio 2026-05-09
 *
 * Filosofía: minimalismo Shopify. Spacing generoso, color marca
 * #041D40 (--color-primary), tipografía Plus Jakarta Sans, inputs
 * y botones con presencia clara pero sin overdose de efectos.
 * ============================================================ */

/* Container principal — max-width contenido tipo Shopify */
#hyva-checkout-main {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}
@media (min-width: 1024px) {
    #hyva-checkout-main {
        padding: 3rem 2rem 5rem;
    }
}

/* Cards de cada step — borde sutil, fondo blanco, padding cómodo */
#hyva-checkout-container > * {
    background: var(--color-bg);
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
@media (min-width: 768px) {
    #hyva-checkout-container > * {
        padding: 2rem;
    }
}

/* Títulos de cada step */
#hyva-checkout-container h2,
#hyva-checkout-container h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: #041D40;
    margin-bottom: 1.25rem;
    letter-spacing: -0.005em;
}

/* Inputs estilo limpio — sin sombras, border slate, focus sutil */
#hyva-checkout-main input[type="text"],
#hyva-checkout-main input[type="email"],
#hyva-checkout-main input[type="tel"],
#hyva-checkout-main input[type="password"],
#hyva-checkout-main input[type="number"],
#hyva-checkout-main select,
#hyva-checkout-main textarea {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: var(--color-bg);
    color: #041D40;
    font-size: 0.9375rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
#hyva-checkout-main input:focus,
#hyva-checkout-main select:focus,
#hyva-checkout-main textarea:focus {
    outline: none;
    border-color: #041D40;
    box-shadow: 0 0 0 2px rgba(4, 29, 64, 0.12);
}
#hyva-checkout-main input::placeholder,
#hyva-checkout-main textarea::placeholder {
    color: #9ca3af;
}

/* Labels arriba de inputs */
#hyva-checkout-main label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.375rem;
}

/* Botones — primary color marca, full-width en mobile */
#hyva-checkout-main .btn,
#hyva-checkout-main button.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #041D40;
    color: var(--color-on-primary);
    border: 1px solid #041D40;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background-color 0.15s;
    line-height: 1.2;
}
#hyva-checkout-main .btn:hover,
#hyva-checkout-main button.btn-primary:hover {
    background: #0a2d5e;
}
#hyva-checkout-main .btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Place Order — destacado, full width siempre */
#hyva-checkout-main .btn.place-order,
#hyva-checkout-main button.place-order {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Botones secundarios (Back to Shipping, etc) */
#hyva-checkout-main button.btn-secondary,
#hyva-checkout-main .btn:not(.btn-primary):not(.place-order) {
    background: var(--color-bg);
    color: #041D40;
    border: 1px solid #d1d5db;
}
#hyva-checkout-main button.btn-secondary:hover,
#hyva-checkout-main .btn:not(.btn-primary):not(.place-order):hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Breadcrumb del checkout — limpio, centrado */
.nav-breadcrumbs {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}
.nav-breadcrumbs .item {
    font-size: 0.875rem;
    color: #9ca3af;
    text-decoration: none;
}
.nav-breadcrumbs .item.completed,
.nav-breadcrumbs .item.current {
    color: #041D40;
    font-weight: 500;
}

/* Order summary — typography clean */
.checkout-quote-summary,
[id*="price-summary"] {
    font-size: 0.9375rem;
}
.checkout-quote-summary .grand-total,
[class*="grand-total"] {
    font-size: 1.125rem;
    font-weight: 600;
    color: #041D40;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Spinner Magewire — color marca */
#magewire-loader svg,
.magewire-loader svg {
    color: #041D40;
}

/* Magewire overlay — backdrop más limpio */
.magewire-loader-overlay {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Mensajes de error/éxito */
#hyva-checkout-main .message,
#hyva-checkout-main [class*="error-message"] {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
#hyva-checkout-main .message.error,
#hyva-checkout-main [class*="error-message"] {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Shipping/payment method cards — selectable */
.shipping-method label,
.payment-method label,
.checkout-payment-method label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
    margin-bottom: 0.5rem;
    background: var(--color-bg);
}
.shipping-method label:hover,
.payment-method label:hover,
.checkout-payment-method label:hover {
    border-color: #9ca3af;
}
.shipping-method:has(input:checked) label,
.payment-method:has(input:checked) label,
.checkout-payment-method:has(input:checked) label {
    border-color: #041D40;
    background: #f8fafc;
}

