/* webroot/css/features/cart-dropdown.css */
.cart-dropdown {
    width: 320px;
    padding: 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.cart-dropdown-header {
    background-color: var(--light);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cart-dropdown-body {
    max-height: 320px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.empty-cart-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: var(--gray);
}

.empty-cart-message i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.cart-dropdown-item {
    display: grid;
    grid-template-columns: 60px 1fr 24px;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
}

.cart-dropdown-item:hover {
    background-color: var(--light);
}

.dropdown-product-image {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
}

.dropdown-product-placeholder {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    border-radius: 4px;
    color: #adb5bd;
    font-size: 1.25rem;
}

.dropdown-product-link {
    color: #495057;
    text-decoration: none;
    transition: color 0.2s;
}

.dropdown-product-link:hover {
    color: var(--primary);
}

.dropdown-remove-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.dropdown-remove-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}

.cart-dropdown-footer, .cart-dropdown-footer-empty {
    padding: 0.75rem 1rem;
    background-color: var(--light);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Make the cart dropdown hover-activated on desktop */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
    }
}