/* Basic CSS for the search form */
.search-form-wrapper {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    direction: rtl; /* For right-to-left languages */
}

/* The main form is a grid for the select boxes */
.search-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.search-form-wrapper .form-group {
    display: flex;
    flex-direction: column;
}

.search-form-wrapper label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.search-form-wrapper select,
.search-form-wrapper input[type="number"] {
    padding: 1px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

.search-form-wrapper button {
    padding: 12px;
    background-color: #8f3f99; /* Changed button color */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.search-form-wrapper button:hover {
    background-color: #000; /* Changed hover color to black */
}

.search-results {
    direction: rtl;
}

.no-results {
    text-align: center;
    color: #888;
    font-size: 1.2em;
    padding: 30px;
    border: 1px dashed #ccc;
    border-radius: 8px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.product-card h3 {
    margin-top: 10;
    font-size: 1.5em;
    color: #000;
}

.product-card h3 a {
    text-decoration: none;
    color: #000;
}

.product-card a:hover {
    color: #8f3f99;
}

.product-card a img {
    border-radius: 155px;
    transition: transform 0.3s ease-in-out;
}
.product-card a:hover img {
    transform: scale(0.8);
}

/* CSS for the new search terms display */
.search-terms-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.search-terms-wrapper .search-term-item {
    background-color: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Re-styled checkbox group for a horizontal, full-width layout with separators */
.checkbox-group-wrapper {
    padding: 15px 0;
    margin-top: 20px;
}
.checkbox-group-wrapper > label {
    font-weight: bold;
    color: #555;
    margin-bottom: 10px;
    display: block;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
}

.checkbox-group .checkbox-item {
    font-weight: normal;
    display: flex;
    align-items: center;
    white-space: nowrap;
    padding: 5px 10px;
}

.checkbox-group .checkbox-item input[type="checkbox"] {
    margin-left: 5px;
}

.checkbox-group .checkbox-item:not(:last-child)::after {
    content: '|';
    margin-left: 10px;
    color: #ccc;
    font-size: 1.2em;
}

/* --- Collapsible Form Styles --- */
.search-form-container {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.search-form-container.collapsed {
    max-height: 0;
}

.search-toggle-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.search-toggle-link {
    color: #8f3f99;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}

.search-toggle-link:hover {
    color: #000;
    text-decoration: underline;
}

.form-actions-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.form-actions-wrapper button {
    flex: 1 1 auto;
}

.form-actions-wrapper .reset-link-button {
    font-size: 14px;
    color: #8f3f99;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
    margin-left: 10px; /* Space between reset and search button */
}

.form-actions-wrapper .reset-link-button:hover {
    color: #000;
    text-decoration: underline;
}
/* Hides the services checkbox group by default */
.services-toggle-wrapper.collapsed .checkbox-group {
    display: none;
}

/* Styles the toggle link for showing/hiding services */
.services-toggle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 15px;
}

.services-toggle-link {
    font-size: 14px;
    color: #8f3f99;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease-in-out;
}

.services-toggle-link:hover {
    color: #000;
    text-decoration: underline;
}
</style>
