.ninetheme-loop-product .product-stock {
    position: absolute !important;
    right: 20px !important;
}

/* Ensure input fields transform is normal to prevent zooming issues */
body.woocommerce-checkout #fc-wrapper input,
body.woocommerce-checkout #fc-wrapper select,
body.woocommerce-checkout #fc-wrapper textarea {
    transform: scale(1) !important;
    font-size: 16px !important;
}

/* Additional selector to ensure we override any theme-specific styles */
#shipping_first_name, 
#shipping_last_name,
#shipping_company,
#shipping_country,
#shipping_address_1,
#shipping_address_2,
#shipping_postcode,
#shipping_city,
#shipping_state,
#shipping_phone,
#billing_first_name,
#billing_last_name,
#billing_company,
#billing_country,
#billing_address_1,
#billing_address_2,
#billing_postcode,
#billing_city,
#billing_state,
#billing_phone,
#billing_email {
    font-size: 16px !important;
}
}

.e-con {
    --z-index: 10 !important;
}
.ninetheme-header-sticky {
    z-index: 9999999 !important;
}

@media (max-width: 767px) {    
    .elementor-16282 .elementor-element.elementor-element-46bb05cb {
        --display: none !important;
    }
}


@media (max-width: 767px) {
    .elementor-11231 .elementor-element.elementor-element-a6bd378 .ninetheme-slide-link {
        font-size: 13px !important;
    }
}

@media (max-width: 768px) {
    .fc-sidebar__inner {
        margin-top: -40px !important;
    }
}

@media (max-width: 768px) {
  .wc-gzd-checkbox-placeholder .wc-gzd-checkbox-placeholder-data-defective-copy {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .ninetheme-shipping-calculator-button {
    margin-bottom: 0px !important;
  }
}

@media (max-width: 768px) {
  .ninetheme-checkout-footer-item.woocommerce-shipping-totals.shipping {
    padding: 12px !important;
    margin-bottom: 10px !important;
  }
}

@media (max-width: 768px) {
  .woocommerce-message {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .ninetheme-page-hero {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }
}

@media (max-width: 768px) {
  .content-area { 
    padding: 0px !important;
  }
}

@media (max-width: 768px) {
  .fc-checkout-header { 
    top: 0 !important;
  }
}

@media (max-width: 768px) {
  .page-overlay {
    z-index: 10 !important;
  }
}

@media (max-width: 768px) {
  .ninetheme-products {
    display: block !important;
  }
}

@media (max-width: 768px) {
  .ninetheme-loop-product {
    margin-bottom: 20px !important;
  }
}


/* Hide product tags */
.ninetheme-meta-wrapper.tagged_as {
    display: none !important;
}

/* Hide "Add to wishlist" button */
.ninetheme-product-button.ninetheme-wishlist-btn {
    display: none !important;
}

/* Increase height of "In den Warenkorb" button */
.single_add_to_cart_button.ninetheme-btn.ninetheme-btn-primary {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
    font-size: 16px !important;
}

/* Adjust height of quantity selector */
.quantity.type-number, .quantity.type-number input.qty {
    height: 52px !important;
}

/* Vertically align quantity buttons */
.quantity-button.minus, .quantity-button.plus {
    height: 100% !important;
}

/* Hide the stock number, keep only "vorrätig" visible */
p.stock.ninetheme-stock-status.in-stock {
    font-size: 0 !important; /* Hide the original text */
}

p.stock.ninetheme-stock-status.in-stock::after {
    content: "vorrätig";
    font-size: 14px !important; /* Restore original font size */
    visibility: visible;
}

/* === Checkout UX Improvements === */

/* 1. Checkboxes Styling */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review__inner .wc-gzd-checkbox-placeholder {
    order: 10 !important;
    padding: 0 !important; /* Remove padding from placeholder */
    margin: 0 !important; /* Remove margin from placeholder */
    width: 100% !important;
    box-sizing: border-box !important;
}
/* Add border/padding to the <p> inside */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review__inner .wc-gzd-checkbox-placeholder p.form-row {
    padding: 15px 0 5px 0 !important;
    margin-top: 15px !important;
    border-top: 1px solid #e4dacb !important;
}
/* Apply only to the first overall checkbox paragraph */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review__inner .wc-gzd-checkbox-placeholder:first-of-type p.form-row {
     border-top: 1px solid #e4dacb !important;
     margin-top: 15px !important;
     padding-top: 15px !important;
}
/* Remove top border/margin from subsequent paragraphs */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review__inner .wc-gzd-checkbox-placeholder + .wc-gzd-checkbox-placeholder p.form-row {
     border-top: none !important;
     margin-top: 5px !important; /* Adjust spacing between checkboxes */
     padding-top: 5px !important;
}

/* Place Order Section */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review__inner .fc-place-order__section--main {
    order: 20 !important;
    margin-top: 15px !important; /* Increase space above button */
    padding-top: 15px !important;
    border-top: 1px solid #e4dacb !important;
}

/* 3. Remove Zone Text */
body.woocommerce-checkout .woocommerce-NoticeGroup-updateOrderReview .woocommerce-message {
    display: none !important;
}

/* DHL Button Spacing */
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days {
    list-style: none !important; padding-left: 0 !important; margin-left: 0 !important; display: flex !important; flex-wrap: wrap !important; gap: 6px !important;
}
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li { margin: 0 !important; padding: 0 !important; }
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label { display: inline-block !important; padding: 4px 8px !important; border: 1px solid #ccc !important; border-radius: 4px !important; cursor: pointer !important; transition: background-color 0.3s, border-color 0.3s !important; font-size: 0.85em !important; line-height: 1.4 !important; }
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li input[type="radio"]:checked + label { background-color: #e0e0e0 !important; border-color: #adadad !important; font-weight: bold !important; }
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li input[type="radio"] { display: none !important; }

/* === Updated Checkout UX Improvements === */

/* 1. Fix layout of finished steps (Marked purple) */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
    display: flex !important;
    align-items: flex-start !important; /* Align items to the top */
    padding: 12px 0 !important; 
    border-bottom: 1px solid #f0f0f0 !important;
    margin-bottom: 10px !important;
    min-height: 38px; /* Ensure minimum height */
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-title {
    display: none !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text {
    flex-grow: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left !important; /* Left-align text */
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content {
    padding: 0 !important;
    width: 100% !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content .fc-step__substep-text-line {
    font-size: 0.95em !important;
    line-height: 1.5 !important;
    display: block !important;
    text-align: left !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
    flex-shrink: 0 !important;
    font-size: 0.9em !important;
    white-space: nowrap;
    margin-left: auto; /* Push to the right */
    text-decoration: underline !important; /* Make it look more like a link */
    padding: 5px; /* Add padding around link */
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-save {
    display: none !important;
}

/* 2. Fix progress bar (Marked orange) */
body.woocommerce-checkout .fc-progress-bar {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body.woocommerce-checkout .fc-progress-bar__inner {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 10px !important; /* Add some padding on the sides */
    box-sizing: border-box !important;
}

body.woocommerce-checkout .fc-progress-bar__count {
    font-size: 14px !important;
    text-align: center !important;
    margin: 0 auto !important;
}

body.woocommerce-checkout .fc-checkout-steps {
    padding-top: 0;
}

/* 3. Fix payment providers layout (Marked green) */
body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods {
    padding: 0 !important;
    margin: 0 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method {
    padding: 10px !important;
    margin-bottom: 10px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 5px !important;
    background-color: #f8f8f8 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method.payment_method_foxpay {
    border-color: #66bb6a !important;
    background-color: #f1f8e9 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method label {
    display: flex !important;
    align-items: center !important;
    padding: 5px !important;
    margin: 0 !important;
    cursor: pointer !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method img {
    max-height: 30px !important;
    margin-left: 10px !important;
}

/* 4. Fix checkboxes and texts, move above pay button (Marked red) */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review__inner .wc-gzd-checkbox-placeholder {
    margin: 15px 0 5px 0 !important;
    order: 9 !important; /* Place just before the payment button (order 10) */
    width: 100% !important;
}

body.woocommerce-checkout #fc-wrapper .wc-gzd-checkbox-placeholder p.form-row {
    margin-bottom: 10px !important;
    border-top: none !important; /* Remove top border */
}

body.woocommerce-checkout #fc-wrapper .wc-gzd-checkbox-placeholder label {
    display: flex !important;
    align-items: flex-start !important;
    line-height: 1.5 !important;
    font-size: 13px !important;
    margin: 0 !important;
    color: #333 !important; /* Darker text for better readability */
}

body.woocommerce-checkout #fc-wrapper .wc-gzd-checkbox-placeholder input[type="checkbox"] {
    margin-top: 3px !important;
    margin-right: 8px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    flex-shrink: 0 !important;
}

body.woocommerce-checkout #fc-wrapper .wc-gzd-checkbox-placeholder .woocommerce-gzd-legal-checkbox-text {
    line-height: 1.5 !important;
    display: inline !important;
}

/* Enhanced progress bar to make it less cluttered */
body.woocommerce-checkout .fc-progress-bar.is-sticky--top {
    height: auto !important;
    margin-bottom: 15px !important;
    border-bottom: 1px solid #e4e4e4 !important;
}

body.woocommerce-checkout .fc-progress-bar__inner {
    padding: 0 10px 5px 10px !important;
    box-shadow: none !important;
    background: transparent !important;
}

body.woocommerce-checkout .fc-progress-bar__bar {
    height: 4px !important; /* Thinner bar */
    margin-top: 5px !important;
    background-color: #e4e4e4 !important;
}

body.woocommerce-checkout .fc-progress-bar__bar-progress {
    background-color: #4CAF50 !important; /* Green progress */
}

body.woocommerce-checkout .fc-progress-bar__count {
    font-size: 14px !important;
    margin: 0 auto !important;
    color: #333 !important;
    font-weight: 600 !important;
}

/* Additional mobile optimizations */
@media (max-width: 768px) {
    /* Remove padding from Elementor container */
    .elementor-9 .elementor-element.elementor-element-57aa42b3 {
        padding: 10px !important;
    }
    
    /* Improve completed steps layout on mobile */
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
        padding: 10px 0 !important;
        flex-wrap: wrap !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text {
        width: 100% !important;
        margin-bottom: 5px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
        margin-left: 0 !important;
        width: 100% !important;
        text-align: right !important;
    }
    
    /* Adjust progress bar for mobile */
    body.woocommerce-checkout .fc-progress-bar__inner {
        padding: 0 5px !important;
    }
    
    /* Improve DHL buttons on mobile */
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days {
        gap: 4px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label {
        padding: 3px 6px !important;
        font-size: 0.8em !important;
    }
    
    /* Improve the payment method display on mobile */
    body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method label {
        flex-wrap: wrap !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method img {
        margin-left: 0 !important;
        margin-top: 5px !important;
    }
    
    /* Make checkbox text more readable on mobile */
    body.woocommerce-checkout #fc-wrapper .wc-gzd-checkbox-placeholder label {
        font-size: 12px !important;
    }
}

/* === Refined Checkout UX Improvements === */

/* Improve overall checkout container */
body.woocommerce-checkout #fc-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    color: #333 !important;
}

/* Better steps spacing and layout */
body.woocommerce-checkout #fc-wrapper .fc-checkout-steps {
    padding: 0 !important;
    margin: 0 !important;
    margin-top: -100px !important;
}

/* Style section headers like cart page */
body.woocommerce-checkout #fc-wrapper .fc-step__title {
    color: #333 !important;
    font-weight: 600 !important;
    font-size: 1.2em !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e4e4e4 !important;
}

/* Improve left section styling - completed steps (email, address, shipping) */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] {
    background-color: #fdfdfd !important;
    border: 1px solid #e4e4e4 !important;
    border-radius: 4px !important;
    margin-bottom: 15px !important;
    padding: 15px !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
    border-bottom: 1px solid #f0f0f0 !important;
    margin-bottom: 8px !important;
    padding: 8px 0 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

/* Improve completed steps text */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content .fc-step__substep-text-line {
    font-size: 0.95em !important;
    line-height: 1.6 !important;
    color: #333 !important;
}

/* Improve edit links */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
    color: #00897b !important; /* Teal color like in cart */
    font-weight: 500 !important;
    text-decoration: none !important;
    border: 1px solid #00897b !important;
    border-radius: 3px !important;
    padding: 2px 8px !important;
    font-size: 0.85em !important;
    transition: all 0.2s !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit:hover {
    background-color: #00897b !important;
    color: white !important;
}

/* Fix progress bar styling */
body.woocommerce-checkout .fc-progress-bar {
    width: 100% !important;
    max-width: 100% !important;
    background-color: transparent !important;
}

body.woocommerce-checkout .fc-progress-bar__inner {
    padding: 0 15px 10px 15px !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

body.woocommerce-checkout .fc-progress-bar__bar {
    height: 3px !important;
    background-color: #e0e0e0 !important;
    margin-top: 8px !important;
}

body.woocommerce-checkout .fc-progress-bar__bar-progress {
    background-color: #00897b !important; /* Match the cart page teal color */
}

body.woocommerce-checkout .fc-progress-bar__count {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #333 !important;
}

/* Style active step differently */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-current] {
    border: 1px solid #e4e4e4 !important;
    border-radius: 4px !important;
    padding: 15px !important;
    margin-bottom: 15px !important;
    background-color: #fff !important;
}

/* Consistent form field styling */
body.woocommerce-checkout #fc-wrapper .form-row input[type="text"],
body.woocommerce-checkout #fc-wrapper .form-row input[type="tel"],
body.woocommerce-checkout #fc-wrapper .form-row input[type="email"],
body.woocommerce-checkout #fc-wrapper .form-row select,
body.woocommerce-checkout #fc-wrapper .form-row textarea {
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    width: 100% !important;
    background-color: #fff !important;
    transition: border-color 0.2s !important;
}

body.woocommerce-checkout #fc-wrapper .form-row input[type="text"]:focus,
body.woocommerce-checkout #fc-wrapper .form-row input[type="tel"]:focus,
body.woocommerce-checkout #fc-wrapper .form-row input[type="email"]:focus,
body.woocommerce-checkout #fc-wrapper .form-row select:focus,
body.woocommerce-checkout #fc-wrapper .form-row textarea:focus {
    border-color: #00897b !important;
    outline: none !important;
    box-shadow: 0 0 0 1px rgba(0, 137, 123, 0.2) !important;
}

/* Payment methods improvements */
body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method {
    border: 1px solid #e4e4e4 !important;
    background-color: #f9f9f9 !important;
    transition: border-color 0.2s !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method:hover {
    border-color: #ccc !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method.payment_method_foxpay {
    border-color: #66bb6a !important;
    background-color: #f1f8e9 !important;
}

/* Align checkout button with cart page style */
body.woocommerce-checkout #fc-wrapper .fc-place-order button.button {
    background-color: #00897b !important; /* Match cart button color */
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 15px 20px !important;
    font-size: 16px !important;
    border-radius: 4px !important;
    width: 100% !important;
    transition: background-color 0.2s !important;
}

body.woocommerce-checkout #fc-wrapper .fc-place-order button.button:hover {
    background-color: #00796b !important; /* Darker shade on hover */
}

/* Responsive improvements */
@media (max-width: 768px) {
    /* Tighten spacing on mobile */
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete],
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-current] {
        padding: 12px !important;
        margin-bottom: 12px !important;
    }
    
    /* Better alignment for edit links on mobile */
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
        margin-left: 0 !important;
        margin-top: 5px !important;
        font-size: 0.8em !important;
        padding: 1px 6px !important;
        display: inline-block !important;
    }
    
    /* Cleaner field layout on mobile */
    body.woocommerce-checkout #fc-wrapper .form-row {
        margin-bottom: 12px !important;
    }
}

/* === Further Checkout Styling Refinements === */

/* Reset and optimize spacing */
body.woocommerce-checkout #fc-wrapper * {
    box-sizing: border-box !important;
}

/* Enhance section headers with icon styling like cart page */
body.woocommerce-checkout #fc-wrapper .fc-step__title {
    display: flex !important;
    align-items: center !important;
    font-size: 1.2em !important;
    font-weight: 600 !important;
    margin: 0 0 15px 0 !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e0e0e0 !important;
    color: #333 !important;
}

/* Adjust background of steps to match cart page clean look */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step {
    background-color: #fff !important;
    border-radius: 5px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

/* Fix the spacing and alignment of complete steps */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] {
    padding: 15px !important;
    margin-bottom: 15px !important;
    border: 1px solid #e0e0e0 !important;
}

/* Improve addresses and other complete substeps layout */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
    padding: 10px 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

/* Cleaner text for completed steps */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text {
    padding: 0 !important;
    margin: 0 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content {
    padding: 0 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content .fc-step__substep-text-line {
    color: #333 !important;
    line-height: 1.5 !important;
    margin-bottom: 2px !important;
}

/* Make "Edit" button match the cart page aesthetics */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
    background-color: transparent !important;
    color: #00897b !important;
    border: 1px solid #00897b !important;
    border-radius: 3px !important;
    padding: 3px 8px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit:hover {
    background-color: #00897b !important;
    color: white !important;
}

/* Fix current step styling to match completed steps */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-current] {
    padding: 15px !important;
    margin-bottom: 15px !important;
    border: 1px solid #e0e0e0 !important;
}

/* Fix the spacing between fields */
body.woocommerce-checkout #fc-wrapper .form-row {
    margin-bottom: 15px !important;
}

body.woocommerce-checkout #fc-wrapper .form-row label {
    font-weight: 500 !important;
    margin-bottom: 5px !important;
    display: block !important;
    color: #333 !important;
}

/* Make checkbox labels more readable */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review__inner .wc-gzd-checkbox-placeholder label {
    line-height: 1.5 !important;
    font-size: 0.9em !important;
    color: #333 !important;
}

/* Order summary styling to match cart page */
body.woocommerce-checkout #fc-wrapper .fc-sidebar {
    padding: 0 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-sidebar__inner {
    padding: 15px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    overflow: hidden !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item {
    width: 100% !important;
    box-sizing: border-box !important;
    padding-right: 15px !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-price,
body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table td,
body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table th {
    padding-right: 0 !important;
    width: auto !important;
    white-space: nowrap !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table {
    table-layout: fixed !important;
    width: 100% !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table th {
    width: 60% !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table td {
    width: 40% !important;
    text-align: right !important;
}

/* Order summary header */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review__header {
    font-weight: 600 !important;
    font-size: 1.2em !important;
    color: #333 !important;
    margin: 0 0 15px 0 !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

/* Product listing in order summary */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list {
    margin-bottom: 15px !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item:last-child {
    border-bottom: none !important;
}

/* Total values alignment and styling */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .order-total th,
body.woocommerce-checkout #fc-wrapper .fc-sidebar .order-total td {
    font-size: 1.1em !important;
    font-weight: 600 !important;
    color: #333 !important;
}

/* Mobile specific refinements */
@media (max-width: 768px) {
    /* Adjust spacing for mobile */
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete],
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-current] {
        padding: 12px !important;
    }
    
    /* Better mobile spacing for order summary */
    body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-sidebar__inner {
        padding: 12px !important;
    }
    
    /* Cleaner edit button on mobile */
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text {
        width: 100% !important;
        margin-bottom: 5px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
        padding: 2px 6px !important;
        margin-left: 0 !important;
        font-size: 11px !important;
    }
}

/* === DHL Delivery Options Refinement === */
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 6px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 !important;
    width: 100% !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 6px 3px !important;
    min-height: 52px !important;
    width: 100% !important;
    background-color: #f5f5f5 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label .dhl-preferred-time-title {
    font-size: 13px !important;
    font-weight: bold !important;
    margin-bottom: 2px !important;
    display: block !important;
    line-height: 1.2 !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label .dhl-preferred-time-value {
    font-size: 11px !important;
    display: block !important;
    line-height: 1.2 !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li input[type="radio"]:checked + label {
    background-color: #00897b !important;
    border-color: #00897b !important;
    color: white !important;
    font-weight: bold !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li input[type="radio"] {
    display: none !important;
}

/* Fix DHL time options to match day options styling */
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-times {
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 15px 0 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-times li {
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-times li label {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px 8px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    background-color: #f5f5f5 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 13px !important;
    text-align: center !important;
    height: 100% !important;
    min-height: 42px !important;
    line-height: 1.2 !important;
    word-break: normal !important;
    hyphens: none !important;
    white-space: normal !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-times li input[type="radio"]:checked + label {
    background-color: #00897b !important;
    border-color: #00897b !important;
    color: white !important;
    font-weight: bold !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-times li input[type="radio"] {
    display: none !important;
}

/* === Enhanced Mobile Optimizations === */
@media (max-width: 768px) {
    /* Improve the general spacing on mobile */
    body.woocommerce-checkout #fc-wrapper {
        padding: 0 !important;
    }
    
    /* Fix completed steps layout on mobile */
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
        padding: 10px 0 !important;
        flex-wrap: wrap !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text {
        width: 100% !important;
        margin-bottom: 8px !important;
        margin-right: 0 !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
        margin-left: 0 !important;
        padding: 2px 8px !important;
        font-size: 12px !important;
    }
    
    /* Improve DHL buttons on mobile */
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li:first-child {
        grid-column: 1 / -1 !important; /* Make "Keiner" button full width */
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label {
        min-height: 40px !important;
        padding: 4px 2px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label .dhl-preferred-time-title {
        font-size: 13px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label .dhl-preferred-time-value {
        font-size: 10px !important;
    }
    
    /* Improve the payment method display on mobile */
    body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method label {
        flex-wrap: wrap !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method img {
        margin-left: 25px !important;
        margin-top: 5px !important;
    }
    
    /* Make checkbox text more readable on mobile */
    body.woocommerce-checkout #fc-wrapper .wc-gzd-checkbox-placeholder label {
        font-size: 12px !important;
    }
    
    /* Improved spacing for order summary on mobile */
    body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-sidebar__inner {
        padding: 10px !important;
    }
    
    /* Better alignment for product items in cart */
    body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item {
        flex-wrap: wrap !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-name,
    body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-quantity {
        margin-bottom: 3px !important;
        width: 100% !important;
    }
    
    /* Fix padding inside steps */
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-current],
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] {
        padding: 12px 10px !important;
    }
    
    /* Better field spacing on mobile */
    body.woocommerce-checkout #fc-wrapper .form-row {
        margin-bottom: 12px !important;
    }
    
    /* Fix the progress bar on mobile */
    body.woocommerce-checkout .fc-progress-bar.is-sticky--top {
        position: absolute !important;
        top: 0 !important;
        margin: 0 !important;
        z-index: 100 !important;
        border-bottom: 1px solid #e0e0e0 !important;
        background-color: #fff !important;
    }
    
    body.woocommerce-checkout .fc-progress-bar__inner {
        padding: 8px 10px 10px 10px !important;
    }
    
    /* Ensure long email addresses don't break layout */
    body.woocommerce-checkout #fc-wrapper .fc-step__substep[data-substep-complete][data-substep-id="contact"] .fc-step__substep-text-content {
        word-break: break-all !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }
    
    /* Fix legal text size and alignment */
    body.woocommerce-checkout #fc-wrapper .wc-gzd-checkbox-placeholder label {
        font-size: 11px !important;
    }
}

/* === Fixes for Desktop Anomalies === */

/* Fix progress bar styling */
body.woocommerce-checkout .fc-progress-bar {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: transparent !important;
}

body.woocommerce-checkout .fc-progress-bar__inner {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 15px 10px 15px !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

body.woocommerce-checkout .fc-progress-bar__bar {
    height: 4px !important;
    background-color: #e0e0e0 !important;
    margin-top: 8px !important;
    border-radius: 2px !important;
}

body.woocommerce-checkout .fc-progress-bar__bar-progress {
    background-color: #00897b !important;
    border-radius: 2px !important;
}

/* Fix spacing in completed steps */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] {
    padding: 15px !important;
    margin-bottom: 15px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    margin-bottom: 0 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

/* Fix payment methods display */
body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method {
    padding: 12px !important;
    margin-bottom: 12px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    background-color: #f8f8f8 !important;
    transition: all 0.2s ease !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method.payment_method_foxpay {
    border-color: #00897b !important;
    background-color: #f1f8e9 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method:hover {
    border-color: #00897b !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method label {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    font-weight: 500 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method img {
    margin-left: 10px !important;
    max-height: 30px !important;
}

/* Fix error messages to be full width */
body.woocommerce-checkout #fc-wrapper .woocommerce-error,
body.woocommerce-checkout #fc-wrapper .woocommerce-info,
body.woocommerce-checkout #fc-wrapper .woocommerce-message {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 15px 0 !important;
    padding: 12px 15px !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
}

body.woocommerce-checkout #fc-wrapper .woocommerce-error {
    background-color: #fff2f2 !important;
    border: 1px solid #ffb8b8 !important;
    color: #d32f2f !important;
}

body.woocommerce-checkout #fc-wrapper .woocommerce-info {
    background-color: #e3f2fd !important;
    border: 1px solid #bbdefb !important;
    color: #0277bd !important;
}

body.woocommerce-checkout #fc-wrapper .woocommerce-message {
    background-color: #e8f5e9 !important;
    border: 1px solid #c8e6c9 !important;
    color: #2e7d32 !important;
}

/* Fix product summary layout */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list {
    margin-bottom: 15px !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item {
    padding: 8px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item:last-child {
    border-bottom: none !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-name {
    width: 70% !important;
    padding-right: 10px !important;
    text-align: left !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-price {
    width: 30% !important;
    text-align: right !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-quantity {
    margin-right: 5px !important;
}

/* Fix checkout button styling */
body.woocommerce-checkout #fc-wrapper .fc-place-order button.button {
    background-color: #00897b !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 15px 20px !important;
    font-size: 16px !important;
    border-radius: 4px !important;
    width: 100% !important;
    transition: background-color 0.2s !important;
    margin-top: 15px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

body.woocommerce-checkout #fc-wrapper .fc-place-order button.button:hover {
    background-color: #00796b !important;
}

/* Fix legal checkboxes layout and styling */
body.woocommerce-checkout #fc-wrapper .wc-gzd-checkbox-placeholder {
    margin: 15px 0 5px 0 !important;
    width: 100% !important;
}

body.woocommerce-checkout #fc-wrapper .wc-gzd-checkbox-placeholder label {
    display: flex !important;
    align-items: flex-start !important;
    line-height: 1.4 !important;
    font-size: 13px !important;
    margin-bottom: 10px !important;
    color: #333 !important;
}

body.woocommerce-checkout #fc-wrapper .wc-gzd-checkbox-placeholder input[type="checkbox"] {
    margin-top: 3px !important;
    margin-right: 8px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    flex-shrink: 0 !important;
}

/* Ensure all text is properly aligned left */
body.woocommerce-checkout #fc-wrapper .fc-step__substep-text-content .fc-step__substep-text-line {
    text-align: left !important;
}

/* === Fixes for Neighbor/Location Options === */
body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 15px !important;
}

body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper label {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 8px 6px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    background-color: #f5f5f5 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 13px !important;
    text-align: center !important;
    height: 100% !important;
    min-height: 40px !important;
    line-height: 1.2 !important;
    word-break: normal !important;
    hyphens: none !important;
    white-space: normal !important;
}

body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper input[type="radio"]:checked + label {
    background-color: #00897b !important;
    border-color: #00897b !important;
    color: white !important;
    font-weight: bold !important;
}

body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper input[type="radio"] {
    display: none !important;
}

@media (max-width: 768px) {
    body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper label {
        padding: 6px 4px !important;
        font-size: 12px !important;
        min-height: 36px !important;
    }
}

/* Fix for address format in completed steps */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
}

/* Fix spacing issues for current active step */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-current] {
    padding: 15px !important;
    margin-bottom: 15px !important;
    border: 1px solid #00897b !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

/* Fix spacing for form fields */
body.woocommerce-checkout #fc-wrapper .form-row label {
    font-weight: 500 !important;
    margin-bottom: 5px !important;
    display: block !important;
    color: #333 !important;
}

body.woocommerce-checkout #fc-wrapper .form-row input[type="text"],
body.woocommerce-checkout #fc-wrapper .form-row input[type="tel"],
body.woocommerce-checkout #fc-wrapper .form-row input[type="email"],
body.woocommerce-checkout #fc-wrapper .form-row select,
body.woocommerce-checkout #fc-wrapper .form-row textarea {
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Fix for the customer info layout */
body.woocommerce-checkout #fc-wrapper .fc-step__substep[data-substep-id="shipping_address"],
body.woocommerce-checkout #fc-wrapper .fc-step__substep[data-substep-id="billing_address"] {
    display: block !important;
}

/* Fix for order summary total alignment */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table th,
body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table td {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    background-color: transparent !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table td {
    text-align: right !important;
}

/* === Fixes for Neighbor/Location Options === */
body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 15px !important;
}

body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper label {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 8px 6px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    background-color: #f5f5f5 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 13px !important;
    text-align: center !important;
    height: 100% !important;
    min-height: 40px !important;
    line-height: 1.2 !important;
    word-break: normal !important;
    hyphens: none !important;
    white-space: normal !important;
}

body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper input[type="radio"]:checked + label {
    background-color: #00897b !important;
    border-color: #00897b !important;
    color: white !important;
    font-weight: bold !important;
}

body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper input[type="radio"] {
    display: none !important;
}

@media (max-width: 768px) {
    body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper label {
        padding: 6px 4px !important;
        font-size: 12px !important;
        min-height: 36px !important;
    }
}

/* Fix for address format in completed steps */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
}

/* Fix spacing issues for current active step */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-current] {
    padding: 15px !important;
    margin-bottom: 15px !important;
    border: 1px solid #00897b !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

/* Fix spacing for form fields */
body.woocommerce-checkout #fc-wrapper .form-row label {
    font-weight: 500 !important;
    margin-bottom: 5px !important;
    display: block !important;
    color: #333 !important;
}

body.woocommerce-checkout #fc-wrapper .form-row input[type="text"],
body.woocommerce-checkout #fc-wrapper .form-row input[type="tel"],
body.woocommerce-checkout #fc-wrapper .form-row input[type="email"],
body.woocommerce-checkout #fc-wrapper .form-row select,
body.woocommerce-checkout #fc-wrapper .form-row textarea {
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Fix for the customer info layout */
body.woocommerce-checkout #fc-wrapper .fc-step__substep[data-substep-id="shipping_address"],
body.woocommerce-checkout #fc-wrapper .fc-step__substep[data-substep-id="billing_address"] {
    display: block !important;
}

/* Fix for order summary total alignment */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table th,
body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table td {
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    background-color: transparent !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table td {
    text-align: right !important;
}

/* === Final Touches === */
/* Fix visual feedback for current step */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-current] {
    border-color: #00897b !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08) !important;
}

/* Left align all text in completed steps */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content,
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content * {
    text-align: left !important;
}

/* === Further DHL Button Improvements === */
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label {
    padding: 8px 4px !important;
    font-size: 12px !important;
    text-overflow: ellipsis !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    /* Improve text readability */
    line-height: 1.2 !important;
}

/* Improve DHL time options with larger buttons */
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-times {
    grid-template-columns: 1fr 1fr !important; /* Force two columns */
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-times li label {
    padding: 10px 8px !important;
    min-height: 42px !important;
}

/* === Critical Mobile Fixes === */
@media (max-width: 768px) {
    /* Ensure buttons are properly spaced */
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days {
        grid-template-columns: repeat(2, 1fr) !important; /* Force 2 columns on mobile */
        gap: 6px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label {
        padding: 6px 2px !important;
        font-size: 11px !important;
        min-height: 34px !important;
    }
    
    /* Fix form padding */
    body.woocommerce-checkout #fc-wrapper form.checkout {
        padding: 0 !important;
    }
    
    /* Fix edit buttons alignment */
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
        margin-bottom: 0 !important;
    }
    
    /* Fix order summary padding */
    body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-sidebar__inner {
        padding: 12px 10px !important;
    }
    
    /* Improve checkout container spacing */
    body.woocommerce-checkout #fc-wrapper .fc-checkout-steps {
        padding-top: 45px !important;
    }
    
    /* Fix progress bar on mobile */
    body.woocommerce-checkout .fc-progress-bar.is-sticky--top {
        position: absolute !important;
        top: 0 !important;
        margin: 0 !important;
        z-index: 100 !important;
        border-bottom: 1px solid #e0e0e0 !important;
        background-color: #fff !important;
    }
    
    body.woocommerce-checkout .fc-progress-bar__inner {
        padding: 8px 10px 10px 10px !important;
    }
    
    /* Ensure long email addresses don't break layout */
    body.woocommerce-checkout #fc-wrapper .fc-step__substep[data-substep-complete][data-substep-id="contact"] .fc-step__substep-text-content {
        word-break: break-all !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }
    
    /* Fix legal text size and alignment */
    body.woocommerce-checkout #fc-wrapper .wc-gzd-checkbox-placeholder label {
        font-size: 11px !important;
    }
}

/* === DHL Neighbor Options Fix === */
body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper {
    margin-top: 10px !important;
}

/* Select better styling */
body.woocommerce-checkout #fc-wrapper .dhl-checkout-additional input[type="text"],
body.woocommerce-checkout #fc-wrapper .dhl-checkout-additional select {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 10px !important;
    width: 100% !important;
}

body.woocommerce-checkout #fc-wrapper #dhl-preferred-neighbor,
body.woocommerce-checkout #fc-wrapper #dhl-preferred-location {
    margin-top: 15px !important;
    padding-top: 10px !important;
    border-top: 1px dashed #eee !important;
}

/* Fix field spacing */
body.woocommerce-checkout #fc-wrapper .form-row {
    margin-bottom: 12px !important;
}

/* Improve full-width of error notices */
body.woocommerce-checkout #fc-wrapper .woocommerce-error,
body.woocommerce-checkout #fc-wrapper .woocommerce-info,
body.woocommerce-checkout #fc-wrapper .woocommerce-message {
    width: 100% !important;
    margin: 0 0 15px 0 !important;
    padding: 12px 15px !important;
    box-sizing: border-box !important;
}

/* Fix spacing for legal checkboxes */
body.woocommerce-checkout #fc-wrapper .wc-gzd-checkbox-placeholder {
    margin: 15px 0 10px 0 !important;
}

/* Make sure edit link text doesn't overflow */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 80px !important;
}

/* Fix order summary item spacing */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item {
    padding: 8px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item:last-child {
    border-bottom: none !important;
}

/* Fix for the FoxPay layout */
body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method.payment_method_foxpay img {
    max-height: 26px !important;
}

/* Improve text alignment in cart summary */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-name {
    text-align: left !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-price {
    text-align: right !important;
}

/* === Final DHL Buttons Fix === */
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)) !important;
    gap: 5px !important;
    margin: 10px 0 15px 0 !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label {
    padding: 7px 4px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: break-word !important;
    hyphens: auto !important;
}

/* Ensure completed steps text is properly formatted */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content .fc-step__substep-text-line {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    word-break: break-word !important;
}

/* Fix mobile alignment */
@media (max-width: 768px) {
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label {
        padding: 5px 3px !important;
        font-size: 10px !important;
        min-height: 32px !important;
    }
    
    /* Improve progress bar spacing */
    body.woocommerce-checkout #fc-wrapper .fc-checkout-steps {
        padding-top: 40px !important;
    }

    /* Fix order summary spacing */
    body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-name,
    body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-quantity {
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 3px !important;
    }
    
    /* Improve text wrapping for email addresses */
    body.woocommerce-checkout #fc-wrapper .fc-step__substep[data-substep-complete][data-substep-id="contact"] .fc-step__substep-text-content {
        word-break: break-all !important;
        font-size: 0.9em !important;
    }
    
    /* Fix edit button position */
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
        margin-left: 0 !important;
        margin-top: 5px !important;
    }
}

/* === Even More Mobile Refinements === */
@media (max-width: 480px) {
    /* Make DHL buttons more compact on very small screens */
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label {
        padding: 4px 2px !important;
        font-size: 10px !important;
        min-height: 30px !important;
    }
    
    /* Fix step spacing */
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete],
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-current] {
        padding: 10px 8px !important;
        margin-bottom: 10px !important;
    }
    
    /* Reduce section title size */
    body.woocommerce-checkout #fc-wrapper .fc-step__title {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }
    
    /* Ensure legal checkboxes are readable */
    body.woocommerce-checkout #fc-wrapper .wc-gzd-checkbox-placeholder label {
        line-height: 1.3 !important;
    }
}

/* Ensure the edit cart link and other links are properly styled */
body.woocommerce-checkout #fc-wrapper .fc-sidebar a.fc-sidebar__edit-cart {
    color: #00897b !important;
    text-decoration: underline !important;
    font-size: 14px !important;
    display: inline-block !important;
    margin-bottom: 10px !important;
}

/* Fix order totals spacing */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table tr.order-total th,
body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table tr.order-total td {
    padding-top: 15px !important;
    border-top: 1px solid #e0e0e0 !important;
    font-weight: 600 !important;
}

/* Fix progress bar display */
body.woocommerce-checkout .fc-progress-bar__inner {
    box-shadow: none !important;
}

/* Make sure form labels are properly aligned */
body.woocommerce-checkout #fc-wrapper .form-row label {
    text-align: left !important;
}

/* === 1. Fix Right Side Order Summary Alignment === */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-sidebar__edit-cart {
    display: block !important;
    text-align: left !important;
    margin-bottom: 15px !important;
    margin-top: -10px !important;
    font-size: 14px !important;
    color: #00897b !important;
}

/* Fix price alignment in right sidebar */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    padding-right: 0 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-name {
    width: auto !important;
    flex: 1 1 auto !important;
    padding-right: 10px !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-price {
    width: auto !important;
    flex: 0 0 auto !important;
    text-align: right !important;
}

/* Shop table prices alignment */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table {
    width: 100% !important;
    border-collapse: collapse !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table th {
    text-align: left !important;
    padding: 8px 0 !important;
    width: 70% !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table td {
    text-align: right !important;
    padding: 8px 0 !important;
    width: 30% !important;
}

/* === 2. Improved DHL Button Readability === */
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important; 
    gap: 6px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 !important;
    width: 100% !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 6px 3px !important;
    min-height: 52px !important;
    width: 100% !important;
    background-color: #f5f5f5 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label .dhl-preferred-time-title {
    font-size: 13px !important;
    font-weight: bold !important;
    margin-bottom: 2px !important;
    display: block !important;
    line-height: 1.2 !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label .dhl-preferred-time-value {
    font-size: 11px !important;
    display: block !important;
    line-height: 1.2 !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li input[type="radio"]:checked + label {
    background-color: #00897b !important;
    border-color: #00897b !important;
    color: white !important;
    font-weight: bold !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li input[type="radio"] {
    display: none !important;
}

/* === 3. Fix Payment Method Styling === */
body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method {
    border: 1px solid #e0e0e0 !important;
    background-color: #f8f8f8 !important;
    padding: 12px !important;
    margin-bottom: 10px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method:hover {
    border-color: #00897b !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method.payment_method_foxpay {
    border-color: #00897b !important;
    background-color: #f1f8e9 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method input[type="radio"]:checked + label {
    font-weight: 600 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method label {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    cursor: pointer !important;
    font-weight: 500 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method img {
    margin-left: 10px !important;
    max-height: 24px !important;
}

/* === 4. Match Button Styles === */
body.woocommerce-checkout #fc-wrapper .fc-step__next-step.button {
    background-color: #2ea887 !important; /* Match the green of Jetzt Kaufen */
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
}

body.woocommerce-checkout #fc-wrapper .fc-step__next-step.button:hover {
    background-color: #267869 !important; /* Slightly darker on hover */
}

body.woocommerce-checkout #fc-wrapper .fc-place-order button.button {
    background-color: #2ea887 !important; /* Match the same green */
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    border-radius: 4px !important;
    width: 100% !important;
    text-transform: uppercase !important;
}

body.woocommerce-checkout #fc-wrapper .fc-place-order button.button:hover {
    background-color: #267869 !important;
}

/* === Additional Visual Improvements === */
/* Fix for the edit links in completed steps */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
    background-color: transparent !important;
    color: #00897b !important;
    border: 1px solid #00897b !important;
    border-radius: 3px !important;
    padding: 3px 8px !important;
    font-size: 12px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit:hover {
    background-color: #00897b !important;
    color: white !important;
}

/* Enhance Field Labels */
body.woocommerce-checkout #fc-wrapper .form-row label {
    font-weight: 500 !important;
    color: #333 !important;
    margin-bottom: 5px !important;
}

/* Improve spacing and borders for completed steps */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] {
    margin-bottom: 15px !important;
}

/* Fix for mobile view */
@media (max-width: 768px) {
    /* Adjust DHL buttons layout for better readability on mobile */
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li:first-child {
        grid-column: 1 / -1 !important; /* Make "Keiner" button full width */
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label {
        min-height: 45px !important;
        padding: 4px 2px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label .dhl-preferred-time-title {
        font-size: 12px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label .dhl-preferred-time-value {
        font-size: 10px !important;
    }
    
    /* Fix price alignment on mobile */
    body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item {
        flex-wrap: wrap !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-name,
    body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-quantity {
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 3px !important;
    }
    
    /* Adjust buttons for mobile */
    body.woocommerce-checkout #fc-wrapper .fc-step__next-step.button,
    body.woocommerce-checkout #fc-wrapper .fc-place-order button.button {
        padding: 10px 15px !important;
        font-size: 15px !important;
    }
}

/* === Further Fixes for DHL Button Text Readability === */
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 5px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 !important;
    width: 100% !important;
}

/* Target DHL buttons on cannaspot.de */
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li {
    position: relative !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 4px 2px !important;
    min-height: 54px !important;
    background-color: #f5f5f5 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    width: 100% !important;
    font-size: 11px !important;
    overflow: hidden !important;
    word-break: break-word !important;
}

/* Hide any unnecessary span elements if present */
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label > span:not(.dhl-preferred-time-title):not(.dhl-preferred-time-value) {
    display: none !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label .dhl-preferred-time-title {
    display: block !important;
    font-weight: bold !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    margin-bottom: 2px !important;
    width: 100% !important;
    text-align: center !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label .dhl-preferred-time-value {
    display: block !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    width: 100% !important;
    text-align: center !important;
}

/* Special fix for date selectors */
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li:first-child label {
    font-weight: bold !important;
    font-size: 13px !important;
}

/* === Enhanced Payment Method Styling for FoxPay === */
body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method {
    position: relative !important;
    border: 1px solid #e0e0e0 !important;
    background-color: #f8f8f8 !important;
    padding: 12px !important;
    margin-bottom: 10px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method.payment_method_foxpay,
body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method input[type="radio"]:checked + label {
    border-color: #00897b !important;
    background-color: #f1f8e9 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method label {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method label img {
    margin-left: 10px !important;
    max-height: 24px !important;
}

/* Add a check mark for selected payment method */
body.woocommerce-checkout #fc-wrapper .fc-payment-methods .payment_methods li.wc_payment_method input[type="radio"]:checked + label::before {
    content: "✓" !important;
    display: inline-block !important;
    margin-right: 8px !important;
    color: #00897b !important;
    font-weight: bold !important;
}

/* === Button Styling Fine-tuning === */
/* Match the styles precisely for both buttons */
body.woocommerce-checkout #fc-wrapper .fc-step__next-step.button {
    background-color: #019267 !important;
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 6px !important; /* Match the rounded corners */
    text-transform: uppercase !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
    letter-spacing: 0.5px !important;
    box-shadow: none !important;
}

body.woocommerce-checkout #fc-wrapper .fc-place-order button.button {
    background-color: #019267 !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    border-radius: 6px !important;
    width: 100% !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: none !important;
}

/* === Fix for Order Summary Alignment === */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-name {
    flex: 1 !important;
    padding-right: 10px !important;
    box-sizing: border-box !important;
    text-align: left !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review-list__item-price {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    text-align: right !important;
}

/* Fix for subtotal alignment */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table {
    width: 100% !important;
    margin: 15px 0 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table th,
body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table td {
    padding: 5px 0 !important;
    vertical-align: top !important;
    text-align: left !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .shop_table td {
    text-align: right !important;
}

/* Fix for Warenkorb bearbeiten link */
body.woocommerce-checkout #fc-wrapper .fc-sidebar__edit-cart {
    color: #00897b !important;
    text-decoration: underline !important;
    font-size: 14px !important;
    display: inline-block !important;
    margin-bottom: 15px !important;
    margin-top: 0 !important;
    text-align: left !important;
}

/* === Mobile-specific Improvements === */
@media (max-width: 768px) {
    /* Adjust DHL buttons layout */
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li:first-child {
        grid-column: span 3 !important; /* Make "Keiner" button full width */
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label {
        padding: 4px 2px !important;
        min-height: 45px !important;
        font-size: 10px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label .dhl-preferred-time-title {
        font-size: 11px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label .dhl-preferred-time-value {
        font-size: 9px !important;
    }
    
    /* Improve button spacing on mobile */
    body.woocommerce-checkout #fc-wrapper .fc-step__actions {
        margin-top: 15px !important;
    }
}

/* === Fix for overlapping text in DHL location selection === */
body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    margin: 10px 0 !important;
}

body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper label {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 6px 4px !important;
    min-height: 40px !important;
    background-color: #f5f5f5 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    transition: all 0.2s !important;
    font-size: 12px !important;
}

body.woocommerce-checkout #fc-wrapper .dhl-location-types-wrapper input[type="radio"]:checked + label {
    background-color: #00897b !important;
    border-color: #00897b !important;
    color: white !important;
    font-weight: bold !important;
} 

/* Fix sticky sidebar container */
body.woocommerce-checkout #fc-wrapper .fc-sidebar {
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar__inner {
    position: sticky !important;
    top: 50px !important; /* Adjust top value as needed */
    width: 100% !important;
    box-sizing: border-box !important; 
    max-height: calc(100vh - 100px) !important;
    overflow-y: auto !important;
    padding: 15px !important;
    background-color: #fff !important;
    z-index: 10 !important;
}

/* Fix form field width and alignment */
body.woocommerce-checkout #fc-wrapper .form-row {
    width: 100% !important;
    margin-bottom: 15px !important;
}

body.woocommerce-checkout #fc-wrapper .form-row input[type="text"],
body.woocommerce-checkout #fc-wrapper .form-row input[type="tel"],
body.woocommerce-checkout #fc-wrapper .form-row input[type="email"],
body.woocommerce-checkout #fc-wrapper .form-row select,
body.woocommerce-checkout #fc-wrapper .form-row textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Left align the form titles and fields */
body.woocommerce-checkout #fc-wrapper .fc-step__substep {
    width: 100% !important;
    text-align: left !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step__substep-title {
    text-align: left !important;
    width: 100% !important;
    display: block !important;
}

/* Fix button styles - correct color values */
body.woocommerce-checkout #fc-wrapper .fc-step__next-step.button {
    background-color: #019267 !important;
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    text-transform: uppercase !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
    letter-spacing: 0.5px !important;
    box-shadow: none !important;
}

body.woocommerce-checkout #fc-wrapper .fc-step__next-step.button:hover {
    background-color: #017554 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-place-order button.button {
    background-color: #019267 !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    border-radius: 6px !important;
    width: 100% !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: none !important;
}

body.woocommerce-checkout #fc-wrapper .fc-place-order button.button:hover {
    background-color: #017554 !important;
}

/* Add full width to address fields */
body.woocommerce-checkout #fc-wrapper .fc-step__substep[data-substep-id="shipping_address"] .form-row,
body.woocommerce-checkout #fc-wrapper .fc-step__substep[data-substep-id="billing_address"] .form-row {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin-bottom: 15px !important;
}

/* Fix input field styling */
body.woocommerce-checkout #fc-wrapper input[type="text"],
body.woocommerce-checkout #fc-wrapper input[type="tel"],
body.woocommerce-checkout #fc-wrapper input[type="email"],
body.woocommerce-checkout #fc-wrapper select {
    width: 100% !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
}

/* Fix for Vorname and Nachname fields to display in columns */
body.woocommerce-checkout #fc-wrapper .form-row.form-row-first,
body.woocommerce-checkout #fc-wrapper .form-row.form-row-last {
    width: 49% !important;
    display: inline-block !important;
    vertical-align: top !important;
}

body.woocommerce-checkout #fc-wrapper .form-row.form-row-first {
    margin-right: 2% !important;
}

/* Ensure sticky sidebar always appears within viewport */
@media (min-width: 769px) {
    body.woocommerce-checkout #fc-wrapper .fc-checkout-order-review-wrapper.fc-sidebar {
        position: sticky !important;
        top: 0 !important;
        right: 0 !important;
        align-self: flex-start !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-sidebar__inner {
        overflow-y: auto !important;
        max-height: calc(100vh - 100px) !important;
        position: sticky !important;
        top: 50px !important;
    }
}

/* Mobile styles for better alignment */
@media (max-width: 768px) {
    body.woocommerce-checkout #fc-wrapper .fc-sidebar__inner {
        position: relative !important;
        top: 0 !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .form-row.form-row-first,
    body.woocommerce-checkout #fc-wrapper .form-row.form-row-last {
        width: 100% !important;
        margin-right: 0 !important;
    }
}

/* === Fix for Sticky Sidebar === */
body.woocommerce-checkout #fc-wrapper .fc-checkout-order-review-wrapper.fc-sidebar {
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar__inner {
    position: sticky !important;
    top: 30px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
    padding: 15px !important;
    background-color: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    z-index: 10 !important;
}

/* === Improved Form Width and Layout === */
/* Make all form containers full width */
body.woocommerce-checkout #fc-wrapper .fc-step__substep {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
}

/* Fix for Lieferadresse (Delivery Address) section */
body.woocommerce-checkout #fc-wrapper .fc-step__substep[data-substep-id="shipping_address"] .form-row,
body.woocommerce-checkout #fc-wrapper .fc-step__substep[data-substep-id="billing_address"] .form-row {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin-bottom: 15px !important;
}

/* Ensure all text fields are full width */
body.woocommerce-checkout #fc-wrapper input[type="text"],
body.woocommerce-checkout #fc-wrapper input[type="tel"],
body.woocommerce-checkout #fc-wrapper input[type="email"],
body.woocommerce-checkout #fc-wrapper select,
body.woocommerce-checkout #fc-wrapper textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
}

/* Left align all field labels */
body.woocommerce-checkout #fc-wrapper label {
    text-align: left !important;
    width: 100% !important;
    display: block !important;
    margin-bottom: 5px !important;
    font-weight: 500 !important;
}

/* Fix for Vorname and Nachname fields to display in columns */
body.woocommerce-checkout #fc-wrapper .form-row-first,
body.woocommerce-checkout #fc-wrapper .form-row-last {
    float: left !important;
    width: 49% !important;
    clear: none !important;
}

body.woocommerce-checkout #fc-wrapper .form-row-first {
    margin-right: 2% !important;
}

/* Ensure step headers are left aligned */
body.woocommerce-checkout #fc-wrapper .fc-step__title {
    text-align: left !important;
    width: 100% !important;
    margin-bottom: 15px !important;
}

/* Fix for form container padding */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step {
    padding: 15px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* =========================
   Fix for completed steps
   ========================= */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    width: 100% !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text {
    flex: 1 !important;
    text-align: left !important;
    padding-right: 10px !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* =========================
   Fix mobile layout issues
   ========================= */
@media (max-width: 768px) {
    body.woocommerce-checkout #fc-wrapper .fc-sidebar__inner {
        position: relative !important;
        top: 0 !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .form-row-first,
    body.woocommerce-checkout #fc-wrapper .form-row-last {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
        flex-wrap: wrap !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text {
        width: 100% !important;
        padding-right: 0 !important;
        margin-bottom: 10px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
        width: 100% !important;
        text-align: right !important;
    }
}

/* === Comprehensive Fix for Sticky Sidebar === */
/* Fix the sticky sidebar container - improved implementation */
body.woocommerce-checkout .fc-content {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 30px !important;
    width: 100% !important;
}

body.woocommerce-checkout .fc-content > .fc-checkout-steps-wrapper {
    flex: 1 1 60% !important;
    width: 60% !important;
    max-width: 60% !important;
    box-sizing: border-box !important;
}

body.woocommerce-checkout .fc-content > .fc-checkout-order-review-wrapper.fc-sidebar {
    flex: 0 0 36% !important;
    width: 36% !important;
    max-width: 36% !important;
    box-sizing: border-box !important;
    position: relative !important;
    margin: 0 !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.woocommerce-checkout .fc-content > .fc-checkout-order-review-wrapper.fc-sidebar .fc-sidebar__inner {
    position: sticky !important;
    top: 30px !important;
    padding: 15px !important;
    background-color: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
}

/* === Form Fields & Text Fixes === */
/* Improve form field styling and alignment */
body.woocommerce-checkout #fc-wrapper .form-row {
    margin-bottom: 15px !important;
    width: 100% !important;
    clear: both !important;
    text-align: left !important;
}

body.woocommerce-checkout #fc-wrapper .form-row label {
    display: block !important;
    margin-bottom: 5px !important;
    text-align: left !important;
    font-weight: 500 !important;
    color: #333 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

body.woocommerce-checkout #fc-wrapper .form-row input[type="text"],
body.woocommerce-checkout #fc-wrapper .form-row input[type="tel"],
body.woocommerce-checkout #fc-wrapper .form-row input[type="email"],
body.woocommerce-checkout #fc-wrapper .form-row select,
body.woocommerce-checkout #fc-wrapper .form-row textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
}

/* Fix for two column fields */
body.woocommerce-checkout #fc-wrapper .form-row-first,
body.woocommerce-checkout #fc-wrapper .form-row-last {
    width: 48% !important;
    float: left !important;
    clear: none !important;
    box-sizing: border-box !important;
}

body.woocommerce-checkout #fc-wrapper .form-row-first {
    margin-right: 4% !important;
}

/* Improved completed steps layout */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    width: 100% !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-title {
    display: none !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text {
    flex: 1 !important;
    padding-right: 10px !important;
    text-align: left !important;
    width: auto !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content {
    padding: 0 !important;
    text-align: left !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content .fc-step__substep-text-line {
    font-size: 0.95em !important;
    line-height: 1.5 !important;
    text-align: left !important;
    margin-bottom: 2px !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* === Responsive Fixes === */
@media (max-width: 768px) {
    body.woocommerce-checkout .fc-content {
        flex-direction: column !important;
    }
    
    body.woocommerce-checkout .fc-content > .fc-checkout-steps-wrapper,
    body.woocommerce-checkout .fc-content > .fc-checkout-order-review-wrapper.fc-sidebar {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-right: 0 !important;
    }
    
    body.woocommerce-checkout .fc-content > .fc-checkout-order-review-wrapper.fc-sidebar .fc-sidebar__inner {
        position: relative !important;
        top: 0 !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .form-row-first,
    body.woocommerce-checkout #fc-wrapper .form-row-last {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
        flex-wrap: wrap !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text {
        width: 100% !important;
        padding-right: 0 !important;
        margin-bottom: 10px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
        width: auto !important;
        margin-left: auto !important;
    }
}

/* === Fix for Vertically Stacked Text Elements === */
body.woocommerce-checkout .fc-step__substep-text-line,
body.woocommerce-checkout #fc-wrapper .fc-step__substep-text-content .fc-step__substep-text-line,
body.woocommerce-checkout #fc-wrapper .fc-step__substep-text,
body.woocommerce-checkout #fc-wrapper .fc-step__substep-text-content,
body.woocommerce-checkout .fc-sidebar .fc-checkout-order-review-list__item,
body.woocommerce-checkout .fc-sidebar .fc-checkout-order-review-list__item-name,
body.woocommerce-checkout .fc-sidebar .fc-checkout-order-review-list__item-quantity,
body.woocommerce-checkout .fc-sidebar .fc-checkout-order-review-list__item-price {
    display: block !important;
    width: auto !important;
    min-width: 100px !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: normal !important;
    word-wrap: normal !important;
    text-align: left !important;
    height: auto !important;
    writing-mode: horizontal-tb !important;
    direction: ltr !important;
    text-orientation: mixed !important;
    line-height: 1.5 !important;
}

/* Fix for email output in completed steps */
body.woocommerce-checkout #fc-wrapper .fc-step__substep[data-substep-id="contact"] .fc-step__substep-text-content {
    display: block !important;
    width: 100% !important;
    word-break: break-word !important;
    white-space: normal !important;
    writing-mode: horizontal-tb !important;
}

/* === Comprehensive Fix for Sticky Sidebar (Second Attempt) === */
/* Reset the main flexbox layout */
body.woocommerce-checkout .fc-content {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    clear: both !important;
    box-sizing: border-box !important;
}

/* Create a two-column layout with floating elements */
body.woocommerce-checkout .fc-content > .fc-checkout-steps-wrapper {
    float: left !important;
    width: 60% !important;
    box-sizing: border-box !important;
    padding-right: 20px !important;
    clear: left !important;
}

body.woocommerce-checkout .fc-content > .fc-checkout-order-review-wrapper.fc-sidebar {
    float: right !important;
    width: 36% !important;
    box-sizing: border-box !important;
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    clear: right !important;
}

body.woocommerce-checkout .fc-content > .fc-checkout-order-review-wrapper.fc-sidebar .fc-sidebar__inner {
    position: sticky !important;
    top: 30px !important;
    padding: 15px !important;
    background-color: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
}

/* Clear floating elements */
body.woocommerce-checkout .fc-content:after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

/* Fix completed steps layout */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
    display: block !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    width: 100% !important;
    position: relative !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text {
    display: block !important;
    width: 80% !important;
    text-align: left !important;
    padding-right: 50px !important; /* Make room for the edit button */
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
    position: absolute !important;
    top: 10px !important;
    right: 0 !important;
    white-space: nowrap !important;
}

/* === Responsive Fixes === */
@media (max-width: 768px) {
    body.woocommerce-checkout .fc-content > .fc-checkout-steps-wrapper,
    body.woocommerce-checkout .fc-content > .fc-checkout-order-review-wrapper.fc-sidebar {
        float: none !important;
        width: 100% !important;
        padding-right: 0 !important;
    }
    
    body.woocommerce-checkout .fc-content > .fc-checkout-order-review-wrapper.fc-sidebar .fc-sidebar__inner {
        position: relative !important;
        top: 0 !important;
        max-height: none !important;
        overflow-y: visible !important;
        margin-top: 20px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper .form-row-first,
    body.woocommerce-checkout #fc-wrapper .form-row-last {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }
}

/* Ensure all inputs have proper alignment */
body.woocommerce-checkout #fc-wrapper input,
body.woocommerce-checkout #fc-wrapper select,
body.woocommerce-checkout #fc-wrapper textarea {
    text-align: left !important;
}

/* === Fix for Checkout Sidebar Layout === */
body.woocommerce-checkout #fc-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

body.woocommerce-checkout #fc-wrapper > .fc-inside {
    width: 62% !important;
    float: left !important;
    padding-right: 30px !important;
    box-sizing: border-box !important;
    flex: 0 0 62% !important;
}

body.woocommerce-checkout #fc-wrapper > .fc-sidebar {
    width: 38% !important;
    float: right !important;
    box-sizing: border-box !important;
    flex: 0 0 38% !important;
    margin-left: 0 !important;
    position: relative !important;
}

body.woocommerce-checkout #fc-wrapper > .fc-sidebar .fc-sidebar__inner {
    position: sticky !important;
    top: 30px !important;
    background-color: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 15px !important;
}

/* Clear the floats */
body.woocommerce-checkout #fc-wrapper:after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

/* === Mobile Responsiveness === */
@media (max-width: 768px) {
    body.woocommerce-checkout #fc-wrapper > .fc-inside,
    body.woocommerce-checkout #fc-wrapper > .fc-sidebar {
        width: 100% !important;
        float: none !important;
        flex: 0 0 100% !important;
        padding-right: 0 !important;
    }
    
    body.woocommerce-checkout #fc-wrapper > .fc-sidebar {
        margin-top: 20px !important;
    }
    
    body.woocommerce-checkout #fc-wrapper > .fc-sidebar .fc-sidebar__inner {
        position: relative !important;
        top: 0 !important;
    }
}

/* === Fix for Checkout Sidebar Layout - Respecting Plugin Sticky functionality === */
body.woocommerce-checkout #fc-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

/* Keep left checkout steps at 60% width */
body.woocommerce-checkout .fc-inside {
    width: 62% !important;
    float: left !important;
    padding-right: 30px !important;
    box-sizing: border-box !important;
    flex: 0 0 62% !important;
}

/* Set right sidebar width but preserve sticky functionality */
body.woocommerce-checkout .fc-sidebar.is-activated {
    width: 38% !important;
    float: right !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    flex: 0 0 38% !important;
    position: relative !important; /* Keep relative positioning */
}

/* Keep the inner content sticky but improve appearance */
body.woocommerce-checkout .fc-sidebar.is-activated .fc-sidebar__inner {
    position: sticky !important;
    top: 30px !important;
    padding: 15px !important;
    background-color: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    z-index: 100 !important; /* Ensure it stays above other content */
    max-height: calc(100vh - 60px) !important; /* Limit height to viewport minus some space */
    overflow-y: auto !important; /* Allow scrolling if content is too tall */
    transition: top 0.2s ease !important; /* Smooth transition for sticky behavior */
}

/* Ensure the order review content is well styled */
body.woocommerce-checkout .fc-checkout-order-review {
    margin: 0 !important;
    padding: 0 !important;
}

/* Fix for potential z-index issues */
body.woocommerce-checkout .fc-wrapper {
    position: relative !important;
    z-index: 1 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    body.woocommerce-checkout .fc-inside,
    body.woocommerce-checkout .fc-sidebar.is-activated {
        width: 100% !important;
        float: none !important;
        flex: 0 0 100% !important;
        padding-right: 0 !important;
    }
    
    body.woocommerce-checkout .fc-sidebar.is-activated {
        margin-top: 20px !important;
    }
    
    body.woocommerce-checkout .fc-sidebar.is-activated .fc-sidebar__inner {
        position: relative !important;
        top: 0 !important;
        max-height: none !important;
    }
}

/* === Direct Fix for Sticky Sidebar and Layout Issues === */
/* Make sure the sidebar sticks directly on the right side without interference */
.fc-sidebar.is-activated {
    position: sticky !important;
    top: 70px !important; /* Position below the progress bar */
    height: auto !important;
    width: 350px !important;
    float: right !important;
    margin-left: 30px !important;
    z-index: 99 !important;
}

/* Make sure the inner content is properly styled */
.fc-sidebar.is-activated .fc-sidebar__inner {
    background-color: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 20px !important; /* Increased padding for better spacing */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    max-height: calc(100vh - 100px) !important;
    overflow-y: auto !important;
}

/* Set main content to take remaining space */
.fc-inside {
    width: calc(100% - 380px) !important;
    float: left !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
}

/* Fix text alignment in sidebar */
.fc-sidebar .product-details,
.fc-sidebar .fc-checkout-order-review-title,
.fc-sidebar .woocommerce-checkout-review-order-table th,
.fc-sidebar .woocommerce-gzd-legal-checkbox-text {
    text-align: left !important;
    display: block !important;
    word-break: normal !important;
    white-space: normal !important;
}

/* Improve spacing for items */
.fc-sidebar .cart_item {
    padding: 15px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.fc-sidebar .product-name {
    display: flex !important;
    align-items: flex-start !important;
    margin-bottom: 10px !important;
}

.fc-sidebar .product-name img {
    max-width: 70px !important;
    margin-right: 15px !important;
}

.fc-sidebar .product-details {
    flex: 1 !important;
}

/* Fix alignment of prices */
.fc-sidebar .shop_table td {
    text-align: right !important;
}

/* Make sure checkout step headers and progress bar don't interfere */
.fc-progress-bar.is-sticky--top {
    z-index: 100 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: #fff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Ensure we have space for the progress bar */
.fc-wrapper {
    padding-top: 60px !important;
}

/* Mobile fixes */
@media (max-width: 768px) {
    .fc-inside,
    .fc-sidebar.is-activated {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
    }
    
    .fc-sidebar.is-activated {
        position: relative !important;
        top: 0 !important;
        margin-top: 70px !important;
    }
}

/* === FIXED CHECKOUT LAYOUT WITH PROPER STICKY BEHAVIOR === */

/* Crucial fix for the parent containers to allow sticky elements to work */
body, html {
    overflow-x: clip !important;
    height: auto !important;
}

/* Force parent wrappers to allow sticky behavior */
.fc-wrapper, 
#fc-wrapper, 
.woocommerce-checkout {
    overflow: visible !important;
    position: relative !important;
    height: auto !important;
    min-height: 100vh !important;
}

/* 1. Main Container Layout */
body.woocommerce-checkout .fc-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-top: 60px !important; /* Space for the sticky progress bar */
    position: relative !important;
    overflow: visible !important; /* This is crucial for sticky elements */
    height: auto !important; /* Ensure the container expands with content */
}

/* 2. Left content column */
body.woocommerce-checkout .fc-inside {
    width: 65% !important;
    padding-right: 30px !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: visible !important;
    float: left !important;
}

/* 3. DIRECT FIX FOR THE SIDEBAR */
body.woocommerce-checkout .fc-sidebar.is-activated,
div.fc-sidebar.is-activated {
    width: 35% !important;
    box-sizing: border-box !important;
    position: relative !important; /* Parent element relative positioning */
    overflow: visible !important; /* Critical for sticky to work */
    height: auto !important;
    float: right !important;
    transform: translateZ(0) !important; /* Force hardware acceleration */
}

/* 4. DIRECT TARGET FOR THE INNER SIDEBAR ELEMENT */
body.woocommerce-checkout .fc-sidebar.is-activated .fc-sidebar__inner,
div.fc-sidebar.is-activated .fc-sidebar__inner,
body.woocommerce-checkout .fc-sidebar .fc-sidebar__inner,
[data-sticky-states-inner] {
    position: sticky !important;
    top: 90px !important; /* Position below the progress bar */
    margin-bottom: 30px !important;
    padding: 20px !important;
    background-color: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    max-height: calc(100vh - 120px) !important;
    overflow-y: auto !important; /* Allow scrolling if content is too tall */
    overflow-x: clip !important; /* Use clip instead of hidden for X-axis overflow */
    height: auto !important;
    z-index: 99 !important; /* Keep it below the progress bar */
    will-change: position, transform !important; /* Performance hint for browser */
}

/* 5. Progress bar styling and positioning */
body.woocommerce-checkout .fc-progress-bar.is-sticky--top {
    z-index: 100 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background-color: #fff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Remove any overflow hidden that might be interfering */
body.woocommerce-checkout .fc-content, 
body.woocommerce-checkout .fc-checkout-steps-wrapper,
body.woocommerce-checkout .fc-checkout-order-review-wrapper {
    overflow: visible !important;
}

/* Mobile fixes - maintain relative positioning on small screens */
@media (max-width: 768px) {
    body.woocommerce-checkout .fc-inside,
    body.woocommerce-checkout .fc-sidebar.is-activated {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
    }
    
    body.woocommerce-checkout .fc-sidebar.is-activated {
        position: relative !important;
        top: 0 !important;
        margin-top: 30px !important;
    }
    
    body.woocommerce-checkout .fc-sidebar.is-activated .fc-sidebar__inner {
        position: relative !important;
        top: 0 !important;
        max-height: none !important;
    }
    
    body.woocommerce-checkout .fc-progress-bar.is-sticky--top {
        width: 100% !important; /* Control the width expansion explicitly */
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Make progress bar invisible */
body.woocommerce-checkout .fc-progress-bar {
    display: none !important;
}



/* Adjust sidebar top position */
body.woocommerce-checkout #fc-wrapper > .fc-sidebar .fc-sidebar__inner {
    top: 40px !important;
}

/* Increase width of completed steps text */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text {
    width: 98% !important;
}

/* Fix search popup padding */
.ninetheme-popup-search.type-popup {
    padding: 0 !important;
}

/* Add margin to substep titles */
body.woocommerce-checkout div.woocommerce .fc-wrapper .fc-step__substep .fc-step__substep-title {
    margin-top: 14px !important;
}

/* Remove top padding from wrapper */
.fc-wrapper {
    padding-top: 0 !important;
}

/* Remove padding from element */
.elementor-9 .elementor-element.elementor-element-57aa42b3 {
    padding: 0 !important;
}

/* === Foxpay Payment Gateway Fixes === */

/* Fix header full width and interactivity */
.ninetheme-header.bg-light.style-1 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    display: block !important;
    position: relative !important;
    z-index: 100 !important;
}

.ninetheme-header .ninetheme-header-inner {
    width: 100% !important;
    max-width: 1400px !important; /* Match the site's max-width */
    margin: 0 auto !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
}

/* Make navigation menu interactive */
.ninetheme-header .main-navigation ul li a:hover {
    color: #b71c32 !important; /* Use brand color for hover state */
    transition: color 0.3s ease !important;
}

.ninetheme-header .main-navigation ul > li:hover > ul {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Fix Foxpay payment container to fit within boxed layout */
body.woocommerce-order-pay .foxpay-payment-container {
    width: 100% !important;
    max-width: 1200px !important; /* Match the site's max-width */
    min-width: auto !important; /* Remove the 100vw min-width */
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Ensure iframe container doesn't overflow */
.foxpay-payment-container .foxpay-iframe-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

#foxpay-payment-iframe {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 600px !important;
}

/* Fix footer display */
.site-footer,
.ninetheme-footer,
.ninetheme-copyright {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    position: relative !important;
    clear: both !important;
    margin-top: 30px !important;
}

.ninetheme-footer .ninetheme-footer-inner,
.ninetheme-copyright .ninetheme-copyright-inner {
    width: 100% !important;
    max-width: 1200px !important; /* Match the site's max-width */
    margin: 0 auto !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
}

/* Media queries for responsive layout */
@media (max-width: 768px) {
    body.woocommerce-order-pay .foxpay-payment-container {
        padding: 0 10px !important;
    }
    
    .ninetheme-header .ninetheme-header-inner,
    .ninetheme-footer .ninetheme-footer-inner,
    .ninetheme-copyright .ninetheme-copyright-inner {
        padding: 0 10px !important;
    }
}

/* === Foxpay Plugin CSS Overrides === */

/* Override plugin's body styles to prevent full-width container */
body.woocommerce-order-pay {
    width: auto !important;
    max-width: none !important;
    min-width: auto !important;
    overflow-x: hidden !important;
}

/* Reset and override the payment container styles completely */
body.woocommerce-order-pay .foxpay-payment-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    min-width: auto !important;
    min-height: auto !important;
    box-shadow: none !important;
    border: none !important;
}

/* Remove any fixed width constraints from container elements */
body.woocommerce-order-pay #main,
body.woocommerce-order-pay #primary,
body.woocommerce-order-pay .content-area,
body.woocommerce-order-pay .site-content,
body.woocommerce-order-pay .entry-content,
body.woocommerce-order-pay .woocommerce {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Fix for iframe to fit within container */
#foxpay-payment-iframe {
    width: 100% !important;
    min-width: auto !important;
    max-width: 100% !important;
    border: none !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Ensure page layout isn't disrupted */
.woocommerce {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

/* Fix header and footer when on payment page */
body.woocommerce-order-pay .site-header,
body.woocommerce-order-pay .site-branding,
body.woocommerce-order-pay header.site-header,
body.woocommerce-order-pay #masthead {
    display: block !important;
    flex-direction: unset !important;
    align-items: unset !important;
    justify-content: unset !important;
}

/* Fix container padding */
body.woocommerce-order-pay .nt-ninetheme-inner-container.section-padding {
    padding: 30px 0 !important;
}

/* === Foxpay Full-width Fix === */

/* Target the container and all parent wrappers */
body.woocommerce-order-pay .entry-content,
body.woocommerce-order-pay #main,
body.woocommerce-order-pay #primary,
body.woocommerce-order-pay .content-area,
body.woocommerce-order-pay .site-content,
body.woocommerce-order-pay .woocommerce,
body.woocommerce-order-pay article,
body.woocommerce-order-pay .hentry,
body.woocommerce-order-pay .nt-ninetheme-inner-container,
body.woocommerce-order-pay div[id^="elementor"],
body.woocommerce-order-pay div[class^="elementor"],
body.woocommerce-order-pay .elementor-widget-container,
body.woocommerce-order-pay .elementor-element,
body.woocommerce-order-pay #wrapper,
body.woocommerce-order-pay div[id^="page"],
body.woocommerce-order-pay #page {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Target specifically the payment container and inner elements */
body.woocommerce-order-pay .foxpay-payment-container,
body.woocommerce-order-pay div.foxpay-payment-container,
#foxpay-payment-container,
.foxpay-payment-container {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    background-color: #f8f9fa;
    min-height: 2400px !important; /* Increased minimum height */
    height: auto !important; /* Allow expansion if needed */
}

/* Target the iframe container */
body.woocommerce-order-pay .foxpay-iframe-container,
.foxpay-iframe-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background-color: #f8f9fa;
    min-height: 2400px !important; /* Increased minimum height */
    height: auto !important; /* Allow expansion if needed */
}

/* Target the iframe itself */
#foxpay-payment-iframe,
body.woocommerce-order-pay #foxpay-payment-iframe {
    width: 100% !important;
    display: block !important;
    min-height: 2400px !important; /* Increased minimum height */
    height: 2400px !important; /* Fixed height increased */
    margin: 0 auto !important;
    border: none !important;
    box-shadow: none !important;
}

/* Target the header/content elements */
.foxpay-payment-header,
.foxpay-payment-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background-color: #f8f9fa;
}

/* Reset footer text styling */
.foxpay-footer-text {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    margin-top: 20px !important;
    padding: 10px !important;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    body.woocommerce-order-pay .foxpay-payment-container,
    body.woocommerce-order-pay div.foxpay-payment-container,
    #foxpay-payment-container,
    .foxpay-payment-container {
        width: 100vw !important;
        min-width: 100vw !important;
    }
    
    #foxpay-payment-iframe,
    body.woocommerce-order-pay #foxpay-payment-iframe {
        min-height: 700px !important;
    }
}

@media (max-width: 480px) {
    #foxpay-payment-iframe,
    body.woocommerce-order-pay #foxpay-payment-iframe {
        min-height: 600px !important;
    }
}

/* Hide footer completely on the payment page */
body.woocommerce-order-pay .site-footer,
body.woocommerce-order-pay .ninetheme-footer,
body.woocommerce-order-pay .ninetheme-copyright,
body.woocommerce-order-pay footer,
body.woocommerce-order-pay .footer,
body.woocommerce-order-pay .footer-template {
    display: none !important;
    visibility: hidden !important;
}

/* Ensure iframe container expands to full height */
body.woocommerce-order-pay .foxpay-payment-container,
body.woocommerce-order-pay div.foxpay-payment-container,
#foxpay-payment-container,
.foxpay-payment-container {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    background-color: #f8f9fa;
    min-height: 100vh !important; /* Make it at least full viewport height */
}

/* Target the iframe container */
body.woocommerce-order-pay .foxpay-iframe-container,
.foxpay-iframe-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background-color: #f8f9fa;
    min-height: 100vh !important; /* Full viewport height */
}

/* Target the iframe itself */
#foxpay-payment-iframe,
body.woocommerce-order-pay #foxpay-payment-iframe {
    width: 100% !important;
    display: block !important;
    min-height: 100vh !important; /* Full viewport height */
    height: 100vh !important; /* Full viewport height */
    margin: 0 auto !important;
    border: none !important;
    box-shadow: none !important;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    body.woocommerce-order-pay .foxpay-payment-container,
    body.woocommerce-order-pay div.foxpay-payment-container,
    #foxpay-payment-container,
    .foxpay-payment-container {
        width: 100vw !important;
        min-width: 100vw !important;
        min-height: 100vh !important; /* Full viewport height */
    }
    
    #foxpay-payment-iframe,
    body.woocommerce-order-pay #foxpay-payment-iframe {
        min-height: 100vh !important; /* Full viewport height */
        height: 100vh !important; /* Full viewport height */
    }
}

/* Hide duplicate search forms - fixing double display issue */
.ninetheme-popup-search .search-form-found:not(:first-of-type) {
    display: none !important;
}
