/* Mini Cart Popup */
.mini-cart-popup {
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin-top: 10px;
}

.mini-cart-popup.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Cart Link */
.cart-link {
    display: inline-block;
    position: relative;
}

.cart-trigger {
    display: inline-block;
    position: relative;
    /* padding: 5px; */
    transition: all 0.3s ease;
}

.cart-trigger:hover {
    transform: translateY(-2px);
}

/* Cart Items */
.mini-cart-items {
    max-height: 400px;
    overflow-y: auto;
}

.mini-cart-item {
    transition: all 0.3s ease;
}

.mini-cart-item:hover {
    background-color: #f8f9fa;
}

.mini-cart-item.removing {
    opacity: 0.5;
    pointer-events: none;
}

/* Product Thumbnail */
.product-thumbnail {
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Product Name */
.product-name a {
    color: #212529;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
}

.product-name a:hover {
    color: #0d6efd;
    text-decoration: underline;
}

/* Empty Cart */
.mini-cart-empty {
    padding: 40px 20px;
}

.empty-icon {
    opacity: 0.3;
}

/* Loading State */
.mini-cart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Buttons */
.remove-from-cart {
    font-size: 0.8rem;
    padding: 3px 10px;
    transition: all 0.2s ease;
}

.remove-from-cart:hover {
    background-color: #dc3545;
    color: white;
    transform: translateY(-1px);
}

/* Footer */
.mini-cart-footer {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
}

/* Overlay */
.mini-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

/* Responsive */
@media (max-width: 576px) {
    .mini-cart-popup {
        width: 95vw;
        right: -50%;
        transform: translateX(50%) translateY(10px);
    }

    .mini-cart-popup.show {
        transform: translateX(50%) translateY(0);
    }
}

/* Animation for adding items */
@keyframes itemAdded {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.mini-cart-item {
    animation: itemAdded 0.3s ease forwards;
}