/**
 * JEXA Cart, Checkout & Thank You
 * v4.3 - Multi-Step Checkout
 */

/* ============================================
   VARIABLES
============================================ */
:root {
    --jx-cart-primary: #6366f1;
    --jx-cart-secondary: #8b5cf6;
    --jx-cart-success: #10b981;
    --jx-cart-danger: #ef4444;
    --jx-cart-bg: #f8fafc;
    --jx-cart-card: #ffffff;
    --jx-cart-text: #1e293b;
    --jx-cart-muted: #64748b;
    --jx-cart-border: #e2e8f0;
}

/* ============================================
   BASE STYLES
============================================ */
body.woocommerce-cart,
body.woocommerce-checkout {
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 50%, #fdf4ff 100%) !important;
    min-height: 100vh !important;
}

body.woocommerce-cart .woocommerce,
body.woocommerce-checkout .woocommerce {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 24px !important;
    font-family: 'Vazirmatn', -apple-system, sans-serif !important;
}

/* ============================================
   CART PAGE - DO NOT MODIFY
============================================ */
body.woocommerce-cart .woocommerce {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 32px !important;
}

body.woocommerce-cart .woocommerce > * {
    width: 100% !important;
}

body.woocommerce-cart .woocommerce-cart-form {
    flex: 1 !important;
    min-width: 0 !important;
    background: var(--jx-cart-card) !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08) !important;
    overflow: hidden !important;
    border: none !important;
}

body.woocommerce-cart .cart_totals {
    width: 380px !important;
    flex-shrink: 0 !important;
    background: var(--jx-cart-card) !important;
    border-radius: 20px !important;
    padding: 28px !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08) !important;
    border: none !important;
    position: sticky !important;
    top: 24px !important;
}

body.woocommerce-cart table.shop_table {
    width: 100% !important;
    border: none !important;
    border-collapse: collapse !important;
    margin: 0 !important;
}

body.woocommerce-cart table.shop_table thead {
    background: linear-gradient(135deg, var(--jx-cart-primary), var(--jx-cart-secondary)) !important;
}

body.woocommerce-cart table.shop_table thead th {
    padding: 18px 20px !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-align: right !important;
    border: none !important;
    background: transparent !important;
}

body.woocommerce-cart table.shop_table tbody tr {
    border-bottom: 1px solid var(--jx-cart-border) !important;
    transition: all 0.3s !important;
}

body.woocommerce-cart table.shop_table tbody tr:hover {
    background: rgba(99,102,241,0.03) !important;
}

body.woocommerce-cart table.shop_table td {
    padding: 20px !important;
    vertical-align: middle !important;
    border: none !important;
    background: transparent !important;
}

body.woocommerce-cart .product-thumbnail img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

body.woocommerce-cart .product-name a {
    color: var(--jx-cart-text) !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    text-decoration: none !important;
}

body.woocommerce-cart .product-name a:hover {
    color: var(--jx-cart-primary) !important;
}

body.woocommerce-cart .product-price .amount,
body.woocommerce-cart .product-subtotal .amount {
    font-weight: 800 !important;
    font-size: 16px !important;
    color: var(--jx-cart-primary) !important;
}

body.woocommerce-cart .quantity {
    display: inline-flex !important;
    align-items: center !important;
    background: #f1f5f9 !important;
    border-radius: 50px !important;
    padding: 4px !important;
}

body.woocommerce-cart .quantity input {
    width: 50px !important;
    height: 40px !important;
    text-align: center !important;
    border: none !important;
    background: transparent !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    color: var(--jx-cart-text) !important;
}

body.woocommerce-cart .product-remove a {
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fee2e2 !important;
    color: var(--jx-cart-danger) !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    text-decoration: none !important;
    transition: all 0.3s !important;
}

body.woocommerce-cart .product-remove a:hover {
    background: var(--jx-cart-danger) !important;
    color: #fff !important;
    transform: scale(1.1) !important;
}

body.woocommerce-cart .coupon {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    padding: 20px !important;
    background: #f8fafc !important;
    border-top: 2px dashed var(--jx-cart-border) !important;
}

body.woocommerce-cart .coupon input[type="text"] {
    flex: 1 !important;
    min-width: 180px !important;
    padding: 14px 18px !important;
    border: 2px solid var(--jx-cart-border) !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    background: #fff !important;
}

body.woocommerce-cart .coupon input:focus {
    outline: none !important;
    border-color: var(--jx-cart-primary) !important;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.15) !important;
}

body.woocommerce-cart .coupon button,
body.woocommerce-cart button[name="update_cart"] {
    padding: 14px 24px !important;
    background: #1e293b !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}

body.woocommerce-cart .coupon button:hover,
body.woocommerce-cart button[name="update_cart"]:hover {
    background: #0f172a !important;
    transform: translateY(-2px) !important;
}

body.woocommerce-cart .cart_totals h2 {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--jx-cart-text) !important;
    margin: 0 0 20px !important;
    padding-bottom: 16px !important;
    border-bottom: 2px solid var(--jx-cart-border) !important;
}

body.woocommerce-cart .cart_totals table {
    width: 100% !important;
    border: none !important;
}

body.woocommerce-cart .cart_totals th,
body.woocommerce-cart .cart_totals td {
    padding: 14px 0 !important;
    border: none !important;
    border-bottom: 1px solid var(--jx-cart-border) !important;
    background: transparent !important;
}

body.woocommerce-cart .cart_totals .order-total th,
body.woocommerce-cart .cart_totals .order-total td {
    font-size: 18px !important;
    font-weight: 800 !important;
    border-bottom: none !important;
    padding-top: 20px !important;
}

body.woocommerce-cart .cart_totals .order-total .amount {
    font-size: 24px !important;
    color: var(--jx-cart-primary) !important;
}

body.woocommerce-cart .wc-proceed-to-checkout a {
    display: block !important;
    width: 100% !important;
    padding: 18px !important;
    background: linear-gradient(135deg, var(--jx-cart-primary), var(--jx-cart-secondary)) !important;
    color: #fff !important;
    text-align: center !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    border-radius: 14px !important;
    text-decoration: none !important;
    margin-top: 20px !important;
    transition: all 0.3s !important;
    box-shadow: 0 4px 16px rgba(99,102,241,0.3) !important;
}

body.woocommerce-cart .wc-proceed-to-checkout a:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(99,102,241,0.4) !important;
}

/* Cart Responsive */
@media (max-width: 991px) {
    body.woocommerce-cart .woocommerce {
        flex-direction: column !important;
    }
    
    body.woocommerce-cart .cart_totals {
        width: 100% !important;
        position: static !important;
    }
}

@media (max-width: 767px) {
    body.woocommerce-cart .woocommerce {
        padding: 20px 16px !important;
    }
    
    body.woocommerce-cart table.shop_table,
    body.woocommerce-cart table.shop_table thead,
    body.woocommerce-cart table.shop_table tbody,
    body.woocommerce-cart table.shop_table tr,
    body.woocommerce-cart table.shop_table th,
    body.woocommerce-cart table.shop_table td {
        display: block !important;
    }
    
    body.woocommerce-cart table.shop_table thead {
        display: none !important;
    }
    
    body.woocommerce-cart table.shop_table tbody tr {
        background: var(--jx-cart-card) !important;
        border-radius: 16px !important;
        padding: 20px !important;
        margin-bottom: 16px !important;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 12px !important;
        border: none !important;
        position: relative !important;
    }
    
    body.woocommerce-cart table.shop_table td {
        padding: 0 !important;
        border: none !important;
    }
    
    body.woocommerce-cart .product-remove {
        position: absolute !important;
        top: 16px !important;
        left: 16px !important;
    }
    
    body.woocommerce-cart .product-thumbnail img {
        width: 70px !important;
        height: 70px !important;
    }
    
    body.woocommerce-cart .product-name {
        flex: 1 !important;
        min-width: 120px !important;
    }
    
    body.woocommerce-cart .product-price {
        display: none !important;
    }
    
    body.woocommerce-cart .product-subtotal {
        width: 100% !important;
        padding-top: 12px !important;
        margin-top: 8px !important;
        border-top: 1px dashed var(--jx-cart-border) !important;
        text-align: left !important;
    }
    
    body.woocommerce-cart .coupon {
        flex-direction: column !important;
    }
    
    body.woocommerce-cart .coupon input[type="text"],
    body.woocommerce-cart .coupon button {
        width: 100% !important;
    }
    
    body.woocommerce-cart .cart_totals {
        padding: 20px !important;
        border-radius: 16px !important;
    }
}

/* ============================================
   CHECKOUT PAGE - MULTI-STEP HORIZONTAL
============================================ */

/* Main Container */
body.woocommerce-checkout .woocommerce {
    max-width: 1000px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
}

/* Hide unwanted elements */
body.woocommerce-checkout .woocommerce-form-coupon-toggle,
body.woocommerce-checkout .woocommerce-form-coupon,
body.woocommerce-checkout #ship-to-different-address,
body.woocommerce-checkout .woocommerce-shipping-fields,
body.woocommerce-checkout .col2-set .col-2 {
    display: none !important;
}

/* ============================================
   PROGRESS STEPS
============================================ */
.jx-checkout-steps {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    margin-bottom: 50px !important;
    padding: 0 20px !important;
}

.jx-step {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    position: relative !important;
    z-index: 1 !important;
}

.jx-step-icon {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative !important;
}

.jx-step-icon svg {
    width: 26px !important;
    height: 26px !important;
    color: #94a3b8 !important;
    transition: all 0.3s !important;
}

.jx-step-label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #94a3b8 !important;
    white-space: nowrap !important;
}

.jx-step-check {
    position: absolute !important;
    top: -2px !important;
    right: -2px !important;
    width: 22px !important;
    height: 22px !important;
    background: var(--jx-cart-success) !important;
    color: #fff !important;
    border-radius: 50% !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(16,185,129,0.4) !important;
}

.jx-step-line {
    width: 100px !important;
    height: 4px !important;
    background: #e2e8f0 !important;
    margin: 0 -10px !important;
    margin-bottom: 30px !important;
    border-radius: 2px !important;
    transition: background 0.3s !important;
}

.jx-step-line.jx-line-done {
    background: var(--jx-cart-success) !important;
}

/* Active Step */
.jx-step.jx-active .jx-step-icon {
    background: linear-gradient(135deg, var(--jx-cart-primary), var(--jx-cart-secondary)) !important;
    box-shadow: 0 8px 30px rgba(99,102,241,0.4) !important;
    transform: scale(1.1) !important;
}

.jx-step.jx-active .jx-step-icon svg {
    color: #fff !important;
}

.jx-step.jx-active .jx-step-label {
    color: var(--jx-cart-primary) !important;
    font-weight: 700 !important;
}

/* Completed Step */
.jx-step.jx-completed .jx-step-icon {
    background: var(--jx-cart-success) !important;
}

.jx-step.jx-completed .jx-step-icon svg {
    color: #fff !important;
}

.jx-step.jx-completed .jx-step-check {
    display: flex !important;
}

.jx-step.jx-completed .jx-step-label {
    color: var(--jx-cart-success) !important;
}

/* ============================================
   STEP 1: BILLING FORM - FULL WIDTH HORIZONTAL
============================================ */
body.woocommerce-checkout #customer_details {
    background: var(--jx-cart-card) !important;
    border-radius: 24px !important;
    padding: 40px !important;
    box-shadow: 0 10px 50px rgba(0,0,0,0.08) !important;
    border: 1px solid var(--jx-cart-border) !important;
    margin-bottom: 24px !important;
}

body.woocommerce-checkout .col2-set .col-1 {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Billing Title */
body.woocommerce-checkout .woocommerce-billing-fields h3 {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: var(--jx-cart-text) !important;
    margin: 0 0 32px !important;
    padding: 0 0 20px !important;
    border-bottom: 2px solid var(--jx-cart-border) !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

body.woocommerce-checkout .woocommerce-billing-fields h3::before {
    content: '👤' !important;
    font-size: 32px !important;
}

/* Form Fields - Horizontal Grid */
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

body.woocommerce-checkout .form-row {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
}

/* Wide fields take full row */
body.woocommerce-checkout #billing_address_1_field,
body.woocommerce-checkout #billing_address_2_field,
body.woocommerce-checkout #order_comments_field {
    grid-column: 1 / -1 !important;
}

/* Two column fields */
body.woocommerce-checkout #billing_first_name_field,
body.woocommerce-checkout #billing_last_name_field {
    grid-column: span 1 !important;
}

body.woocommerce-checkout .form-row label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--jx-cart-text) !important;
    margin-bottom: 10px !important;
}

body.woocommerce-checkout .form-row label .required {
    color: var(--jx-cart-danger) !important;
    margin-right: 4px !important;
}

body.woocommerce-checkout .form-row input,
body.woocommerce-checkout .form-row select,
body.woocommerce-checkout .form-row textarea {
    width: 100% !important;
    padding: 16px 18px !important;
    border: 2px solid var(--jx-cart-border) !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    font-family: inherit !important;
    background: #fff !important;
    color: var(--jx-cart-text) !important;
    transition: all 0.3s !important;
    box-sizing: border-box !important;
}

body.woocommerce-checkout .form-row input:focus,
body.woocommerce-checkout .form-row select:focus,
body.woocommerce-checkout .form-row textarea:focus {
    outline: none !important;
    border-color: var(--jx-cart-primary) !important;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.15) !important;
}

body.woocommerce-checkout .form-row input.jx-error {
    border-color: var(--jx-cart-danger) !important;
    animation: shake 0.5s !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Select2 Dropdown */
body.woocommerce-checkout .select2-container {
    width: 100% !important;
}

body.woocommerce-checkout .select2-container--default .select2-selection--single {
    height: auto !important;
    padding: 14px 18px !important;
    border: 2px solid var(--jx-cart-border) !important;
    border-radius: 14px !important;
    background: #fff !important;
}

body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5 !important;
    padding: 0 !important;
    color: var(--jx-cart-text) !important;
}

body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    left: 12px !important;
    right: auto !important;
}

/* ============================================
   NAVIGATION BUTTONS
============================================ */
.jx-step-nav,
.jx-nav-wrap {
    display: flex !important;
    justify-content: center !important;
    gap: 16px !important;
    margin-top: 32px !important;
}

.jx-btn-next,
.jx-btn-back {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 18px 40px !important;
    border-radius: 16px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    border: none !important;
    font-family: inherit !important;
}

.jx-btn-next {
    background: linear-gradient(135deg, var(--jx-cart-primary), var(--jx-cart-secondary)) !important;
    color: #fff !important;
    box-shadow: 0 6px 25px rgba(99,102,241,0.35) !important;
}

.jx-btn-next:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 35px rgba(99,102,241,0.45) !important;
}

.jx-btn-back {
    background: #f1f5f9 !important;
    color: var(--jx-cart-text) !important;
}

.jx-btn-back:hover {
    background: #e2e8f0 !important;
}

/* Back button positioning */
.jx-step-nav-back,
.jx-nav-back {
    justify-content: flex-start !important;
    margin-top: 24px !important;
    padding-top: 24px !important;
    border-top: 1px solid var(--jx-cart-border) !important;
}

/* ============================================
   STEP 2: ORDER REVIEW - HORIZONTAL
============================================ */
body.woocommerce-checkout #order_review_heading {
    display: none !important;
}

body.woocommerce-checkout #order_review {
    background: var(--jx-cart-card) !important;
    border-radius: 24px !important;
    padding: 40px !important;
    box-shadow: 0 10px 50px rgba(0,0,0,0.08) !important;
    border: 1px solid var(--jx-cart-border) !important;
}

body.woocommerce-checkout #order_review::before {
    content: '🛒 بررسی و پرداخت' !important;
    display: block !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    color: var(--jx-cart-text) !important;
    margin-bottom: 32px !important;
    padding-bottom: 20px !important;
    border-bottom: 2px solid var(--jx-cart-border) !important;
}

/* Order Review Horizontal Layout */
body.woocommerce-checkout .woocommerce-checkout-review-order {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    align-items: start !important;
}

/* Order Table - Left Side */
body.woocommerce-checkout .woocommerce-checkout-review-order-table {
    grid-column: 1 !important;
    width: 100% !important;
    border: none !important;
    border-collapse: collapse !important;
    margin: 0 !important;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table thead {
    display: none !important;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table td {
    padding: 16px 0 !important;
    border: none !important;
    border-bottom: 1px solid var(--jx-cart-border) !important;
    background: transparent !important;
    vertical-align: middle !important;
    font-size: 14px !important;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table .product-name {
    font-weight: 600 !important;
    color: var(--jx-cart-text) !important;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table .product-total {
    text-align: left !important;
    font-weight: 700 !important;
    color: var(--jx-cart-primary) !important;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot th {
    text-align: right !important;
    font-weight: 600 !important;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot td {
    text-align: left !important;
    font-weight: 700 !important;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot .order-total th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot .order-total td {
    font-size: 20px !important;
    font-weight: 800 !important;
    border-bottom: none !important;
    padding-top: 24px !important;
}

body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot .order-total .amount {
    font-size: 26px !important;
    color: var(--jx-cart-primary) !important;
}

/* Payment Methods - Right Side */
body.woocommerce-checkout #payment {
    grid-column: 2 !important;
    background: #f8fafc !important;
    border-radius: 20px !important;
    padding: 24px !important;
    overflow: hidden !important;
    max-width: 100% !important;
}

/* Fix wallet payment boxes overflow */
body.woocommerce-checkout #payment > *,
body.woocommerce-checkout .payment_box,
body.woocommerce-checkout .payment_box > * {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body.woocommerce-checkout .wc_payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 24px !important;
    max-width: 100% !important;
}

body.woocommerce-checkout .wc_payment_method {
    margin-bottom: 12px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    border: 2px solid var(--jx-cart-border) !important;
    background: #fff !important;
    transition: all 0.3s !important;
    max-width: 100% !important;
}

body.woocommerce-checkout .wc_payment_method:has(input:checked) {
    border-color: var(--jx-cart-primary) !important;
    background: rgba(99,102,241,0.05) !important;
    box-shadow: 0 4px 16px rgba(99,102,241,0.15) !important;
}

body.woocommerce-checkout .wc_payment_method > label {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 16px 18px !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    color: var(--jx-cart-text) !important;
    margin: 0 !important;
    flex-wrap: wrap !important;
}

body.woocommerce-checkout .wc_payment_method input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
    accent-color: var(--jx-cart-primary) !important;
    flex-shrink: 0 !important;
}

body.woocommerce-checkout .payment_box {
    padding: 14px 18px !important;
    background: #f8fafc !important;
    border-top: 1px solid var(--jx-cart-border) !important;
    font-size: 13px !important;
    color: var(--jx-cart-muted) !important;
    overflow: hidden !important;
    max-width: 100% !important;
}

/* Wallet payment special box */
body.woocommerce-checkout .payment_box .wc-wallet-gateway-payment-form,
body.woocommerce-checkout .payment_box > div {
    max-width: 100% !important;
    overflow: hidden !important;
    border-radius: 12px !important;
}

/* Place Order Button */
body.woocommerce-checkout #place_order {
    width: 100% !important;
    padding: 20px 24px !important;
    background: linear-gradient(135deg, var(--jx-cart-primary), var(--jx-cart-secondary)) !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    border: none !important;
    border-radius: 16px !important;
    cursor: pointer !important;
    font-family: inherit !important;
    transition: all 0.3s !important;
    box-shadow: 0 6px 25px rgba(99,102,241,0.35) !important;
}

body.woocommerce-checkout #place_order:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 35px rgba(99,102,241,0.45) !important;
}

/* Back Button in Step 2 */
.jx-step-nav-back {
    justify-content: flex-start !important;
    margin-top: 24px !important;
    padding-top: 24px !important;
    border-top: 1px solid var(--jx-cart-border) !important;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 991px) {
    body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    body.woocommerce-checkout .woocommerce-checkout-review-order {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
    
    body.woocommerce-checkout #payment {
        grid-column: 1 !important;
    }
}

@media (max-width: 767px) {
    body.woocommerce-checkout .woocommerce {
        padding: 20px 12px !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .jx-checkout-wrapper {
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    .jx-checkout-steps {
        margin-bottom: 30px !important;
        padding: 0 !important;
    }
    
    .jx-step-icon {
        width: 50px !important;
        height: 50px !important;
    }
    
    .jx-step-icon svg {
        width: 22px !important;
        height: 22px !important;
    }
    
    .jx-step-label {
        font-size: 11px !important;
    }
    
    .jx-step-line {
        width: 40px !important;
    }
    
    body.woocommerce-checkout #customer_details,
    body.woocommerce-checkout #order_review {
        padding: 20px 16px !important;
        border-radius: 20px !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    body.woocommerce-checkout #billing_first_name_field,
    body.woocommerce-checkout #billing_last_name_field {
        grid-column: 1 !important;
    }
    
    .jx-btn-next,
    .jx-btn-back {
        padding: 16px 28px !important;
        font-size: 15px !important;
        width: 100% !important;
        justify-content: center !important;
    }
    
    .jx-step-nav,
    .jx-nav-wrap {
        flex-direction: column !important;
    }
    
    body.woocommerce-checkout #payment {
        padding: 16px !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    body.woocommerce-checkout .wc_payment_method > label {
        padding: 14px 12px !important;
        font-size: 14px !important;
    }
    
    body.woocommerce-checkout .payment_box {
        padding: 12px !important;
        max-width: 100% !important;
    }
    
    /* Fix wallet payment box on mobile */
    body.woocommerce-checkout .payment_box > *,
    body.woocommerce-checkout .wc-wallet-gateway-payment-form {
        max-width: 100% !important;
        overflow: hidden !important;
        word-wrap: break-word !important;
    }
    
    body.woocommerce-checkout #order_review::before {
        font-size: 20px !important;
    }
    
    body.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot .order-total .amount {
        font-size: 20px !important;
    }
}

/* ============================================
   THANK YOU PAGE
============================================ */
.jx-thankyou-wrapper {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    font-family: 'Vazirmatn', -apple-system, sans-serif !important;
    min-height: 100vh !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #a855f7 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    overflow: auto !important;
}

.jx-ty-container {
    width: 100% !important;
    max-width: 440px !important;
}

/* Background Animation */
.jx-ty-bg {
    position: fixed !important;
    inset: -50% !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

.jx-ty-circle {
    position: absolute !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,0.1) !important;
    animation: tyFloat 6s ease-in-out infinite !important;
}

.jx-ty-circle-1 {
    width: 300px !important;
    height: 300px !important;
    top: 10% !important;
    left: 10% !important;
}

.jx-ty-circle-2 {
    width: 200px !important;
    height: 200px !important;
    bottom: 20% !important;
    right: 10% !important;
    animation-delay: -2s !important;
}

.jx-ty-circle-3 {
    width: 150px !important;
    height: 150px !important;
    top: 60% !important;
    left: 60% !important;
    animation-delay: -4s !important;
}

@keyframes tyFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.1); }
}

/* Card */
.jx-ty-card {
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-radius: 28px !important;
    padding: 40px 32px !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2) !important;
    text-align: center !important;
    animation: tyCardIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes tyCardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Icon */
.jx-ty-icon-wrap {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 24px !important;
    animation: iconPulse 2s ease-in-out infinite !important;
}

.jx-ty-icon-wrap.success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0) !important;
}

.jx-ty-icon-wrap.failed {
    background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
}

.jx-ty-icon-wrap svg {
    width: 40px !important;
    height: 40px !important;
}

.jx-ty-icon-wrap.success svg {
    color: #059669 !important;
}

.jx-ty-icon-wrap.failed svg {
    color: #dc2626 !important;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Header */
.jx-ty-header {
    margin-bottom: 24px !important;
}

.jx-ty-header h1 {
    font-size: 26px !important;
    font-weight: 900 !important;
    color: #1e293b !important;
    margin: 0 0 12px !important;
}

.jx-ty-header p {
    font-size: 15px !important;
    color: #64748b !important;
    margin: 0 !important;
    line-height: 1.7 !important;
}

/* Order Number */
.jx-ty-order-number {
    background: #f1f5f9 !important;
    border-radius: 12px !important;
    padding: 14px 20px !important;
    margin-bottom: 28px !important;
    font-size: 15px !important;
    color: #64748b !important;
}

.jx-ty-order-number strong {
    color: var(--jx-cart-primary) !important;
    font-weight: 800 !important;
}

/* Actions */
.jx-ty-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.jx-ty-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 16px 24px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: all 0.3s !important;
}

.jx-ty-btn svg {
    width: 20px !important;
    height: 20px !important;
}

.jx-ty-btn.primary {
    background: linear-gradient(135deg, var(--jx-cart-primary), var(--jx-cart-secondary)) !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(99,102,241,0.3) !important;
}

.jx-ty-btn.primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(99,102,241,0.4) !important;
}

.jx-ty-btn:not(.primary):not(.outline) {
    background: #1e293b !important;
    color: #fff !important;
}

.jx-ty-btn:not(.primary):not(.outline):hover {
    background: #0f172a !important;
}

.jx-ty-btn.outline {
    background: transparent !important;
    color: #64748b !important;
    border: 2px solid #e2e8f0 !important;
}

.jx-ty-btn.outline:hover {
    border-color: var(--jx-cart-primary) !important;
    color: var(--jx-cart-primary) !important;
}

/* Failed Background */
.jx-thankyou-wrapper:has(.is-failed) {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 50%, #991b1b 100%) !important;
}

/* Responsive */
@media (max-width: 575px) {
    .jx-ty-card {
        padding: 32px 24px !important;
        border-radius: 24px !important;
    }
    
    .jx-ty-header h1 {
        font-size: 22px !important;
    }
    
    .jx-ty-icon-wrap {
        width: 70px !important;
        height: 70px !important;
    }
    
    .jx-ty-icon-wrap svg {
        width: 35px !important;
        height: 35px !important;
    }
}

/* Hide WC default content */
body.woocommerce-order-received .woocommerce-order,
body.woocommerce-order-received .entry-content > *:not(.jx-thankyou-wrapper) {
    display: none !important;
}
