/* 语言切换 */
.lang-switch {
    position: relative;
    display: inline-block;
    margin-left: 16px;
    font-size: 14px;
    line-height: 1;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.2s, background 0.2s;
}

.lang-toggle:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.lang-arrow {
    transition: transform 0.2s;
}

.lang-switch.open .lang-arrow {
    transform: rotate(180deg);
}

/* 下拉列表 */
.lang-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 130px;
    padding: 6px 0;
    margin: 0;
    list-style: none;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 100;
}

.lang-switch.open .lang-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-list li a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.15s;
}

.lang-list li a:hover {
    background: #f5f5f5;
    color: #000;
}

.lang-list li.active a {
    color: #999;
    cursor: default;
    background: #fafafa;
}

@media (max-width: 768px) {
    .lang-switch {
        margin: 12px 0 0;
        display: block;
    }
    .lang-toggle {
        width: 100%;
        justify-content: space-between;
    }
    .lang-list {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        display: none;
    }
    .lang-switch.open .lang-list {
        display: block;
    }
    .lang-list li a {
        color: #fff;
    }
}


/* ============================================================
   component-menu 下拉菜单完整样式
   PC 端：悬停展开
   手机端：点击展开
   只作用于 .component-menu 内部，不影响原有菜单样式
   ============================================================ */

/* ---------- 1. 头部整体提升层叠 ---------- */
main.container-list > .b_block--header,
main.container-list > .b_block--floating,
.b_block--header,
.b_block--floating {
    position: relative !important;
    z-index: 99999 !important;
}

.b_block--header .container-fluid,
.b_block--header .indent,
.b_block--header .container {
    position: relative;
    z-index: 1;
}

/* ---------- 2. 防裁切 ---------- */
.b_block--header,
.b_block--floating,
.b_block--header .container-fluid,
.b_block--header .indent,
.b_block--header .container,
.menu-holder,
.component-menu,
.component-menu-list,
.component-menu-list > .menu-item,
.component-menu .submenu,
.component-menu .submenu > li {
    overflow: visible !important;
}

/* ---------- 3. 菜单容器 ---------- */
.menu-holder,
.component-menu {
    position: relative !important;
    z-index: 100000 !important;
}

/* ---------- 4. 定位基准 ---------- */
.component-menu .component-menu-list > .menu-item.has-submenu,
.component-menu .submenu > .has-submenu {
    position: relative !important;
}

/* ---------- 5. 子菜单盒子 ---------- */
.component-menu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100001;
    min-width: 180px;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    overflow: visible;
}

.component-menu .submenu .submenu {
    top: 0;
    left: 100%;
}

/* ---------- 6. 菜单项 ---------- */
.component-menu .submenu > li > a {
    display: block;
    position: relative;
    padding: 10px 18px;
    color: #333;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    transition: background .2s, color .2s;
}

/* 带子菜单的项：flex，文字在左，箭头在右 */
.component-menu .submenu > .has-submenu > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 18px;
}

/* 首尾圆角 */
.component-menu .submenu > li:first-child > a {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.component-menu .submenu > li:last-child > a {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* ---------- 分隔线：用 ::before，绝不碰箭头 ::after ---------- */
.component-menu .submenu > li > a::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: 0;
    height: 1px;
    background: rgba(0, 0, 0, .08);
    pointer-events: none;
}

/* 第一个上面不画线（顶部不用分隔） */
.component-menu .submenu > li:first-child > a::before {
    display: none;
}

/* hover / focus */
.component-menu .submenu > li > a:hover,
.component-menu .submenu > li > a:focus {
    color: #111;
    background: #f5f5f5;
}

/* ---------- 7. 展开状态（移动端点击用） ---------- */
.component-menu .component-menu-list > .menu-item.has-submenu.open > .submenu,
.component-menu .submenu > .has-submenu.open > .submenu {
    display: block !important;
}

/* ---------- 7.5 桌面端悬停展开（≥992px） ---------- */
@media (min-width: 992px) {
    /* 一级：悬停展开二级 */
    .component-menu .component-menu-list > .menu-item.has-submenu:hover > .submenu,
        /* 二级：悬停展开三级 */
    .component-menu .submenu > .has-submenu:hover > .submenu {
        display: block !important;
    }

    /* 一级箭头悬停时翻转 */
    .component-menu .component-menu-list > .menu-item.has-submenu:hover > a::after {
        content: "▴";
    }

    /* 二级箭头悬停时翻转（保持视觉一致，可选） */
    .component-menu .submenu > .has-submenu:hover > a::after {
        content: "▾";
    }
    /* JS 兜底：延时保持 hover 状态 */
    .component-menu .component-menu-list > .menu-item.has-submenu.is-hovered > .submenu,
    .component-menu .submenu > .has-submenu.is-hovered > .submenu {
        display: block !important;
    }
    .component-menu .component-menu-list > .menu-item.has-submenu.is-hovered > a::after {
        content: "▴";
    }
}
/* ---------- 7.6 桌面端：透明桥接区，防止鼠标滑动时 hover 中断 ---------- */
@media (min-width: 992px) {

    .component-menu .component-menu-list > .menu-item.has-submenu::after {
        content: "";
        position: absolute;
        left: -8px;
        right: -8px;
        top: 100%;
        height: 32px;                 /* 一次给够 */
        background: transparent;
        z-index: 100000;
    }
    .component-menu .submenu > .has-submenu::after {
        content: "";
        position: absolute;
        left: 100%;
        top: -8px;
        width: 32px;
        height: calc(100% + 16px);
        background: transparent;
        z-index: 100000;
    }
}

/* ---------- 8. 箭头（继续用 ::after，不再被分隔线干扰） ---------- */

/* 一级箭头 */
.component-menu .component-menu-list > .menu-item.has-submenu > a::after {
    content: "▾";
    margin-left: 6px;
    font-size: 10px;
}

.component-menu .component-menu-list > .menu-item.has-submenu.open > a::after {
    content: "▴";
}

/* 二级箭头：flex 子项，永远靠右同行 */
.component-menu .submenu > .has-submenu > a::after {
    content: "▸";
    position: static;
    margin: 0 0 0 20px;
    font-size: 10px;
    line-height: 1;
    flex-shrink: 0;
}

/* ============================================================
   手机端
   ============================================================ */
@media (max-width: 991px) {

    main.container-list > .b_block--header,
    main.container-list > .b_block--floating,
    .b_block--header,
    .b_block--floating {
        position: relative !important;
        z-index: 99999 !important;
    }

    .menu-holder,
    .component-menu {
        position: relative !important;
        z-index: 100000 !important;
    }

    /* 子菜单静态展开 */
    .component-menu .submenu {
        display: none;
        position: static;
        top: auto;
        left: auto;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }

    .component-menu .submenu .submenu {
        top: auto;
        left: auto;
        padding-left: 14px;
    }

    .component-menu .submenu > li > a {
        padding: 8px 0 8px 14px;
        color: inherit;
        white-space: normal;
        background: transparent;
        border-radius: 0;
    }

    .component-menu .submenu > .has-submenu > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-right: 14px;
    }

    .component-menu .submenu > li:first-child > a,
    .component-menu .submenu > li:last-child > a {
        border-radius: 0;
    }

    /* 手机端分隔线 */
    .component-menu .submenu > li > a::before {
        left: 14px;
        right: 14px;
    }

    .component-menu .submenu .submenu > li > a {
        padding-left: 28px;
    }

    /* 手机端箭头 */
    .component-menu .submenu > .has-submenu > a::after {
        content: "▾";
        position: static;
        margin: 0 0 0 8px;
        font-size: 10px;
        line-height: 1;
        flex-shrink: 0;
    }

    .component-menu .submenu > .has-submenu.open > a::after {
        content: "▴";
    }
}


.cb-modal, .cb-modal * { box-sizing: border-box; }
:root { --cb-primary: #2563eb; }

.cb-modal {
    position: fixed; inset: 0;
    z-index: 2147483000;
    display: block;                    /* 不再是 none */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* 关闭时：opacity 播 0.28s，visibility 延迟 0.28s 再变 hidden */
    transition: opacity .28s ease, visibility 0s linear .28s;
}
.cb-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* 打开时：visibility 立即生效，opacity 播 0.28s */
    transition: opacity .28s ease, visibility 0s;
}

.cb-modal__backdrop {
    position: fixed; inset: 0;
    background: rgba(17, 24, 39, .55);
    opacity: 0;
    transition: opacity .28s ease;
}
.cb-modal.is-open .cb-modal__backdrop { opacity: 1; }

.cb-modal__dialog {
    position: relative; z-index: 1;
    width: min(560px, calc(100% - 32px));
    margin: 40px auto;
    padding: 24px 24px 20px;
    background: #fff; border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

    opacity: 0;
    transform: translateY(20px) scale(.97);
    transition: opacity .3s ease, transform .3s cubic-bezier(.22, .61, .36, 1);
}
.cb-modal.is-open .cb-modal__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

html.cb-modal-open, html.cb-modal-open body { overflow: hidden; }

.cb-modal__close {
    position: absolute; top: 12px; right: 12px;
    width: 34px; height: 34px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 8px; background: transparent;
    color: #6b7280; cursor: pointer; transition: background .15s, color .15s;
}
.cb-modal__close:hover { background: #f3f4f6; color: #111827; }

.cb-modal__head { margin-bottom: 16px; padding-right: 34px; }
.cb-modal__title { margin: 0 0 6px; font-size: 19px; font-weight: 700; color: #111827; }
.cb-modal__desc  { margin: 0; font-size: 13px; color: #6b7280; line-height: 1.5; }

.cb-form { display: flex; flex-direction: column; gap: 14px; }
.cb-field { display: flex; flex-direction: column; gap: 6px; }
.cb-field__label { font-size: 13px; font-weight: 600; color: #374151; }
.cb-field__label .req { color: #dc2626; margin-left: 2px; }

.cb-input, .cb-select, .cb-textarea {
    width: 100%; padding: 10px 12px;
    font-size: 14px; color: #111827; font-family: inherit;
    border: 1px solid #d1d5db; border-radius: 8px; background: #fff;
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.cb-input::placeholder, .cb-textarea::placeholder { color: #9ca3af; }
.cb-input:focus, .cb-select:focus, .cb-textarea:focus {
    border-color: var(--cb-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.cb-textarea { resize: vertical; min-height: 92px; }

.cb-select {
    appearance: none; -webkit-appearance: none;
    padding-right: 34px; cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.cb-input.is-invalid, .cb-select.is-invalid, .cb-textarea.is-invalid { border-color: #dc2626; }

.cb-upload {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 20px 16px; text-align: center; cursor: pointer;
    border: 1.5px dashed #d1d5db; border-radius: 10px; background: #fafafa;
    transition: border-color .15s, background .15s;
}
.cb-upload:hover, .cb-upload.is-dragover { border-color: var(--cb-primary); background: #f0f6ff; }
.cb-upload__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cb-upload__icon { color: var(--cb-primary); line-height: 0; }
.cb-upload__main { font-size: 13.5px; color: #374151; }
.cb-upload__hint { font-size: 12px; color: #9ca3af; }

.cb-filelist { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cb-filelist__item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: #f3f4f6; border-radius: 8px; font-size: 13px; }
.cb-filelist__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #374151; }
.cb-filelist__size { color: #9ca3af; font-size: 12px; }
.cb-filelist__del { border: 0; background: transparent; cursor: pointer; color: #9ca3af; font-size: 18px; line-height: 1; padding: 0 4px; }
.cb-filelist__del:hover { color: #dc2626; }

.cb-error { margin: 0; font-size: 12px; color: #dc2626; }
.cb-error:empty { display: none; }

.cb-submit {
    width: 100%; padding: 11px 16px;
    border: 0; border-radius: 9px;
    background: var(--cb-primary); color: #fff;
    font-size: 15px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: background .15s, opacity .15s;
}
.cb-submit:hover { background: #1d4ed8; }
.cb-submit:disabled { opacity: .6; cursor: not-allowed; }

.cb-form__tip { margin: 0; font-size: 13px; color: #dc2626; }
.cb-form__tip:empty { display: none; }

.cb-success { text-align: center; padding: 12px 0 4px; }
.cb-success__icon { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; background: #dcfce7; color: #16a34a; display: flex; align-items: center; justify-content: center; }
.cb-success h4 { margin: 0 0 6px; font-size: 17px; color: #111827; }
.cb-success p { margin: 0 0 18px; font-size: 13px; color: #6b7280; }
.cb-success[hidden] { display: none; }


/* ===== 外层 ===== */
.product-page {
    padding: 32px 0 56px;
    background: #f7f8fa;
}
.product-page__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: #111827;
}

/* ===== 分类导航 ===== */
.product-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}
.product-cats__item {
    display: inline-block;
    padding: 7px 14px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    transition: all .18s ease;
}
.product-cats__item:hover {
    color: #2563eb;
    border-color: #2563eb;
    background: #eff6ff;
}
.product-cats__item.is-active {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
}

/* ===== 网格：每行 4 个 ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ===== 卡片 ===== */
.product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .10);
}

.product-card__thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f3f4f6;
    overflow: hidden;
}
.product-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.product-card:hover .product-card__thumb img {
    transform: scale(1.06);
}

.product-card__body {
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.product-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 分页 ===== */
.product-pagination {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}
.product-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.product-pagination .page-item .page-link,
.product-pagination .page-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 14px;
    color: #374151;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all .18s ease;
}
.product-pagination .page-item .page-link:hover {
    color: #2563eb;
    border-color: #2563eb;
    background: #eff6ff;
}
.product-pagination .page-item.active span,
.product-pagination .page-item.active .page-link {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
}
.product-pagination .page-item.disabled span,
.product-pagination .page-item.disabled .page-link {
    color: #d1d5db;
    background: #f9fafb;
    border-color: #f3f4f6;
    cursor: not-allowed;
}

/* ===== 空状态 ===== */
.product-empty {
    padding: 60px 0;
    text-align: center;
    font-size: 14px;
    color: #9ca3af;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .product-card__title { font-size: 14px; }
    .product-card__desc { font-size: 12px; }
}
@media (max-width: 480px) {
    .product-page__inner { padding: 0 14px; }
    .product-cats__item { padding: 6px 12px; font-size: 13px; }
    .product-grid { gap: 12px; }
}
