* {
    margin: 0;
    box-sizing: border-box;
    list-style: none;
    padding: 0;
}

a {
    text-decoration: none;
}

body {
    font-family: 'MyCustomFont', sans-serif;
    /* 使用自定义字体 */
}

@font-face {
    font-family: 'MyCustomFont';
    /* 修正格式声明 - 你使用的是ttf文件但声明为woff/woff2 */
    src: url('../public-img/fonts/times.ttf') format('truetype'),
        /* 可以添加其他格式以提高兼容性 */
        url('../public-img/fonts/times.woff2') format('woff2'),
        url('../public-img/fonts/times.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    /* 添加字体显示策略 */
    font-display: swap;
}


/* body {
    font-family: 'MyCustomFont', sans-serif;
} */

:root {
    /* 主色调 */
    --primary-color: #e70012;
    --normall-color: #111E36;
    --orange-color: #FF8300
}

.top-lticon {
    display: flex;
}

.top-switch {
    width: 0.8rem;
    height: 0.8rem;
    background: url(../public-img/switch.png) no-repeat center 100%/ 100% 100%;
    z-index: 100;

}

.header {
    /* 安全区域适配优化 */
    min-height: calc(50px + constant(safe-area-inset-top));
    /* 先写constant兼容旧版iOS */
    min-height: calc(50px + env(safe-area-inset-top));
    /* 后写env覆盖新版 */
    padding-top: constant(safe-area-inset-top);
    padding-top: env(safe-area-inset-top);
    display: flex;
    align-items: center;
    /* 垂直居中（包含安全距离的总高度内） */
    justify-content: center;
    /* 水平居中 */
    width: 100%;
    background: url(../public-img/top-img.png) no-repeat center;
    background-size: contain;
    background-color: #000;
}

/* 顶部通用样式 */
.top-list-placeholder {
    width: 100%;
    /* 保持与导航栏过渡同步 */
}

/* 关键修改：设置相对定位的根容器 */
.relative-container {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

@layer utilities {
    .transition-slide {
        transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    }

    .scrollbar-thin {
        scrollbar-width: thin;
    }

    .scrollbar-thin::-webkit-scrollbar {
        width: 4px;
    }

    .scrollbar-thin::-webkit-scrollbar-thumb {
        background-color: rgba(134, 144, 156, 0.3);
        border-radius: 2px;
    }
}

.top-t {
    width: 100%;
    height: 0.8rem;
    display: flex;
    justify-content: space-between;
    background-color: #fff;
}

/* 隐藏占位容器的类 */
.hidden {
    display: none;
    height: 0 !important;
    /* 确保隐藏时不占空间 */
}

.sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.top-list {
    width: 100%;
    align-items: center;
    z-index: 9999;
    position: fixed;
    top: 0;
    background-color: #fff;
    box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.1);

    .goback {
        width: 0.8rem;
        height: 0.8rem;
        background: url(../public-img/goback.png) no-repeat center 100%/ 100% 100%;
        z-index: 100;
    }

    .top-md {
        position: relative;
        top: 0.25rem;
        width: 2.2rem;
        height: 0.3rem;
        background: url(../public-img/top-mid.png) no-repeat center 100%/ 100% 100%;
        z-index: 50;
        left: 0.3rem;
    }

    .top-mds {
        width: 100%;
        text-align: center;
        z-index: 50;
        position: relative;

        p {
            font-size: 0.34rem;
            color: #333;
            font-weight: bold;
            text-transform: uppercase;
            line-height: 0.8rem;
            position: relative;
            left: 0.4rem;
        }
    }

    .top-rt {
        width: 0.8rem;
        height: 0.8rem;
        background: url(../public-img/top-rt.png) no-repeat center 100%/ 100% 100%;
        z-index: 100;
    }
}


/* 底部tabber样式 */
.bottom-list {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.88rem;
    background-color: #fff;
    border-top: 1px solid rgba(204, 204, 204, 0.6);

    ul {
        width: 100%;
        display: flex;
        height: 100%;
        align-items: center;
        justify-content: space-between;

        li {
            width: 20%;
            height: 0.7rem;
            display: flex;
            align-items: center;

            a {
                width: 100%;
            }

            &:nth-child(1) {
                &.active {
                    p {
                        color: var(--primary-color) !important;
                    }

                    .img-list {
                        background: url(../public-img/tabber/active/home-active.png) no-repeat center 100%/ 100% 100% !important;
                    }
                }
            }

            &:nth-child(2) {
                &.active {
                    p {
                        color: var(--primary-color) !important;
                    }

                    .img-list {
                        background: url(../public-img/tabber/active/community-active.png) no-repeat center 100%/ 100% 100% !important;
                    }
                }
            }

            &:nth-child(3) {
                &.active {
                    p {
                        color: var(--primary-color) !important;
                    }

                    .img-list {
                        background: url(../public-img/tabber/active/cart-active.png) no-repeat center 100%/ 100% 100% !important;
                    }
                }
            }

            &:nth-child(4) {
                &.active {
                    p {
                        color: var(--primary-color) !important;
                    }

                    .img-list {
                        background: url(../public-img/tabber/active/message-active.png) no-repeat center 100%/ 100% 100% !important;
                    }
                }
            }

            &:nth-child(5) {
                &.active {
                    p {
                        color: var(--primary-color) !important;
                    }

                    .img-list {
                        background: url(../public-img/tabber/active/my-active.png) no-repeat center 100%/ 100% 100% !important;
                    }
                }
            }

            .icon-bg {
                width: 100%;
                display: flex;
                justify-content: center;
                flex-shrink: 0;
                flex-direction: column;
                align-items: center;

                .img-list {
                    width: 0.36rem;
                    height: 0.36rem;
                }

                p {
                    width: 100%;
                    line-height: 0.2rem;
                    font-size: 0.19rem;
                    text-align: center;
                    margin-top: 0.04rem;
                    color: #333;
                }
            }
        }
    }
}

.lf-hc {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 999;
}

/* 主容器 */
.mainContainer {
    position: relative;
    overflow-x: hidden;
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    top: 0.8rem;
    left: 0;
    width: 100%;
    background-color: #fff;
    color: #333;
    padding: 0 0.3rem;
    z-index: 20;
    padding-bottom: 0.48rem;
    display: none;

    .sidebar-close {
        position: absolute;
        right: 0.3rem;
        top: 0.2rem;
        background: url(../public-img/close.png) no-repeat center 100%/ 100% 100%;
        width: 0.6rem;
        height: 0.6rem;
    }

    .list-countries {
        &:last-child {
            border: 0;
        }
    }

    p {
        text-transform: uppercase;
        font-size: 0.3rem;
        width: calc(100% + 0.6rem);
        padding-left: 0.3rem;
        position: relative;
        left: -0.3rem;
        line-height: 1rem;
        border-bottom: 1px solid #eee;
    }
}

.sidebar.open {
    transform: translateX(0);
    z-index: 99999 !important;
    display: block !important;
}

.sidebarMenu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0.08rem;
}

.sidebarMenu li {
    cursor: pointer;
    transition: color 0.3s;
    height: 0.8rem;
    display: flex;
    align-items: center;
    width: 50%;
    padding-right: 0.08rem;

    a {
        display: flex;
        width: 100%;
        height: 100%;
        align-items: center;
        font-size: 0.26rem;
        color: #666;
        text-decoration: none;
        overflow: hidden;

        i {
            width: 0.3rem;
            height: 0.3rem;
            margin-right: 0.06rem;
            display: block;
            flex-shrink: 0;
           
        }
    }
}

/* 蒙版 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    /* transition: opacity 0.3s; */
    z-index: 10;
}

.overlay.visible {
    opacity: 1;
    pointer-events: auto;
    z-index: 1000 !important;
}

.list-countries {
    width: calc(100% + 0.6rem);
    position: relative;
    left: -0.3rem;
    padding: 0.3rem;
    padding-top: 0;
    border-bottom: 1px solid #eee;

    h2 {
        font-size: 0.3rem;
        font-weight: normal;
        line-height: 0.3rem;
        margin-top: 0.3rem;
        color: #333;
        margin-bottom: 0.08rem;
    }
}

.list-countriesbg {
    max-height: 8rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.pages {
    margin-top: 0.28rem;
    width: 100%;
    text-align: center;
    position: relative;
    font-size: 0.3rem;
    z-index: 999;
    height: 0.9rem;
    background: #F1f1f1;
    position: fixed;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #ddd;

    &:nth-child(2) {
        a {
            margin: 0 0.1rem;
        }
    }

    a {
        color: #333;

        p {
            display: inline-block;
            vertical-align: middle;
        }

        b {
            color: #E70012;
            margin-right: 0.08rem;
            font-size: 0.27rem;
        }

        i {
            font-style: normal;
            margin-left: 0.06rem;
        }
    }
}