.equipment_archive_section {

    & .container {
        position: relative;
        z-index: 2;
        padding-bottom: 100px;

        & .section_inner {
            width: 100%;

            & h2, & h3 {
                width: 100%;
                text-align: center;
                font-weight: 400;
                font-size: 5rem;
                margin: 0 0 5rem;
                line-height: 1;
                color: var(--primary);
            }

            & .equipment-archive-content {
                width: 100%;
                display: flex;
                flex-direction: column;
                justify-content: center;
                margin: 0 0 5rem;
            }

            & .sunbed-tabs {
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 2rem;
                margin-bottom: 5rem;
                flex-wrap: wrap;

                /* Mobile: full-width stack — every category visible (matches lotions-section) */
                @media (max-width: 767px) {
                    display: grid;
                    grid-template-columns: 1fr;
                    gap: 1rem;
                    margin-bottom: 3rem;
                    width: 100%;
                }

                & .sunbed-tab {
                    padding: 1rem 2rem;
                    border-radius: 1rem;
                    color: #FFF;
                    text-align: center;
                    font-family: "DM Sans";
                    font-size: 1.8rem;
                    font-style: normal;
                    font-weight: 700;
                    line-height: normal;
                    border: 1px solid var(--primary);
                    color: var(--primary);
                    cursor: pointer;
                    background: none;
                    text-decoration: none;
                    display: inline-block;
                    transition: all 0.3s ease;

                    @media (max-width: 767px) {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        width: 100%;
                        min-height: 4.4rem;
                        box-sizing: border-box;
                        padding: 1.2rem 1.5rem;
                        font-size: 1.6rem;
                        line-height: 1.3;
                        text-wrap: balance;
                    }

                    &:hover {
                        background: #f7f2ef;
                    }

                    &:focus {
                        outline: 2px solid var(--primary);
                        outline-offset: 2px;
                    }
                }
            }

            /* Sections - all visible */
            & .sunbed-section {
                margin-bottom: 8rem;
                
                &:last-child {
                    margin-bottom: 0;
                }
                
                &::before {
                    content: '';
                    display: block;
                    height: 100px; /* Offset for anchor links */
                    margin-top: -100px;
                    visibility: hidden;
                }
                
                & .category-heading {
                    width: 100%;
                    text-align: center;
                    font-weight: 400;
                    font-size: 4rem;
                    margin: 0 0 4rem;
                    line-height: 1;
                    color: var(--primary);
                }

                & .equipment-search {
                    width: 73rem;
                    max-width: 100%;
                    margin: 0 auto 4rem;
                    position: relative;

                    & .equipment-search-input {
                        width: 100%;
                        padding: 18px 24px;
                        border-radius: 40px;
                        border: 2px solid #623A2D;
                        font-size: 17px;
                        background: #F8D2B3;
                        position: relative;
                        z-index: 2;
                        font-family: "DM Sans", arial;

                        &:focus {
                            outline: none;
                            border-color: #42251A;
                        }

                        &::placeholder {
                            color: #623A2D;
                            opacity: 0.7;
                        }
                    }
                }
            }

            /* Grid */
            & .sunbed-grid {
                display: flex;
                flex-wrap: wrap;
                gap: 5rem;
                justify-content: center;
                position: relative;

                & .sunbed-card {
                    display: flex;;
                    flex: 0 1 calc((100% - 10rem) / 3);
                    max-width: 40rem;
                    border: 2px solid var(--primary);
                    padding: 3rem;
                    text-align: center;
                    background: var(--white);
                    flex-direction: column;
                    position: relative;

                    @media (max-width: 991px) {
                        flex: 0 1 calc((100% - 5rem) / 2);
                    }

                    @media (max-width: 767px) {
                        flex: 0 1 100%;
                    }

                    & .sunbed-img {
                        & a {
                            display: block;
                            text-decoration: none;
                            transition: opacity 0.3s ease;

                            &:hover {
                                opacity: 0.9;
                            }
                        }

                        & img {
                            width: auto;
                            height: 23rem;
                            margin-bottom: 2rem;
                        }
                    }

                    & .sunbed-title {
                        color: #42251A;
                        text-align: center;
                        font-family: "Aboreto";
                        font-size: 2.4rem;
                        font-style: normal;
                        font-weight: 400;
                        line-height: 98%;
                        letter-spacing: 4.6px;
                        text-transform: uppercase;
                        margin: 2rem 0 3rem;

                        & a {
                            color: inherit;
                            font: inherit;
                            letter-spacing: inherit;
                            text-transform: inherit;
                            text-decoration: none;
                        }
                    }

                    & .buttons {
                        margin-top: auto;

                        & a:first-of-type {
                            margin-bottom: 2rem;
                        }

                        & .read-more-btn {
                            cursor: pointer;
                            width: 100%;
                        }
                    }
                }

                /* Popup - positioned directly under each card */
                & .sunbed-popup {
                    display: none;
                    position: fixed;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    z-index: 9999;
                    overflow-y: auto;

                    &.active {
                        display: flex;
                        align-items: flex-start;
                        justify-content: center;
                        padding: 16rem 2rem 5rem;

                        @media (max-width: 767px) {
                            padding: 12rem 2rem 4rem;
                        }
                    }

                    &::before {
                        content: '';
                        position: fixed;
                        top: 0;
                        left: 0;
                        width: 100%;
                        height: 100%;
                        background: rgba(0, 0, 0, 0.5);
                        z-index: -1;
                    }

                    & .popup-content {
                        position: relative;
                        background: var(--white);
                        border: 2px solid var(--primary);
                        padding: 4rem;
                        max-width: 60rem;
                        width: 100%;
                        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
                        z-index: 1;
                        max-height: calc(100vh - 22rem);
                        overflow-y: auto;

                        @media (max-width: 767px) {
                            padding: 3rem 2rem;
                            max-height: calc(100vh - 18rem);
                        }

                        & .popup-close {
                            position: absolute;
                            top: 1.5rem;
                            right: 1.5rem;
                            background: none;
                            border: none;
                            font-size: 3rem;
                            line-height: 1;
                            color: var(--primary);
                            cursor: pointer;
                            padding: 0;
                            width: 3rem;
                            height: 3rem;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            transition: all 0.3s ease;

                            &:hover {
                                transform: scale(1.1);
                                color: #3a2416;
                            }

                            &:focus {
                                outline: 2px solid var(--primary);
                                outline-offset: 2px;
                            }
                        }

                        & .popup-body {
                            & h3 {
                                color: #42251A;
                                font-family: "Aboreto";
                                font-size: 2.4rem;
                                font-style: normal;
                                font-weight: 400;
                                line-height: 98%;
                                letter-spacing: 4.6px;
                                text-transform: uppercase;
                                margin: 0 0 2rem;
                                text-align: center;
                            }

                            & p {
                                color: #42251A;
                                font-family: "DM Sans";
                                font-size: 1.6rem;
                                line-height: 1.6;
                                margin: 0 0 1.5rem;

                                &:last-child {
                                    margin-bottom: 0;
                                }
                            }

                            & .popup-content-field {
                                color: #42251A;
                                font-family: "DM Sans";
                                font-size: 1.6rem;
                                line-height: 1.6;

                                & p {
                                    margin: 0 0 1.5rem;

                                    &:last-child {
                                        margin-bottom: 0;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
