/* Zeropin-style Dropdown Menu - Specific to dropdown only */

/* Dropdown Wrapper */
.dropdown-wrapper {
    position: fixed;
    top: var(--header-height, 80px);
    left: 0;
    right: 0;
    width: 100%;
    height: 0;
    overflow: visible;
    z-index: 9990;
    pointer-events: none;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Backdrop */
.dropdown-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.dropdown-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Dropdown Content */
.dropdown-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.dropdown-content.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Container */
.dropdown-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* Products Grid - Zeropin Style - DROPDOWN ONLY */
.dropdown-products {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

/* Dropdown Product Card - Specific to dropdown */
.dropdown-product-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 150px;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-product-card:hover {
    background: #f8fafc;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Dropdown Product Name Section */
.dropdown-product-name {
    flex: 1;
    padding-right: 0.5rem;
    padding-bottom: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.3;
    color: #1e293b;
    font-weight: 500;
}

.dropdown-product-name small {
    display: block;
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Dropdown Product Thumbnail */
.dropdown-product-thumb {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dropdown-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Responsive Grid */
@media (min-width: 1200px) {
    .dropdown-products {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 1199px) and (min-width: 768px) {
    .dropdown-products {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 767px) {
    /* Hide dropdown on mobile */
    .dropdown-wrapper {
        display: none;
    }
}

/* Menu Item States */
.category-menu-item {
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
}

.category-menu-item.active,
.category-menu-item:hover {
    color: #3b82f6;
}

/* Adjust for scrolled header */
header.scrolled ~ .dropdown-wrapper {
    top: 56px;
}

/* Empty State */
.dropdown-empty {
    width: 100%;
    text-align: center;
    padding: 3rem 2rem;
    color: #64748b;
    font-size: 0.9375rem;
}

/* Loading State */
.dropdown-loading {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.dropdown-loading::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-products.show {
    animation: fadeIn 0.3s ease;
}