.offcanvas-custom {
    position: fixed !important;
    top: 0;
    right: 0;
    width: 500px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -3px 0px 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    z-index: 999999 !important;

    /* HIDE initially */
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;

    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out,
        visibility 0.5s;
}

/* When cart is open */
.offcanvas-custom.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.cart-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white !important;
}

.cart-close-overlay {
    background: rgba(0, 0, 0, 0.2);
    z-index: 9999;
}

/* Timer Box */
.cart-timer {
    position: fixed !important;
    width: 500px;
    height: 45px;
    background: #000000;
    color: white !important;
    padding: 10px;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    font-weight: bold;
    text-align: center;
    color: #d9534f;
    z-index: 88888;
}

.cart-timer p {
    font-size: 19px;
}

.offcanvas-body {
    margin-top: 70px;
}

/* Cart Header */
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 2px solid #ddd;
}

/* Cart List */
.cart-items {
    padding: 10px 0px 10px 0px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Product Card */
.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /*  padding: 5px; */
    border-bottom: 1px solid #eee;
}

.name-section {
    width: 260px;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    padding-bottom: 5px;
}

.name-section-checkout {
    width: 460px;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    padding-bottom: 10px;
}

.price-section {
    width: 100px;
}

.price-row {
    font-size: 16px;
}

/* Product Image */
.cart-image {
    width: 150px;
    height: auto;
    margin-right: 5px;
    margin-left: 10px;
    margin-top: 10px;
}

.cart-image img {
    border-radius: 10px;
    border: 1px solid #ddd;
    max-height: 150px;
    max-width: 150px;
    margin: 0px auto;
    display: block;
    object-fit: cover;
}

/* Quantity Controls */
.qty-control {
    display: flex;
    align-items: center;
}

.qty-btn {
    background: #ddd;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

/* Free Shipping Progress Bar */
.free-shipping-progress {
    padding: 10px;
}

.progress-container {
    width: 100%;
    background: #f0f0f0;
    border-radius: 5px;
    height: 10px;
    position: relative;
}

.progress-bar-custom {
    height: 100%;
    background: #28a745;
    border-radius: 5px;
    transition: width 0.5s;
}

/* Checkout Section */
.cart-footer {
    padding: 25 0px 10px 0px;
    border-top: 2px solid #ddd;
    text-align: center;
}

.checkout-btn {
    background: #28a745;
    color: white;
    padding: 10px;
    width: 100%;
    display: block;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
}

.checkout-btn:hover {
    background: #218838;
}

.top_box {
    background: #d5cabd;
    padding: 10px 10px;
    margin: 0 auto;
    width: 95%;
    border-radius: 10px;
}

.top_box h4 {
    color: black;
    font-size: 18px;
}

.top_box h5 {
    color: black;
    font-size: 14px;
}

.fbt-section {
    padding: 10px;
}

.plusminus-cart {
    display: inline-block;
    position: relative;
    font-size: 0;
    overflow: hidden;
    border-radius: 3px;
    width: 20px;
    height: 75px;
}

.plusminus-cart button {
    display: block;
    width: 20px;
    height: 25px;
    position: absolute;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: #000;
    color: #fff;
    font-size: 15px;
    line-height: 1;
    font-family: bonds, sans-serif;
    cursor: pointer;
    -moz-transition: color 200ms;
    -o-transition: color 200ms;
    -webkit-transition: color 200ms;
    transition: color 200ms;
}

.plusminus-cart button:focus {
    outline: none;
    color: #2bebaf;
}

.plusminus-cart button:disabled {
    background: #999;
    color: #ccc;
    cursor: default;
}

.plusminus-cart button:first-child {
    bottom: 0;
}

.plusminus-cart button:first-child:before {
    content: "-";
}

.plusminus-cart button:last-child {
    top: 0;
}

.plusminus-cart button:last-child:before {
    content: "+";
}

.plusminus-cart button:last-child:focus {
    color: #ff6367;
}

.plusminus-cart input[type="number"] {
    position: absolute;
    width: 25px;
    height: 25px;
    top: 44px;
    margin: 0;
    padding: 0 0 2px;
    border: 0;
    font-size: 17.6px;
    font-weight: bold;
    text-align: center;
    -moz-appearance: textfield;
}

.plusminus-cart input[type="number"]::-webkit-outer-spin-button,
.plusminus-cart input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.plusminus-cart.horiz {
    width: 75px;
    height: 25px;
}

.plusminus-cart.horiz button:first-child {
    left: 0;
}

.plusminus-cart.horiz button:last-child {
    right: 0;
}

.plusminus-cart.horiz:after {
    bottom: 0;
}

.plusminus-cart.horiz input[type="number"] {
    position: absolute;
    top: 0;
    left: 24px;
    border: 1px solid #e8e8e7;
    border-radius: 5px;
}

.plusminus-cart.stacked:after {
    width: 100%;
    bottom: 50%;
}

.plusminus-cart.stacked button {
    float: none;
    top: auto;
    bottom: 0;
}

.plusminus-cart.stacked button:first-child {
    left: 0;
}

.plusminus-cart.stacked button:last-child {
    right: 0;
}

.plusminus-cart.stacked input[type="number"] {
    top: 0;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    border: 1px solid #eee;
    width: 100%;
}

.plusminus-cart.stacked input[type="number"]:after {
    width: 100%;
}

.fbt-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2-column grid */
    gap: 10px;
    width: 100%;
    padding: 10px;
}

/* Product Card */
.fbt-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #ddd;
    min-height: 225px;
    /* Increased height to prevent overlaps */
    justify-content: space-between;
}

/* Product Image */
.fbt-img {
    width: 360px;
    max-height: 360px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 5px;
}

/* Product Title - Max 2 Lines */
.fbt-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-top: 5px;
    /* Fixed height to ensure consistency */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    flex-grow: 1;
    /* Allows text to use available space */
    text-align: left;
}

/* Price Section */
.fbt-price {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 5px;
    margin-top: auto;
    font-size: 1.2rem;
    color: #0f0f0f;
}

.current-price {
    font-size: 18px;
    font-weight: bold;
    color: #000000;
}

.old-price {
    font-size: 12px;
    text-decoration: line-through;
    color: #888;
}

/* Add to Cart Button */
.fbt-add-cart {
    background: #28a745;
    color: white;
    padding: 8px;
    width: 100%;
    border-radius: 5px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    border: none;
    margin-top: auto;
    /* Keeps button aligned at the bottom */
}

.fbt-add-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.fbt-add-cart i {
    margin-right: 5px;
}

.extra-data {
    border-top: 1px solid #c0c0c0;
    margin-top: 20px;
    background-color: #d5cabd;
    width: 100%;
    padding: 15px;
}

.extra-data-item {
    font-size: 16px;
    margin-bottom: 10px;
    border-bottom: 1px solid #c0c0c0;
    padding-bottom: 10px;
}

.extra-data-item img {
    max-width: 40px;
    height: auto;
    border-radius: 5px;
    margin-right: 10px;
}

.extra-data-item p {
    color: black;
}

.fbt-content {
    width: 100%;
}

.fbt-attributes {
    text-align: left;
}

@media (max-width: 987px) {
    .name-section-checkout {
        width: 150px;
        display: flex;
        flex-direction: column;
        font-size: 16px;
        padding-bottom: 5px;
        text-align: start;
    }
}
/* Make full width on smaller screens (mobile) */
@media (max-width: 768px) {
    .offcanvas-custom {
        width: 100vw;
    }

    .cart-timer {
        position: fixed !important;
        width: 100vw;
        height: 40px;
        background: #000000;
        color: white !important;
        padding: 10px;
        font-weight: bold;
        text-align: center;
    }

    .cart-image {
        width: 50px;
        height: auto;
        border-radius: 5px;
        margin: 10px;
    }

    .name-section {
        width: 200px;
    }

    .name-section p {
        font-size: 16px !important;
        padding-bottom: 5px;
    }

    .fbt-section {
        padding: 0;
    }

    .fbt-card {
        width: 100%;
    }

    .fbt-content {
        padding: 5px;
        width: 100%;
    }

    .fbt-card > img {
        width: 300px;
        max-height: 300px;
    }
}
