/* ============================================
   CHECKOUT PAGE OPTIMIZATION - SUBTLE & MODERN
   Focus: Form improvements only, keep header/footer standard
   ============================================ */

/* =====================================
   1. PROGRESS BAR - Subtle Version
   ===================================== */

.checkout-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 25px auto 35px;
    padding: 0 20px;
    position: relative;
}

.checkout-progress-bar::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.progress-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #999;
    transition: all 0.3s ease;
}

.progress-step.active .progress-step-number {
    background: #ff6b00;
    border-color: #ff6b00;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}

.progress-step.completed .progress-step-number {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

.progress-step-label {
    font-size: 0.8rem;
    color: #999;
    font-weight: 500;
}

.progress-step.active .progress-step-label {
    color: #ff6b00;
    font-weight: 600;
}

/* =====================================
   2. FORM STYLING - Premium & Spacious
   ===================================== */

/* Clean background with spacing */
.woocommerce-checkout {
    background: #fafafa;
}

/* Wrap billing/shipping in card containers */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper,
.woocommerce-checkout .woocommerce-additional-fields__field-wrapper {
    background: #fff;
    border-radius: 10px;
    padding: 28px 24px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

/* Form headings */
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3 {
    font-size: 1.25rem;
    color: #001f3f;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.woocommerce-checkout .woocommerce-billing-fields h3::after,
.woocommerce-checkout .woocommerce-shipping-fields h3::after,
.woocommerce-checkout .woocommerce-additional-fields h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #ff6b00;
}

/* === KEY FIX: Row spacing between fields === */
.woocommerce-checkout .form-row {
    margin-bottom: 16px;
}

.woocommerce-checkout .form-row:last-child {
    margin-bottom: 0;
}

/* Input fields - premium style */
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="password"],
.woocommerce-checkout input[type="number"],
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    border: 1px solid #dce0e5;
    border-radius: 8px;
    padding: 13px 16px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: all 0.25s ease;
    background: #fafbfc;
    width: 100%;
    color: #333;
}

.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
    border-color: #ff6b00;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.08);
    background: #fff;
}

/* Field labels */
.woocommerce-checkout .form-row label {
    font-weight: 600;
    color: #2a2a2a;
    margin-bottom: 8px;
    font-size: 0.88rem;
    display: block;
}

/* Required marker */
.woocommerce-checkout .required {
    color: #ff6b00;
}

/* =====================================
   3. ORDER SUMMARY - Clean & Modern
   ===================================== */

.woocommerce-checkout #order_review_heading {
    font-size: 1.2rem;
    color: #001f3f;
    margin-bottom: 20px;
}

.woocommerce-checkout .woocommerce-checkout-review-order {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Product items */
.woocommerce-checkout .woocommerce-checkout-review-order-table td {
    padding: 12px 0;
    border-top: 1px solid #f5f5f5;
}

.woocommerce-checkout .woocommerce-checkout-review-order-table .product-name {
    font-weight: 500;
    color: #333;
}

/* Order total - highlighted but not aggressive */
.woocommerce-checkout .order-total th,
.woocommerce-checkout .order-total td {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #001f3f !important;
    padding: 18px 0 !important;
    border-top: 2px solid #e0e0e0 !important;
}

.woocommerce-checkout .order-total .woocommerce-Price-amount {
    color: #ff6b00 !important;
}

/* =====================================
   4. TRUST BADGES - Subtle & Professional
   ===================================== */

.trust-badges-container {
    margin: 20px 0 25px;
    padding: 18px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.trust-badges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
}

.trust-badge-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.trust-badge-icon.security {
    background: #e8f5e9;
    color: #28a745;
}

.trust-badge-icon.payment {
    background: #e3f2fd;
    color: #2196f3;
}

.trust-badge-icon.return {
    background: #fff3e0;
    color: #ff9800;
}

.trust-badge-icon.support {
    background: #f3e5f5;
    color: #9c27b0;
}

.trust-badge-text {
    flex: 1;
}

.trust-badge-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 2px;
}

.trust-badge-subtitle {
    font-size: 0.7rem;
    color: #777;
}

/* Payment methods icons */
.payment-methods-icons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.payment-icon {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
}

/* =====================================
   5. CTA BUTTON - Prominent but Balanced
   ===================================== */

/* Place order button - reduced size */
/* Place order button - refined & sophisticated */
.woocommerce-checkout #place_order,
.woocommerce-checkout .wc-block-components-checkout-place-order-button {
    background: linear-gradient(to right, #ff6b00, #ff8533) !important;
    color: #fff !important;
    font-size: 1.05rem !important;
    padding: 16px 40px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    width: auto !important;
    min-width: 250px;
    max-width: 100%;
    margin-top: 25px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.woocommerce-checkout #place_order::before {
    content: '🔒 ';
    margin-right: 10px;
    font-size: 1rem;
    opacity: 0.9;
}

.woocommerce-checkout #place_order:hover,
.woocommerce-checkout .wc-block-components-checkout-place-order-button:hover {
    background: linear-gradient(to right, #e65c00, #ff701a) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.4);
}

.woocommerce-checkout #place_order:active,
.woocommerce-checkout .wc-block-components-checkout-place-order-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.2);
}

/* =====================================
   6. COUPON FIELD - Less Prominent
   ===================================== */

.woocommerce-checkout .woocommerce-form-coupon-toggle {
    margin-bottom: 20px;
    text-align: center;
}

.woocommerce-checkout .showcoupon {
    color: #666;
    font-size: 0.9rem;
    text-decoration: underline;
    background: transparent;
    border: none;
    cursor: pointer;
}

.woocommerce-checkout .showcoupon:hover {
    color: #ff6b00;
}

.woocommerce-checkout .checkout_coupon {
    background: #f9f9f9;
    border: 1px dashed #ddd;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* =====================================
   7. RESPONSIVE DESIGN
   ===================================== */

@media (max-width: 768px) {
    .checkout-progress-bar {
        padding: 0 10px;
    }

    .progress-step-label {
        font-size: 0.7rem;
    }

    .progress-step-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .woocommerce-checkout #place_order {
        font-size: 1rem !important;
        padding: 14px 25px !important;
    }

    .trust-badges {
        grid-template-columns: 1fr;
    }

    .trust-badge-title {
        font-size: 0.8rem;
    }
}

/* =====================================
   8. MISC IMPROVEMENTS
   ===================================== */

/* Loading overlay */
.woocommerce-checkout .blockUI.blockOverlay {
    background: rgba(255, 255, 255, 0.9) !important;
}

/* Error messages */
.woocommerce-checkout .woocommerce-error {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 4px;
}

/* Privacy policy */
.woocommerce-checkout .woocommerce-privacy-policy-text {
    font-size: 0.85rem;
    color: #666;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-top: 15px;
}

/* Payment box */
.woocommerce-checkout #payment {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
}

.woocommerce-checkout #payment ul.payment_methods {
    border: none;
    padding: 0;
}

.woocommerce-checkout #payment .payment_method_paypal {
    background: #fafafa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* Terms and conditions */
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
    margin: 15px 0;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper input[type="checkbox"] {
    margin-right: 8px;
}

/* =========================================================
   9. WOOCOMMERCE BLOCKS CHECKOUT - Premium Styling
   ========================================================= */

/* Overall checkout container */
.wc-block-checkout {
    padding-top: 8px;
}

/* Section steps - breathing room between sections */
.wc-block-components-checkout-step {
    margin-bottom: 12px;
    padding: 20px 0 !important;
    border: none !important;
}

/* Section titles */
.wc-block-components-checkout-step__title {
    font-family: var(--font-heading) !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #0a192f !important;
    letter-spacing: -0.3px;
}

/* === KEY FIX: Space between address form rows (Grid layout) === */
.wc-block-components-address-form {
    background: #fff;
    border-radius: 10px;
    padding: 24px 20px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid #eef0f3;
    row-gap: 20px !important;
    grid-row-gap: 20px !important;
}

/* Extra spacing on individual field wrappers */
.wc-block-components-address-form>.wc-block-components-text-input,
.wc-block-components-address-form>.wc-block-components-select,
.wc-block-components-address-form>.wc-block-components-combobox,
.wc-block-components-address-form>div {
    margin-bottom: 4px;
}

/* Text input fields */
.wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input input[type="password"],
.wc-block-components-text-input textarea {
    border: 1px solid #dce0e5 !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
    font-size: 0.95rem !important;
    font-family: var(--font-body) !important;
    background: #fafbfc !important;
    transition: all 0.25s ease !important;
}

.wc-block-components-text-input input:focus,
.wc-block-components-text-input textarea:focus {
    border-color: #f26522 !important;
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.08) !important;
    background: #fff !important;
    outline: none !important;
}

/* Text input labels */
.wc-block-components-text-input__label {
    color: #555 !important;
    font-size: 0.85rem !important;
}

/* Select / Combobox fields (País, Estado) */
.wc-blocks-components-select__select,
.wc-block-components-combobox .components-combobox-control input {
    border: 1px solid #dce0e5 !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
    font-size: 0.95rem !important;
    background: #fafbfc !important;
    transition: all 0.25s ease !important;
}

.wc-blocks-components-select__select:focus,
.wc-block-components-combobox .components-combobox-control input:focus {
    border-color: #f26522 !important;
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.08) !important;
    background: #fff !important;
    outline: none !important;
}

/* Checkout step container separator */
.wc-block-components-checkout-step::after {
    border-color: #eef0f3 !important;
}

/* Order summary panel */
.wc-block-components-order-summary {
    border-radius: 10px !important;
    border: 1px solid #eef0f3 !important;
    overflow: hidden;
}

/* Totals items */
.wc-block-components-totals-wrapper {
    padding: 12px 0 !important;
}

.wc-block-components-totals-item__label {
    font-weight: 600 !important;
    color: #0a192f !important;
}

.wc-block-components-totals-item__value {
    font-weight: 700 !important;
    color: #f26522 !important;
}

/* Checkout button */
.wc-block-components-checkout-place-order-button {
    background: linear-gradient(135deg, #f26522 0%, #ff8533 100%) !important;
    border-radius: 50px !important;
    padding: 16px 40px !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: none !important;
    box-shadow: 0 4px 15px rgba(242, 101, 34, 0.3) !important;
    transition: all 0.3s ease !important;
    margin-top: 16px !important;
}

.wc-block-components-checkout-place-order-button:hover {
    background: linear-gradient(135deg, #d95316 0%, #f26522 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(242, 101, 34, 0.4) !important;
}

/* Error/notice banners */
.wc-block-components-notice-banner {
    border-radius: 8px !important;
    margin-bottom: 16px !important;
}

/* Responsive for Blocks checkout */
@media (max-width: 768px) {
    .wc-block-components-address-form {
        padding: 20px 16px;
    }

    .wc-block-components-address-form__row {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .wc-block-components-checkout-place-order-button {
        width: 100% !important;
        padding: 14px 24px !important;
    }
}