/* Cart Popup Styles */
.cart-popup-container {
    position: relative;
    display: inline-block;
}

.cart-trigger {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.cart-trigger:hover {
    transform: scale(1.1);
}

.cart-count-badge {
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: bounce 0.3s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.cart-popup-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 380px;
    background: white;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 12px;
    padding: 0;
    margin-top: 15px;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-popup-dropdown.active {
    display: block;
}

.cart-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.cart-popup-overlay.active {
    display: block;
}

.cart-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: grey;
    color: rgb(0, 0, 0);
}

.cart-popup-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.cart-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: background 0.2s ease;
}

.cart-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cart-popup-content {
    max-height: 350px;
    overflow-y: auto;
    padding: 15px;
}

.cart-popup-content .woocommerce-mini-cart {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cart-popup-content .woocommerce-mini-cart__empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.cart-popup-content .woocommerce-mini-cart__empty-message i {
    font-size: 48px;
    color: #e5e7eb;
    margin-bottom: 15px;
    display: block;
}

.cart-popup-content .mini_cart_item {
    display: flex;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f9fafb;
    transition: all 0.2s ease;
    position: relative;
}

.cart-popup-content .mini_cart_item:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cart-popup-content .mini_cart_item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cart-item-details {
    flex: 1;
    padding: 0 15px;
}

.cart-item-name {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.4;
}

.cart-item-price {
    display: block;
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border-radius: 6px;
    padding: 4px;
    width: fit-content;
    border: 1px solid #e5e7eb;
}

.quantity-btn {
    background: #f3f4f6;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: #4b5563;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #667eea;
    color: white;
}

.quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
}

.remove-cart-item {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
}

.remove-cart-item:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.cart-popup-footer {
    padding: 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cart-popup-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 15px;
}

.cart-popup-buttons .button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-view-cart {
    background: white;
    color: #4b5563;
    border: 2px solid #e5e7eb !important;
}

.btn-view-cart:hover {
    background: #f9fafb;
    border-color: #9ca3af !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-checkout {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background-color: grey;

    color: white;
    border: none !important;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .cart-popup-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 80vh;
        margin-top: 0;
        border-radius: 20px 20px 0 0;
        animation: slideUp 0.3s ease;
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .cart-popup-buttons {
        grid-template-columns: 1fr;
    }

    .cart-popup-header {
        padding: 25px 20px;
    }
}