/* ===== MINI CART POPUP REDESIGN ===== */
.mini-cart-body p.woocommerce-mini-cart__total.total,
.mini-cart-body p.woocommerce-mini-cart__buttons.buttons {
    display: none;
}

#mini-cart-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: none;
}

#mini-cart-popup.active {
    display: block;
}

.mini-cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.mini-cart-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: #fff;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #eee;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mini-cart-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #111;
    margin: 0;
}

.mini-cart-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    padding: 0;
    line-height: 1;
}

.mini-cart-close:hover {
    color: #000;
}

.mini-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #f8f9fa;
}

/* Hide default WooCommerce mini-cart styles */
.woocommerce-mini-cart,
.woocommerce-mini-cart__total,
.woocommerce-mini-cart__buttons {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.woocommerce-mini-cart {
    list-style: none;
    /* padding: 24px !important; */
}

/* Cart Item Styling */
.woocommerce-mini-cart-item.mini_cart_item {
    display: flex;
    gap: 10px;
    padding: 10px;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #eee;
    position: relative;
    animation: fadeIn 0.3s ease;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Image */
/* .woocommerce-mini-cart-item.mini_cart_item a:first-child {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
} */

.woocommerce-mini-cart-item.mini_cart_item img {
    max-width: 70px;
    max-height: 70px;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    border-radius: 2px;
}

/* Hide the duplicate image and text wrapper */
.wc-product-with-image {
    display: flex;
    gap: 15px;
    width: 95%;
}

/* Product Details Container */
.woocommerce-mini-cart-item.mini_cart_item>a:nth-child(2) {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none !important;
    color: inherit;
}

/* Product Name */
.wc-product-name {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

/* Remove Button Styling */
.remove.remove_from_cart_button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: auto;
    height: auto;
    line-height: 1;
    text-indent: 0;
    font-size: 22px !important;
    color: #000000 !important;
    background: none !important;
    opacity: 0.8;
    padding: 0 !important;
    margin: 0 !important;
}

.remove.remove_from_cart_button:hover {
    color: #d32f2f !important;
    opacity: 1;
    background: none !important;
}

/* Quantity & Price Container */
.quantity {
    display: flex !important;
    gap: 16px;
    margin-left: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    align-items: center;
}

/* Quantity Input Group */
.quantity .woocommerce-Price-amount {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

/* Quantity Selector */
.qty-selector {
    display: flex;
    align-items: center;
    background-color: #f2f2f2;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
    margin-top: 0px !important;
}

.qty-btn {
    border: none;
    background: none;
    width: 32px;
    height: 100%;
    font-size: 18px;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-weight: 500;
}

.qty-btn:hover {
    background-color: #e0e0e0;
}



/* Cart Footer */
.woocommerce-mini-cart__total.total {
    padding: 24px;
    background: #fff;
    margin: 0 !important;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: #111;
}

.woocommerce-mini-cart__total.total strong {
    font-weight: 600;
}

.woocommerce-mini-cart__total.total .woocommerce-Price-amount {
    font-weight: 600;
    color: #111;
}

/* Cart Buttons */
.woocommerce-mini-cart__buttons.buttons {
    padding: 24px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 !important;
}

.woocommerce-mini-cart__buttons.buttons a.button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    padding: 16px;
    font-size: 16px;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
}

.woocommerce-mini-cart__buttons.buttons a.button.wc-forward {
    background-color: #f5f5f5;
    color: #333;
}

.woocommerce-mini-cart__buttons.buttons a.button.checkout.wc-forward {
    background-color: #F29900;
    color: #000;
    font-family: "Anek Bangla", sans-serif;
    position: relative;
}

/* Cart Icon */
.woocommerce-mini-cart__buttons.buttons a.button.checkout.wc-forward::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'%3E%3C/circle%3E%3Ccircle cx='20' cy='21' r='1'%3E%3C/circle%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.woocommerce-mini-cart__buttons.buttons a.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.woocommerce-mini-cart__buttons.buttons a.button.checkout.wc-forward:hover {
    background-color: #e08e00;
}

.woocommerce-mini-cart__buttons.buttons a.button:active {
    transform: translateY(0);
}

/* Empty Cart State */
.woocommerce-mini-cart__empty-message {
    padding: 48px 24px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

/* Currency Symbol Styling */
.woocommerce-Price-currencySymbol {
    font-weight: 400;
    color: #666;
}

/* Animation for cart updates */
@keyframes itemUpdate {
    0% {
        background-color: #fff;
    }

    50% {
        background-color: #f0f9ff;
    }

    100% {
        background-color: #fff;
    }
}

.updating-cart-item {
    animation: itemUpdate 0.6s ease;
}

/* Responsive Design */
@media (max-width: 480px) {
    .mini-cart-content {
        max-width: 100%;
    }

    .woocommerce-mini-cart-item.mini_cart_item {
        flex-direction: column;
        /* align-items: center; */
        /* text-align: center; */
        padding: 16px;
    }

    .woocommerce-mini-cart-item.mini_cart_item a:first-child {
        /* width: 120px; */
        /* height: 120px; */
    }

    .remove.remove_from_cart_button {
        /* position: static; */
        /* margin-top: 12px !important; */
        /* display: inline-block; */
    }

    .quantity {
        justify-content: center;
        /* flex-direction: column; */
        gap: 12px;
    }

    .qty-selector {
        margin: 0 auto;
    }

    .mini-cart-header,
    .woocommerce-mini-cart__total.total,
    .woocommerce-mini-cart__buttons.buttons {
        padding: 16px;
    }
}

.cart-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #F29900;
    color: #000;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-family: "Anek Bangla", sans-serif;
    cursor: pointer;
}

.cart-trigger:hover {
    background: #e08e00;
}

.cart-icon {
    font-size: 20px;
}

.cart-count {
    background: #000;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.woocommerce-mini-cart-item.mini_cart_item>a:nth-child(2)>img {
    display: none;
}

.mini-cart-body dt.variation- {
    width: 50%;
}

.mini-cart-body dd.variation- {
    width: 50%;
    font-weight: 600;
}

.mini-cart-body dl.variation {
    display: flex;
    flex-wrap: wrap;
}