
.order-option{
    line-height: normal;
 }
 .cart-items-box{
     /* height: calc(-100px + 30vh); */
     overflow-y: auto;
     padding-bottom: 10px; /* Reduced padding to prevent overflow */
     border-radius: 10px;
     /* background-color: #C1DADE; */
     flex: 0 0 auto; /* Don't grow, don't shrink, auto size */
     min-height: 0; /* Allow flex item to shrink */
     max-height: 200px; /* Reduced from calc(100% - 150px) to fixed 200px */
     box-sizing: border-box; /* Include padding in height calculations */
 }

/* Ensure cart items don't push bottom section out of view */
.footer-avoidance-mode .cart-items-box {
    max-height: 150px; /* Reduced to fixed height */
    overflow-y: auto;
}

/* General cart items box height management */
.cart-items-box {
    max-height: 200px; /* Reduced to fixed height instead of calc */
}

/* Ensure bottom section stays within cart container */
.cart-area .bottom {
    position: relative !important;
    bottom: auto !important;
    margin-bottom: 0 !important;
    padding-bottom: 10px !important;
}

/* AGGRESSIVE ZOOM-LEVEL FIXES - Force containment at all zoom levels */
#cart-container {
    overflow: hidden !important;
    box-sizing: border-box !important;
    position: fixed !important;
    max-height: calc(100vh - 150px) !important;
    height: calc(100vh - 150px) !important;
    top: 200px !important;
    right: 20px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Ensure cart container has proper visual boundaries */
#cart-container::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: #e0e0e0 !important;
    z-index: 1000 !important;
}

#cart-content {
    overflow: hidden !important;
    box-sizing: border-box !important;
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
}

.cart-items-box {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: calc(100% - 160px) !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
}

.bottom {
    flex-shrink: 0 !important;
    max-height: 120px !important;
    min-height: 80px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    position: relative !important;
    bottom: 0 !important;
    margin-bottom: 0 !important;
    margin-top: auto !important;
    padding: 8px 15px 8px 15px !important;
    background: white !important;
    border-top: 1px solid #e0e0e0 !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    width: 100% !important;
}

/* Ensure bottom section content stays within bounds */
.bottom * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Force subtotal to stay within bottom section */
.bottom .subtotal,
.bottom .cart-subtotal {
    margin-bottom: 5px !important;
    padding: 0 !important;
    max-height: 30px !important;
    overflow: hidden !important;
}

#checkoutbtn {
    max-height: 50px !important;
    min-height: 40px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    border-radius: 0 !important;
    border: none !important;
    outline: none !important;
}

/* Ensure button background doesn't extend beyond container */
#checkoutbtn::before,
#checkoutbtn::after {
    display: none !important;
}

/* Force button to stay within bottom section */
.bottom #checkoutbtn {
    margin: 5px 0 0 0 !important;
    padding: 8px 12px !important;
    height: 40px !important;
    max-height: 40px !important;
    min-height: 40px !important;
    line-height: 1.2 !important;
    display: block !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-clip: padding-box !important;
    background-origin: padding-box !important;
    overflow: visible !important;
    font-size: 14px !important;
}

/* CRITICAL: Force button to not extend beyond bottom section */
.bottom {
    padding-bottom: 8px !important;
    margin-bottom: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

/* Ensure bottom section has a hard stop */
.bottom::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: white !important;
    z-index: 999 !important;
}

/* SPECIFIC FIX: Ensure bottom section is not cut off by cart container */
#cart-container .bottom {
    position: relative !important;
    z-index: 10 !important;
    margin-bottom: 0 !important;
    padding-bottom: 10px !important;
    overflow: hidden !important;
    max-height: 120px !important;
    flex-shrink: 0 !important;
}

/* Ensure checkout button is fully visible */
#cart-container .bottom #checkoutbtn {
    position: relative !important;
    z-index: 11 !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
    max-height: none !important;
}

/* Revert to simple approach - reduced height should fix the issue */

/* FORCE cart position to use space above */
#cart-container {
    top: 200px !important;
    right: 20px !important;
    position: fixed !important;
}

/* Override any other cart positioning */
.cart-container,
#cart-container-large,
.cart-modal {
    top: 200px !important;
    right: 20px !important;
    position: fixed !important;
}

/* Remove conflicting clip-path rules that were causing the issue */

/* Mobile specific fixes */
@media screen and (max-width: 768px) {
    #cart-container {
        height: 100vh !important;
        max-height: 100vh !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        /* Hide cart by default on mobile */
        display: none !important;
        position: fixed !important;
        z-index: 9999 !important;
        /* Override any height constraints for full screen */
        bottom: 0 !important;
    }
    
    /* Show cart only when cart is opened */
    #cart-container.cart-open {
        display: block !important;
    }
    
    .cart-items-box {
        max-height: 120px !important; /* Significantly reduced from calc(100vh - 160px) */
    }
}

/* Desktop specific fixes */
@media screen and (min-width: 769px) {
    #cart-container {
        max-height: calc(100vh - 150px) !important;
        height: calc(100vh - 150px) !important;
        top: 143px !important;
        right: 20px !important;
        max-width: 350px !important;
    }
    
    .cart-items-box {
        max-height: 150px !important; /* Significantly reduced from calc(100vh - 290px) */
    }
}
 .unclickable {
   pointer-events: none;
   opacity: 0.5;
   cursor: not-allowed;
 }
  
#cart-container {
    width: 350px;
    position: fixed;
    top: 150px;
    height: calc(100vh - 200px);
    max-width: 350px;
    z-index: 11;
    right: 20px;
    transition: top 0.3s ease-in-out, transform 0.3s ease-in-out, height 0.3s ease-in-out;
    bottom: 20px; /* Ensure cart doesn't go below this point */
    max-height: calc(100vh - 170px); /* Ensure cart doesn't exceed viewport */
    overflow: hidden; /* Prevent content from overflowing the container */
    box-sizing: border-box; /* Include padding and borders in width/height */
}

#cart-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden; /* Prevent content from overflowing */
}

/* Removed duplicate .bottom rule - using the main one above */

/* Ensure bottom section is always visible */
.footer-avoidance-mode .bottom {
    position: sticky;
    bottom: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* Ensure bottom section is always visible in all cases - handled in main .bottom rule */

/* Make sure checkout button is always visible */
#checkoutbtn {
    margin-bottom: 0 !important; /* Remove bottom margin to prevent overflow */
    min-height: 50px;
    width: 100% !important;
    box-sizing: border-box; /* Ensure button stays within container */
    display: block !important; /* Force button to be visible */
    visibility: visible !important;
    opacity: 1 !important;
}

/* Adjust cart layout to accommodate timing section and checkout button */
#cart-container {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* Timing section styling */
#cart-container .row.d-block {
    flex-shrink: 0 !important;
    margin-bottom: 2px !important;
}

/* Cart content area - adjust height to leave space for timing and checkout */
#cart-content {
    flex: 1 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Cart items box - make it scrollable if needed */
.cart-items-box {
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    max-height: calc(100% - 120px) !important; /* Reduced reserved space for better visibility */
}

/* Bottom section with checkout button */
.bottom {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    padding: 5px 0 !important;
}

/* Reduce spacing between cart elements */
#cart-content h2 {
    margin-bottom: 4px !important;
    font-size: 20px !important;
}

/* Reduce spacing around delivery/collection toggle */
.delivery-collection-switch {
    margin: 3px 0 !important;
}

/* Reduce spacing in cart items box */
.cart-items-box {
    margin: 3px 0 !important;
}

/* Optimize cart layout for better space utilization */
#cart-content {
    padding: 0.25rem !important; /* Minimal padding */
}

/* Ensure cart items are fully visible */
.cart-items-box {
    min-height: 200px !important; /* Ensure minimum space for items */
    padding: 0.5rem 0 !important; /* Minimal padding */
}

/* Reduce bottom section padding */
.bottom {
    padding: 3px 0 !important;
}
 @media only screen and (max-width: 768px) {
    #cart-container {
        z-index: 1100;
        width: 100vw !important;
        max-width: 100vw !important;
        right: 0;
        left: 0;
        top: 0;
        height: 100vh;
        /* Hide cart by default on mobile */
        display: none !important;
        position: fixed !important;
    }
    
    /* Show cart only when opened */
    #cart-container.cart-open {
        display: block !important;
    }
    
    /* Ensure cart button is visible on mobile - positioned above navigation bar */
    .cart-container {
        display: block !important;
        bottom: 80px !important; /* Above mobile navigation bar */
        right: 80px !important; /* Left of scroll-to-top button */
    }
    
    /* Hide cart button when cart is open on mobile - Multiple selectors for reliability */
    .cart-open .cart-container,
    body.cart-open .cart-container,
    #cart-container.cart-open ~ .cart-container,
    #cart-container.cart-open + .cart-container,
    .cart-container.cart-open {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Mobile cart layout adjustments for timing and checkout button */
    #cart-container.cart-open {
        display: flex !important; /* Use flex for proper layout */
        flex-direction: column !important;
    }
    
    /* Mobile cart content adjustments */
    #cart-content {
        height: auto !important; /* Let it size naturally */
        flex: 1 !important;
        min-height: 0 !important;
    }
    
    .cart-items-box {
        max-height: calc(100vh - 180px) !important; /* Further reduced for better visibility */
        overflow-y: auto !important;
        min-height: 300px !important; /* Ensure adequate space for items */
    }
    
    /* Mobile cart content optimization */
    #cart-content {
        padding: 0.5rem !important;
    }
    
    /* Mobile bottom section optimization */
    .bottom {
        padding: 2px 0 !important;
    }
    
    /* Ensure timing section is visible on mobile */
    #cart-container .row.d-block {
        display: block !important;
        flex-shrink: 0 !important;
        margin-bottom: 1px !important;
    }
}

  .counter-box{
    background: #F5F3F1;
    width: fit-content; /* Adjusts to content */
    display: inline-block; /* Ensures width fits content */
    padding: 3px; /* Optional padding */
    border: 1px solid gray; /* Optional border */
    border-radius: 20px;
  }
.cart-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 4000;
    transition: bottom 0.3s ease-in-out, transform 0.3s ease-in-out;
    /* Ensure container doesn't capture clicks outside the button */
    pointer-events: none;
}

/* Cart button positioned at bottom-right corner above navigation bar */
@media screen and (max-width: 480px) {
    .cart-container {
        bottom: 80px; /* Above mobile navigation bar */
        right: 80px; /* Left of scroll-to-top button */
    }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
    .cart-container {
        bottom: 85px; /* Above mobile navigation bar */
        right: 85px; /* Left of scroll-to-top button */
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .cart-container {
        bottom: 30px; /* Desktop - normal bottom positioning */
        right: 25px;
    }
}

@media screen and (min-width: 1025px) {
    .cart-container {
        bottom: 30px; /* Desktop - normal bottom positioning */
        right: 30px;
    }
}

/* Ensure cart button is always visible - fallback positioning */
.cart-container {
    /* Ensure button stays within viewport bounds */
    position: fixed !important;
    z-index: 4000 !important;
}

.cart-btn {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 75%;
    background-color: #000000 !important; /* Force black background */
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease; /* Removed background transition */
    position: relative;
    /* Ensure button can receive clicks even when container has pointer-events: none */
    pointer-events: auto;
}

/* Hover Effect */
.cart-btn:hover {
    background-color: #000000 !important; /* Keep black on hover */
    transform: scale(1.1);
}

/* Cart Counter */
.cart-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: red;
    color: white;
    font-size: 8px;
    font-weight: bold;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.3);
    /* Ensure counter can receive clicks */
    pointer-events: auto;
}

/* FORCE CART BUTTON TO ALWAYS BE BLACK */
.cart-btn,
.cart-container .cart-btn,
#checkout-btn .cart-btn,
.cart-btn:focus,
.cart-btn:active,
.cart-btn:visited {
    background-color: #000000 !important;
    color: white !important;
}

.cart-btn:hover,
.cart-btn:focus:hover,
.cart-btn:active:hover {
    background-color: #000000 !important;
    color: white !important;
}

 .small-screen-cart{
    width: 100%;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh !important;
    z-index: 9999 !important;
 }
 
 #cart-small-screen-content {
     z-index: 11; /* Ensure it appears above other content */
 }
 
 @media (max-width: 992px) {
     /* Hide the cart content for large screens on small screens */
     #cart-container .d-lg-block {
         display: none;
     }
     
     /* Show timings section on mobile and tablet */
     #cart-container .row.d-block {
         display: block !important;
         flex-shrink: 0 !important;
         margin-bottom: 10px !important;
     }
     
     /* Show the cart content for small screens when the checkout button is clicked */
     #cart-small-screen-content {
         display: block;
     }
 }
 

 
 .w-100{
     width: 100% !important;
 }
 .cart-area {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.cart-area .btn-dark {
    background-color: #0c0303;
}

.cart-area .fa-trash {
    cursor: pointer;
}

.cart-area .border-top {
    border-top: 1px solid #e0e0e0;
}
#cart-container-large{
    position: fixed;
    top: 200px;
    height: calc(100vh - 40px);
    width:450px;
    z-index: 4000;
    transition: top 0.3s ease-in-out, transform 0.3s ease-in-out;
}


.delivery-collection-switch {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    overflow: hidden;
    width: 100%;
    border-radius: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.option {
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
    border-radius: 25px;
    padding: 8px 12px;
    background-color: transparent;
}

.option.active {
    background-color: #000000 !important;
    color: white !important;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transform: scale(1.02);
}

.option:hover {
    background-color: #f8f9fa;
    color: #000000;
    transform: scale(1.01);
}

.option.active:hover {
    background-color: #333333 !important;
    color: white !important;
}

.option.unclickable {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f9fa;
    color: #6c757d;
}

.option.unclickable:hover {
    background-color: #f8f9fa;
    color: #6c757d;
    transform: none;
}

.option.unclickable i {
    color: #6c757d;
}
.cart-item-name{
    color: #242e30 !important;
    font-weight: bolder;
    font-weight: 700;
    font-size: 16px;
    line-height: 20px;
    font-family: JETSansDigital, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Helvetica, Arial, sans-serif;
}
.cart-item-price{
    color: #242e30 !important;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    font-family: JETSansDigital, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Helvetica, Arial, sans-serif;
    white-space: nowrap;
    font-style: normal;
}
.cart-item-topings{
    color: #242e30 !important;
    font-weight: 400;
    font-size: 13px;
    line-height: 20px;
    font-family: JETSansDigital, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Helvetica, Arial, sans-serif;
    white-space: nowrap;
    font-style: normal;
}
.option i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.option.active i {
    color: white !important;
    transform: scale(1.1);
}

.option:hover i {
    color: #000000;
    transform: scale(1.05);
}

.btn2{
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: .375rem .75rem;
    font-size: 1rem;
    border-radius: .25rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
/* Hides the element on large screens and up */
.d-lg-none {
    display: none;
}

/* Displays the element as block on small screens */
.d-sm-block {
    display: block;
}

/* Media queries for responsiveness */
@media (min-width: 576px) {
    .d-sm-block {
        display: block;
    }
}

@media (min-width: 992px) {
    .d-lg-none {
        display: none;
    }
}


    #footer{
        z-index: 1000 !important;
        position: relative !important;
    }

/* Ensure footer is always above cart when visible */
footer, #footer {
    z-index: 1001 !important;
    position: relative !important;
}

/* Cart positioning for footer overlap prevention */
.cart-container, #cart-container-large {
    transition: bottom 0.3s ease-in-out, top 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* Cart footer avoidance mode - SMOOTH MOVEMENT */
#cart-container.footer-avoidance-mode {
    transition: top 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1002 !important; /* Ensure cart stays above footer */
    position: fixed !important;
}

/* Smooth transitions for all cart movements */
#cart-container {
    transition: top 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: top !important; /* Optimize for smooth animations */
    transform: translateZ(0) !important; /* Force hardware acceleration */
    backface-visibility: hidden !important; /* Improve rendering performance */
    /* Ensure cart never goes above header - handled by JavaScript */
}

/* Ensure cart maintains its structure when moved up */
#cart-container.footer-avoidance-mode #cart-content {
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Ensure cart items box maintains scrollability */
#cart-container.footer-avoidance-mode .cart-items-box {
    max-height: calc(100% - 160px) !important; /* Reserve space for bottom section */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* Ensure bottom section stays at bottom when cart moves up */
#cart-container.footer-avoidance-mode .bottom {
    flex-shrink: 0 !important;
    max-height: 120px !important;
    min-height: 80px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    position: relative !important;
    bottom: 0 !important;
    margin-bottom: 0 !important;
    margin-top: auto !important;
    padding: 8px 15px !important;
    background: white !important;
    border-top: 1px solid #e0e0e0 !important;
    width: 100% !important;
}

/* FORCE CART TO NEVER OVERLAP FOOTER */
@media (min-width: 992px) {
    #cart-container {
        transition: all 0.3s ease-in-out;
        /* Force cart to never go below 80% of viewport height */
        max-height: 80vh !important;
        /* Ensure cart stays above footer area */
        bottom: auto !important;
    }
}

/* AGGRESSIVE: Force cart positioning to prevent footer overlap */
#cart-container {
    /* Force maximum height to prevent footer overlap */
    max-height: calc(100vh - 200px) !important;
    /* Ensure cart content fits within bounds */
    overflow: hidden !important;
    /* Force cart to never go below 70% of viewport */
    bottom: 30vh !important;
}

/* MOBILE OVERRIDE: Remove height constraints on mobile for full screen */
@media screen and (max-width: 768px) {
    #cart-container {
        max-height: 100vh !important;
        bottom: 0 !important;
        height: 100vh !important;
    }
    
    /* AGGRESSIVE: Hide cart button when cart is open on mobile */
    body.cart-open .cart-container,
    .cart-open .cart-container,
    #cart-container.cart-open ~ .cart-container {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Hide cart button when any modal is open */
    .modal.show .cart-container,
    .modal-open .cart-container,
    body.modal-open .cart-container,
    #productModal.show ~ .cart-container,
    #productModal.show + .cart-container,
    .modal.show ~ .cart-container,
    .modal.show + .cart-container {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Additional modal hiding rules */
    .modal-backdrop.show ~ .cart-container,
    .modal-backdrop.show + .cart-container {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* ULTRA AGGRESSIVE: Force cart to never overlap footer */
#cart-container.footer-avoidance-mode {
    position: fixed !important;
    top: auto !important;
    bottom: 35vh !important; /* Increased from 30vh to 35vh for more safety */
    max-height: 55vh !important; /* Reduced from 60vh to 55vh for more safety */
    overflow: hidden !important;
    z-index: 1002 !important;
}

/* FORCE: Cart content to respect height limits */
#cart-container #cart-content {
    max-height: 100% !important;
    overflow: hidden !important;
}

/* FORCE: Cart items to be scrollable when needed - REDUCED AREA */
#cart-container .cart-items-box {
    max-height: 120px !important; /* Significantly reduced from calc(100% - 160px) */
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* TEMPLATE 10 SPECIFIC: Ensure cart doesn't overlap header */
body.template10 #cart-container,
.template10 #cart-container {
    top: 150px !important;
    max-height: calc(100vh - 200px) !important;
}

/* TEMPLATE 10 MOBILE: Full screen cart on mobile */
@media screen and (max-width: 768px) {
    body.template10 #cart-container,
    .template10 #cart-container {
        top: 0 !important;
        height: 100vh !important;
        max-height: 100vh !important;
    }
}

/* UNIVERSAL FIX: Prevent checkbox sticking across all templates */
.modal-scrollable-content {
    position: relative !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.modal-scrollable-content .form-check-input,
.modal-scrollable-content .form-check-input[type="checkbox"],
.modal-scrollable-content .form-check-input[type="radio"] {
    position: relative !important;
    transform: none !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
    float: none !important;
    clear: none !important;
}

.modal-scrollable-content .d-flex,
.modal-scrollable-content .form-check,
.modal-scrollable-content .mb-3 {
    position: relative !important;
    transform: none !important;
    float: none !important;
    clear: both !important;
}

.modal-scrollable-content .variant-properties,
.modal-scrollable-content .property-checkbox,
.modal-scrollable-content .variant-radio,
.modal-scrollable-content .modifier-checkbox {
    position: relative !important;
    transform: none !important;
    float: none !important;
    clear: both !important;
}

/* Ensure all form elements within scrollable content are positioned correctly */
.modal-scrollable-content * {
    position: relative !important;
    transform: none !important;
    float: none !important;
}

/* Fix for flex containers that might cause issues */
.modal-scrollable-content .d-flex {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Ensure checkboxes stay with their labels */
.modal-scrollable-content .form-check {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.5rem !important;
}

.modal-scrollable-content .form-check-input {
    margin-right: 0.5rem !important;
    flex-shrink: 0 !important;
}

.modal-scrollable-content .form-check-label {
    flex: 1 !important;
    margin-bottom: 0 !important;
}

/* TEMPLATE 13: Fix cart modal modifiers checkboxes scrolling */
body.template13 .modal-scrollable-content,
.template13 .modal-scrollable-content {
    position: relative !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

body.template13 .modal-scrollable-content .form-check-input,
.template13 .modal-scrollable-content .form-check-input {
    position: relative !important;
    transform: none !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
}

body.template13 .modal-scrollable-content .d-flex,
.template13 .modal-scrollable-content .d-flex {
    position: relative !important;
    transform: none !important;
}

body.template13 .modal-scrollable-content .mb-3,
.template13 .modal-scrollable-content .mb-3 {
    position: relative !important;
    transform: none !important;
}

body.template13 .modal-scrollable-content .property-checkbox,
.template13 .modal-scrollable-content .property-checkbox {
    position: relative !important;
    transform: none !important;
}

body.template13 .modal-scrollable-content .modifier-checkbox,
.template13 .modal-scrollable-content .modifier-checkbox {
    position: relative !important;
    transform: none !important;
}

/* TEMPLATE 13: Hide scroll-to-top button */
body.template13 #scrollUp,
.template13 #scrollUp,
body.template13 .scrollup,
.template13 .scrollup,
body.template13 .scroll-to-top,
.template13 .scroll-to-top,
body.template13 .scroll-to-target,
.template13 .scroll-to-target,
body.template13 .back-to-top,
.template13 .back-to-top,
/* Hide jQuery scrollUp plugin button */
body.template13 a[href="#top"],
.template13 a[href="#top"],
body.template13 .scrollUp,
.template13 .scrollUp {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* TEMPLATE 14: Hide scroll-up button */
body.template14 #scrollUp,
.template14 #scrollUp,
body.template14 .scrollup,
.template14 .scrollup,
body.template14 .scroll-to-top,
.template14 .scroll-to-top,
body.template14 .back-to-top,
.template14 .back-to-top,
/* Hide jQuery scrollUp plugin button */
body.template14 a[href="#top"],
.template14 a[href="#top"],
body.template14 .scrollUp,
.template14 .scrollUp {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* FINAL OVERRIDE: Reduce cart items area significantly */
.cart-items-box {
    max-height: 120px !important;
    height: 120px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Mobile override for even smaller cart items area */
@media (max-width: 768px) {
    .cart-items-box {
        max-height: 100px !important;
        height: 100px !important;
    }
    
    /* Mobile cart - HIDDEN BY DEFAULT */
    #cart-container {
        display: none !important; /* Hide cart by default on mobile */
        max-height: 100vh !important;
        min-height: 400px !important;
        overflow: hidden !important;
    }
    
    /* Show cart only when opened */
    #cart-container.cart-open {
        display: flex !important; /* Show when cart is opened */
    }
    
    #cart-content {
        max-height: calc(100vh - 120px) !important;
    }
    
    .bottom {
        max-height: 70px !important;
        min-height: 50px !important;
        padding: 3px 8px !important;
    }
    
    #checkoutbtn {
        max-height: 40px !important;
        min-height: 35px !important;
        font-size: 13px !important;
        padding: 6px 10px !important;
    }
}

/* ZOOM VIEW FIX: Ensure checkout button stays within cart box */
#cart-container {
    overflow: hidden !important; /* Prevent content from going outside */
    max-height: calc(100vh - 120px) !important; /* Ensure cart fits in viewport */
    min-height: 300px !important; /* Minimum height to show checkout button */
    display: flex !important;
    flex-direction: column !important;
}

/* Desktop cart - VISIBLE BY DEFAULT */
@media (min-width: 769px) {
    #cart-container {
        display: flex !important; /* Show cart by default on desktop */
    }
}

/* Ensure cart content area is properly sized */
#cart-content {
    flex: 1 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: calc(100% - 80px) !important; /* Reduced reserved space for bottom section */
}

/* Ensure bottom section with checkout button stays within cart */
.bottom {
    position: relative !important;
    bottom: 0 !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
    max-height: 60px !important; /* Further reduced to minimize space */
    min-height: 50px !important;
    overflow: hidden !important;
    background: white !important;
    border-top: 1px solid #e0e0e0 !important;
    padding: 2px 8px !important; /* Reduced padding */
}

/* Ensure checkout button fits within bottom section */
#checkoutbtn {
    max-height: 40px !important;
    min-height: 35px !important;
    margin: 2px 0 !important; /* Reduced margin */
    padding: 6px 10px !important; /* Reduced padding */
    font-size: 14px !important;
    line-height: 1.1 !important; /* Tighter line height */
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
}

/* Zoom level specific fixes - COMPACT LAYOUT */
@media (min-resolution: 1.25dppx) {
    .bottom {
        max-height: 50px !important; /* More compact */
        min-height: 40px !important;
        padding: 1px 6px !important;
    }
    
    #checkoutbtn {
        max-height: 35px !important;
        min-height: 30px !important;
        font-size: 13px !important;
        padding: 4px 8px !important;
        margin: 1px 0 !important;
    }
}

@media (min-resolution: 1.5dppx) {
    .bottom {
        max-height: 45px !important; /* More compact */
        min-height: 35px !important;
        padding: 1px 5px !important;
    }
    
    #checkoutbtn {
        max-height: 30px !important;
        min-height: 25px !important;
        font-size: 12px !important;
        padding: 3px 6px !important;
        margin: 1px 0 !important;
    }
}

@media (min-resolution: 2dppx) {
    .bottom {
        max-height: 40px !important; /* More compact */
        min-height: 30px !important;
        padding: 1px 4px !important;
    }
    
    #checkoutbtn {
        max-height: 25px !important;
        min-height: 20px !important;
        font-size: 11px !important;
        padding: 2px 4px !important;
        margin: 1px 0 !important;
    }
}

/* COMPACT LAYOUT: Reduce spacing above checkout button */
.bottom ul {
    margin-bottom: 2px !important; /* Reduce space between subtotal and button */
    padding-bottom: 2px !important;
}

.bottom li {
    margin-bottom: 1px !important; /* Reduce space between list items */
    padding: 1px 0 !important;
}

/* FINAL OVERRIDE: Ensure mobile cart is hidden by default */
@media (max-width: 768px) {
    #cart-container {
        display: none !important; /* Force hide on mobile by default */
    }
    
    #cart-container.cart-open {
        display: flex !important; /* Show only when opened */
        /* FULL SCREEN CART ON MOBILE */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        z-index: 9999 !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    /* Ensure cart content takes full screen */
    #cart-container.cart-open #cart-content {
        height: 100vh !important;
        max-height: 100vh !important;
        padding: 1rem !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Make cart items area larger on mobile */
    #cart-container.cart-open .cart-items-box {
        flex: 1 !important;
        max-height: calc(100vh - 180px) !important; /* Reduced to give more space to bottom */
        height: auto !important;
        overflow-y: auto !important;
    }
    
    /* Ensure bottom section with checkout button is visible - COMPACT */
    #cart-container.cart-open .bottom {
        flex-shrink: 0 !important;
        max-height: 80px !important; /* Reduced from 120px */
        min-height: 60px !important; /* Reduced from 80px */
        margin-top: auto !important;
        padding: 5px 0 !important; /* Reduced padding */
        background: white !important;
        border-top: 2px solid #e0e0e0 !important;
    }
    
    /* Ensure checkout button is visible - COMPACT */
    #cart-container.cart-open #checkoutbtn {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        max-height: 45px !important; /* Reduced from 50px */
        min-height: 40px !important; /* Reduced from 45px */
        margin: 3px 0 !important; /* Reduced margin */
        padding: 10px 20px !important; /* Reduced padding */
        font-size: 16px !important;
        background: #000 !important;
        color: #fff !important;
        border: none !important;
        border-radius: 25px !important;
        width: 100% !important;
    }
}
