/* ========================================================================
   Cipriani custom fixes — maintainable, replaces footer style hacks
   ======================================================================== */

/* --- Megamenu: full viewport width dropdown (desktop only) --- */
@media (min-width: 992px) {
    .navigation .nav-main-menu li.mega-menu-fullwidth > ul.dropdown-menu {
        width: 100vw !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
        box-sizing: border-box;
        padding-left: 40px;
        padding-right: 40px;
    }
}

/* --- Footer: left-align list items with slight indent --- */
.footer-wrapper ul {
    width: 100% !important;
    margin: 0 !important;
    padding-left: 15px !important;
    list-style: none;
}
.footer-wrapper ul li {
    text-align: left !important;
    padding: 5px 0;
}
.footer-wrapper ul li a {
    text-align: left !important;
}
@media screen and (max-width: 720px) {
    .footer-wrapper ul {
        width: 100% !important;
        margin: 0 !important;
        padding-left: 15px !important;
        gap: 10px !important;
    }
}

/* --- Price filter: hide duplicate empty slider items (price only) --- */
.filter-options-content .ln_slider_container + .ln_slider_container,
.filter-options-content li.item:has(.ln_slider_container) ~ li.item:has(.ln_slider_container) {
    display: none !important;
}
.filter-options-content li.item:has(.ln_slider_container):not(:first-child) {
    display: none !important;
}

/* === Cart page: Move Proceed to Checkout below order summary, above Continue Shopping === */
/* Make the cart summary a flex column so we can reorder */
.cart-summary {
    display: flex !important;
    flex-direction: column !important;
}

/* Order summary / totals stay at top */
.cart-summary .cart-totals {
    order: 1 !important;
}

/* Proceed to checkout button container right after totals */
.cart-summary .checkout-methods-items {
    order: 2 !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
}

/* Continue shopping and other elements after */
.cart-summary .block.shipping,
.cart-summary .block.discount {
    order: 3 !important;
}

/* Green Proceed to Checkout button */
.cart-summary .checkout-methods-items .action.primary.checkout,
.cart-summary .checkout-methods-items .action.primary {
    background-color: #3bb54a !important;
    border-color: #3bb54a !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 14px 20px !important;
    width: 100% !important;
    text-transform: uppercase !important;
}

.cart-summary .checkout-methods-items .action.primary.checkout:hover,
.cart-summary .checkout-methods-items .action.primary:hover {
    background-color: #2ea03d !important;
    border-color: #2ea03d !important;
}

/* Also style the totals container */
#cart-totals {
    order: 1 !important;
}

.checkout.methods .item {
    margin-bottom: 10px !important;
}

/* === Mobile: Sticky Proceed to Checkout button at bottom of viewport === */
@media screen and (max-width: 767px) {
    /* Create a sticky checkout button fixed at bottom of screen on mobile */
    .cart-summary .checkout-methods-items {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 999 !important;
        background: #ffffff !important;
        padding: 12px 15px !important;
        margin: 0 !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15) !important;
        order: unset !important;
    }

    .cart-summary .checkout-methods-items .action.primary.checkout,
    .cart-summary .checkout-methods-items .action.primary {
        margin: 0 !important;
        padding: 16px 20px !important;
        font-size: 18px !important;
        border-radius: 6px !important;
    }

    /* Add bottom padding to page so content is not hidden behind the sticky button */
    .checkout-cart-index .page-wrapper {
        padding-bottom: 80px !important;
    }
}
