.fbt-container {
    margin: 30px 0;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #faf7f5;
}

.fbt-title {
    margin-bottom: 20px;
    font-weight: 600;
    color: #02122b;
}

.fbt-products-wrapper {
    display: flex;
    flex-direction: row; /* Change from 'column' to 'row' */
    gap: 30px; /* Increased gap for better spacing */
    align-items: center;
    justify-content: center;
}
/* Allows the product list to take up the remaining space */
/*.fbt-products-wrapper .fbt-products-list {
    flex-grow: 1; 
}
*/
.fbt-products-list {
    display: flex;
    align-items: center;
    gap: 15px;
}

.fbt-product {
    border: none;
    background: none;
    box-shadow: none;
    padding: 0;
    width: 150px; /* Let the image define the width */
    text-align: left; /* Align text to the left */
}

.fbt-product.main-product {
    background: #faf7f5;
    border: 2px solid #007cba; /* Keep the border for the main product */
    padding: 10px;
    border-radius: 8px;
    width:150px;
}

.fbt-product-details {
    width: 100%; /* Ensure this div takes up the full width of its parent */
    padding: 0;
}

.fbt-product-details h2 {
    font-size: 1em;
    margin-top: 8px;
    color: #02122B;
}

.fbt-price {
    font-weight: 600;
    color: #02122b;
    font-size: 1em;
    margin-bottom: 0;
}
.fbt-product-details .fbt-price del {
    opacity: 0.7;
}
.fbt-checkbox {
    margin-top: 10px;
}

.fbt-plus {
    font-size: 20px;
    font-weight: bold;
    color: #666;
    align-self: center;
}

.fbt-products-wrapper .fbt-summary {
    flex-shrink: 0; /* Prevents the summary box from shrinking */
    width: 280px;   /* Give it a fixed width */
    align-self: stretch; /* Makes it the same height as the product list flex container */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fbt-total-price {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fbt-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.fbt-discounted-price {
    font-size: 18px;
    font-weight: 600;
    color: #007cba;
}

.fbt-savings {
    font-size: 14px;
    color: #d63384;
    font-weight: 600;
}

.fbt-add-all-to-cart {
    background: rgb(219, 150, 98);
    color: #02122B;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.fbt-add-all-to-cart:hover {
    background: #02122B;
    color:white;
}

/* Cart FBT Styles */
.fbt-cart-container {
    margin: 30px 0;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}



.fbt-cart-list-view {
    border: 1px solid #e0e2e5;
    padding: 20px;
    border-radius: 8px;
    background-color: #ffffff;
}

.fbt-cart-list-view h3 {
    margin-top: 0;
}

.fbt-cart-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fbt-cart-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.fbt-cart-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.fbt-cart-list-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.fbt-cart-item-details {
    flex-grow: 1;
}

.fbt-cart-item-title {
    font-weight: 600;
    text-decoration: none;
    color: #333;
}
.fbt-cart-item-title:hover {
    color: #007cba;
}

.fbt-cart-list-item .fbt-price {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: #555;
    font-weight: normal;
}

.fbt-cart-list-item .fbt-cart-add-button {
    flex-shrink: 0;
    padding: 5px 15px; /* Use important to override theme styles if needed */
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
    background: rgb(219, 150, 98);
    color: #02122B;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.fbt-success-message {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 100000;
    opacity: 0;
    transform: translateY(20px);
    animation: fbt-fade-in-out 4s ease-in-out forwards;
}

@keyframes fbt-fade-in-out {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    15% {
        opacity: 1;
        transform: translateY(0);
    }
    85% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    
    .fbt-cart-products {
        grid-template-columns: 1fr;
    }
    
    .fbt-products-wrapper {
        flex-direction: column;
        align-items: stretch; /* Let items take full width */
    }
    .fbt-container .fbt-product-details {
        display: none;
    }
    .fbt-container .fbt-products-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto; /* Adds horizontal scrolling if needed */
    }
    .fbt-products-wrapper .fbt-summary {
        width: auto; /* Reset width for mobile */
    }
}

/*
==============================================
  Cart Page Layout & Style Fix
==============================================
*/
/* Ensure the parent container uses flexbox to align items */
.woocommerce .cart-collaterals {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: row-reverse;
}

/* Style your FBT section to take up one half of the space */
.cart-collaterals  .fbt-cart-container {
    width: 48%; /* Adjust this value as needed, leaving space for margin */
    margin: 0 2% 24px 0;
    background-color: #faf7f5; /* Match your theme's background */
}

/* Style the cart totals section to take up the other half */
.woocommerce .cart_totals {
    width: 48%;
    margin-bottom: 24px;
}

/* Optional: Add media queries for mobile responsiveness */
@media (max-width: 768px) {
    .woocommerce .cart-collaterals {
        flex-direction: column-reverse;
    }

    .cart-collaterals  .fbt-cart-container,
    .woocommerce .cart_totals {
        width: 100%;
        margin-right: 0;
    }
}
/* Style our container to match the theme's .cart_totals */
/*
.cart-collaterals  .fbt-cart-container {
    width: 50%;
    order: 1;
    padding: 20px;
    background-color: #faf7f5; /* Match your theme's background */
    /*border-radius: 8px;
    box-sizing: border-box;
    clear: both;
}
*/

/* Style the title inside our container */
.fbt-cart-container h3 {
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 20px;
    color: #02122b;
}
