/* --- PREMIUM SEARCH PANEL --- */
:root {
    --search-glass-bg: rgba(255, 255, 255, 0.95);
    --search-glass-border: rgba(0, 0, 0, 0.08);
    --search-accent-v2: #1a1a1a;
    --search-accent-soft: rgba(0, 0, 0, 0.05);
    --search-text-main: #121212;
    --search-text-secondary: #666666;
    --search-shadow-v2: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Ensure navbar is above backdrop to avoid being blurred */
.navbar {
    z-index: 3500 !important;
}

.search-box {
    position: relative;
    z-index: 10; 
}

/* Ensure search box is above backdrop when active */
.search-box:focus-within {
    z-index: 3600 !important;
}

.search-box:focus-within input {
    background: #fff !important;
    box-shadow: 0 0 0 2px var(--search-accent-v2), 0 10px 25px rgba(0,0,0,0.1) !important;
    transition: all 0.2s ease;
}

.premium-search-panel {
    position: fixed;
    z-index: 3700; /* Above everything */
    background: var(--search-glass-bg);
    backdrop-filter : blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--search-glass-border);
    border-radius: 16px;
    box-shadow: var(--search-shadow-v2);
    overflow: hidden;
    animation: premiumFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@keyframes premiumFadeIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--search-glass-border);
}

.search-section:last-of-type {
    border-bottom: none;
}

.search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.search-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--search-text-secondary);
}

.clear-recent {
    font-size: 11px;
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

/* Tags Grid */
.search-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-tag {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--search-accent-soft);
    color: var(--search-text-main);
    border: 1px solid transparent;
}

.search-tag i {
    font-size: 11px;
    opacity: 0.6;
}

.search-tag:hover {
    background: var(--search-accent-v2);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.search-tag.recent { color: #555; }
.search-tag.trending { background: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }
.search-tag.brand { background: #f0fdf4; color: #15803d; border: 1px solid #dcfce7; }
.search-tag.suggested { background: #f5f3ff; color: #6d28d9; border: 1px solid #ede9fe; }

/* Premium List Items */
.suggestions-list-premium {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.suggestion-item-v2 {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.suggestion-item-v2:hover {
    background: rgba(0, 0, 0, 0.03);
}

.suggestion-img-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: #f7f7f7;
    flex-shrink: 0;
}

.suggestion-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggestion-content {
    flex: 1;
}

.suggestion-name-v2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--search-text-main);
}

.suggestion-price-v2 {
    font-size: 13px;
    color: #059669;
    font-weight: 700;
}

.suggestion-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.2s ease;
}

.suggestion-item-v2:hover .suggestion-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Footer & States */
.search-footer {
    padding: 12px 20px;
    background: #fcfcfc;
    border-top: 1px solid var(--search-glass-border);
}

.see-all-btn {
    width: 100%;
    padding: 10px;
    background: var(--search-accent-v2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.see-all-btn:hover {
    opacity: 0.9;
}

.search-loading, .search-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--search-text-secondary);
}

.search-loading {
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.search-empty-state strong {
    color: var(--search-text-main);
}

.search-empty-state small {
    display: block;
    margin-top: 8px;
    opacity: 0.7;
}

/* Backdrop */
.search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    z-index: 3400;
    display: none;
}

.search-backdrop.active {
    display: block;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .premium-search-panel {
        max-height: 70vh;
    }
    .search-tag {
        padding: 6px 12px;
        font-size: 12px;
    }
}