/* Top Sellers Dropdown Styles - Allure Theme */

/* Menu Item */
.top-items-menu-item {
    position: relative;
}

.top-items-link {
    cursor: pointer;
}

/* Dropdown Container */
.top-sellers-dropdown-container {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.top-items-menu-item:hover .top-sellers-dropdown-container,
.top-items-menu-item.active .top-sellers-dropdown-container {
    display: block;
}

/* Dropdown */
.top-sellers-dropdown {
    width: 500px;
    max-height: 700px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    border: 1px solid #cdcdcd;
}

/* Dropdown Header */
.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #cdcdcd;
    background: #f8f8f8;
}

.dropdown-header strong {
    color: #000;
    font-size: 14px;
    font-weight: 600;
}

/* Products List */
.dropdown-products-list {
    flex: 1;
    overflow-y: auto;
    max-height: 450px;
}

/* Product Item */
.dropdown-product-item {
    display: flex;
    padding: 12px;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
    gap: 12px;
    transition: background-color 0.2s;
    min-height: 120px;
}

.dropdown-product-item:hover {
    background-color: #f9f9f9;
}

.dropdown-product-item:last-child {
    border-bottom: none;
}

.dropdown-product-item.adding-to-cart {
    opacity: 0.6;
    pointer-events: none;
}

/* Product Image */
.product-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #ddd;
    overflow: hidden;
}

.product-thumb {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

/* Product Info */
.product-info {
    flex: 1;
    min-width: 0;
}

.product-name {
    margin-bottom: 6px;
}

.product-name {
    font-weight: 600;
    font-size: 14px;
    color: #000;
    word-wrap: break-word;
    line-height: 1.4;
}

.product-price {
    font-size: 16px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 6px;
}

.product-stock {
    font-size: 12px;
}

.stock-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.stock-badge.in-stock {
    background-color: #d4edda;
    color: #377f13;
}

.stock-badge.low-stock {
    background-color: #fff3cd;
    color: #856404;
}

.stock-badge.out-of-stock {
    background-color: #f8d7da;
    color: #fd001f;
}

/* Product Actions */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #cdcdcd;
    background: #fff;
    color: #555;
    cursor: pointer;
    border-radius: 3px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.qty-btn:hover {
    background: #f0f0f0;
    border-color: #377f13;
    color: #377f13;
}

.qty-btn:active {
    background: #e0e0e0;
}

.qty-input {
    width: 60px;
    text-align: center;
    border: 1px solid #cdcdcd;
    padding: 4px;
    border-radius: 3px;
    font-size: 14px;
}

.qty-input::placeholder {
    color: #999;
    opacity: 1;
}

.qty-input:focus {
    outline: none;
    border-color: #377f13;
}

/* Add to Cart Button */
.btn-add-cart {
    background: #377f13;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.2s;
    min-height: 32px;
}

.btn-add-cart:hover {
    background: #2d6a0f;
}

.btn-add-cart:active {
    background: #245009;
}

.btn-add-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Dropdown Footer */
.dropdown-footer {
    padding: 12px 16px;
    border-top: 1px solid #cdcdcd;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-load-more {
    background: #fff;
    color: #377f13;
    border: 1px solid #377f13;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    width: 100%;
}

.btn-load-more:hover {
    background: #377f13;
    color: #fff;
}

.btn-load-more:disabled {
    background: #ccc;
    border-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

.btn-add-all-cart {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
    width: 100%;
}

.btn-add-all-cart:hover {
    background: #c0392b;
}

.btn-add-all-cart:active {
    background: #a93226;
}

.btn-add-all-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.no-products {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .top-sellers-dropdown {
        width: 100%;
        max-width: 100vw;
        left: 0;
        right: 0;
    }

    .top-sellers-dropdown-container {
        position: fixed;
        left: 0;
        right: 0;
        margin-top: 0;
    }

    .dropdown-product-item {
        flex-wrap: wrap;
    }

    .product-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 8px;
    }
}

/* Loading State */
.top-sellers-dropdown.loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-sellers-dropdown.loading::before {
    content: "Loading...";
    color: #555;
}
