/* Store Search Styles */


.store-search-container {
    position: sticky;
	/*top: 80px; */
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem;
    transition: all 0.3s ease;
}

.store-search-inner {
    max-width: 100%;
    margin: 0 auto;
}

.store-search-form {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.store-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.store-search-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 2px 15px rgba(245, 158, 11, 0.15);
}

.search-submit {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #6b7280;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-submit:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.search-loading {
    position: absolute;
    right: 3rem;
    display: none;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #f59e0b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.store-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    border: 1px solid #e5e7eb;
}

.store-search-results.active {
    display: block;
    animation: fadeInUp 0.2s ease;
}

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

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
    min-height: 44px;
}

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

.search-result-item:hover {
    background-color: #f9fafb;
}

.search-result-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 1rem;
    flex-shrink: 0;
    background: #f3f4f6;
}

.search-result-content {
    flex: 1;
    min-width: 0;
    margin-right: 1rem;
}

.search-result-title {
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

.search-result-price {
    color: #6b7280;
    font-size: 0.8rem;
    margin: 0;
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .store-search-container {
        padding: 0.75rem 1rem;
    }
    
    .store-search-input {
        padding: 0.875rem 1rem;
        padding-right: 3.5rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .search-result-item {
        padding: 1rem;
    }
}

@media (max-width: 400px) {
    .store-search-container {
        padding: 0.5rem;
    }
    
    .store-search-input {
        padding: 0.75rem 1rem;
        padding-right: 3.5rem;
    }
    
    .search-result-image {
        width: 40px;
        height: 40px;
        margin-right: 0.75rem;
    }
    
    .search-result-content {
        margin-right: 0.75rem;
    }
}

/* Hide on non-WooCommerce pages */
body:not(.woocommerce-page) .store-search-container {
    display: none !important;
}