/* Smart Search Dropdown Styles */
.search-pill-container, .input-group-modern {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group-custom {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.divider {
    flex-shrink: 0;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    z-index: 1000;
    overflow: hidden;
    display: none;
    animation: slideInDown 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results-dropdown.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none !important;
    color: #1d352b;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    text-align: left;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(94, 193, 153, 0.1);
    transform: translateX(5px);
}

.search-result-image-col {
    width: 60px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

.search-result-image {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    background: #f8f9fa;
    border: 1px solid rgba(0,0,0,0.05);
}

.search-result-title-col {
    flex-grow: 1;
    padding: 0 20px;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    min-width: 0; /* Important for text truncation in flexbox */
}

.search-result-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #1d352b;
}

.search-result-price-col {
    width: 130px;
    flex-shrink: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-result-price {
    font-weight: 800;
    color: #5ec199;
    font-size: 0.9rem;
}

.search-no-result {
    padding: 24px;
    text-align: center;
    color: #667085;
}

.search-no-result i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
    color: #cecece;
}

.search-loading {
    padding: 20px;
    text-align: center;
}

.search-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(94, 193, 153, 0.3);
    border-top: 3px solid #5ec199;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Adjustments for Mobile Modal */
#searchModal .search-results-dropdown {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eaecf0;
    background: #fff;
    max-height: 300px;
    overflow-y: auto;
}

/* Premium Category Dropdown Styles */
.premium-category-group {
    position: relative;
    flex-grow: 0;
    flex-shrink: 0;
}

.premium-dropdown {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.premium-dropdown-trigger {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: transparent;
    border-radius: 12px;
    transition: all 0.2s ease;
    min-width: 160px;
    max-width: 200px;
}

.premium-dropdown-trigger:hover {
    background: rgba(94, 193, 153, 0.05);
}

.trigger-icon, .item-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.trigger-icon i, .item-icon i {
    font-size: 1.2rem;
    color: #5ec199;
}

.trigger-icon img, .item-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.trigger-text, .item-text {
    flex-grow: 1;
    font-weight: 600;
    color: #1d352b;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trigger-chevron {
    margin-left: 10px;
    color: #cecece;
    transition: transform 0.3s ease;
}

.premium-dropdown.active .trigger-chevron {
    transform: rotate(180deg);
}

.premium-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 240px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    padding: 8px;
    animation: slideInDown 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.premium-dropdown.active .premium-dropdown-menu {
    display: block;
}

.dropdown-item-custom {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
    color: #1d352b;
    text-decoration: none;
}

.dropdown-item-custom:hover {
    background: rgba(94, 193, 153, 0.1);
    transform: translateX(5px);
}

/* Modal Specific Adjustments */
#modal-premium-category-dropdown .premium-dropdown-trigger {
    border: 1.5px solid #eaecf0;
    padding: 12px 15px;
    border-radius: 12px;
}

#modal-premium-category-dropdown .premium-dropdown-menu {
    background: #fff;
    backdrop-filter: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

/* Hide native scrollbar for premium menu */
.premium-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.premium-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.premium-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(94, 193, 153, 0.2);
    border-radius: 10px;
}

.premium-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(94, 193, 153, 0.4);
}
