:root {
    --primary-search: #d95700;
    --primary-search-dark: #b34700;
    --search-dark-bg: #0f172a;
    --search-glass-white: rgba(255, 255, 255, 0.08);
    --search-glass-border: rgba(255, 255, 255, 0.15);
}

/* --- Professional Discovery Hero --- */
.discovery-hero {
    position: relative;
    min-height: 85vh;
    background: var(--search-dark-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible; /* Changed from hidden to fix dropdown clipping */
    padding: 80px 20px;
    z-index: 100; /* Ensure it stays above content below */
}

.hero-overlay-creative {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(108, 92, 231, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 107, 53, 0.08) 0%, transparent 50%);
    z-index: 1;
    overflow: hidden; /* Keep background gradients within bounds */
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1000px;
    width: 100%;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid var(--search-glass-border);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.8);
}

.hero-title {
    font-size: clamp(38px, 8vw, 72px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 20px;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary-search), #ffa16c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 600px;
    margin: 0 auto 50px;
    line-height: 1.6;
}

/* --- Professional Search Pill --- */
.hero-search-pill-container {
    max-width: 850px;
    margin: 0 auto 25px;
    z-index: 10000;
    position: relative;
    transform: translateZ(0);
}

.hero-search-form {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px);
    border: 1px solid var(--search-glass-border);
    padding: 8px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
    transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-search-form:focus-within {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 102, 0, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 50px 110px rgba(0, 0, 0, 0.5);
}

.category-select-wrapper {
    position: relative;
    min-width: 180px;
    padding: 0 15px 10px 25px; /* Added some padding adjustment for select center */
    border-right: 1px solid var(--search-glass-border);
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

@media (min-width: 769px) {
    .category-select-wrapper {
        padding: 0 15px 0 25px;
    }
}

/* --- Custom Category Dropdown (Creative) --- */
.custom-category-dropdown {
    position: relative;
    width: 100%;
    cursor: pointer;
    user-select: none;
}

.dropdown-selected {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Changed from space-between to cluster left */
    gap: 12px; /* Added gap to keep icon near text but left-aligned as a unit */
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 0;
    transition: 0.3s;
    text-align: left;
}

.dropdown-selected span {
    flex: 0 1 auto;
    text-align: left;
}

.dropdown-selected i {
    font-size: 11px;
    opacity: 0.8;
    transition: transform 0.3s ease;
    margin-left: auto; /* Push only the icon to the right if needed, or keep it left */
}

.custom-category-dropdown.active .dropdown-selected i {
    transform: rotate(180deg);
}

.dropdown-list {
    position: absolute;
    top: calc(100% + 15px);
    left: -20px;
    width: 240px;
    background: #0f172a;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 8px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    z-index: 2000;
    margin: 0;
    text-align: left; /* Overriding inherited text-align: center from hero content */
}

.custom-category-dropdown.active .dropdown-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-list li {
    padding: 12px 18px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
    margin-bottom: 2px;
}

.dropdown-list li:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(5px);
}

.dropdown-list li.current {
    background: linear-gradient(135deg, var(--primary-search), #ff9f6c);
    color: #fff;
}

.search-field-wrapper {
    flex: 1;
    padding: 0 35px;
    display: flex;
    align-items: center;
}

#heroSearchInput {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    outline: none;
    padding: 10px 0;
}

#heroSearchInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.hero-search-btn {
    background: var(--primary-search);
    color: #fff;
    border: none;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    box-shadow: 0 10px 20px rgba(255, 102, 0, 0.3);
}

.hero-search-btn:hover {
    background: var(--primary-search-dark);
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 102, 0, 0.4);
}

/* --- Animations --- */
.animate-fade-in { animation: fadeInSearch 1s ease both; }
.animate-title { animation: titleSlideSearch 1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.animate-search { animation: searchInSearch 1s 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* --- Category Validation Shake (Mandatory) --- */
.category-validation-active .category-select-wrapper {
    animation: categoryShakeSearch 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    border-color: rgba(255, 107, 53, 0.8) !important;
    background: rgba(255, 107, 53, 0.05); /* Soft hint of orange */
}

@keyframes categoryShakeSearch {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

@keyframes fadeInSearch { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes titleSlideSearch { from { opacity: 0; transform: translateY(40px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes searchInSearch { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    .hero-search-form {
        flex-direction: column;
        border-radius: 24px;
        padding: 15px;
    }
    .category-select-wrapper {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--search-glass-border);
        padding: 15px 10px;
    }
    .search-field-wrapper { width: 100%; padding: 20px 10px; }
    .hero-search-btn { width: 100%; justify-content: center; padding: 16px; }
    .discovery-hero { min-height: 70vh; }
}

/* --- Search Trends --- */
.search-trends {
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 13px;
    position: relative;
    z-index: -1; /* Definitively sits behind absolute suggestions overlay */
}

.trends-label {
    opacity: 0.6;
    font-weight: 600;
}

.search-trends a {
    color: #fff;
    text-decoration: none;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-trends a:hover {
    background: var(--primary-search);
    border-color: var(--primary-search);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 102, 0, 0.3);
}

/* --- Real-time Suggestions --- */
.search-field-wrapper {
    position: relative;
}

.hero-suggestions {
    position: absolute;
    top: calc(100% + 20px);
    left: 0;
    right: 0;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 20px;
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.2) !important;
    z-index: 999999 !important; /* Hyper-high priority to ensure it sits on top of everything */
}

.hero-suggestions.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hero-suggestions .suggestion-item {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 10px 15px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: 0.3s !important;
    background: transparent !important;
    border: none !important;
    margin-bottom: 5px !important;
    text-decoration: none !important;
}

.hero-suggestions .suggestion-item:hover {
    background: #f8f9fa !important;
    transform: translateX(5px);
}

.hero-suggestions .suggestion-img {
    width: 50px !important;
    height: 50px !important;
    object-fit: contain !important;
    background: #fff !important;
    padding: 6px !important;
    border: 1px solid #eee !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
}

.hero-suggestions .suggestion-info {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important; /* Explicit left align */
}

.hero-suggestions .suggestion-name {
    color: #1a1a1a !important;
    font-weight: 500 !important; /* Soft, readable weight */
    font-size: 15px !important;
    margin: 0 !important;
    text-align: left !important; /* Explicit left align */
}

.hero-suggestions .suggestion-meta {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-top: 4px !important;
}

.hero-suggestions .suggestion-type {
    background: var(--primary-search) !important;
    color: #fff !important;
    font-size: 9px !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    letter-spacing: 0.5px !important;
}

.hero-suggestions .suggestion-price {
    color: #666 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

.hero-suggestions .no-suggestions {
    padding: 20px !important;
    color: #888 !important;
    text-align: center !important;
    font-size: 14px !important;
}
