/* dates and product list */

#datesAndProductsList {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    margin-top: 60px;
}

#preProductDatesRow {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding-right: 0px;
    padding-left:20px;
}

.productDateLegend{
    width:40%;
    border:none;
}

#dateToSelectButton {
    width: 100%;
    box-sizing: border-box;
    border: 2px solid rgb(230, 230, 230);
    border-radius: 8px;
    text-align: center;
    padding-top: 8px;
    padding-bottom: 8px;
    background: white;
    color: black;
    font-family: Inter;
    margin-top: 8px;
    cursor: pointer;
    font-size:1.2rem;
}

#dateFromSelectButton {
    width: 100%;
    box-sizing: border-box;
    border: 2px solid rgb(230, 230, 230);
    border-radius: 8px;
    text-align: center;
    padding-top: 8px;
    padding-bottom: 8px;
    background: white;
    color: black;
    font-family: Inter;
    margin-top: 8px;
    cursor: pointer;
    font-size:1.2rem;
}

/* filter navigation */

#filterNavigation {
    width: 20%;
    min-width: 240px;
    box-sizing: border-box;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgb(200, 200, 200);
    position: relative;
    align-self: flex-start;
    /*margin-right:20px;*/
    /* Added to prevent stretching */
}


.filterSectionTitle {
    font-size: 1.2em;
    font-weight: bold;
    font-family: Satoshi;

}

.filterSectionTitleExpandIconHolder {
    height: 1.2em;
    /*width: 1.2em;*/
    font-size: 1.2em;
}

#filterIcon {
    height: 1.2em;
    width: auto;
}


.filterSectionHeaderRow {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.filterSection {
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    padding-top: 8px;
    padding-bottom: 8px;
}

.filterSectionRow {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-right:4px;
    cursor:pointer;
}

.filterName {
    font-family: Inter;
    font-size: 1em;
}

.filterExpandIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    /* This makes the icon's size match the text size */
    height: 1.2em;
    /* Adjust these values if needed for a square look */
    /*width: 1em;*/
    transition: transform 0.3s ease;
}


/* When the section is expanded, add an 'expanded' class to its container */
.filterSection.expanded .filterExpandIcon {
    transform: rotate(90deg);
}

hr {
    margin-top: 8px;
    margin-bottom: 8px;
}

.buttonSelector {
    padding: 8px;
    box-sizing: border-box;
    color: black;
    font-family: Inter;
    margin-right: 4px;
    margin-top: 4px;
    position: relative;
    float: left;
    font-size: .8em;
    background: rgb(230, 230, 230);
    border-radius: 8px;
    cursor: pointer;
}

#applyFilterButton {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    background: black;
    color: white;
    font-family: 'Satoshi';
    font-weight: bold;
    cursor: pointer;
    margin-top: 12px;
}

.noResultsMessage{
    padding:20px;
}

/* accordion elements */
/* Accordion Content: pre-expanded */
.accordion-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 500px;
    /* or another value that suits your content */
    padding: 0;
    /* Remove extra padding */
    margin: 0;
    /* Remove extra margin */
    width: 100%;
    /* Ensure it takes the full available width */
}


/* When collapsed, set max-height to 0 */
.accordion-content.collapsed {
    max-height: 0;
}

/* Rotate header icon: pre-expanded state: pointing up */
.accordion-header .filterSectionTitleExpandIconHolder {
    transition: transform 0.3s ease;
    transform: rotate(-90deg);
    /* Rotated so it points up */
}

/* When header is toggled (collapsed state), rotate icon to point right */
.accordion-header.collapsed .filterSectionTitleExpandIconHolder {
    transform: rotate(0deg);
}


/* dual slider elements */
/* Slider container fills 100% of its parent */
/* === Desktop Dual Slider === */
#dualSlider {
    position: relative;
    width: 100%;
    height: 30px;
    margin-top: 10px;
    margin-bottom: 20px;
    margin-left: 0;
    margin-right: 0;
    padding-top: 2em; /* space for the labels */
}

#dualSlider .track {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: lightgray;
    transform: translateY(-50%);
    z-index: 1;
}

#dualSlider .active-track {
    position: absolute;
    top: 50%;
    height: 8px;
    background-color: black;
    transform: translateY(-50%);
    z-index: 2;
}

#dualSlider .thumb {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background-color: black;
    border: 2px solid black;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    cursor: pointer;
}

#dualSlider .value {
    position: relative;
    top: 90%;
    font-size: 14px;
    transform: translateX(-50%);
    color: black;
    z-index: 4;
}

#dualSlider .value-container {
    position: relative;
    top: 0;
    left: 0;
    font-size: 0.9em;
    margin-bottom: 20px;
}

#dualSlider .value-container .value {
    min-width: 2.5em;
    text-align: right;
}

#dualSlider .value-container .separator {
    margin: 0 0.5em;
    user-select: none;
}


/* === Mobile Dual Slider === */
#dualSliderMobile {
    position: relative;
    width: 100%;
    height: 30px;
    margin-top: 10px;
    margin-bottom: 20px;
    margin-left: 0;
    margin-right: 0;
    padding-top: 2em; /* space for the labels */
}

#dualSliderMobile .track {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: lightgray;
    transform: translateY(-50%);
    z-index: 1;
}

#dualSliderMobile .active-track {
    position: absolute;
    top: 50%;
    height: 8px;
    background-color: black;
    transform: translateY(-50%);
    z-index: 2;
}

#dualSliderMobile .thumb {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background-color: black;
    border: 2px solid black;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    cursor: pointer;
}

#dualSliderMobile .value {
    position: relative;
    top: 90%;
    font-size: 14px;
    transform: translateX(-50%);
    color: black;
    z-index: 4;
}

#dualSliderMobile .value-container {
    position: relative;
    top: 0;
    left: 0;
    font-size: 0.9em;
    margin-bottom: 20px;
}

#dualSliderMobile .value-container .value {
    min-width: 2.5em;
    text-align: right;
}

#dualSliderMobile .value-container .separator {
    margin: 0 0.5em;
    user-select: none;
}

/* Product display */

#productsSection {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: row;
    box-sizing: border-box;
}

#productDisplay {
    width: 74%;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    height: 100%;
}

.product-card {
    min-width: 180px;
    max-width: 280px;
    width: calc(33.3333% - 20px);
    /*height: 420px;*/
    position: relative;
    display:flex;
    flex-direction:column;
    min-height:380px;
    float: left;
    margin-left: 20px;
    margin-top: 20px;
}

.productStarsHolder {
    position: relative;
    display: block;
    width: 100%;
    margin-top: 8px;
}

.productStar {
    height: 16px;
    width: 16px;
    margin-right: 8px;
    float: right;
}

.productCardImage {
    width: 84%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
    margin-top: 1rem;
    margin-left: 8%;
}

.product-card h3 {
    font-size: 1.4rem;
    margin-left: 16px;
    margin-right: 16px;
    font-weight: bold;
}

.product-card p {
    margin-left: 16px;
    margin-right: 16px;
    display:flex;
    flex-direction:row;
    justify-content: space-between;
}

.productName{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    line-clamp: 3;
    overflow: hidden;
}

.productCardDescription {
    font-size: 1rem;
    color: rgb(100, 100, 100);
}

.productFooter {
    margin-top: auto;            /* Pushes the footer to the bottom of the card */
    display: flex;
    flex-direction: column;
    gap: 1em;                    /* Fixed gap between the price and the buttons */
}

.productPrice {
    color: black;
    margin-top: 1rem;
    font-weight: bold;
    font-size: 1.2rem;
}

.productCardHolder {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 1em;
    box-sizing: border-box;
    /*margin-top: 2em;*/
    margin-top:auto;
    gap: 8px;
    padding: 0 16px;
}

.productCardAddToKit,
.productCardTailorBuild {
    flex: 1;
    padding: .7em .4em;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    box-sizing: border-box;
    transition: background-color 0.3s;
    font-size: 0.75em;
    white-space: nowrap;
    cursor: pointer;
}

.productCardAddToKit {
    background: black;
}

.productCardAddToKit:hover {
    background-color: #333;
}

.productCardTailorBuild {
    background: #666;
}

.productCardTailorBuild:hover {
    background-color: #555;
}

/* Green styling for products in cart */
.productCardAddToKit.in-cart {
    background-color: #28a745 !important;
}

.productCardAddToKit.in-cart:hover {
    background-color: #218838 !important;
}

/* mobile elements*/

/*product card elements*/
.mobileProductStarHolder {
    display: none;
}

/*other mobile elements*/
#mobileFiltersRow {
    display: none;
    width: 100%;
    padding-right: 20px;
}

#mobileFiltersLeftColumn {
    width: calc(50% - 30px);
    margin-left: 20px;
    min-width: 180px;
    max-width: 400px;
}

#mobileFilterDropDown {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px;
    border: 1px solid rgb(210, 210, 210);
    border-radius: 8px;
    height: 50px;
}

#mobileFiltersRightColumn {
    width: calc(50% - 30px);
    margin-left: 20px;
    min-width: 180px;
    max-width: 400px;
}

#mobileSortByDropDown {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px;
    border: 1px solid rgb(210, 210, 210);
    border-radius: 8px;
    height: 50px;
}

/* Button Styling for both Filter and Sort */
.mobileFilterButton,
.mobileSortByButton {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    border: 1px solid rgb(210, 210, 210);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    height: 50px;
}

/* Icon Styling */
.mobileFilterIcon,
.mobileSortByIcon {
    height: 24px;
    width: auto;
    margin-right: 8px;
}

/* Dropdown Overlay Content */
.mobileDropdownContent {
    display: none;
    /* Hidden by default; toggle via JS */
    position: absolute;
    top: 55px;
    /* Position it just below the button */
    left: 0;
    right: 0;
    background: white;
    border: 1px solid rgb(210, 210, 210);
    border-radius: 8px;
    padding: 10px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Option List Styling */
.mobileDropdownContent ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobileDropdownContent li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-family: Inter, sans-serif;
    font-size: 1em;
}

.mobileDropdownContent li:last-child {
    border-bottom: none;
}

@media only screen and (max-width: 1200px) {
    #productDisplay {
        width: 74%;
    }
}

@media only screen and (max-width: 1111px) {

    #filterNavigation {
        width: calc(22% - 20px);
        margin-left: 20px;
    }

    #productDisplay {
        width: 78%;
        padding-right: 20px;
    }

    .product-card {
        width: calc(50% - 30px);
        max-width: 400px;
    }
}

@media only screen and (max-width: 836px) {

    #productsSection {
        flex-direction: column;
    }

    #filterNavigation {
        display: none;
    }

    #mobileFiltersRow {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    #productDisplay {
        width: 100%;
        padding-right: 20px;
    }
}

@media only screen and (max-width: 533px) {
    .productStarsHolder {
        display: none;
    }

    .mobileProductStarHolder {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        margin-left: 16px;
        margin-right: 16px;
        margin-top: 1em;
    }

    .productCardTailorBuild {
        display: none;
    }

    .productCardAddToKit {
        width: 80%;
    }
}

@media only screen and (max-width: 438px) {
    /* Product display */

    #productsSection {}

    #productDisplay {
        padding-right: 10px;
    }

    .product-card {
        min-width: 160px;
        max-width: 280px;
        width: calc(50% - 10px);
        /*height: 420px;*/
        position: relative;
        float: left;
        margin-left: 10px;
        margin-top: 10px;
    }

    .productStar {
        height: 16px;
        width: 16px;
        margin-right: 8px;
        float: right;
    }

    .productCardImage {
        width: 84%;
        height: auto;
        border-radius: 4px;
        margin-bottom: 1rem;
        margin-top: 1rem;
        margin-left: 8%;
    }

    .product-card h3 {
        font-size: 1.2rem;
        margin-left: 16px;
        margin-right: 16px;
        font-weight: bold;
    }

    .product-card p {
        margin-left: 16px;
        margin-right: 16px;
    }

    .productCardDescription {
        font-size: .9rem;
        color: rgb(100, 100, 100);
    }

    .productPrice {
        color: black;
        margin-top: .8rem;
        font-weight: bold;
        font-size: 1rem;
    }

    .productCardHolder {
        width: 100%;
        position: relative;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        margin-bottom: 1em;
        box-sizing: border-box;
        margin-top: 2em;
    }

    .productCardAddToKit {}

    .productCardTailorBuild {}

    /* mobile elements*/

    /*product card elements*/
    .mobileProductStarHolder {
        margin-top: .8em;
    }

    /*other mobile elements*/
    #mobileFiltersRow {
        padding-right: 10px;
    }

    #mobileFiltersLeftColumn {
        width: calc(50% - 10px);
        margin-left: 10px;
        min-width: 140px;
        max-width: 400px;
    }

    #mobileFilterDropDown {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 12px;
        border: 1px solid rgb(210, 210, 210);
        border-radius: 8px;
        height: 50px;
    }

    #mobileFiltersRightColumn {
        width: calc(50% - 10px);
        margin-left: 10px;
        min-width: 140px;
        max-width: 400px;
    }

    #mobileSortByDropDown {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 12px;
        border: 1px solid rgb(210, 210, 210);
        border-radius: 8px;
        height: 50px;
    }

    /* Button Styling for both Filter and Sort */
    .mobileFilterButton,
    .mobileSortByButton {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 12px;
        border: 1px solid rgb(210, 210, 210);
        border-radius: 8px;
        background: white;
        cursor: pointer;
        height: 50px;
    }

    /* Icon Styling */
    .mobileFilterIcon,
    .mobileSortByIcon {
        height: 24px;
        width: auto;
        margin-right: 8px;
    }

    /* Dropdown Overlay Content */
    .mobileDropdownContent {
        display: none;
        /* Hidden by default; toggle via JS */
        position: absolute;
        top: 55px;
        /* Position it just below the button */
        left: 0;
        right: 0;
        background: white;
        border: 1px solid rgb(210, 210, 210);
        border-radius: 8px;
        padding: 10px;
        z-index: 100;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    /* Option List Styling */
    .mobileDropdownContent ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobileDropdownContent li {
        padding: 8px 0;
        border-bottom: 1px solid #eee;
        font-family: Inter, sans-serif;
        font-size: 1em;
    }

    .mobileDropdownContent li:last-child {
        border-bottom: none;
    }
}

@media only screen and (max-width: 406px) {}