html,body{
    padding: 0;
    margin: 0;
    background: #f4f6f8;
    color: #475467;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
body{
    margin: 0 auto;
    max-width: 720px;
    min-height: 100vh;
}

/* 主题色变量（可在后台“站点配色”中调整，前台按配置覆盖） */
:root{
    --primary: #0013D2;
    --primary-light: #0040ff;
    --search-bg: #0013D2;
    --search-bg-light: #0040ff;
    --boxcode-bg: #0013D2;
    --boxcode-bg-light: #0040ff;
    --float-btn-bg: #0013D2;
    --float-btn-bg-light: #0040ff;

    /* 中性色（现代简约商务风）：面 / 线 / 三级文字 / 卡片阴影 */
    --surface: #fff;
    --line: #e8ecf1;
    --line-soft: #eef1f5;
    --ink: #1f2937;
    --ink-2: #475467;
    --ink-3: #98a2b3;
    --shadow-card: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
}

.swiper{
    overflow: hidden;
}
.swiper-slide img{
    width: 100%;
    display: block;
}

.mydevice{
    margin: 0;
    
    background: #fff;
    animation: fadeIn 0.5s ease;
}
.mydevice-card{
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mydevice-card:hover{
    border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
    box-shadow: 0 2px 8px rgba(16,24,40,.06);
}

.mydevice-card .mydevice-img{
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 3px;
    object-fit: contain;
    background: var(--line-soft);
}
.mydevice-card .mydevice-info{
    flex: 1;
    min-width: 0;
}
.mydevice-card .mydevice-name{
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mydevice-card .mydevice-specs{
    font-size: 0.7rem;
    color: var(--ink-3);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mydevice-card .mydevice-img-placeholder{
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 3px;
    background: var(--line-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--ink-3);
}
.searchForm{
    padding: 0.85rem 1rem;
    background: var(--search-bg);
    color: #fff;
}
.icon-search {
    width: 20px;
    height: 20px;
    margin-left: 1rem;
    flex-shrink: 0;
    color: var(--ink-3);
}
.search-dropdown {
    position: relative;
    width: 100%;
}

.search-dropdown-input {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
    position: relative;
}
.search-dropdown-input:focus-within {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}
.search-dropdown-input input {
    flex: 1;
    height: 45px;
    width: 100%;
    padding-left: 1.2rem;
    padding-right: 0.5rem;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
    display: block;
    transition: all 0.3s ease;
}
.search-dropdown-input input::placeholder {
    color: #999;
    font-size: 0.95rem;
}
.dropdown-arrow {
    padding: 0 1rem;
    font-size: 0.7rem;
    color: var(--ink-3);
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    user-select: none;
    flex-shrink: 0;
    line-height: 45px;
}
.search-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.search-dropdown-list {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(16,24,40,.12);
    z-index: 1001;
    max-height: 55vh;
    overflow-y: auto;
    animation: fadeIn 0.2s ease;
}
.search-dropdown.open .search-dropdown-list {
    display: block;
}
.search-dropdown-list ul {
    list-style: none;
    margin: 0;
    padding: 0.3rem 0;
}
.search-dropdown-list li {
    padding: 0.7rem 1.2rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--ink-2);
    transition: background 0.2s ease, color 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}
.search-dropdown-list li:last-child {
    border-bottom: none;
}
.search-dropdown-list li:hover,
.search-dropdown-list li.highlighted {
    background: #f7f9fc;
    color: var(--primary);
}
.search-dropdown-list li .match-highlight {
    color: var(--primary);
    font-weight: 700;
}
.search-dropdown-list .no-result {
    padding: 1rem;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

.search-dropdown-input input[readonly] {
    cursor: pointer;
    caret-color: transparent;
}

.keyword-clear {
    padding: 0 0.6rem;
    font-size: 0.85rem;
    color: var(--ink-3);
    cursor: pointer;
    flex-shrink: 0;
    line-height: 45px;
    transition: color 0.2s ease;
    user-select: none;
}
.keyword-clear:hover {
    color: var(--primary);
}

.dropdown-search-wrap {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.dropdown-search-input {
    width: 100%;
    box-sizing: border-box;
    height: 34px;
    padding: 0 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
    font-size: 0.88rem;
    color: var(--ink);
    background: #f7f9fc;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.dropdown-search-input:focus {
    border-color: var(--primary);
    background: #fff;
}
.dropdown-search-input::placeholder {
    color: #bbb;
}

.search-dropdown-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
}

.search-dropdown-input input.input-invalid {
    animation: shake 0.4s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.search-dropdown-overlay.active {
    display: block;
}
.categories{
    background-color: #fff;
    margin: 0;
    list-style: none;
    padding: 0.6rem 1rem;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.categories::-webkit-scrollbar {
    display: none;
}
.categories li{
    flex-shrink: 0;
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--ink-2);
    background-color: #f2f4f7;
    transition: background-color 0.2s ease, color 0.2s ease;
    border: none;
    white-space: nowrap;
}
.categories li:hover{
    background-color: #e9edf3;
    color: var(--ink);
}
.categories li.active{
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}
.sticky-header{
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px rgba(16,24,40,.05);
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.models{
    padding: 1rem 1rem 2.5rem;
}       
.header{
    display: flex;
    flex-direction: row;
    gap: .6rem;
}
.header .des{
    flex: 1;
}
.tip{
    padding: 1rem 1rem 0;
    display: none;
    animation: fadeIn 0.5s ease;
}
.tip dl{
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.tip dl dt{
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #cbd5e1;
    border-radius: 3px;
}
.tip dl dt.active{
    background: #d92d20;
}
.tip dl dt.sub{
    background: #0b8ce0;
}
.tip dl dd{
    display: inline-block;
    font-size: 0.75rem;
    padding: 0;
    margin: 0 1rem 0 0.35rem;
    color: var(--ink-3);
    font-weight: 500;
}
.models .item{
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    padding: 1.05rem 1.1rem;
    margin-bottom: 0.85rem;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    border: 1px solid var(--line);
    animation: fadeInUp 0.5s ease;
}
.models .item:hover{
    box-shadow: 0 4px 16px rgba(16,24,40,.08);
    border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
    transform: translateY(-2px);
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.models .item .header{
    margin-bottom: 0.8rem;
}
.models .item .boxCode{
    background: var(--boxcode-bg);
    color: #fff;
    padding: 0 0.75rem;
    border-radius: 8px;
    height: 42px;
    line-height: 42px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    min-width: 58px;
    text-align: center;
}
.models .item .title{
    font-weight: 600;
    color: #101828;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
}
.models .item .category{
    color: var(--ink-3);
    font-size: 0.8rem;
    font-weight: 500;
}
.models .item .price{
    color: #b42318;
    font-weight: 600;
    font-size: 1.1rem;
}
.list{
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
}
.list li{
    padding: 0.42rem 0.8rem;
    border-radius: 8px;
    background-color: #f2f4f7;
    color: var(--ink-2);
    font-size: 0.82rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
    border: 1px solid var(--line);
    font-weight: 500;
}
.list li:hover{
    background-color: #e9edf3;
    border-color: #d8dee8;
    color: var(--ink);
}
.list li.active{
    background: #d92d20;
    color: #fff;
    border-color: #d92d20;
}
.list li.sub{
    background: #eaf5fd;
    color: #0b6bb0;
    border-color: #cfe6f7;
}
/* 新型号标记：命中 products.new_model 的型号右上角上标 N */
.list li .new-tag{
    display: inline-block;
    margin-inline-start: 0.25rem;
    padding: 0 0.25rem;
    font-size: 0.65em;
    font-weight: 700;
    line-height: 1.5;
    color: #fff;
    /* 深板岩色：在浅灰标签与红/蓝选中态底色上都有足够对比 */
    background: #101828;
    border-radius: 4px;
    box-shadow: 0 0 0 1.5px rgba(255,255,255,.9);
    vertical-align: super;
    cursor: inherit;
}
dl.info{
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--ink-3);
}
dl.info dd{
    margin: 0;
    padding: 0;
}
dl.info dd.view-count{
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.list .mobile-hidden {
    display: none;
}

.toggle-mobiles {
    margin-top: 0.6rem;
    padding: 0.45rem 0.8rem;
    text-align: center;
    background-color: #f7f9fc;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--ink-2);
}

.toggle-mobiles:hover {
    background-color: #f2f5f9;
    border-color: #e2e8f0;
    color: var(--ink);
}

.toggle-mobiles:active {
    background-color: #eaeff5;
}

.toggle-mobiles.expanded {
    background-color: color-mix(in srgb, var(--primary) 20%, transparent);
    color: var(--primary);
}

.toggle-mobiles .toggle-icon {
    font-style: normal;
    transition: transform 0.3s ease;
    font-size: 0.75rem;
}

.toggle-mobiles.expanded .toggle-icon {
    transform: rotate(180deg);
}

.toggle-mobiles .toggle-text {
    font-weight: 500;
}

.loader{
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 500;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.12);
}

.to-top,.orderby{
    position: fixed;
    right: 1rem;
    bottom: 2rem;
    width: 2.5rem;
    height: 2.5rem;
    line-height: 2.5rem;
    background: var(--float-btn-bg);
    border-radius: 50%;
    display: none;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--float-btn-bg) 28%, transparent);
    z-index: 1000;
    color: #fff;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.to-top:hover,.orderby:hover{
    background: var(--float-btn-bg-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--float-btn-bg) 35%, transparent);
}
.to-top:active,.orderby:active{
    transform: translateY(0);
}
.orderby{
    bottom: 6.2rem;
}
.orderby .orderby-icon{
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 2.5rem;
}
/* 返回顶部：上折角图标（与排序按钮的 ↑/↓ 箭头区分）；
   用 flex 居中，避免 vertical-align 受字体 strut 影响而偏移 */
.to-top{
    align-items: center;
    justify-content: center;
}

.floating-menu-btn {
    position: fixed;
    right: 1rem;
    bottom: 11.5rem;
    width: 2.8rem;
    height: 2.8rem;
    line-height: 2.8rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #fff;
    text-align: center;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 18px rgba(255, 107, 53, 0.45);
    transition: all 0.3s ease;
    border: none;
}
.floating-menu-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.6);
}
.floating-menu-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.floating-menu-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
}
.floating-menu-panel.active {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}
.floating-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease;
}
.floating-menu-content {
    position: absolute;
    right: 1rem;
    bottom: 15rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.16);
    min-width: 160px;
    overflow: hidden;
    animation: slideUp 0.25s ease;
}
.floating-menu-list {
    list-style: none;
    margin: 0;
    padding: 0.3rem 0;
}
.floating-menu-list li {
    margin: 0;
}
.floating-menu-list a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.2rem;
    color: #444;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.floating-menu-list a:hover,
.floating-menu-list a:active {
    background: #f5f5f5;
    color: var(--primary);
}

.wrapper-about{
    background-color: #fff;
    padding: 1rem;
    margin: 1rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
}

/* 手机详情弹窗样式 */
.mobile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

/* 设备选择弹窗 */
.device-select-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.device-select-modal.active {
    opacity: 1;
    visibility: visible;
}
.device-select-modal.closing {
    opacity: 0;
    visibility: hidden;
}
.dsm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}
.dsm-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(16, 24, 40, 0.18);
    animation: slideUp 0.3s ease;
}
.dsm-header {
    padding: 1.5rem 1.5rem 0.5rem;
    text-align: center;
}
.dsm-header h3 {
    margin: 0 0 0.3rem;
    font-size: 1.15rem;
    color: var(--ink);
    font-weight: 600;
    letter-spacing: -0.01em;
}
.dsm-header p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--ink-3);
    line-height: 1.45;
}
.dsm-body {
    padding: 0.8rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.dsm-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.95rem;
    color: var(--ink-2);
    text-align: left;
    width: 100%;
    outline: none;
}
.dsm-option:hover,
.dsm-option:focus {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 5%, #fff);
    box-shadow: 0 2px 10px color-mix(in srgb, var(--primary) 12%, transparent);
}
.dsm-option:active {
    background: color-mix(in srgb, var(--primary) 9%, #fff);
    box-shadow: none;
}
.dsm-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.dsm-model-name {
    font-weight: 600;
    flex: 1;
}
.dsm-footer {
    padding: 0.5rem 1.2rem 1.2rem;
    text-align: center;
}
.dsm-skip {
    padding: 0.55rem 1.6rem;
    border: none;
    background: transparent;
    color: var(--ink-3);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.dsm-skip:hover {
    background: #f2f4f7;
    color: var(--ink-2);
}

.mobile-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.mobile-modal .modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    /* 必须给 width：否则作为 flex 子项会被内容撑成 shrink-to-fit，手机上窄一大截 */
    width: 100%;
    max-width: 90%;
    max-height: 85vh;
    /* 滚动交给 .modal-body，关闭按钮才能绝对定位常驻右上角而不占布局 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(16, 24, 40, 0.20);
    animation: slideUp 0.3s ease;
    margin: 1rem;
}

.mobile-modal .modal-close {
    /* 悬浮在右上角，不占一行/一列 */
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
    color: var(--ink-2);
    cursor: pointer;
    padding: 0.35rem 0.55rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    border-start-end-radius: 16px;
    border-end-start-radius: 12px;
    z-index: 1;
    transition: all 0.3s ease;
}

.mobile-modal .modal-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.mobile-modal .modal-body {
    /* 窄屏收紧内边距，把宽度让给参数内容 */
    padding: 0.85rem 1rem 1rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.mobile-modal .modal-body.loading {
    text-align: center;
    padding: 3rem;
    color: var(--ink-3);
    font-size: 1.05rem;
}

.mobile-detail {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mobile-detail .detail-image {
    text-align: center;
    background: #f7f9fc;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    padding: 1rem;
}

.mobile-detail .detail-image img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
}

.mobile-detail .detail-info {
    display: flex;
    flex-direction: column;
}

.mobile-detail .detail-info h3 {
    margin: 0 0 0.75rem 0;
    /* 让开右上角悬浮的关闭按钮 */
    padding-inline-end: 2.2rem;
    color: var(--primary);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
}

/* 完整参数表：全宽单列；标签列用固定宽度，保证所有行的数值左边缘对齐 */
.mobile-detail .detail-info .spec-list {
    --spec-label-w: 7.5em;
    margin: 0;
    padding: 0.2rem 0.85rem;
    background: #fafbfc;
    border: 1px solid #eef1f5;
    border-radius: 10px;
}

.mobile-detail .detail-info .spec-item {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.42rem 0;
    border-bottom: 1px solid #eef1f5;
    font-size: 0.78rem;
    line-height: 1.5;
}

.mobile-detail .detail-info .spec-item:last-child {
    border-bottom: none;
}

.mobile-detail .detail-info .spec-item dt {
    flex: 0 0 var(--spec-label-w);
    width: var(--spec-label-w);
    color: #8a94a6;
    font-weight: 500;
    /* 贴住数值：左对齐会在标签与数值之间留出一大片空白 */
    text-align: end;
    hyphens: auto;
}

.mobile-detail .detail-info .spec-item dd {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: #1f2937;
    font-weight: 500;
    overflow-wrap: anywhere;
}

/* 窄屏：标签与数值改为上下排列，避免数值列被挤得太窄 */
@media (max-width: 400px) {
    .mobile-detail .detail-info .spec-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.1rem;
        padding: 0.5rem 0;
    }

    .mobile-detail .detail-info .spec-item dt {
        flex: none;
        width: auto;
        text-align: start;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 600px) {
    .mobile-modal .modal-content {
        max-width: 760px;
    }

    .mobile-modal .modal-body {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .mobile-detail {
        flex-direction: row;
    }
    
    .mobile-detail .detail-image {
        flex: 0 0 170px;
    }
    
    .mobile-detail .detail-info {
        flex: 1;
    }
}

/* ============================================
   语言切换器
   ============================================ */
.lang-switcher {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1001;
}
.lang-switcher-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.lang-switcher-btn:hover {
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.24);
}
.lang-switcher-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.16);
    min-width: 170px;
    max-height: 60vh;
    overflow-y: auto;
    display: none;
}
.lang-switcher-panel.active {
    display: block;
    animation: fadeIn 0.2s ease;
}
.lang-switcher-panel ul {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
}
.lang-switcher-panel li {
    padding: 0.6rem 1.1rem;
    font-size: 0.88rem;
    color: var(--ink-2);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}
.lang-switcher-panel li:hover {
    background: #f7f9fc;
    color: var(--primary);
}
.lang-switcher-panel li.active {
    color: var(--primary);
    font-weight: 600;
}
.lang-switcher-panel li.lang-auto {
    margin-top: 0.35rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line-soft);
    color: var(--ink-3);
}
.lang-switcher-panel li.lang-auto.active {
    color: var(--primary);
}

/* ============================================
   RTL 适配（阿拉伯语）
   ============================================ */
[dir="rtl"] .lang-switcher {
    right: auto;
    left: 0.75rem;
}
[dir="rtl"] .lang-switcher-panel {
    right: auto;
    left: 0;
}
[dir="rtl"] .to-top,
[dir="rtl"] .orderby,
[dir="rtl"] .floating-menu-btn {
    right: auto;
    left: 1rem;
}
[dir="rtl"] .search-dropdown-input input {
    direction: rtl;
    text-align: right;
}
