/* Ürün Arama Stilleri */
.product-search-container {
    position: relative;
    margin-bottom: 0;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-input-group:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #374151;
    outline: none;
    min-height: 25px;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    background: #ee1c24;
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 45px;
}

.search-btn:hover {
    background: #2563eb;
}

.search-btn:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.clear-search-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 48px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.clear-search-btn:hover {
    background: #b91c1c;
}

.clear-search-btn:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Arama Sonuçları Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-results-content {
    padding: 0;
}

.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
}

.search-loading i {
    margin-right: 8px;
    font-size: 18px;
}

.search-results-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #374151;
}

.search-result-item:hover {
    background: #f9fafb;
    text-decoration: none;
    color: #111827;
}

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

.search-result-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-weight: 500;
    color: #111827;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.search-result-category {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.2;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .search-input-group {
        border-radius: 6px;
    }
    
    .search-input {
        padding: 10px 12px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .search-btn,
    .clear-search-btn {
        min-width: 44px;
        height: 44px;
        padding: 10px 12px;
    }
    
    .search-results-dropdown {
        max-height: 300px;
    }
    
    .search-result-item {
        padding: 10px 12px;
    }
    
    .search-result-image {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .search-input {
        padding: 8px 10px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .search-btn,
    .clear-search-btn {
        min-width: 40px;
        height: 40px;
        padding: 8px 10px;
    }
    
    .search-result-item {
        padding: 8px 10px;
    }
    
    .search-result-image {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }
    
    .search-result-title {
        font-size: 13px;
    }
    
    .search-result-category {
        font-size: 11px;
    }
}

/* Animasyonlar */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results-dropdown {
    animation: slideDown 0.2s ease-out;
}

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

.zmdi-hc-spin {
    animation: spin 1s linear infinite;
}

/* Focus durumları */
.search-result-item:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
    background: #f0f9ff;
}

/* Sidebar içindeki özel stiller */
.sidebar-block .product-search-container {
    background: transparent;
}

.sidebar-block .search-input-group {
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.sidebar-block .search-input-group:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Dark mode desteği */
@media (prefers-color-scheme: dark) {
    .search-input-group {
        background: #1f2937;
        border-color: #374151;
    }
    
    .search-input {
        color: #e5e7eb;
    }
    
    .search-input::placeholder {
        color: #9ca3af;
    }
    
    .search-results-dropdown {
        background: #1f2937;
        border-color: #374151;
    }
    
    .search-result-item {
        color: #e5e7eb;
        border-color: #374151;
    }
    
    .search-result-item:hover {
        background: #374151;
        color: #f9fafb;
    }
    
    .search-result-title {
        color: #f9fafb;
    }
    
    .search-result-category {
        color: #9ca3af;
    }
    
    .search-no-results {
        color: #9ca3af;
    }
}
