/* ========================================
   CART POPUP - MODERN FULL WIDTH DESIGN
   ======================================== */

.cart_popup_div {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    min-height: 100%;
    background: #fff;
    z-index: 9999999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: none;
    border-radius: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.cart_order_btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2563eb;
    color: #fff;
    border-radius: 0;
    padding: 16px 20px;
    margin: 0;
    cursor: pointer;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    transition: .3s;
}

.cart_order_btn:hover {
    background: #0e43b8;
    transform: translateY(-2px);
}

.content_div_price span {
    font-weight: bold;
    font-size: 16px;
}

.content_div_price p {
    font-weight: lighter;
    letter-spacing: 1px;
    font-size: 13px;
}



.cart_order_btn .content_div_price {
    display: flex;
    flex-direction: column;

}

.cart_order_btn .content_div_proceed {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
}

.cart_popup_div.active {
    transform: translateX(0);
}

/* Cart Body */
.cart_popup_body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Cart Title Bar */
.cart_popup_head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 18px 20px !important;
    background: linear-gradient(135deg, #1e5799 0%, #2989d8 50%, #207cca 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    flex-shrink: 0 !important;
    height: 70px;
}

/* Close Button - Left */
.cart_popup_head .cart_close_btn {
    font-size: 22px !important;
    color: #fff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    width: 38px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
    order: 2 !important;
}

.cart_popup_head .cart_close_btn:hover {
    transform: scale(1.05) !important;
    background: rgba(255, 255, 255, 0.25) !important;
}

/* Cart Title - Center */
.cart_popup_head .cart_title {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    gap: 25px !important;
    flex: 1 !important;
    order: 2 !important;
}

.cart_popup_head .cart_title .cart_item_count {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    min-width: 26px !important;
    text-align: center !important;
    margin: 0 !important;
    display: inline-block !important;
}

/* Clear All Button - Right */
.cart_popup_head .clear_all_btn {
    font-weight: 600 !important;
    color: #fff !important;
    font-size: 14px !important;
    cursor: pointer !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    background: rgba(0, 0, 0, .3);
    border: 1px solid #fff;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    order: 3 !important;
    position: relative !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cart_popup_head .clear_all_btn:hover {
    background: #0b010070 !important;
    transform: scale(1.05) !important;
}

/* Force hide any icons inside clear button */
.cart_popup_head .clear_all_btn::before,
.cart_popup_head .clear_all_btn::after {
    display: none !important;
}

.cart_popup_head .clear_all_btn * {
    /* display: none !important; */
}

/* Ensure only text shows in clear button */
.cart_popup_head .clear_all_btn {
    font-family: inherit !important;
    line-height: 1 !important;
}

.cart_popup_body .booking_detail_3 {
    position: static !important;
    grid-row: 2 !important;
    flex-direction: column;
}


/* Cart Items Container */
.cart_popup_body .product_main_div_cart {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    padding: 16px;
    max-height: calc(100% - 70px);
    height: calc(100% - 70px);
    display: grid;
    overflow: hidden;
    grid-template-rows: calc(100% - 100px) 100px;
    padding: 0px;

}


.responsive_product_cart {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    height: 100%;
    overflow-y: auto;
    background: #f5f7fd;
    padding: 10px;
    align-items: start;
}

/* ========================================
   CART PRODUCT ITEMS
   Force same vertical layout as index.php products
   ======================================== */

/* Make cart items 2-column grid with vertical layout */
.cart_popup_body .product_item {
    display: flex !important;
    flex-direction: row !important;
    padding: 10px 0px !important;
    background: #fff;
    width: 100% !important;

}

.cart_popup_body .product_price_div {
    gap: 0 !important;
}

/* Image on top */

.cart_popup_body .product_item .product_img {
    width: 35% !important;
}

/* Content below image */
.cart_popup_body .product_item .product_detail {
    width: 100% !important;
    padding: 0px 10px 0px 0px !important;
    justify-content: center;
    min-height: 100% !important;
}

.cart_popup_body .product_item .product_img {
    height: 100% !important;
}

/* Show total price in cart */
.cart_popup_body .product_item .product_total_price {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #2989d8 !important;
    margin: 6px 0 0 0 !important;
    display: block !important;
}

/* Cart Footer / Checkout Section */
.booking_detail_3 {
    background: #fff;
    padding: 20px 24px;
    border-top: 2px solid #f0f0f0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
}

.booking_detail_3 .content_div:nth-child(1) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.booking_detail_3 .content_div:nth-child(1) p {
    font-size: 16px;
    font-weight: 600;
    color: #666;
    margin: 0;
}

.booking_detail_3 .content_div:nth-child(1)>span {
    font-size: 24px;
    font-weight: 700;
    color: #2989d8;
}

.booking_detail_3 .content_div:nth-child(2) button {
    width: 100%;
    padding: 16px;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #2989d8 0%, #1e5799 100%);
    color: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(41, 137, 216, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking_detail_3 .content_div:nth-child(2) button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41, 137, 216, 0.4);
}

.booking_detail_3 .content_div:nth-child(2) button:active {
    transform: translateY(0);
}

/* Empty Cart State */
.empty_cart_message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.empty_cart_message::before {
    content: "🛒";
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty_cart_message h3 {
    font-size: 20px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.empty_cart_message p {
    font-size: 14px;
    color: #999;
}

/* Scrollbar Styling */
.cart_popup_body .product_main_div_cart::-webkit-scrollbar {
    width: 8px;
}

.cart_popup_body .product_main_div_cart::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.cart_popup_body .product_main_div_cart::-webkit-scrollbar-thumb {
    background: #2989d8;
    border-radius: 4px;
}

.cart_popup_body .product_main_div_cart::-webkit-scrollbar-thumb:hover {
    background: #1e5799;
}

/* Backdrop Overlay */
.cart_backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart_backdrop.active {
    opacity: 1;
}

/* Tablet Responsive */
@media (min-width: 768px) {
    .cart_popup_div {
        max-width: 400px;
        border-radius: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .cart_order_btn {
        border-radius: 10px;
        margin: 15px;
        box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    }

    .cart_hide_btn {
        padding: 20px 24px;
    }

    .cart_popup_head {
        padding: 24px;
    }

    .booking_detail_3 {
        padding: 24px;
    }

    .cart_popup_body .product_item .prduct_desc {
        font-size: 13px !important;
        height: 36px !important;
    }

    .cart_popup_body .product_item .product_price {
        font-size: 15px !important;
    }
}

/* Desktop Responsive */
@media (min-width: 1024px) {
    .cart_popup_div {
        max-width: 450px;
        border-radius: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .cart_order_btn {
        border-radius: 12px;
        margin: 15px 15px;
        box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    }

    .cart_hide_btn {
        padding: 24px 28px;
    }

    .cart_popup_head {
        padding: 28px;
    }

    .responsive_product_cart {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .booking_detail_3 {
        padding: 28px;
    }

    .cart_popup_body .product_item .prduct_desc {
        font-size: 13px !important;
    }

    .cart_popup_body .product_item .product_price {
        font-size: 16px !important;
    }
}

/* ===
=====================================
   CLEAR ALL BUTTON STYLING
   ======================================== */

.clear_all_btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.clear_all_btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.clear_all_btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Item count badge */
.clear_all_btn .item_count {
    background: rgba(255, 255, 255, 0.9);
    color: #2563eb;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* Alternative solid style */
.clear_all_btn.solid {
    background: white;
    color: #2563eb;
    border: 1px solid white;
}

.clear_all_btn.solid:hover {
    background: #f8f9fa;
    color: #1d4ed8;
}

.clear_all_btn.solid .item_count {
    background: #2563eb;
    color: white;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .clear_all_btn {
        padding: 6px 12px;
        font-size: 13px;
        gap: 6px;
    }

    .clear_all_btn .item_count {
        padding: 1px 6px;
        font-size: 11px;
        min-width: 18px;
    }
}

/* Cart header layout with Clear All button */
.cart_popup_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cart_popup_title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.cart_header_actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Close button styling */
.cart_close_btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cart_close_btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Example HTML structure for reference:
<div class="cart_popup_header">
    <h3 class="cart_popup_title">My Cart</h3>
    <div class="cart_header_actions">
        <button class="clear_all_btn" onclick="clearAllCart()">
            Clear All
            <span class="item_count">7</span>
        </button>
        <button class="cart_close_btn" onclick="hideCart()">×</button>
    </div>
</div>
*/
/* ========================================
   CART ORDER BUTTON STATES
   ======================================== */
/* Active cart order button */
.cart_order_btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.cart_order_btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.cart_order_btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Disabled cart order button */
.cart_order_btn.disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%) !important;
    cursor: not-allowed !important;
    opacity: 0.7 !important;
    pointer-events: none !important;
}

.cart_order_btn.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.cart_order_btn.disabled .content_div_proceed span {
    color: #d1d5db !important;
}

.cart_order_btn.disabled .content_div_price span {
    color: #d1d5db !important;
}

/* Price section styling */
.content_div_price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.content_div_price span {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.content_div_price p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    margin-top: 2px;
}

/* Proceed section styling */
.content_div_proceed {
    display: flex;
    align-items: center;
    gap: 8px;
}

.content_div_proceed span {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.content_div_proceed i {
    font-size: 16px;
    color: white;
    transition: transform 0.2s ease;
}

.cart_order_btn:hover .content_div_proceed i {
    transform: translateX(4px);
}

/* Loading state */
.cart_order_btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.cart_order_btn.loading .content_div_proceed span {
    opacity: 0.7;
}

.cart_order_btn.loading .content_div_proceed i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Mobile responsive */
@media (max-width: 767px) {
    .cart_popup_div {
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        left: 0 !important;
        right: 0 !important;
    }

    .cart_order_btn {
        padding: 16px 20px;
        margin: 12px !important;
        border-radius: 10px !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
    }

    .content_div_price span {
        font-size: 18px;
    }

    .content_div_proceed span {
        font-size: 15px;
    }

    .content_div_proceed i {
        font-size: 14px;
    }

    .cart_popup_head {
        border-radius: 0 !important;
    }
}

@media (max-width: 480px) {
    .cart_order_btn {
        padding: 14px 16px;
    }

    .content_div_price span {
        font-size: 18px;
    }

    .content_div_proceed span {
        font-size: 15px;
    }

    .content_div_proceed i {
        font-size: 14px;
    }
}