/*
 * Base Frontend Styles for Advanced Search Pro
 */

.custom-search-container {
    position: relative;
    max-width: 700px; /* A good default max-width */
    margin: 20px auto; /* Center the search box by default */
}

.custom-search-form {
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden; /* Ensures border-radius is respected by children */
}

.custom-search-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
    height: 100%;
    box-sizing: border-box; /* Important for padding */
}

.search-button {
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 15px;
}

.search-dropdown-container {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1001;
    padding: 20px;
    box-sizing: border-box;
}

.search-dropdown-container .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.search-dropdown-container .section-header h3 {
    margin: 0;
    font-weight: 600;
}

.search-dropdown-container .section-header a {
    font-size: 13px;
    color: #0073aa;
    text-decoration: none;
}
.search-dropdown-container .section-header a:hover {
    text-decoration: underline;
}

.search-history-section {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-list li a {
    display: block;
    padding: 6px 0;
    text-decoration: none;
}
.history-list li a:hover {
    color: #000;
}

.recommendations-section {
    display: flex;
    gap: 20px;
}

.discover-more-column {
    width: 35%;
    padding-right: 20px;
    border-right: 1px solid #eee;
}

.discover-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.discover-list li a {
    display: block;
    padding: 4px 0;
    text-decoration: none;
}
.discover-list li a:hover {
    color: #000;
}

.categories-column {
    width: 65%;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 15px;
}

.category-item {
    text-align: center;
    text-decoration: none;
    color: #333;
}

.category-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    margin-bottom: 8px;
    background-color: #f9f9f9;
    border-radius: 4px;
    transition: transform 0.2s ease-in-out;
}
.category-item:hover img {
    transform: scale(1.05);
}

.category-item span {
    display: block;
    line-height: 1.3;
}

/* Handle cases where one column is hidden */
.recommendations-section .discover-more-column:only-child,
.recommendations-section .categories-column:only-child {
    width: 100%;
    padding: 0;
    border: none;
}
