:root {
--main-red: #b20912;
}
.container {
max-width: 800px;
margin: auto;
padding: 20px;
text-align: center;
}
/* Search box with flat icon */
.search-box {
position: relative;
margin-bottom: 30px;
}
.search-box input {
width: 100%;
padding: 10px 40px 10px 10px;
font-size: 18px;
}
.search-box i {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
font-size: 20px;
color: var(--main-red);
pointer-events: none;
}
.icon-bar {
display: flex;
justify-content: space-around;
margin-top: 20px;
flex-wrap: wrap;
}
.icon {
position: relative;
cursor: pointer;
margin: 10px;
}
.icon-label {
font-size: 18px;
font-weight: bold;
margin-bottom: 10px;
display: inline-block;
color: var(--main-red);
}
.dropdown {
display: none;
position: absolute;
top: 35px;
left: 0;
background: #fff;
border: 1px solid #ccc;
padding: 10px;
z-index: 10;
text-align: left;
white-space: nowrap;
min-width: 120px;
}
.icon:hover .dropdown {
display: block;
}
.dropdown label {
display: block;
margin-bottom: 5px;
cursor: pointer;
}
#apply-filters {
margin-top: 40px;
padding: 10px 30px;
font-size: 18px;
background-color: var(--main-red);
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
#apply-filters:hover {
background-color: #90080e;
}
document.addEventListener("DOMContentLoaded", function () {
document.getElementById("apply-filters").addEventListener("click", function () {
const searchValue = document.getElementById("searchInput").value;
const gender = document.querySelector('input[name="gender"]:checked')?.value || "Not selected";
const age = document.querySelector('input[name="age"]:checked')?.value || "Not selected";
const height = document.querySelector('input[name="height"]:checked')?.value || "Not selected";
alert(`Selected Filters:\nSearch: ${searchValue}\nGender: ${gender}\nAge: ${age}\nHeight: ${height}`);
});
});
Gender
Age
Height
MEN
Name: Adam
Age: 32
Eyes: Green
Hair: Black
Skin: Fair
Name: Yusuf
Age: 25
Eyes: Gray
Hair: Black
Skin: Olive
WOMEN
Name: Lina
Age: 27
Eyes: Hazel
Hair: Brown
Skin: Light
Name: Sara
Age: 45
Eyes: Blue
Hair: Gray
Skin: Pale
CHILDREN
Name: Omar
Age: 16
Eyes: Brown
Hair: Dark Brown
Skin: Medium
Name: Maya
Age: 15
Eyes: Amber
Hair: Red
Skin: Freckled
