/* ========================================
 EQUIPMENT ARCHIVE STYLE
 ========================================= */
.sattv-decoder-archive {
    background: #fafbff;

    &.has-header-image {

        .site-content-heading {
            &::before {
                content: '';
                display: block;
                background: url('../images/composant-1-bg.svg') 0 bottom no-repeat;
                position: absolute;
                bottom: initial;
                top: -1rem;
                left: 0;
                width: 100%;
                height: 15rem;
                background-size: cover;
                transform: none;
            }

            &::after {
                content: '';
                display: block;
                background: url('../images/ligne-separation.svg') 0 bottom no-repeat;
                position: absolute;
                bottom: -3rem;
                left: 0;
                width: 100%;
                height: 6rem;
                background-size: cover;
            }

            background-size: cover;
            background-position: center;
            height: 550px;

            & .section-inner {
                position: relative;

                & .site-content-heading-title {
                    margin-top: 12rem;
                    max-width: 50%;
                    text-align: left;
                }
            }
        }
    }

    .site-content-heading-title {
        text-align: center;
        margin-bottom: 5rem;

        & h1 {
            color: var(--selected-color);
            text-transform: uppercase;
        }

        & .site-content-heading-subtitle {
            font-size: 2.5rem;
            font-weight: 500;
            color: #000;
        }
    }

    & #equipment-search-form {
        display: grid;
        grid-template-columns: 1fr 3fr;
        gap: 2rem;
    }

    /*.archive-equipment-search,*/

    & .sidebar-filters {
        & .filter-title {
            display: none;
        }

        .filter-reinit {
            height: 60px;
            padding: 1.5rem 0;

            & a {
                font-weight: 500;
                font-size: 1.8rem;
                text-decoration: none;
            }
        }

        & .filter-group {
            margin: 2rem 0;
            padding: 2rem;
            border: 1px solid #ddd;
            background: #fff;

            & p.group-title {
                margin-bottom: 2rem;
                font-weight: 500;
                font-size: 2.5rem;
            }

            & input[type="checkbox"] {
                display: inline-block;
                margin-right: 1rem;
                /*vertical-align: middle;*/
            }

            & label {
                text-transform: uppercase;
                font-weight: 300;
                font-size: 1.4rem;
                align-items: baseline;
            }
        }


    }


    & .equipment-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        align-items: stretch;

        & .equipment-item {
            padding: 2rem 1.5rem;
            display: flex;
            flex-direction: column;
            height: 100%;

            & .button-outline {
                margin-top: auto;
                align-self: flex-start;
            }

            &:hover {
                background: #fff;
                box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

                > .equipment-thumbnail > img {
                    transform: scale(1.05);
                    transition: transform 0.3s ease;
                }
            }
        }

        & .equipment-thumbnail {
            width: 100%;
            height: 250px;

            & > img {
                width: 100%;
                height: 100%;
                object-fit: contain;
            }
        }

        & .equipment-title {
            margin-bottom: 2rem;
        }

        & .equipment-excerpt {
            margin-bottom: 1.5rem;
        }
    }

    & .other-country-content {
        padding: 3rem;
        text-align: center;

        & .other-country-image {
            margin-bottom: 2rem;

            & img {
                max-width: 100%;
                margin: 3rem auto;
                height: auto;
            }
        }

        & .other-country-text {
            font-size: 1.8rem;
            font-weight: 500;
            line-height: 1.6;
            text-align: left;
        }
    }
}

/* Small devices (landscape phones, less than 768px)*/
@media (max-width: 767px) {
    .sattv-decoder-archive {

        &.has-header-image {
            .site-content-heading {
                height: 300px;

                &::before {
                    height: 10rem;
                }

                &::after {
                    height: 3rem;
                    bottom: -2.5rem;
                }


                & .section-inner {
                    & .site-content-heading-title {
                        margin-top: 6rem;
                        max-width: none;
                    }
                }
            }
        }

        & #equipment-search-form {
            grid-template-columns: 1fr;
        }

        & .sidebar-filters {
            & .filter-title {
                display: block;
                position: relative;

                & .filter-toggle-icon {
                    position: absolute;
                    right: 0;
                    cursor: pointer;
                    width: 30px;

                    & > svg {
                        width: 100%;
                        color: var(--selected-color);
                    }
                }
            }

            & .filter-content {
                display: none;
                max-height: 0;
                transition: all 2s ease;
            }

            &.open {
                & .filter-title {
                    & .filter-toggle-icon {
                        & > svg {
                            transform: rotate(180deg);
                        }
                    }
                }

                & .filter-content {
                    display: block;
                    max-height: 1000px;
                }
            }
        }

        & .equipment-grid {
            grid-template-columns: 1fr;
        }
    }
}

/* ========================================
 SINGLE EQUIPMENT PAGE STYLE
 ========================================= */
.sattv-decoder-single {
    background: #fafbff;

    & .equipment-top-row {
        display: grid;
        grid-template-columns: 3fr 2fr;
        gap: 2rem;
        margin-bottom: 40px;


        & .equipment-gallery {
            flex: 1;
            min-width: 0; /* Important for Slick inside flex/grid */

            & .slider-container {
                position: relative;

                & .slider-for {
                    margin-bottom: 15px;

                    & .slide-item {
                        & img {
                            width: 100%;
                            padding-left: 90px;
                            padding-right: 52px;
                            height: auto;
                            display: block;
                            border-radius: 4px;
                        }
                    }
                }

                & .slider-nav {
                    max-width: 80%;
                    margin: 0 auto;
                    & .nav-item {
                        padding: 0 5px;
                        cursor: pointer;
                        opacity: 0.5;
                        transition: opacity 0.3s ease;

                        &.slick-current {
                            opacity: 1;
                        }

                        & img {
                            width: 100%;
                            height: auto;
                            display: block;
                            border: 2px solid transparent;
                            border-radius: 2px;
                        }

                        &.slick-current img {
                            border-color: var(--selected-color);
                        }
                    }

                    /* Customizing Slick Arrows */
                    & .slick-prev, & .slick-next {
                        z-index: 1;
                        width: 30px;
                        height: 30px;
                        &:before {
                            color: var(--selected-color);
                            font-size: 30px;
                        }
                    }
                    & .slick-prev {
                        left: -35px;
                    }
                    & .slick-next {
                        right: -35px;
                    }
                }
            }
        }


        & .equipment-info {
            /*flex: 1;*/

            & .equipment-title {
                font-size: 3.4rem;
                font-weight: 500;
                color: var(--tertiary-color);
            }

            & .equipment-excerpt {
                font-weight: 400;
                font-size: 1.8rem;
            }
        }
    }

    & .equipment-bottom-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding: 1rem;
        margin-bottom: 4rem;
        /*background-color: rgba(244, 244, 244, .5);*/

        & .foldable-section {
            padding: 3rem;
            background: #fff;

            & .section-title {
                background: #fff;
                border: none;
                border-bottom: 1px solid #f4f4f4;
                position: relative;
                font-size: 2rem;
                font-weight: 500;
                padding: 2rem 0;

                & .toggle-icon {
                    position: absolute;
                    right: 10px;
                    top: 50%;
                    transform: translateY(-50%);

                    & > svg {
                        color: var(--selected-color);
                        transform: rotate(180deg);
                    }
                }
            }

            &.folded {
                & .section-title {
                    & .toggle-icon {
                        & > svg {
                            transform: rotate(0deg);
                        }
                    }
                }
            }

            & .section-content {
                border: none;
                padding: 2rem 0;
            }
        }

        & .equipment-description {
            height: 100%;
            font-weight: normal;
        }

        & .equipment-specs {
            height: 100%;

            & .spec-type {
                font-weight: 500;
                font-size: 2rem;
                margin-bottom: 1rem;
            }

            & li {
                color: var(--text-color);
                font-weight: normal;
            }
        }
    }
}

@media (max-width: 767px) {
    .sattv-decoder-single {
        & .equipment-top-row {
            grid-template-columns: 1fr;
        }

        & .equipment-bottom-row {
            grid-template-columns: 1fr;
            padding: 0;

            & .foldable-section {
                padding: 2rem;
            }
        }
    }
}
/* ========================================
 GENERIC STYLE
 ========================================= */
.button-outline {
    display: inline-block;
    text-decoration: none;
    border: 2px solid;
    border-radius: .5rem;
    padding: .5rem 1.5rem;

    font-weight: 500;
}

.button-large {
    display: inline-block;
    width: 100%;
    font-size: 2.5rem;
    text-align: center;
    margin: 2rem 0;
}


/* ========================================
 RESELLERS MODAL STYLE
 ========================================= */
.sattv-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 900px;
    position: relative;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: black;
}

@media (max-width: 767px) {
    .modal-content {
        width: 95%;
    }
}

/* ================================================
OTHER STYLES
================================================ */
.foldable-section .section-title {
    cursor: pointer;
    background: #f4f4f4;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.foldable-section .section-content {
    padding: 15px;
    border: 1px solid #ddd;
    border-top: none;
}

#reseller-list {
    max-height: 250px; /* Ajuster selon la hauteur d'une ligne pour en avoir 2 */
    overflow-y: auto;
    margin-top: 20px;
}

.reseller-item {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 15px;
    padding: 15px;
    border: 1px solid #ccc;
    background-color: #fff;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    align-items: center;
    cursor: pointer;
}

.reseller-item:hover {
    background-color: #f0f7ff;
    border-color: #0073aa;
}

.reseller-name strong {
    font-weight: bold;
    color: #333;
}

.reseller-address {
    color: #666;
}

.reseller-phones a {
    display: block;
    color: #0073aa;
    text-decoration: none;
    margin-bottom: 5px;
}

.reseller-phones a:last-child {
    margin-bottom: 0;
}

.reseller-phones a:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .reseller-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}
