.staytile-container {
    margin: 0rem auto;
    padding: 40px 120px;
    max-width: 1550px;

    @media (max-width: 1024px) {
        padding: 0 60px;
    }

    @media (max-width: 768px) {
        padding: 0 1rem;
    }
}

.staytile-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 2rem 0;
    color: $staytile-title-color;
    text-align: center;
}

/* Tab Navigation */
.staytile-tabs {
    display: flex;
    justify-content: flex-start;
    border-bottom: none;
    flex-wrap: nowrap;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: $staytile-tabs-bg;
    border-radius: 12px;
    padding: 5px;

    @media (max-width: 768px) {
        max-width: 600px;
    }

    @media (max-width: 480px) {
        flex-direction: row;
    }

    .nav-item {
        margin-bottom: 0;
        padding: 0;

        &::before {
            display: none;
        }

        @media (max-width: 768px) {
            display: flex;
            flex-grow: 0;
        }
    }

    .nav-link {
        border-radius: 12px;
        padding: 1.25rem 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        cursor: pointer;
        transition: all 0.3s ease;
        min-width: 184px;
        border: none;
        text-decoration: none;
        color: $staytile-title-color;
        background: transparent;

        @media (max-width: 768px) {
            min-width: auto;
            width: 100%;
        }

        @media (max-width: 480px) {
            flex-direction: column;
            align-items: center;
            padding: 10px;
            min-width: 100px;
            width: 112px;
            text-overflow: ellipsis;
            overflow: hidden;
        }

        &:hover {
            background: rgba(91, 74, 159, 0.1);
        }

        &.active {
            background: $staytile-nav-button-bg;
            color: $staytile-text-white;

            &:hover {
                background: $staytile-nav-button-hover;
            }

            .tab-icon img {
                filter: brightness(0) invert(1);
            }

            .tab-title {
                color: $staytile-text-white;
            }
        }

        .tab-icon {
            height: 25px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;

            @media (max-width: 480px) {
                height: 25px;
            }

            img {
                height: 25px;
                max-width: 100%;
                max-height: 100%;
                object-fit: contain;
                filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(2000%) hue-rotate(210deg) brightness(0.9);
                transition: filter 0.3s ease;
            }
        }

        .tab-title {
            text-align: center;
            font-size: 14px;
            font-style: normal;
            font-weight: 700;
            line-height: 18px;
            color: inherit;
            transition: color 0.3s ease;
        }
    }
}

/* Tab Content */
.staytile-content {
    margin-top: 2rem;
}

.tab-pane {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Stay Cards Grid */
.stay-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;

    @media (max-width: 768px) {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stay-card {
        padding-bottom: 0px;
    }
}

/* Stay Card */
.stay-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid $staytile-card-border;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
    height: 100%;

    .stay-card-image {
        position: relative;
        width: 100%;
        height: 327px;
        overflow: hidden;

        @media (max-width: 768px) {
            height: 300px;
        }

        picture {
            display: block;
            width: 100%;
            height: 100%;

            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                border-radius: 12px 12px 0 0;
            }
        }

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 12px 12px 0 0;
        }

        .stay-card-icons {
            position: absolute;
            bottom: 3rem;
            left: 0.5rem;
            display: flex;
            gap: 0.75rem;
            z-index: 5;

            .stay-icon {
                width: 33.25px;
                height: 33.25px;
                padding: 4.156px;
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                border: 3px solid white;

                @media (max-width: 480px) {
                    width: 40px;
                    height: 40px;
                    padding: 0.5rem;
                }

                img {
                    max-width: 100%;
                    max-height: 100%;
                    object-fit: contain;
                    filter: brightness(0) invert(1);
                }
            }
        }

        .stay-card-badge-box {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: $staytile-badge-box-bg;
            padding: 5px 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 10;
            flex-shrink: 0;
            align-self: stretch;

            .badge-keywords {
                display: flex;
                gap: 0.5rem;
                flex-wrap: wrap;
                align-items: center;
                color: white;
            }

            .badge-text {
                background: $staytile-badge-text-bg;
                padding: 5px 8px;
                text-transform: capitalize;
                color: $staytile-text-white;
                font-size: 12px;
                font-weight: 400;
                line-height: 18px;
                border-radius: 30px;

                @media (max-width: 480px) {
                    font-size: 0.9rem;
                    padding: 0.4rem 1rem;
                }
            }

            .badge-pricing {
                display: flex;
                flex-direction: row;
                align-items: center;
                gap: 1rem;

                @media (max-width: 480px) {
                    gap: 0.75rem;
                }
            }

            .badge-actual-price {
                color: $staytile-text-white;
                font-size: 14px;
                font-style: normal;
                font-weight: 400;
                line-height: 150%;
                text-decoration-line: line-through;

                @media (max-width: 480px) {
                    font-size: 1rem;
                }
            }

            .badge-price {
                color: $staytile-text-white;
                font-size: 16px;
                font-style: normal;
                font-weight: 800;
                line-height: 24px;


            }
        }
    }

    .stay-card-content {
        padding: 20px;
        display: flex;
        flex-direction: column;
        flex: 1;

        @media (max-width: 768px) {
            padding: 1.5rem;
        }

        .stay-card-title {
            color: $staytile-card-title-color;
            font-size: 20px;
            font-style: normal;
            font-weight: 700;
            line-height: 30px;
            margin: 0;
            padding: 0;


        }

        .stay-card-subtitle {
            color: $staytile-card-subtitle-color;
            font-size: 16px;
            font-weight: 400;
            line-height: 24px;
            padding-bottom: 15px;
        }

        .stay-card-description {
            color: $staytile-card-title-color;
            font-size: 16px;
            font-weight: 400;
            line-height: 21px;
            margin-bottom: 1.5rem;
            flex: 1;

            p {
                margin: 0;
            }
        }

        .stay-card-buttons {
            display: flex;
            flex-direction: row;
            align-items: flex-start;
            gap: 15px;
            align-self: stretch;
            flex-wrap: wrap;
            margin-top: auto;

            @media (max-width: 480px) {
                display: flex;
                flex-direction: row;
                flex-wrap: nowrap;
                /* prevent wrapping */
                gap: 10px;
            }

            .stay-button-wrapper {
                flex: 1 1 0;
                // min-width: 150px;
                display: flex;
                align-items: flex-start;
                gap: 15px;

                @media (max-width: 480px) {
                    width: 100%;
                    min-width: auto;
                }

                &.button-inside {
                    position: relative;

                }

                &.button-outside {
                    position: absolute;
                    left: 50%;
                    transform: translate(-50%, 50%);
                    bottom: 0;
                    z-index: 10;

                    @media (max-width: 767px) {
                        transform: translate(-50%, 40%);
                    }
                }

                .stay-button {
                    display: flex;
                    height: 45px;
                    padding: 15px 10px;
                    justify-content: center;
                    align-items: center;
                    gap: 10px;
                    flex: 1 0 0;
                    text-decoration: none;
                    border-radius: 4px;
                    transition: all 0.3s ease;
                    cursor: pointer;
                    font-size: 18px;
                    font-weight: 600;
                    border-radius: 100px;

                    @media screen and (max-width: 1024px) {
                        font-size: 14px;
                    }

                    &.primary {
                        background: $staytile-button-primary-bg;
                        color: $staytile-button-primary-text;
                        border: 3px solid $staytile-button-primary-bg;

                        &:hover {
                            background: $staytile-button-primary-hover;
                            border-color: $staytile-button-primary-hover;

                        }
                    }

                    &.secondary {
                        border: 1px solid $staytile-card-title-color;
                        color: $staytile-card-title-color;
                        background: transparent;

                        &:hover {
                            background: $staytile-card-title-color;
                            color: $staytile-text-white;
                        }
                    }

                    &.outline {
                        background: transparent;
                        border: 3px solid $staytile-title-color;
                        color: $staytile-title-color;

                        &:hover {
                            background: $staytile-title-color;
                            color: $staytile-text-white;
                        }
                    }

                    .button-icon {
                        display: inline-flex;
                        align-items: center;
                        justify-content: center;
                        width: 1.25rem;
                        height: 1.25rem;
                        flex-shrink: 0;

                        @media (max-width: 767px) {
                            width: 1rem;
                            height: 1rem;
                        }

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

                        &.button-icon-before {
                            order: -1;
                        }

                        &.button-icon-after {
                            order: 1;
                        }
                    }

                    .button-text {
                        order: 0;
                    }
                }
            }
        }
    }
}

/* Stay Icon - can be used standalone or within stay-card-icons */
.stay-icon {
    width: 33.25px;
    height: 33.25px;
    padding: 4.156px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid $staytile-text-white;

    @media (max-width: 480px) {
        width: 40px;
        height: 40px;
        padding: 0.5rem;
    }

    img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        filter: brightness(0) invert(1);
    }
}

/* Badge Keywords - can be used standalone or within stay-card-badge-box */
.badge-keywords {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    color: white;
}

/* Badge Pricing - can be used standalone or within stay-card-badge-box */
.badge-pricing {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;

    @media (max-width: 480px) {
        gap: 0.75rem;
    }
}

/* Badge Actual Price - can be used standalone or within badge-pricing */
.badge-actual-price {
    color: $staytile-text-white;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
    text-decoration-line: line-through;

    @media (max-width: 480px) {
        font-size: 1rem;
    }
}

/* Stay Button - can be used standalone or within stay-button-wrapper */
.stay-button {
    display: flex;
    height: 45px;
    padding: 15px 10px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex: 1 0 0;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-radius: 100px;

    &.primary {
        background: $staytile-button-primary-bg;
        color: $staytile-button-primary-text;
        border: 3px solid $staytile-button-primary-bg;

        &:hover {
            background: $staytile-button-primary-hover;
            border-color: $staytile-button-primary-hover;
            transform: translateY(-2px);
            box-shadow: 0 6px 20px $staytile-button-primary-shadow;
        }
    }

    &.secondary {
        border: 1px solid $staytile-card-title-color;
        color: $staytile-card-title-color;
        background: transparent;

        &:hover {
            background: $staytile-card-title-color;
            color: $staytile-text-white;
        }
    }

    &.outline {
        background: transparent;
        border: 3px solid $staytile-title-color;
        color: $staytile-title-color;

        &:hover {
            background: $staytile-title-color;
            color: $staytile-text-white;
        }
    }
}

/* Button Icon - can be used standalone or within stay-button */
.button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;

    @media (max-width: 767px) {
        width: 1rem;
        height: 1rem;
    }

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

    &.button-icon-before {
        order: -1;
    }

    &.button-icon-after {
        order: 1;
    }
}

/* Standalone button icon modifier classes */
.button-icon-before {
    order: -1;
}

.button-icon-after {
    order: 1;
}

.button-text {
    order: 0;
}

/* Owl Carousel Slider */
.stay-card-slider.owl-carousel {
    margin: 0;
    padding: 0;

    .owl-item {
        padding: 3px;

        .stay-card {
            margin: 0 auto;
            // max-width: 400px;
        }
    }

    .owl-nav {
        display: flex;
        justify-content: space-between;
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        transform: translateY(-50%);
        pointer-events: none;
        z-index: 100;

        @media (max-width: 1024px) {
            display: none;
        }

        button {
            pointer-events: all;
            background: $staytile-nav-button-bg !important;
            color: $staytile-text-white !important;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            border: none;
            cursor: pointer;
            transition: all 0.3s ease;


            @media (max-width: 768px) {
                width: 40px;
                height: 40px;
                font-size: 1.5rem;
            }

            &:hover {
                background: $staytile-nav-button-hover !important;

            }

            &.owl-prev {
                margin-left: -75px;

                @media (max-width: 768px) {
                    margin-left: 0px;
                }
            }

            &.owl-next {
                margin-right: -75px;

                @media (max-width: 768px) {
                    margin-right: 0px;
                }
            }

            &.owl-prev:before,
            &.owl-next:before {
                font-size: 1.5rem !important;
                line-height: 3.25rem !important;
            }
        }

        &.disabled {
            display: none;
        }
    }

    .owl-dots {
        display: flex;
        justify-content: center;
        gap: 0px;
        margin-top: 0rem;
        padding-bottom: 1rem;

        &.disabled {
            display: none;
        }
    }

    .owl-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: $staytile-dot-inactive;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;

        &.active {
            background: $staytile-nav-button-bg;

        }
    }
}