/**
 * Checkout Page Styles
 * 
 * Custom styling for the checkout page with sidebar cart design
 * Uses separate classes from mini-cart but identical styling
 */

/* Override any theme CSS that might interfere */
body.woocommerce-checkout .militra-checkout-container,
.militra-checkout-container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: var(--spacing-8) var(--spacing-6) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* FORCE CHECKOUT FIELD STYLING - MAXIMUM SPECIFICITY */
body.woocommerce-checkout input[type="text"],
body.woocommerce-checkout input[type="email"],
body.woocommerce-checkout input[type="tel"],
body.woocommerce-checkout .input-text,
.woocommerce-checkout .input-text,
.woocommerce form.checkout input[type="text"],
.woocommerce form.checkout input[type="email"],
.woocommerce form.checkout input[type="tel"],
.woocommerce form.checkout .input-text,
.militra-checkout-container input[type="text"],
.militra-checkout-container input[type="email"],
.militra-checkout-container input[type="tel"],
.militra-checkout-container .input-text,
/* DEBUG: These fields should have BRIGHT GREEN border if CSS loads */
#billing_first_name,
#billing_last_name,
#billing_phone,
#billing_email,
#_billing_company_name,
#_billing_company_code,
#_billing_company_vat_code {
    border: 3px solid lime !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 54px !important;
    flex-shrink: 0 !important;
    padding: 0 var(--spacing-4) !important;
    border: 1px solid #E6E8EC !important;
    border-radius: 15px !important;
    background: #F9F9F9 !important;
    color: var(--color-text) !important;
    font-family: var(--font-family-body) !important;
    font-size: 16px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: normal !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* Force all inputs to match existing-customer styling on mobile */
@media (max-width: 768px) {
    /* HIGH PRIORITY OVERRIDE - Match existing-customer styling */
    body.woocommerce-checkout input[type="text"],
    body.woocommerce-checkout input[type="email"],
    body.woocommerce-checkout input[type="tel"],
    body.woocommerce-checkout select,
    body.woocommerce-checkout textarea,
    .woocommerce-checkout input[type="text"],
    .woocommerce-checkout input[type="email"],
    .woocommerce-checkout input[type="tel"],
    .woocommerce-checkout select,
    .woocommerce-checkout textarea,
    .woocommerce-checkout .input-text,
    body.woocommerce-checkout .input-text {
        width: 100% !important;
        max-width: 100% !important;
        height: 54px !important;
        flex-shrink: 0 !important;
        padding: 0 var(--spacing-4) !important;
        border: 1px solid #E6E8EC !important;
        border-radius: 15px !important;
        background: #F9F9F9 !important;
        color: var(--color-text) !important;
        font-family: var(--font-family-body) !important;
        font-size: 16px !important;
        font-style: normal !important;
        font-weight: 400 !important;
        line-height: normal !important;
        transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
        box-sizing: border-box !important;
    }

    /* Force form rows to full width */
    body.woocommerce-checkout .form-row,
    .woocommerce-checkout .form-row,
    .checkout-form-section .form-row {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Force containers to full width */
    body.woocommerce-checkout form.checkout,
    .woocommerce-checkout form.checkout {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Ensure form doesn't have conflicting styles */
body.woocommerce-checkout form.checkout,
form.checkout {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.checkout-main-content {
    display: grid !important;
    grid-template-columns: 1fr 500px !important;
    gap: var(--spacing-12) !important;
    align-items: start !important;
    width: 100% !important;
}

/* Left Side: Checkout Form */
.checkout-form-section {
    background: var(--color-background) !important;
    width: 100% !important;
    min-width: 0 !important;
    display: block !important;
    padding: 0 !important;
}

/* Customer Type Tabs */
.customer-type-tabs {
    display: flex;
    margin-bottom: var(--spacing-8);
    border-bottom: 2px solid #e6e8ec;
    gap: var(--spacing-8);
}

.tab-button {
    background: none;
    border: none;
    padding: var(--spacing-4) var(--spacing-2);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    font-family: var(--font-family-body);
    white-space: nowrap;
}

.tab-button:hover {
    color: var(--color-headings-general);
}

.tab-button.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Existing Customer Login Section */
.existing-customer-login {
    transition: all 0.3s ease;
}

.existing-customer-login.hidden {
    display: none !important;
}

.login-fields-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-5);
    width: 100%;
    max-width: 500px;
}

.login-fields-grid .form-row {
    margin-bottom: 0;
    width: 100%;
}

/* Login field labels - matching checkout styling */
.existing-customer-login .form-row label {
    display: block;
    margin-bottom: var(--spacing-3);
    color: #12142D;
    font-family: var(--font-family-body);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.existing-customer-login .form-row label .required {
    color: var(--color-error);
    margin-left: 2px;
}

/* Login inputs - matching checkout styling */
.existing-customer-login .form-row input[type="text"],
.existing-customer-login .form-row input[type="email"],
.existing-customer-login .form-row input[type="password"] {
    width: 100%;
    height: 54px;
    flex-shrink: 0;
    padding: 0 var(--spacing-4);
    border: 1px solid #E6E8EC;
    border-radius: 15px;
    background: #F9F9F9;
    color: var(--color-text);
    font-family: var(--font-family-body);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.existing-customer-login .form-row input::placeholder {
    color: #777E90;
    font-family: var(--font-family-body);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.existing-customer-login .form-row input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Login button styling */
.login-submit-button {
    width: 100%;
    height: 54px;
    background: var(--color-primary);
    border: none;
    border-radius: 15px;
    color: var(--color-background);
    font-family: var(--font-family-body);
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-submit-button:hover {
    background: var(--color-secondary);
}

.login-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Login links styling */
.login-links {
    text-align: center;
    margin: 0;
}

.login-links a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: color 0.2s ease;
}

.login-links a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

/* Login notices styling */
.login-notices {
    margin-top: var(--spacing-4);
}

.login-notice {
    padding: var(--spacing-3) var(--spacing-4);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--spacing-3);
}

.login-notice.success {
    background: #d1eddb;
    color: #2d5016;
    border: 1px solid #a7c3a0;
}

.login-notice.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
}

/* Login success message styling */
.login-success-message {
    margin-top: var(--spacing-4);
}

.login-success-message .login-notice.success {
    font-size: var(--font-size-base);
    padding: var(--spacing-4) var(--spacing-5);
    text-align: center;
    font-weight: var(--font-weight-medium);
}

/* Checkout Sections */
.checkout-section {
    margin-bottom: var(--spacing-10);
    transition: all 0.3s ease;
}

.checkout-section.hidden {
    display: none !important;
}

.checkout-section h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-headings-general);
    margin-bottom: var(--spacing-6);
    padding-bottom: 0;
    border: none;
}

/* Form Fields Styling */
.checkout-billing-fields,
.checkout-shipping-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-5);
    width: 100%;
    max-width: none;
}

.woocommerce-input-wrapper {
    position: relative;
}

/* Hide WooCommerce order attribution inputs that interfere with layout */
wc-order-attribution-inputs,
.wc-order-attribution-inputs {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* WooCommerce billing fields wrapper */
@media (min-width: 769px) {
    .woocommerce-billing-fields {
     width: 200% !important;
     max-width: none !important;
    }
}
@media (max-width: 768px) {
     .woocommerce-billing-fields {
     width: 100%;
}
}

.woocommerce-billing-fields__field-wrapper {
    width: 100% !important;
    max-width: none !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

/* Force field ordering with CSS since invoice123 plugin overrides PHP priorities */
@media (min-width: 769px) {
#billing_first_name_field { 
    margin-right: var(--spacing-3);
}
#billing_last_name_field { 
    margin-left: var(--spacing-3);
}
#billing_phone_field { 
    margin-top: var(--spacing-8);
    margin-right: var(--spacing-3);
}
#billing_email_field { 
    margin-top: var(--spacing-8);
    margin-left: var(--spacing-3);
}

.woocommerce-billing-fields__field-wrapper {
    margin-left: var(--spacing-4);
}
}
#billing_first_name_field { 
    order: 1; 
}
#billing_last_name_field { 
    order: 2; 
}
#billing_phone_field { 
    order: 3; 
}
#billing_email_field { 
    order: 4; 
}
#_invoice_for_company_field { order: 5; }
#_billing_company_name_field { order: 6; }
#_billing_company_code_field { order: 7; }
#_billing_company_vat_code_field { order: 8; }
#create_account_checkbox_field { order: 9; }
#account_password_field { order: 10; }

.checkout-billing-fields .form-row,
.checkout-shipping-fields .form-row {
    margin-bottom: 0;
    width: 100%;
    max-width: none;
}

.checkout-billing-fields .form-row.form-row-wide,
.checkout-shipping-fields .form-row.form-row-wide {
    grid-column: 1 / -1;
}

/* Form Field Labels and Inputs */
.checkout-form-section .form-row label {
    display: block;
    margin-bottom: var(--spacing-3);
    color: #12142D;
    font-family: var(--font-family-body);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.checkout-form-section .form-row label .required {
    color: var(--color-error);
    margin-left: 2px;
}

.checkout-form-section .form-row input[type="text"],
.checkout-form-section .form-row input[type="email"],
.checkout-form-section .form-row input[type="tel"],
.checkout-form-section .form-row select,
.checkout-form-section .form-row textarea,
.checkout-form-section .form-row .input-text,
.checkout-billing-fields input[type="text"],
.checkout-billing-fields input[type="email"],
.checkout-billing-fields input[type="tel"],
.checkout-billing-fields .input-text,
.woocommerce-billing-fields input[type="text"],
.woocommerce-billing-fields input[type="email"],
.woocommerce-billing-fields input[type="tel"],
.woocommerce-billing-fields .input-text {
    width: 100%;
    height: 54px;
    flex-shrink: 0;
    padding: 0 var(--spacing-4);
    border: 1px solid #E6E8EC;
    border-radius: 15px;
    background: #F9F9F9;
    color: var(--color-text);
    font-family: var(--font-family-body);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}


.checkout-form-section .form-row input::placeholder {
    color: #777E90;
    font-family: var(--font-family-body);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

/* Company Name Field Styling */
.checkout-form-section .form-row input[name*="company"] {
    background: #f8f9fa;
    color: var(--color-text-muted);
}

/* Account Registration Fields Styling */
.create-account-checkbox {
    margin-top: var(--spacing-6);
    margin-bottom: var(--spacing-4);
}

/* Custom checkbox styling for all checkout checkboxes */
.checkout-form-section .create-account-checkbox label,
.checkout-form-section #_invoice_for_company_field label.checkbox,
.checkout-form-section .woocommerce-form__label.woocommerce-form__label-for-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
    color: var(--color-headings-general);
    margin-bottom: 0;
}




/* Enhanced Firefox-specific styling */
.checkout-form-section .create-account-checkbox input[type="checkbox"],
.checkout-form-section #_invoice_for_company_field input[type="checkbox"],
.checkout-form-section .woocommerce-form__label-for-checkbox input[type="checkbox"] {
    /* Force standard appearance across all browsers */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background: white !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    width: 20px !important;
    height: 20px !important;
    position: relative !important;
    margin-right: var(--spacing-3) !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    outline: none !important;
    display: inline-block !important;
    vertical-align: middle !important;
    min-width: 20px !important;
    min-height: 20px !important;
}

.checkout-form-section .create-account-checkbox input[type="checkbox"]:checked,
.checkout-form-section #_invoice_for_company_field input[type="checkbox"]:checked,
.checkout-form-section .woocommerce-form__label-for-checkbox input[type="checkbox"]:checked {
    background: var(--color-primary) !important;
    border: 1px solid var(--color-primary) !important;
}

.checkout-form-section .create-account-checkbox input[type="checkbox"]:checked::before,
.checkout-form-section #_invoice_for_company_field input[type="checkbox"]:checked::before,
.checkout-form-section .woocommerce-form__label-for-checkbox input[type="checkbox"]:checked::before {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 4px !important;
    height: 8px !important;
    border: solid white !important;
    border-width: 0 2px 2px 0 !important;
    transform: translate(-50%, -60%) rotate(45deg) !important;
    display: block !important;
    z-index: 2 !important;
}


.account-password-field {
    margin-top: var(--spacing-4);
    transition: all 0.3s ease;
}

.account-password-field.hidden {
    display: none !important;
    opacity: 0;
}

.checkout-form-section .account-password-field input[type="password"] {
    background: #fff5f3;
    border: 2px solid var(--color-primary);
    font-family: var(--font-family-body);
}


.checkout-form-section .account-password-field label {
    color: var(--color-primary);
    font-weight: var(--font-weight-medium);
}

/* Delivery Options */
.delivery-section {
    padding: var(--spacing-6);
}

.delivery-options {
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
}

/* Hide the "Pristatymas" heading/text that appears before shipping methods */
.delivery-options > *:first-child:not(.woocommerce-shipping-methods):not(ul) {
    display: none !important;
}

/* Hide any text nodes or headings */
#shipping_method::before,
.delivery-options::before {
    display: none !important;
}

/* Target specific elements that might contain "Pristatymas" */
.delivery-options th,
.delivery-options td:first-child:not(:has(input)):not(:has(label)):not(:has(ul)) {
    display: none !important;
}

/* Hide any standalone text before the UL */
.delivery-options > br,
.delivery-options > text {
    display: none !important;
}

/* Set font-size to 0 for the container to hide text nodes, then reset for children */
.delivery-options {
    font-size: 0;
}

.delivery-options * {
    font-size: 16px;
    margin-top: -8px;
}

.delivery-options .shipping_method,
.delivery-options .woocommerce-shipping-methods {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
}

.delivery-options .shipping_method li,
.delivery-options .woocommerce-shipping-methods li {
    display: flex;
    align-items: start;
    padding-top: 20px;
    padding-bottom: 15px;
    padding-left: 10px;
    padding-right: 10px;
    background: #F8F9FA;
    border-radius: 20px;
    border: 1px solid #E6E8EC;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    gap: var(--spacing-4);
}

.delivery-options .shipping_method li:hover,
.delivery-options .shipping_method li:has(input:checked),
.delivery-options .woocommerce-shipping-methods li:hover,
.delivery-options .woocommerce-shipping-methods li:has(input:checked) {
    border-color: var(--color-primary);
    background: #FFFFFF;
}

/* Radio button */
.delivery-options .shipping_method li input[type="radio"],
.delivery-options .woocommerce-shipping-methods li input[type="radio"] {
    margin: 0;
    margin-top: 2px;
    accent-color: var(--color-primary);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Shipping method logo */
.delivery-options .shipping_method li img,
.delivery-options .woocommerce-shipping-methods li img {
    max-width: 45px;
    max-height: 25px;
    margin: 0;
    flex-shrink: 0;
}

/* Shipping method label */
.delivery-options .shipping_method li > label,
.delivery-options .woocommerce-shipping-methods li > label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1);
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    color: #12142D;
    line-height: 1.4;
    flex-shrink: 0;
}

/* Shipping method title */
.delivery-options .shipping_method li .shipping-method-title,
.delivery-options .woocommerce-shipping-methods li .shipping-method-title {
    font-size: 16px;
    font-weight: 500;
    color: #12142D;
    display: block;
    width: 100%;
}

/* Shipping description */
.delivery-options .shipping_method li .shipping-description,
.delivery-options .woocommerce-shipping-methods li .shipping-description {
    color: #777E90;
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    display: block;
    width: 100%;
}

/* Terminal/location select wrapper */
.delivery-options label[for*="terminal"],
.delivery-options .woo_lithuaniapost_lpexpress_terminal_select_container,
.delivery-options .woocommerce-input-wrapper {
    width: auto;
    min-width: 250px;
    max-width: 400px;
    margin: 0;
    flex-shrink: 0;
    order: 3;
}

/* Terminal select styling */
.delivery-options .woo_lithuaniapost_lpexpress_terminal_id,
.delivery-options select,
.delivery-options .woo_lithuaniapost_lpexpress_terminal_select_container select {
    width: 100% !important;
    height: 46px;
    padding: 0 var(--spacing-4);
    border: 1px solid #E6E8EC;
    border-radius: 12px;
    background: #FFFFFF;
    color: #777E90;
    font-family: var(--font-family-body);
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.delivery-options select:focus,
.delivery-options .woo_lithuaniapost_lpexpress_terminal_id:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Price styling - positioned on the right */
.delivery-options .shipping_method li .woocommerce-Price-amount,
.delivery-options .woocommerce-shipping-methods li .woocommerce-Price-amount,
.delivery-options .shipping_method li > .shipping-price-relocated,
.delivery-options .woocommerce-shipping-methods li > .shipping-price-relocated,
.delivery-options .shipping_method li > .shipping-price-data,
.delivery-options .woocommerce-shipping-methods li > .shipping-price-data {
    color: var(--color-primary);
    font-size: 16px;
    white-space: nowrap;
    font-weight: 500 !important;
    margin-left: auto;
    order: 4;
    padding-top:10px;
}

/* "Nemokamai" or free shipping text */
.delivery-options .shipping_method li > .shipping-free-text,
.delivery-options .woocommerce-shipping-methods li > .shipping-free-text {
    color: #FF7544 !important;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    margin-left: auto;
    order: 4;
}

/* Select2 dropdown styling */
.delivery-options .select2-container {
    width: auto !important;
    min-width: 280px;
    max-width: 400px;
    order: 3;
}

@media (max-width: 768px) {
    .delivery-options .shipping_method li,
    .delivery-options .woocommerce-shipping-methods li {
        flex-wrap: wrap;
    }

    .delivery-options .select2-container,
    .delivery-options label[for*="terminal"],
    .delivery-options .woo_lithuaniapost_lpexpress_terminal_select_container,
    .delivery-options .woocommerce-input-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        order: 5;
        margin-top: var(--spacing-3);
    }
}

.delivery-options .select2-container .select2-selection--single {
    height: 46px;
    border: 1px solid #E6E8EC;
    border-radius: 12px;
    background: #FFFFFF;
}

.delivery-options .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 46px;
    padding-left: var(--spacing-4);
    color: #777E90;
    font-size: 15px;
}

.delivery-options .select2-container .select2-selection--single .select2-selection__arrow {
    height: 56px;
}

.delivery-options .select2-container--open .select2-selection--single {
    border-color: var(--color-primary);
}

/* Payment Section */
.payment-section {
    padding: var(--spacing-6);
}

.woocommerce-checkout-payment {
    background: none;
    padding: 0;
    border: none;
}

.payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
}

.payment_methods .wc_payment_method {
    margin-bottom: 0;
}

.payment_methods .wc_payment_method label {
    display: flex;
    align-items: center;
    padding: var(--spacing-4) var(--spacing-5);
    background: var(--color-background);
    border-radius: var(--border-radius-md);
    border: 2px solid #e6e8ec;
    cursor: pointer;
    font-weight: var(--font-weight-medium);
    color: var(--color-headings-general);
    transition: all 0.2s ease;
}

.payment_methods .wc_payment_method label:hover,
.payment_methods .wc_payment_method:has(input:checked) label {
    border-color: var(--color-primary);
    background: #fff5f3;
}

.payment_methods .wc_payment_method input[type="radio"] {
    margin-right: var(--spacing-4);
    accent-color: var(--color-primary);
    width: 18px;
    height: 18px;
}

/* Payment method logos/icons styling */
.payment_methods .wc_payment_method img {
    max-height: 24px;
    margin-left: auto;
    opacity: 0.8;
}

.payment_methods .wc_payment_method:has(input:checked) img {
    opacity: 1;
}

/* Right Side: Checkout Cart - Integrated with Checkout Page */
body.woocommerce-checkout .checkout-cart-wrapper,
body.woocommerce .checkout-cart-wrapper,
body .checkout-cart-wrapper,
.checkout-cart-wrapper {
    position: relative !important;
    top: 0 !important;
    width: 500px !important;
    max-height: none !important;
    min-height: auto !important;
    height: auto !important;
    background: #f5f5f5 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: var(--border-radius-md) !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    z-index: auto !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Header - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-header,
body.woocommerce .checkout-cart-wrapper .checkout-cart-header,
body .checkout-cart-wrapper .checkout-cart-header,
.checkout-cart-wrapper .checkout-cart-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: var(--spacing-6) var(--spacing-6) !important;
    border-bottom: none !important;
    flex-shrink: 0 !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-header h3,
body.woocommerce .checkout-cart-wrapper .checkout-cart-header h3,
body .checkout-cart-wrapper .checkout-cart-header h3,
.checkout-cart-wrapper .checkout-cart-header h3 {
    margin: 0 !important;
    font-size: var(--font-size-2xl) !important;
    font-weight: var(--font-weight-semibold) !important;
    color: var(--color-headings-general) !important;
}

/* Content - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content,
body .checkout-cart-wrapper .checkout-cart-content,
.checkout-cart-wrapper .checkout-cart-content {
    background: #f5f5f5 !important;
    padding: 0 var(--spacing-6) var(--spacing-4) !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Scrollable content area - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-scrollable,
body.woocommerce .checkout-cart-wrapper .checkout-cart-scrollable,
body .checkout-cart-wrapper .checkout-cart-scrollable,
.checkout-cart-wrapper .checkout-cart-scrollable {
    flex: 1 !important;
    overflow-y: visible !important;
    padding: 0 0 var(--spacing-6) 0 !important;
}

/* Cart Items Section - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-items-section,
body.woocommerce .checkout-cart-wrapper .checkout-cart-items-section,
body .checkout-cart-wrapper .checkout-cart-items-section,
.checkout-cart-wrapper .checkout-cart-items-section {
    margin-bottom: var(--spacing-6) !important;
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: visible !important;
    padding-right: var(--spacing-2) !important;
    position: relative !important;
}

/* Custom scrollbar for Webkit browsers - Product List */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar,
body .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar,
.checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar {
    width: 6px;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-track,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-track,
body .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-track,
.checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-thumb,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-thumb,
body .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-thumb,
.checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    transition: background 0.2s ease;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-thumb:hover,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-thumb:hover,
body .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-thumb:hover,
.checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-thumb:active,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-thumb:active,
body .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-thumb:active,
.checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart::-webkit-scrollbar-thumb:active {
    background: rgba(0, 0, 0, 0.5);
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart,
body .checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart,
.checkout-cart-wrapper .checkout-cart-content .woocommerce-mini-cart {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    padding-right: var(--spacing-2) !important;
    /* Custom scrollbar styling */
    scrollbar-width: thin !important;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
}

/* Individual cart item - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item {
    display: flex !important;
    align-items: flex-start !important;
    padding: var(--spacing-6) 0 !important;
    border-bottom: none !important;
    gap: var(--spacing-4) !important;
    position: relative !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item:last-child,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item:last-child,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item:last-child,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item:last-child {
    border-bottom: none !important;
}

/* Product image - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-image,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-image,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-image,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-image {
    flex-shrink: 0 !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-image img,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-image img,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-image img,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-image img {
    width: 100px !important;
    height: 100px !important;
    object-fit: cover !important;
    border-radius: var(--spacing-3) !important;
    background: var(--color-background) !important;
}

/* Product details - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-details,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-details,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-details,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-details {
    flex: 1 !important;
    padding-right: var(--spacing-4) !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name {
    margin-bottom: var(--spacing-2) !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name a,
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name a,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name a,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name a,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name {
    color: var(--color-headings-general) !important;
    text-decoration: none !important;
    font-weight: var(--font-weight-medium) !important;
    font-size: var(--font-size-base) !important;
    line-height: 1.4 !important;
    display: block !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name a:hover,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name a:hover,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name a:hover,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-name a:hover {
    color: var(--color-primary) !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-quantity,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-quantity,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-quantity,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-quantity {
    color: var(--color-headings-general) !important;
    font-size: var(--font-size-sm) !important;
    font-weight: var(--font-weight-normal) !important;
    margin-top: var(--spacing-2) !important;
}

/* Product price container - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-price-container,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-price-container,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-price-container,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-price-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: var(--spacing-3) !important;
    padding-right: var(--spacing-4) !important;
}

/* Product price - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-price,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-price,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-price,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-price {
    color: var(--color-headings-general) !important;
    font-size: var(--font-size-lg) !important;
    font-weight: var(--font-weight-semibold) !important;
    white-space: nowrap !important;
}

/* Remove button - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-remove,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-remove,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-remove,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-remove {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .remove,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .remove,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .remove,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .remove {
    background: none !important;
    border: none !important;
    padding: var(--spacing-1) !important;
    cursor: pointer !important;
    color: #A1A2A7 !important;
    transition: color 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .remove:hover,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .remove:hover,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .remove:hover,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .remove:hover {
    color: var(--color-error) !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .remove svg,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .remove svg,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .remove svg,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .remove svg {
    width: 22px !important;
    height: 22px !important;
}

/* Order Information Section - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-order-info,
body.woocommerce .checkout-cart-wrapper .checkout-order-info,
body .checkout-cart-wrapper .checkout-order-info,
.checkout-cart-wrapper .checkout-order-info {
    background: var(--color-background) !important;
    border-radius: var(--spacing-3) !important;
    padding: var(--spacing-4) !important;
    margin-bottom: var(--spacing-3) !important;
    flex-shrink: 0 !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-order-info h4,
body.woocommerce .checkout-cart-wrapper .checkout-order-info h4,
body .checkout-cart-wrapper .checkout-order-info h4,
.checkout-cart-wrapper .checkout-order-info h4 {
    margin: 0 0 var(--spacing-6) 0 !important;
    font-size: var(--font-size-2xl) !important;
    font-weight: var(--font-weight-semibold) !important;
    color: var(--color-headings-general) !important;
}

/* Coupon section - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-coupon,
body.woocommerce .checkout-cart-wrapper .checkout-coupon,
body .checkout-cart-wrapper .checkout-coupon,
.checkout-cart-wrapper .checkout-coupon {
    display: flex !important;
    gap: var(--spacing-3) !important;
    margin-bottom: var(--spacing-8) !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-coupon input,
body.woocommerce .checkout-cart-wrapper .checkout-coupon input,
body .checkout-cart-wrapper .checkout-coupon input,
.checkout-cart-wrapper .checkout-coupon input {
    flex: 1 !important;
    padding: var(--spacing-4) var(--spacing-5) !important;
    border: 1px solid #e6e8ec !important;
    border-radius: var(--border-radius-md) !important;
    font-size: var(--font-size-base) !important;
    color: var(--color-text) !important;
    background: var(--color-background) !important;
    font-family: var(--font-family-body) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}


body.woocommerce-checkout .checkout-cart-wrapper .checkout-coupon input::placeholder,
body.woocommerce .checkout-cart-wrapper .checkout-coupon input::placeholder,
body .checkout-cart-wrapper .checkout-coupon input::placeholder,
.checkout-cart-wrapper .checkout-coupon input::placeholder {
    color: var(--color-text) !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-coupon button,
body.woocommerce .checkout-cart-wrapper .checkout-coupon button,
body .checkout-cart-wrapper .checkout-coupon button,
.checkout-cart-wrapper .checkout-coupon button {
    padding: var(--spacing-4) var(--spacing-6) !important;
    background: var(--color-background) !important;
    border: 1px solid #e6e8ec !important;
    border-radius: var(--border-radius-md) !important;
    color: var(--color-headings-general) !important;
    font-size: var(--font-size-base) !important;
    font-weight: var(--font-weight-medium) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: var(--font-family-body) !important;
    white-space: nowrap !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-coupon button:hover,
body.woocommerce .checkout-cart-wrapper .checkout-coupon button:hover,
body .checkout-cart-wrapper .checkout-coupon button:hover,
.checkout-cart-wrapper .checkout-coupon button:hover {
    background: #f8f8f8 !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-coupon button:disabled,
body.woocommerce .checkout-cart-wrapper .checkout-coupon button:disabled,
body .checkout-cart-wrapper .checkout-coupon button:disabled,
.checkout-cart-wrapper .checkout-coupon button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Notices - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-notices,
body.woocommerce .checkout-cart-wrapper .checkout-notices,
body .checkout-cart-wrapper .checkout-notices,
.checkout-cart-wrapper .checkout-notices {
    margin-bottom: var(--spacing-4) !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-notice,
body.woocommerce .checkout-cart-wrapper .checkout-notice,
body .checkout-cart-wrapper .checkout-notice,
.checkout-cart-wrapper .checkout-notice {
    margin: var(--spacing-3) 0 !important;
    padding: var(--spacing-3) var(--spacing-4) !important;
    border-radius: var(--border-radius-sm) !important;
    font-size: var(--font-size-sm) !important;
    font-weight: var(--font-weight-medium) !important;
    display: none !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-notice-success,
body.woocommerce .checkout-cart-wrapper .checkout-notice-success,
body .checkout-cart-wrapper .checkout-notice-success,
.checkout-cart-wrapper .checkout-notice-success {
    background: #d1eddb !important;
    color: #2d5016 !important;
    border: 1px solid #a7c3a0 !important;
    display: block !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-notice-error,
body.woocommerce .checkout-cart-wrapper .checkout-notice-error,
body .checkout-cart-wrapper .checkout-notice-error,
.checkout-cart-wrapper .checkout-notice-error {
    background: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f1aeb5 !important;
    display: block !important;
}

/* Totals - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-totals,
body.woocommerce .checkout-cart-wrapper .checkout-totals,
body .checkout-cart-wrapper .checkout-totals,
.checkout-cart-wrapper .checkout-totals {
    margin-bottom: var(--spacing-6) !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-total-row,
body.woocommerce .checkout-cart-wrapper .checkout-total-row,
body .checkout-cart-wrapper .checkout-total-row,
.checkout-cart-wrapper .checkout-total-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: var(--spacing-4) !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-total-row:last-child,
body.woocommerce .checkout-cart-wrapper .checkout-total-row:last-child,
body .checkout-cart-wrapper .checkout-total-row:last-child,
.checkout-cart-wrapper .checkout-total-row:last-child {
    margin-bottom: 0 !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-total-row .label,
body.woocommerce .checkout-cart-wrapper .checkout-total-row .label,
body .checkout-cart-wrapper .checkout-total-row .label,
.checkout-cart-wrapper .checkout-total-row .label {
    color: var(--color-text-muted) !important;
    font-size: var(--font-size-base) !important;
    font-weight: var(--font-weight-normal) !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-total-row .value,
body.woocommerce .checkout-cart-wrapper .checkout-total-row .value,
body .checkout-cart-wrapper .checkout-total-row .value,
.checkout-cart-wrapper .checkout-total-row .value {
    color: var(--color-headings-general) !important;
    font-size: var(--font-size-lg) !important;
    font-weight: var(--font-weight-semibold) !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-total-row .value.discount,
body.woocommerce .checkout-cart-wrapper .checkout-total-row .value.discount,
body .checkout-cart-wrapper .checkout-total-row .value.discount,
.checkout-cart-wrapper .checkout-total-row .value.discount {
    color: var(--color-primary) !important;
}

/* Line separator - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-separator,
body.woocommerce .checkout-cart-wrapper .checkout-separator,
body .checkout-cart-wrapper .checkout-separator,
.checkout-cart-wrapper .checkout-separator {
    height: 1px !important;
    background: #e6e8ec !important;
    margin: var(--spacing-6) 0 !important;
}

/* Final total - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-final-total,
body.woocommerce .checkout-cart-wrapper .checkout-final-total,
body .checkout-cart-wrapper .checkout-final-total,
.checkout-cart-wrapper .checkout-final-total {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 0 !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-final-total .label,
body.woocommerce .checkout-cart-wrapper .checkout-final-total .label,
body .checkout-cart-wrapper .checkout-final-total .label,
.checkout-cart-wrapper .checkout-final-total .label {
    color: var(--color-headings-general) !important;
    font-size: var(--font-size-lg) !important;
    font-weight: var(--font-weight-medium) !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-final-total .value,
body.woocommerce .checkout-cart-wrapper .checkout-final-total .value,
body .checkout-cart-wrapper .checkout-final-total .value,
.checkout-cart-wrapper .checkout-final-total .value {
    color: var(--color-headings-general) !important;
    font-size: var(--font-size-4xl) !important;
    font-weight: var(--font-weight-bold) !important;
}

/* Checkout button - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons {
    padding: var(--spacing-5) var(--spacing-4) var(--spacing-4) var(--spacing-4) !important;
    margin: 0 !important;
    display: block !important;
    flex-shrink: 0 !important;
    background: #f5f5f5 !important;
    border-top: 1px solid #e6e8ec !important;
    margin-top: auto !important;
    min-height: 70px !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons .button,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons .button,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons .button,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons .button {
    width: 100% !important;
    text-align: center !important;
    padding: var(--spacing-4) var(--spacing-6) !important;
    border-radius: var(--border-radius-md) !important;
    text-decoration: none !important;
    font-weight: var(--font-weight-medium) !important;
    font-size: var(--font-size-base) !important;
    transition: all 0.2s ease !important;
    border: none !important;
    cursor: pointer !important;
    display: block !important;
    margin: 0 !important;
    background: var(--color-primary) !important;
    color: var(--color-background) !important;
    font-family: var(--font-family-body) !important;
}

body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons .button:hover,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons .button:hover,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons .button:hover,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons .button:hover {
    background: var(--color-secondary) !important;
}

/* Empty state - Maximum specificity */
body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-empty-message,
body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-empty-message,
body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-empty-message,
.checkout-cart-wrapper .checkout-cart-content .checkout-cart-empty-message {
    text-align: center !important;
    padding: var(--spacing-15) var(--spacing-8) !important;
    color: var(--color-text-muted) !important;
    background: var(--color-background) !important;
    border-radius: var(--spacing-3) !important;
}

/* Empty state height adjustment */
body.woocommerce-checkout .checkout-cart-wrapper:has(.checkout-cart-empty-message),
body.woocommerce .checkout-cart-wrapper:has(.checkout-cart-empty-message),
body .checkout-cart-wrapper:has(.checkout-cart-empty-message),
.checkout-cart-wrapper:has(.checkout-cart-empty-message) {
    min-height: 250px !important;
    max-height: 350px !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .checkout-main-content {
        grid-template-columns: 1fr 450px;
        gap: var(--spacing-10);
    }
}

@media (max-width: 1024px) {
    .checkout-main-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-8);
    }
    
    .checkout-cart-wrapper {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
        min-height: 600px !important;
        order: -1;
    }
    
    .checkout-cart-wrapper .checkout-cart-items-section {
        max-height: 400px !important;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    #billing_first_name_field,
    #billing_last_name_field,
    #billing_phone_field,
    #billing_email_field {
        margin-right: var(--spacing-3) !important;
    }

    .militra-checkout-container {
        padding: var(--spacing-4) var(--spacing-3) !important;
        max-width: 100% !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Single column layout - hide cart sidebar completely */
    .checkout-main-content {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0 !important;
        width: 100% !important;
    }

    /* Hide the entire cart sidebar on mobile */
    .checkout-cart-wrapper {
        display: none !important;
    }

    /* Form section takes full width */
    .checkout-form-section {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    /* Mobile form layout - single column */
    .checkout-billing-fields,
    .checkout-shipping-fields {
        display: flex !important;
        flex-direction: column !important;
        gap: var(--spacing-4) !important;
        grid-template-columns: none !important;
    }

    /* All form rows take full width on mobile */
    .checkout-billing-fields .form-row,
    .checkout-shipping-fields .form-row,
    .checkout-billing-fields .form-row.form-row-first,
    .checkout-billing-fields .form-row.form-row-last,
    .checkout-shipping-fields .form-row.form-row-first,
    .checkout-shipping-fields .form-row.form-row-last,
    .checkout-billing-fields .form-row.form-row-wide,
    .checkout-shipping-fields .form-row.form-row-wide {
        width: 100% !important;
        grid-column: unset !important;
        margin-bottom: 0 !important;
    }

    /* Mobile input field styling - MATCH EXISTING-CUSTOMER */
    .checkout-form-section .form-row input[type="text"],
    .checkout-form-section .form-row input[type="email"],
    .checkout-form-section .form-row input[type="tel"],
    .checkout-form-section .form-row select,
    .checkout-form-section .form-row textarea,
    .checkout-form-section .form-row .input-text,
    .checkout-billing-fields input[type="text"],
    .checkout-billing-fields input[type="email"],
    .checkout-billing-fields input[type="tel"],
    .checkout-billing-fields .input-text,
    .woocommerce-billing-fields input[type="text"],
    .woocommerce-billing-fields input[type="email"],
    .woocommerce-billing-fields input[type="tel"],
    .woocommerce-billing-fields .input-text {
        width: 100% !important;
        max-width: 100% !important;
        height: 54px !important;
        flex-shrink: 0 !important;
        padding: 0 var(--spacing-4) !important;
        border: 1px solid #E6E8EC !important;
        border-radius: 15px !important;
        background: #F9F9F9 !important;
        color: var(--color-text) !important;
        font-family: var(--font-family-body) !important;
        font-size: 16px !important;
        font-style: normal !important;
        font-weight: 400 !important;
        line-height: normal !important;
        transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* Ensure login fields also take full width */
    .existing-customer-login .form-row input[type="text"],
    .existing-customer-login .form-row input[type="email"],
    .existing-customer-login .form-row input[type="password"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        height: 50px !important;
        border-radius: 12px !important;
        background: #F5F6F8 !important;
        border: 1px solid #E6E8ED !important;
    }

    /* Login button full width */
    .login-submit-button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        height: 50px !important;
        border-radius: 12px !important;
    }

    /* Mobile label styling */
    .checkout-form-section .form-row label {
        font-size: 14px !important;
        font-weight: var(--font-weight-medium) !important;
        margin-bottom: var(--spacing-2) !important;
        color: #2D2F3A !important;
    }

    /* Customer tabs mobile */
    .customer-type-tabs {
        margin-bottom: var(--spacing-6) !important;
        gap: var(--spacing-2) !important;
    }

    .tab-button {
        font-size: 15px !important;
        padding: var(--spacing-3) var(--spacing-1) !important;
        flex: 1 !important;
        text-align: center !important;
    }

    /* Section headers mobile */
    .checkout-section h2 {
        font-size: 20px !important;
        margin-bottom: var(--spacing-4) !important;
        color: #2D2F3A !important;
        font-weight: var(--font-weight-semibold) !important;
    }

    /* Section spacing mobile */
    .checkout-section {
        margin-bottom: var(--spacing-6) !important;
    }

    /* Checkbox styling mobile */
    .checkout-form-section .create-account-checkbox,
    .checkout-form-section #_invoice_for_company_field {
        margin: var(--spacing-4) 0 !important;
    }

    .checkout-form-section .create-account-checkbox label,
    .checkout-form-section #_invoice_for_company_field label {
        font-size: 14px !important;
        gap: var(--spacing-2) !important;
    }

    /* Payment methods mobile */
    .payment_methods {
        margin: var(--spacing-4) 0 !important;
    }

    .payment_methods .wc_payment_method {
        margin-bottom: var(--spacing-3) !important;
    }

    .payment_methods .wc_payment_method label {
        font-size: 14px !important;
    }

    /* Delivery options mobile */
    .delivery-options .shipping_method {
        margin: var(--spacing-3) 0 !important;
    }

    .delivery-options .shipping_method label {
        font-size: 14px !important;
    }
    
    /* Ensure cart wrapper is completely hidden on mobile */
    body.woocommerce-checkout .checkout-cart-wrapper,
    body.woocommerce .checkout-cart-wrapper,
    body .checkout-cart-wrapper,
    .checkout-cart-wrapper {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-items-section,
    body.woocommerce .checkout-cart-wrapper .checkout-cart-items-section,
    body .checkout-cart-wrapper .checkout-cart-items-section,
    .checkout-cart-wrapper .checkout-cart-items-section {
        flex: 1 !important;
        min-height: 0 !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(0, 0, 0, 0.2) transparent !important;
    }
    
    /* Mobile custom scrollbar for Webkit browsers */
    body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-items-section::-webkit-scrollbar,
    body.woocommerce .checkout-cart-wrapper .checkout-cart-items-section::-webkit-scrollbar,
    body .checkout-cart-wrapper .checkout-cart-items-section::-webkit-scrollbar,
    .checkout-cart-wrapper .checkout-cart-items-section::-webkit-scrollbar {
        width: 4px;
    }
    
    body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-items-section::-webkit-scrollbar-thumb,
    body.woocommerce .checkout-cart-wrapper .checkout-cart-items-section::-webkit-scrollbar-thumb,
    body .checkout-cart-wrapper .checkout-cart-items-section::-webkit-scrollbar-thumb,
    .checkout-cart-wrapper .checkout-cart-items-section::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.25);
        border-radius: 2px;
    }
    
    body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-items-section::-webkit-scrollbar-thumb:hover,
    body.woocommerce .checkout-cart-wrapper .checkout-cart-items-section::-webkit-scrollbar-thumb:hover,
    body .checkout-cart-wrapper .checkout-cart-items-section::-webkit-scrollbar-thumb:hover,
    .checkout-cart-wrapper .checkout-cart-items-section::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 0, 0, 0.4);
    }
    
    body.woocommerce-checkout .checkout-cart-wrapper .checkout-order-info,
    body.woocommerce .checkout-cart-wrapper .checkout-order-info,
    body .checkout-cart-wrapper .checkout-order-info,
    .checkout-cart-wrapper .checkout-order-info {
        padding: var(--spacing-3) !important;
    }
    
    body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons,
    body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons,
    body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons,
    .checkout-cart-wrapper .checkout-cart-content .checkout-cart-buttons {
        padding: var(--spacing-4) var(--spacing-10) var(--spacing-2) var(--spacing-2) !important;
    }
    
    body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item,
    body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item,
    body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item,
    .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item {
        padding: var(--spacing-4) 0 !important;
    }
    
    body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-image img,
    body.woocommerce .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-image img,
    body .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-image img,
    .checkout-cart-wrapper .checkout-cart-content .checkout-cart-item .checkout-item-image img {
        width: 80px !important;
        height: 80px !important;
    }
    
    body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-header,
    body.woocommerce .checkout-cart-wrapper .checkout-cart-header,
    body .checkout-cart-wrapper .checkout-cart-header,
    .checkout-cart-wrapper .checkout-cart-header {
        padding: var(--spacing-5) var(--spacing-5) !important;
    }
    
    body.woocommerce-checkout .checkout-cart-wrapper .checkout-cart-content,
    body.woocommerce .checkout-cart-wrapper .checkout-cart-content,
    body .checkout-cart-wrapper .checkout-cart-content,
    .checkout-cart-wrapper .checkout-cart-content {
        padding: 0 var(--spacing-5) var(--spacing-5) !important;
    }
    
    /* Empty state height adjustment for mobile */
    body.woocommerce-checkout .checkout-cart-wrapper:has(.checkout-cart-empty-message),
    body.woocommerce .checkout-cart-wrapper:has(.checkout-cart-empty-message),
    body .checkout-cart-wrapper:has(.checkout-cart-empty-message),
    .checkout-cart-wrapper:has(.checkout-cart-empty-message) {
        min-height: 250px !important;
        max-height: 300px !important;
    }
}

/* Cart overlay removed - no longer needed for integrated design */

/* Hide default WooCommerce place order button in main checkout area on desktop - keep cart sidebar button */
@media (min-width: 769px) {
    body.woocommerce-checkout .woocommerce-checkout-payment #place_order,
    body.woocommerce-checkout .form-row.place-order #place_order {
        display: none !important;
    }
}

/* Show place order button on mobile (since cart sidebar is hidden) */
@media (max-width: 768px) {
    body.woocommerce-checkout .woocommerce-checkout-payment #place_order,
    body.woocommerce-checkout .form-row.place-order #place_order {
        display: block !important;
        width: 100% !important;
        height: 54px !important;
        background: var(--color-primary) !important;
        color: var(--color-background) !important;
        border: none !important;
        border-radius: 15px !important;
        font-family: var(--font-family-body) !important;
        font-size: 16px !important;
        font-weight: var(--font-weight-medium) !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        margin-top: var(--spacing-6) !important;
        padding: var(--spacing-4) var(--spacing-6) !important;
    }

    body.woocommerce-checkout .woocommerce-checkout-payment #place_order:hover,
    body.woocommerce-checkout .form-row.place-order #place_order:hover {
        background: var(--color-secondary) !important;
    }

    body.woocommerce-checkout .woocommerce-checkout-payment #place_order:disabled,
    body.woocommerce-checkout .form-row.place-order #place_order:disabled {
        opacity: 0.6 !important;
        cursor: not-allowed !important;
    }
}

/* Hide default WooCommerce coupon notices - we use custom notifications */
body.woocommerce-checkout .woocommerce-message,
body.woocommerce-checkout .woocommerce-error:not(.checkout-form-section .woocommerce-error),
body.woocommerce-checkout .woocommerce-info {
    display: none !important;
}

/* Hide coupon-related notices specifically */
body.woocommerce-checkout .woocommerce-message[role="alert"]:has-text("Coupon"),
body.woocommerce-checkout .woocommerce-error[role="alert"]:has-text("coupon"),
body.woocommerce-checkout .woocommerce-error[role="alert"]:has-text("Coupon") {
    display: none !important;
}

/* Ensure our custom notices are visible */
.checkout-cart-wrapper .checkout-notices .checkout-notice {
    display: block !important;
}

/* Error and validation styling */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
    padding: var(--spacing-3) var(--spacing-4);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-4);
    font-size: var(--font-size-sm);
}

.woocommerce-message {
    background: #d1eddb;
    color: #2d5016;
    border-color: #a7c3a0;
}

.woocommerce-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.checkout-form-section .form-row.woocommerce-invalid input {
    border-color: var(--color-error);
}

.checkout-form-section .form-row .woocommerce-error {
    margin-top: var(--spacing-2);
    margin-bottom: 0;
    font-size: var(--font-size-sm);
}

/* Medium Mobile - 429px to 768px */
@media (max-width: 768px) and (min-width: 429px) {
    .militra-checkout-container {
        padding: var(--spacing-5) var(--spacing-4) !important;
    }

    /* Slightly larger spacing for medium mobile */
    .checkout-billing-fields,
    .checkout-shipping-fields {
        gap: var(--spacing-5) !important;
    }

    /* Medium mobile input styling */
    .checkout-form-section .form-row input[type="text"],
    .checkout-form-section .form-row input[type="email"],
    .checkout-form-section .form-row input[type="tel"],
    .checkout-form-section .form-row select,
    .checkout-form-section .form-row textarea {
        height: 54px !important;
        flex-shrink: 0 !important;
        padding: 0 var(--spacing-4) !important;
        border: 1px solid #E6E8EC !important;
        border-radius: 15px !important;
        background: #F9F9F9 !important;
        color: var(--color-text) !important;
        font-family: var(--font-family-body) !important;
        font-size: 16px !important;
        font-style: normal !important;
        font-weight: 400 !important;
        line-height: normal !important;
        transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    }

    /* Customer tabs responsive */
    .customer-type-tabs {
        gap: var(--spacing-4);
        margin-bottom: var(--spacing-7);
    }

    .tab-button {
        font-size: 16px !important;
        padding: var(--spacing-3) var(--spacing-2);
    }

    /* Section headers */
    .checkout-section h2 {
        font-size: 22px !important;
        margin-bottom: var(--spacing-5) !important;
    }

    /* Section spacing */
    .checkout-section {
        margin-bottom: var(--spacing-8) !important;
    }

    /* Login fields responsive */
    .login-fields-grid {
        gap: var(--spacing-5);
    }

    /* Ensure cart remains hidden on medium mobile */
    .checkout-cart-wrapper {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* Small Mobile - 428px and below */
@media (max-width: 428px) {
    .militra-checkout-container {
        padding: var(--spacing-3) var(--spacing-2) !important;
    }

    /* Compact spacing for small mobile */
    .checkout-billing-fields,
    .checkout-shipping-fields {
        gap: var(--spacing-3) !important;
    }

    /* Small mobile input styling */
    .checkout-form-section .form-row input[type="text"],
    .checkout-form-section .form-row input[type="email"],
    .checkout-form-section .form-row input[type="tel"],
    .checkout-form-section .form-row select,
    .checkout-form-section .form-row textarea {
        height: 54px !important;
        flex-shrink: 0 !important;
        padding: 0 var(--spacing-4) !important;
        border: 1px solid #E6E8EC !important;
        border-radius: 15px !important;
        background: #F9F9F9 !important;
        color: var(--color-text) !important;
        font-family: var(--font-family-body) !important;
        font-size: 16px !important;
        font-style: normal !important;
        font-weight: 400 !important;
        line-height: normal !important;
        transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    }

    /* Customer tabs compact */
    .customer-type-tabs {
        gap: var(--spacing-2);
        margin-bottom: var(--spacing-5);
    }

    .tab-button {
        font-size: 14px !important;
        padding: var(--spacing-2) var(--spacing-1);
    }

    /* Compact section headers */
    .checkout-section h2 {
        font-size: 18px !important;
        margin-bottom: var(--spacing-3) !important;
    }

    /* Compact section spacing */
    .checkout-section {
        margin-bottom: var(--spacing-5) !important;
    }

    /* Compact labels */
    .checkout-form-section .form-row label {
        font-size: 13px !important;
        margin-bottom: var(--spacing-1) !important;
    }

    /* Login fields compact */
    .login-fields-grid {
        gap: var(--spacing-3);
    }

    /* Compact checkboxes */
    .checkout-form-section .create-account-checkbox label,
    .checkout-form-section #_invoice_for_company_field label {
        font-size: 13px !important;
    }

    /* Payment methods compact */
    .payment_methods .wc_payment_method label,
    .delivery-options .shipping_method label {
        font-size: 13px !important;
    }

    /* Ensure cart remains hidden on small mobile */
    .checkout-cart-wrapper {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}