.search-container {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    display: flex;
    align-items: center;
}

.floating-search-btn {
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    margin-right: 20px;
}

.floating-search-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

.floating-search-btn:active {
    transform: scale(0.95);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.floating-search-btn i {
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.floating-search-btn:hover i {
    transform: rotate(-15deg) scale(1.2);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}


.search-side-panel {
    position: absolute;
    right: 90px; 
    background: white;
    width: 0;
    height: 550px; 
    border-radius: 20px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(37, 99, 235, 0.1);
    backdrop-filter: blur(10px);
}

.search-container:hover .search-side-panel,
.search-container.hover .search-side-panel {
    width: 480px; 
    opacity: 1;
    visibility: visible;
}

.search-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 25px 20px 25px;
    border-bottom: 2px solid rgba(37, 99, 235, 0.1);
    background: linear-gradient(135deg, #f8fafc 0%, #e1f5fe 100%);
}

.search-panel-header h3 {
    margin: 0;
    color: #1e40af;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-panel-header h3 i {
    font-size: 1.4rem;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-search {
    background: rgba(37, 99, 235, 0.1);
    border: none;
    color: #1e40af;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-search:hover {
    background: rgba(37, 99, 235, 0.2);
    color: #1e3a8a;
    transform: scale(1.1);
}


.search-panel-content {
    padding: 25px;
    height: calc(100% - 80px);
    overflow-y: auto;
    overflow-x: hidden;
}

.search-panel-content::-webkit-scrollbar {
    width: 8px;
}

.search-panel-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.search-panel-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    border-radius: 4px;
}

.search-panel-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #64748b, #475569);
}


.search-input-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.2rem;
}


.deep-search-link {
    margin: 20px 0 25px 0;
}

.ai-search-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.ai-search-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

.ai-search-link i {
    margin: 0 10px;
}

.ai-search-link i:first-child {
    margin-left: 0;
    font-size: 1.2rem;
}

.ai-search-link i:last-child {
    margin-left: auto;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.ai-search-link:hover i:last-child {
    transform: translateX(6px);
}


.category-filter {
    margin-bottom: 25px;
}

.category-filter h4 {
    color: #374151;
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-filter h4::before {
    content: "📁";
    font-size: 1.2rem;
}

.category-filter select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #1e293b;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.category-filter select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
}


.dynamic-filters-container {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 15px;
    border: 2px solid rgba(37, 99, 235, 0.1);
    display: none;
    animation: slideDown 0.4s ease-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dynamic-filters-container.show {
    display: block;
}

.filters-title {
    color: #1e40af;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(37, 99, 235, 0.1);
}

.filters-title i {
    color: #2563eb;
    font-size: 1.2rem;
}

.filter-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-field label {
    font-size: 0.95rem;
    color: #374151;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-field label i {
    color: #2563eb;
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

.filter-field select,
.filter-field input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.filter-field select:focus,
.filter-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.price-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.price-group .filter-field {
    margin: 0;
}


.apply-filters-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.apply-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

.apply-filters-btn:active {
    transform: translateY(0);
}

.reset-filters-btn {
    width: 100%;
    padding: 12px 20px;
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.reset-filters-btn:hover {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}


.active-filters {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #bfdbfe;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.filter-tag .remove-tag {
    background: rgba(30, 64, 175, 0.2);
    border: none;
    color: #1e40af;
    cursor: pointer;
    padding: 0;
    font-size: 0.8rem;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.filter-tag .remove-tag:hover {
    background: #1e40af;
    color: white;
    transform: scale(1.1);
}


.search-results {
    max-height: 320px; 
    overflow-y: auto;
    padding-right: 15px;
    margin-top: 20px;
}

.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    border-radius: 4px;
}

.search-result {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 12px;
    border: 2px solid transparent;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-result:hover {
    border-color: #2563eb;
    background: linear-gradient(135deg, #f0f7ff 0%, #f8fafc 100%);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.result-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-info h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.result-category {
    font-size: 0.8rem;
    color: #64748b;
    background: rgba(37, 99, 235, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 6px;
}

.result-price {
    font-weight: 700;
    color: #2563eb;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.result-price i {
    font-size: 0.9rem;
}

.result-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.spec-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 8px;
    font-size: 0.75rem;
    color: #64748b;
    border: 1px solid rgba(37, 99, 235, 0.1);
    transition: all 0.2s ease;
}

.spec-badge:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.spec-badge i {
    color: #2563eb;
    font-size: 0.8rem;
}

.no-results,
.error-message,
.search-loading,
.filters-loading {
    text-align: center;
    padding: 30px 20px;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.no-results i,
.error-message i,
.search-loading i,
.filters-loading i {
    font-size: 2rem;
    opacity: 0.7;
}

.error-message {
    color: #dc2626;
    background: #fee2e2;
    border-radius: 12px;
    margin: 15px;
    border: 2px solid #fecaca;
}

.search-loading i,
.filters-loading i {
    animation: spin 1s linear infinite;
    color: #2563eb;
}

.no-options {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 0.9rem;
    font-style: italic;
}


@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 600px;
    }
}

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

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@media (max-width: 480px) {
    .search-container:hover .search-side-panel,
    .search-container.hover .search-side-panel {
        width: 380px; 
        right: 10px;
    }
    
    .floating-search-btn {
        width: 55px;
        height: 55px;
        margin-right: 15px;
    }
    
    .search-side-panel {
        height: 500px;
    }
    
    .dynamic-filters-container {
        padding: 15px;
    }
    
    .price-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.category-filter.has-filters select {
    border-color: #2563eb;
    background: linear-gradient(135deg, #f0f7ff 0%, white 100%);
}

.category-filter.has-filters::after {
    content: "●";
    color: #2563eb;
    margin-left: 8px;
    animation: pulse 2s infinite;
    font-size: 1.2rem;
}