/* Search Styles */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    z-index: 99;
}

.search-form {
    display: flex;
    align-items: center;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 175, 14, 0.2);
}

.search-icon {
    position: absolute;
    left: 15px;
    color: #888;
    font-size: 1.1rem;
}

.search-clear-btn {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    display: none;
}

.search-clear-btn:hover {
    color: var(--red);
}

/* Search Results */
.search-results-container {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: none;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 100;
}

.search-results-header {
    padding: 15px;
    background-color: var(--background-dark);
    color: white;
    border-radius: 6px 6px 0 0;
}

.search-results-count {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.search-results-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.tab-button {
    background: none;
    border: none;
    color: var(--text-grey);
    padding: 5px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    margin-right: 5px;
    transition: all 0.2s;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    background-color: var(--primary-color);
    color: black;
}

.search-results-content {
    padding: 15px;
}

.search-loading {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-grey);
}

.search-loading i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

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

/* Result Sections */
.result-section {
    margin-bottom: 20px;
}

.result-section h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--background-dark);
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.view-more-link {
    display: block;
    text-align: center;
    padding: 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--background-dark);
    transition: background-color 0.3s;
}

.view-more-link:hover {
    background-color: #eee;
    color: var(--primary-color);
}

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-grey);
}

.no-results p {
    margin-bottom: 10px;
}

/* Promotion Results */
.search-promotion-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    transition: background-color 0.3s;
}

.search-promotion-item:hover {
    background-color: #f0f0f0;
}

.promotion-info {
    flex: 1;
}

.retailer-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: black;
    font-size: 0.8rem;
    padding: 3px 6px;
    border-radius: 3px;
    margin-bottom: 5px;
    font-weight: bold;
}

.search-promotion-item h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.promotion-price {
    margin-bottom: 5px;
}

.current-price {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.old-price {
    text-decoration: line-through;
    color: var(--text-grey);
    font-size: 0.9rem;
    margin-left: 5px;
}

.promotion-meta {
    display: flex;
    font-size: 0.8rem;
    color: var(--text-grey);
}

.category {
    margin-right: 10px;
}

.promotion-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    margin-left: 15px;
}

.view-promotion-btn {
    background-color: var(--primary-color);
    color: black;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
