/**
 * 味识码消费者门户 — 全站配色与布局变量（主色 #8EDB49，辅色 #F7FBF5）
 */
:root {
    --portal-color-primary: #8EDB49;
    --portal-color-primary-dark: #6fc238;
    --portal-color-primary-soft: rgba(142, 219, 73, 0.18);
    --portal-color-bg-aux: #F7FBF5;
    --portal-color-bg-page: #ffffff;
    --portal-color-text: #1a1a1a;
    --portal-color-text-muted: #5c6670;
    --portal-color-border: #e3ebe0;
    --portal-color-header-text: #ffffff;
    --portal-font-sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --portal-radius: 10px;
    --portal-shadow: 0 8px 28px rgba(26, 74, 26, 0.08);
    --portal-max-width: 1200px;
    --portal-header-h: 64px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body.portal-body {
    margin: 0;
    font-family: var(--portal-font-sans);
    color: var(--portal-color-text);
    background: var(--portal-color-bg-aux);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--portal-color-primary-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    vertical-align: middle;
}

.portal-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 8px 12px;
    background: var(--portal-color-primary);
    color: #fff;
    z-index: 10000;
}

.portal-skip:focus {
    left: 12px;
    top: 12px;
}

/* —— 顶栏 —— */
.portal-topbar {
    background: #ffffff;
    color: var(--portal-color-header-text);
    box-shadow: var(--portal-shadow);
    position: sticky;
    top: 0;
    z-index: 900;
}

.portal-topbar-inner {
    max-width: var(--portal-max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: var(--portal-header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.portal-brand img {
    height: 42px;
    width: auto;
    display: block;
}

.portal-brand-text {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    color: var(--portal-color-header-text);
    white-space: nowrap;
}

.portal-brand:hover {
    text-decoration: none;
    opacity: 0.95;
}

/* 桌面导航 */
.portal-nav-desktop {
    display: flex;
    align-items: center;
    gap: 4px;
}

.portal-nav-desktop a {

    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    opacity: 0.92;
    text-decoration: none;
    white-space: nowrap;
}

.portal-nav-desktop a:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
    opacity: 1;
}

.portal-nav-desktop a.is-active {
    background: rgba(255, 255, 255, 0.22);
    font-weight: 600;
    opacity: 1;
}

.portal-nav-desktop span.nav-soon {
    color: rgba(255, 255, 255, 0.65);
    padding: 8px 14px;
    font-size: 0.95rem;
    cursor: default;
}

/* 移动菜单开关 */
.portal-nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: var(--portal-color-primary);
}

.portal-nav-toggle span {
    display: block;
    height: 2px;
    background: currentColor;
    margin: 6px 0;
    border-radius: 1px;
}

.portal-nav-mobile-panel {
    display: none;
}

.portal-nav-check {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 860px) {
    .portal-nav-desktop {
        display: none;
    }

    .portal-nav-toggle {
        display: block;
    }

    .portal-nav-mobile-panel {
        display: none;
        background: #2d5016;
        padding: 8px 0 16px;
    }

    .portal-nav-mobile-panel a,
    .portal-nav-mobile-panel span.nav-soon {
        display: block;
        padding: 12px 20px;
        color: #fff;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .portal-nav-mobile-panel a:hover {
        background: rgba(255, 255, 255, 0.08);
        text-decoration: none;
    }

    .portal-nav-mobile-panel a.is-active {
        background: rgba(255, 255, 255, 0.15);
    }

    .portal-topbar .portal-nav-check:checked~.portal-nav-mobile-panel {
        display: block;
    }

    .portal-brand-text {
        font-size: 1rem;
    }
}

/* —— 主内容区 —— */
.portal-main {
    flex: 1;
    width: 100%;
}

.portal-wrap {
    max-width: var(--portal-max-width);
    margin: 0 auto;
    padding: 24px 20px 48px;
}

/* Hero + 标语 + 搜索 */
.portal-hero {
    /* background: var(--portal-color-bg-page);
    border-radius: var(--portal-radius); */
    padding: 32px 28px 28px;
    /* box-shadow: var(--portal-shadow);
    border: 1px solid var(--portal-color-border); */
    margin-bottom: 28px;
}

.portal-slogan {
    text-align: center;
    margin: 0 0 8px;
    font-size: clamp(1.25rem, 3.5vw, 2.3rem);
    font-weight: 500;
    color: #234018;
    line-height: 1.35;
    margin-top: -16px;
}

.portal-sub {
    text-align: center;
    margin-top: 2px;
    color: var(--portal-color-text-muted);
    font-size: 0.95rem;
    line-height: 1;
}

.portal-search {
    max-width: 640px;
    margin: 0 auto;
    /* margin-top: 40px; */
}

.portal-search-modes {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.portal-search-modes label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--portal-color-text-muted);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--portal-color-border);
    background: var(--portal-color-bg-aux);
}

.portal-search-modes input {
    accent-color: var(--portal-color-primary-dark);
}

.portal-search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.portal-search-row input[type="search"],
.portal-search-row input[type="text"] {
    flex: 1;
    min-width: 200px;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--portal-color-border);
    border-radius: 999px;
    font-size: 1rem;
    outline: none;
    background: #fff;
}

.portal-search-row input:focus {
    border-color: var(--portal-color-primary);
    box-shadow: 0 0 0 3px var(--portal-color-primary-soft);
}

.portal-search-row button[type="submit"] {
    height: 48px;
    padding: 0 28px;
    border: none;
    border-radius: 999px;
    background: var(--portal-color-primary);
    color: #1a3310;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
}

.portal-search-row button[type="submit"]:hover {
    background: var(--portal-color-primary-dark);
    color: #fff;
}

.portal-search-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--portal-color-text-muted);
    margin-top: 10px;
}

/* 分类 */
.portal-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #234018;
    margin: 0 0 16px;
    padding-left: 12px;
    border-left: 4px solid var(--portal-color-primary);
}

.portal-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    margin-top: 24px;
}

.portal-cats a {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--portal-color-bg-page);
    border: 1px solid var(--portal-color-border);
    color: var(--portal-color-text);
    font-size: 0.9rem;
    text-decoration: none;
}

.portal-cats a:hover {
    border-color: var(--portal-color-primary);
    color: var(--portal-color-primary-dark);
}

.portal-cats a.is-active {
    background: var(--portal-color-primary);
    border-color: var(--portal-color-primary);
    color: #fff;
    font-weight: 600;
}

.portal-cats a.is-disabled {
    opacity: 0.55;
}

.portal-cats a.is-disabled:hover {
    border-color: var(--portal-color-border);
    color: var(--portal-color-text);
    text-decoration: none;
}

/* 首页分类为换行 flex；小屏居中。排除横向滚动的 .portal-cats--scroll，避免溢出时两侧被裁切 */
@media (max-width: 760px) {
    .portal-cats:not(.portal-cats--scroll) {
        justify-content: center;
    }

    /* 首页区块：小屏固定每行 4 个类目（避免 flex 换行仅排 3 个） */
    #portal-products .portal-cats:not(.portal-cats--scroll) {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        justify-content: initial;
    }

    #portal-products .portal-cats:not(.portal-cats--scroll) a {
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
        text-align: center;
        padding: 8px 4px;
        font-size: clamp(0.68rem, 3.2vw, 0.85rem);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* 产品网格：桌面 6 列，手机 2 列 */
.portal-products {
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}

@media (max-width: 1100px) {
    .portal-products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 760px) {
    .portal-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.portal-product-card {
    background: var(--portal-color-bg-page);
    border-radius: var(--portal-radius);
    overflow: hidden;
    border: 1px solid var(--portal-color-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.portal-product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--portal-shadow);
}

.portal-product-card a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.portal-product-thumb {
    aspect-ratio: 1;
    background: var(--portal-color-bg-aux);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.portal-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-product-thumb--empty {
    color: var(--portal-color-text-muted);
    font-size: 0.85rem;
    padding: 16px;
    text-align: center;
}

.portal-product-body {
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.portal-product-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    min-height: 1.25em;
    line-height: 1.25;
}

.portal-product-name {
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-product-brand {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    color: var(--portal-color-text-muted);
    margin: 0;
    min-width: 0;
    flex: 1;
}

/* 品牌 / 点击量图标统一盒子尺寸，消除 inline-svg 基线空隙，与文字垂直居中 */
.portal-product-meta-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    display: block;
    align-self: center;
}

.portal-product-brand-label {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: inherit;
    align-self: center;
}

.portal-notice-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.portal-notice-views svg {
    color: var(--portal-color-text-muted);
}

.portal-product-clicks {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    color: var(--portal-color-text-muted);
    flex-shrink: 0;
    line-height: inherit;
}

.portal-product-clicks svg {
    color: var(--portal-color-text-muted);
}

.portal-product-clicks-num {
    line-height: inherit;
    align-self: center;
}

.portal-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--portal-color-text-muted);
    background: var(--portal-color-bg-page);
    border-radius: var(--portal-radius);
    border: 1px dashed var(--portal-color-border);
}

/* —— 产品中心（独立页） —— */
.portal-product-page {
    padding-top: 16px;
}

/* 产品页顶部轮播 */
.portal-carousel-section {
    margin-bottom: 20px;
}

.portal-carousel {
    position: relative;
    isolation: isolate;
    background: #fff;
    border: 1px solid var(--portal-color-border);
    border-radius: var(--portal-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.portal-carousel-viewport {
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1200 / 360;
    max-height: min(42vh, 360px);
    background: var(--portal-color-bg-aux);
    /* 整块区域高度由此处决定；下方不再为指示条预留占位 */
}

@media (max-width: 600px) {
    .portal-carousel-viewport {
        max-height: none;
    }
}

.portal-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.45s ease;
    will-change: transform;
}

.portal-carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    min-height: 100%;
    display: flex;
    align-items: stretch;
}

.portal-carousel-link,
.portal-carousel-static {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    line-height: 0;
}

.portal-carousel-link:hover {
    text-decoration: none;
    opacity: 0.97;
}

.portal-carousel-slide img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* 悬浮在轮播画面上方（叠层），不挤出视口高度 */
.portal-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    margin: 0;
    background: transparent;
    pointer-events: none;
}

.portal-carousel-dot {
    pointer-events: auto;
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.portal-carousel-dot:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.portal-carousel-dot.is-active {
    background: var(--portal-color-primary);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
    transform: scale(1.15);
}

.portal-product-search-wrap {
    background: #fff;
    border: 1px solid var(--portal-color-border);
    border-radius: var(--portal-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    padding: 20px;
    margin-bottom: 20px;
}

.portal-product-search-wrap .portal-search {
    margin-top: 0;
}

.portal-cats--scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.portal-cats--scroll::-webkit-scrollbar {
    height: 6px;
}

.portal-cats--scroll::-webkit-scrollbar-thumb {
    background: #c9d6c2;
    border-radius: 999px;
}

.portal-cats--scroll a {
    flex: 0 0 auto;
}

.portal-category-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.portal-category-block {
    /* background: #fff;
    border: 1px solid var(--portal-color-border);
    border-radius: var(--portal-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    padding: 16px;
    scroll-margin-top: calc(var(--portal-header-h) + 18px); */
}

.portal-category-title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: #234018;
    padding-left: 10px;
    border-left: 3px solid var(--portal-color-primary);
}

.portal-products--full {
    margin-bottom: 0;
}

.portal-empty--compact {
    margin: 0;
    padding: 26px 12px;
}

/* —— 产品搜索结果页 —— */
.portal-search-result-head {
    margin-bottom: 14px;
}

.portal-search-result-head .portal-search-hint strong {
    color: #234018;
}

.portal-search-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.portal-search-sort a {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--portal-color-border);
    background: #fff;
    color: var(--portal-color-text);
    font-size: 0.9rem;
    text-decoration: none;
}

.portal-search-sort a:hover {
    border-color: var(--portal-color-primary);
    color: var(--portal-color-primary-dark);
}

.portal-search-sort a.is-active {
    background: var(--portal-color-primary);
    border-color: var(--portal-color-primary);
    color: #1a3310;
    font-weight: 600;
}

.portal-search-list-wrap {
    background: #fff;
    border: 1px solid var(--portal-color-border);
    border-radius: var(--portal-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    padding: 16px;
}

@media (max-width: 760px) {
    .portal-product-search-wrap {
        padding: 14px;
    }

    .portal-category-block {}
}

/* —— 素材中心 —— */
.portal-slogan--small {
    margin-bottom: 12px;
    font-size: clamp(1.2rem, 2.4vw, 1.9rem);
}

.portal-material-page {
    padding: 12px 0 24px;
}

.portal-material-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.portal-material-card {
    background: #fff;
    border: 1px solid var(--portal-color-border);
    border-radius: var(--portal-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.portal-material-card h2 {
    margin: 0 0 6px;
    font-size: 1rem;
    color: #234018;
}

.portal-material-desc {
    margin: 0 0 8px;
    color: var(--portal-color-text-muted);
    font-size: 0.9rem;
}

.portal-material-meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--portal-color-text-muted);
    font-size: 0.82rem;
}

.portal-btn-download {
    display: inline-block;
    border-radius: 999px;
    padding: 9px 16px;
    background: var(--portal-color-primary);
    color: #1a3310;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.portal-btn-download:hover {
    background: var(--portal-color-primary-dark);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 760px) {
    .portal-material-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* —— 页脚 —— */
.portal-footer {
    background: #243018;
    color: rgba(255, 255, 255, 0.88);
    margin-top: auto;
}

.portal-footer a {
    color: rgba(255, 255, 255, 0.75);
}

.portal-footer a:hover {
    color: #b8f078;
}

.portal-footer-inner {
    max-width: var(--portal-max-width);
    margin: 0 auto;
    padding: 36px 20px 20px;
}

.portal-footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 28px;
}

@media (max-width: 800px) {
    .portal-footer-grid {
        grid-template-columns: 1fr;
    }
}

.portal-footer h3 {
    margin: 0 0 12px;
    font-size: 1rem;
    color: #fff;
}

.portal-footer p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.75);
}

.portal-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.portal-footer-links li {
    margin-bottom: 8px;
}

.portal-footer-links a {
    font-size: 0.9rem;
}

.portal-friends {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    flex-direction: column;
}

.portal-footer-bottom {
    max-width: var(--portal-max-width);
    margin: 0 auto;
    padding: 16px 20px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}

.portal-footer-bottom p {
    margin: 4px 0;
}

/* —— 右下角悬浮快捷按钮 —— */
.portal-float-nav {
    position: fixed;
    right: clamp(12px, 3vw, 22px);
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 980;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.portal-float-nav__btn {
    min-width: 106px;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(36, 48, 24, 0.58);
    color: rgba(255, 255, 255, 0.95);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 6px 14px rgba(20, 28, 18, 0.2);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

button.portal-float-nav__btn {
    font-family: inherit;
}

.portal-float-nav__btn:hover {
    background: rgba(36, 48, 24, 0.72);
    border-color: rgba(184, 240, 120, 0.65);
    transform: translateY(-1px);
    text-decoration: none;
}

.portal-float-nav__btn:focus-visible {
    outline: 2px solid rgba(142, 219, 73, 0.8);
    outline-offset: 2px;
}

@media (max-width: 760px) {
    .portal-float-nav {
        right: 10px;
        bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .portal-float-nav__btn {
        min-width: 96px;
        height: 34px;
        padding: 0 12px;
        font-size: 0.78rem;
    }
}

/* —— 公告中心：列表 —— */
.portal-page-head {
    text-align: center;
    margin-bottom: 24px;
}

.portal-notice-page {
    padding: 12px 0 24px;
}

.portal-notice-list {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.portal-notice-card {
    background: #fff;
    border: 1px solid var(--portal-color-border);
    border-radius: var(--portal-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.portal-notice-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--portal-shadow);
    border-color: var(--portal-color-primary);
}

.portal-notice-link {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    color: inherit;
    text-decoration: none;
    padding: 14px;
}

.portal-notice-link:hover {
    text-decoration: none;
}

.portal-notice-thumb {
    aspect-ratio: 16 / 10;
    background: var(--portal-color-bg-aux);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-notice-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portal-notice-thumb.is-empty {
    background: linear-gradient(135deg, var(--portal-color-primary-soft), var(--portal-color-bg-aux));
    color: var(--portal-color-primary-dark);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
}

.portal-notice-thumb__placeholder {
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.portal-notice-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.portal-notice-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 0.78rem;
    color: var(--portal-color-text-muted);
    margin-bottom: 8px;
}

.portal-notice-tag {
    display: inline-block;
    padding: 2px 10px;
    background: var(--portal-color-primary-soft);
    color: var(--portal-color-primary-dark);
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
}

.portal-notice-date {
    display: inline-flex;
    align-items: center;
}

.portal-notice-title {
    margin: 0 0 8px;
    font-size: 1.08rem;
    font-weight: 600;
    color: #234018;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-notice-card:hover .portal-notice-title {
    color: var(--portal-color-primary-dark);
}

.portal-notice-excerpt {
    margin: 0 0 10px;
    color: var(--portal-color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-notice-foot {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--portal-color-text-muted);
    font-size: 0.82rem;
}

.portal-notice-more {
    color: var(--portal-color-primary-dark);
    font-weight: 600;
}

@media (max-width: 760px) {
    .portal-notice-link {
        grid-template-columns: 120px 1fr;
        gap: 12px;
        padding: 10px;
    }

    .portal-notice-thumb {
        aspect-ratio: 1;
    }

    .portal-notice-title {
        font-size: 0.98rem;
    }

    .portal-notice-excerpt {
        -webkit-line-clamp: 2;
        font-size: 0.84rem;
    }
}

/* 分页 */
.portal-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.portal-pagination .pagination,
.portal-pagination ul.pagination {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.portal-pagination .pagination li {
    display: inline-block;
}

.portal-pagination .pagination li a,
.portal-pagination .pagination li span {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--portal-color-border);
    color: var(--portal-color-text);
    background: #fff;
    font-size: 0.88rem;
    text-decoration: none;
    line-height: 1.4;
}

.portal-pagination .pagination li a:hover {
    border-color: var(--portal-color-primary);
    color: var(--portal-color-primary-dark);
    text-decoration: none;
}

.portal-pagination .pagination li.active span,
.portal-pagination .pagination li.active a {
    background: var(--portal-color-primary);
    border-color: var(--portal-color-primary);
    color: #1a3310;
    font-weight: 600;
}

.portal-pagination .pagination li.disabled span,
.portal-pagination .pagination li.disabled a {
    color: #b3bdb1;
    background: #f5f7f3;
    cursor: not-allowed;
}

.portal-pagination-total {
    font-size: 0.82rem;
    color: var(--portal-color-text-muted);
}

/* —— 公告中心：详情 —— */
.portal-breadcrumb {
    margin-bottom: 14px;
    font-size: 0.86rem;
    color: var(--portal-color-text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.portal-breadcrumb a {
    color: var(--portal-color-text-muted);
}

.portal-breadcrumb a:hover {
    color: var(--portal-color-primary-dark);
    text-decoration: none;
}

.portal-breadcrumb-sep {
    color: #c4ccc1;
}

.portal-breadcrumb-current {
    color: #234018;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-notice-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 980px) {
    .portal-notice-detail-layout {
        grid-template-columns: 1fr;
    }
}

.portal-article {
    background: #fff;
    border: 1px solid var(--portal-color-border);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
    padding: 28px 32px;
}

@media (max-width: 760px) {
    .portal-article {
        padding: 18px 16px;
    }
}

.portal-article-head {
    border-bottom: 1px dashed var(--portal-color-border);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.portal-article-title {
    margin: 0 0 12px;
    font-size: clamp(1.25rem, 2.4vw, 1.7rem);
    font-weight: 700;
    color: #1f3a14;
    line-height: 1.4;
}

.portal-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    color: var(--portal-color-text-muted);
    font-size: 0.85rem;
}

.portal-article-cover {
    margin: 0 0 20px;
    text-align: center;
}

.portal-article-cover img {
    max-width: 100%;
    max-height: 420px;
    border-radius: 8px;
    object-fit: cover;
}

.portal-article-content {
    color: #2a3a26;
    font-size: 1rem;
    line-height: 1.85;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.portal-article-content img,
.portal-article-content video {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 12px auto;
}

.portal-article-content p {
    margin: 0 0 14px;
}

.portal-article-content h1,
.portal-article-content h2,
.portal-article-content h3,
.portal-article-content h4 {
    color: #234018;
    margin: 22px 0 10px;
    line-height: 1.45;
}

.portal-article-content blockquote {
    margin: 14px 0;
    padding: 10px 14px;
    border-left: 4px solid var(--portal-color-primary);
    background: var(--portal-color-bg-aux);
    color: var(--portal-color-text-muted);
    border-radius: 0 8px 8px 0;
}

.portal-article-content ul,
.portal-article-content ol {
    padding-left: 24px;
    margin: 0 0 14px;
}

.portal-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
}

.portal-article-content table td,
.portal-article-content table th {
    border: 1px solid var(--portal-color-border);
    padding: 8px 10px;
}

.portal-article-content a {
    color: var(--portal-color-primary-dark);
    text-decoration: underline;
}

.portal-article-foot {
    margin-top: 28px;
    border-top: 1px solid var(--portal-color-border);
    padding-top: 18px;
}

.portal-btn-back {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--portal-color-bg-aux);
    border: 1px solid var(--portal-color-border);
    color: var(--portal-color-text);
    font-size: 0.9rem;
    text-decoration: none;
}

.portal-btn-back:hover {
    background: var(--portal-color-primary-soft);
    border-color: var(--portal-color-primary);
    color: var(--portal-color-primary-dark);
    text-decoration: none;
}

/* 推荐阅读侧栏 */
.portal-aside {
    position: sticky;
    top: calc(var(--portal-header-h) + 16px);
}

@media (max-width: 980px) {
    .portal-aside {
        position: static;
    }
}

.portal-aside-card {
    background: #fff;
    border: 1px solid var(--portal-color-border);
    border-radius: var(--portal-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    padding: 16px 18px 18px;
}

.portal-aside-title {
    margin: 0 0 12px;
    padding: 0 0 8px;
    font-size: 1rem;
    color: #234018;
    border-bottom: 2px solid var(--portal-color-primary);
    display: inline-block;
}

.portal-aside-empty {
    margin: 6px 0 0;
    color: var(--portal-color-text-muted);
    font-size: 0.88rem;
}

.portal-aside-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.portal-aside-list li+li {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--portal-color-border);
}

.portal-aside-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.portal-aside-item:hover {
    text-decoration: none;
}

.portal-aside-thumb {
    aspect-ratio: 1;
    background: var(--portal-color-bg-aux);
    border-radius: 6px;
    overflow: hidden;
    display: block;
}

.portal-aside-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portal-aside-thumb.is-empty {
    background: var(--portal-color-primary-soft);
}

.portal-aside-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.portal-aside-item-title {
    font-size: 0.88rem;
    color: #2a3a26;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-aside-item:hover .portal-aside-item-title {
    color: var(--portal-color-primary-dark);
}

.portal-aside-item-date {
    margin-top: 4px;
    font-size: 0.76rem;
    color: var(--portal-color-text-muted);
}

/* ——— 扫码产品公开页（与门户同色、通用顶栏底栏） ——— */
.portal-scan-body.portal-scan-modal-open {
    overflow: hidden;
}

.portal-scan-main {
    flex: 1;
}

.portal-scan-wrap {
    margin: 0 auto;
    max-width: min(var(--portal-max-width), 100%);
    padding: 18px 20px 48px;
}

.portal-scan-hero-carousel {
    margin-bottom: 18px;
}

.portal-scan-product-carousel.portal-carousel .portal-carousel-viewport {
    aspect-ratio: 1;
    max-height: min(88vw, 520px);
    background: #fff;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
}

@media (max-width: 600px) {
    .portal-scan-product-carousel.portal-carousel .portal-carousel-viewport {
        max-height: none;
    }
}

.portal-scan-slide-frame {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--portal-color-bg-aux);
}

.portal-scan-product-carousel .portal-carousel-slide img {
    object-fit: contain;
    background: var(--portal-color-bg-aux);
    -webkit-user-drag: none;
    user-select: none;
}

.portal-scan-product-carousel .portal-carousel-viewport.is-dragging {
    cursor: grabbing;
}

.portal-scan-product-carousel .portal-carousel-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.portal-scan-product-carousel .portal-carousel-nav:hover {
    background: rgba(0, 0, 0, 0.48);
}

.portal-scan-product-carousel .portal-carousel-nav:active {
    transform: translateY(-50%) scale(0.96);
}

.portal-scan-product-carousel .portal-carousel-nav--prev {
    left: 10px;
}

.portal-scan-product-carousel .portal-carousel-nav--next {
    right: 10px;
}

@media (max-width: 300px) {
    .portal-scan-product-carousel .portal-carousel-nav {
        display: none;
    }
}

.portal-scan-hero-carousel--placeholder {
    border-radius: var(--portal-radius);
    border: 1px solid var(--portal-color-border);
    background: linear-gradient(145deg, var(--portal-color-bg-aux), #fff);
    min-height: min(56vw, 280px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-scan-placeholder-inner {
    text-align: center;
    color: var(--portal-color-text-muted);
}

.portal-scan-placeholder-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: var(--portal-color-primary-soft);
    color: var(--portal-color-primary-dark);
    font-size: 2rem;
    font-weight: 700;
}

.portal-scan-placeholder-hint {
    margin: 12px 0 0;
    font-size: 0.9rem;
}

.portal-scan-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.portal-scan-act-btn {
    flex: 1 1 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.portal-scan-act-btn--primary {
    background: linear-gradient(135deg, var(--portal-color-primary), var(--portal-color-primary-dark));
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(111, 194, 56, 0.35);
}

.portal-scan-act-btn--primary:hover {
    text-decoration: none;
    filter: brightness(1.03);
}

.portal-scan-act-btn--outline {
    background: #fff;
    border-color: var(--portal-color-primary);
    color: var(--portal-color-primary-dark) !important;
}

.portal-scan-act-btn--outline:hover {
    text-decoration: none;
    background: var(--portal-color-bg-aux);
}

.portal-scan-act-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    filter: none;
}

.portal-scan-card {
    background: var(--portal-color-bg-page);
    border: 1px solid var(--portal-color-border);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
    padding: 18px 20px 20px;
    margin-bottom: 18px;
}

.portal-scan-card-title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: #234018;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--portal-color-primary);
    display: inline-block;
}

.portal-scan-product-name {
    margin: 4px 0 10px;
    font-size: 1.35rem;
    line-height: 1.35;
    font-weight: 700;
    word-break: break-word;
}

.portal-scan-meta {
    margin: 0 0 6px;
    font-size: 0.93rem;
    color: var(--portal-color-text);
}

.portal-scan-meta-k {
    display: inline-block;
    min-width: 4.6em;
    color: var(--portal-color-text-muted);
    margin-right: 8px;
}

.portal-scan-intro {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--portal-color-border);
    font-size: 0.93rem;
    color: var(--portal-color-text-muted);
    line-height: 1.65;
}

.portal-scan-factory-title {
    margin: 0 0 14px;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--portal-color-text);
    word-break: break-word;
}

.portal-scan-license-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.portal-scan-license-tile {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px;
    border: 1px solid var(--portal-color-border);
    border-radius: 10px;
    background: var(--portal-color-bg-aux);
    color: inherit !important;
    text-decoration: none !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.portal-scan-license-tile:hover {
    border-color: var(--portal-color-primary);
    box-shadow: 0 4px 16px rgba(111, 194, 56, 0.18);
}

.portal-scan-license-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--portal-color-primary-dark);
    margin-bottom: 10px;
}

.portal-scan-license-thumb-wrap {
    flex: 1;
    min-height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.portal-scan-license-thumb-wrap img {
    width: 100%;
    height: 180px;
    /* object-fit: cover; */
    display: block;
}

.portal-scan-license-more {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--portal-color-primary-dark);
    text-decoration: underline;
}

.portal-scan-empty-hint {
    margin: 0;
    font-size: 0.92rem;
    color: var(--portal-color-text-muted);
}

.portal-scan-notfound {
    padding-top: 48px;
    padding-bottom: 64px;
}

.portal-scan-notfound-card {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    padding: 32px 24px;
    border-radius: var(--portal-radius);
    border: 1px solid var(--portal-color-border);
    box-shadow: var(--portal-shadow);
    background: #fff;
}

.portal-scan-notfound-icon {
    margin: 0 auto 14px;
    width: 56px;
    height: 56px;
    line-height: 56px;
    border-radius: 50%;
    background: rgba(255, 180, 80, 0.2);
    color: #c65d00;
    font-size: 1.6rem;
    font-weight: 800;
}

.portal-scan-notfound-msg {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--portal-color-text);
}

.portal-scan-notfound-tip {
    margin: 0 0 22px;
    font-size: 0.92rem;
    color: var(--portal-color-text-muted);
}

.portal-scan-notfound-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.portal-scan-notfound-actions .portal-scan-act-btn {
    flex: 0 1 auto;
    min-width: 140px;
}

/* 质检报告弹窗 */
.portal-scan-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) 16px 16px;
}

.portal-scan-modal[hidden] {
    display: none !important;
}

.portal-scan-modal-scrim {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(18, 28, 22, 0.5);
}

.portal-scan-dialog {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    max-height: min(78vh, 560px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.portal-scan-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--portal-color-border);
}

.portal-scan-dialog-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #234018;
}

.portal-scan-dialog-close {
    border: none;
    background: var(--portal-color-bg-aux);
    color: var(--portal-color-text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.portal-scan-dialog-close:hover {
    color: var(--portal-color-text);
    background: var(--portal-color-primary-soft);
}

.portal-scan-qc-list {
    list-style: none;
    margin: 0;
    padding: 8px 0 12px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.portal-scan-qc-list-item {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    border-bottom: 1px solid var(--portal-color-border);
}

.portal-scan-qc-list-item:hover {
    background: var(--portal-color-bg-aux);
}

.portal-scan-qc-list-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--portal-color-text);
}

.portal-scan-qc-list-item-sub {
    font-size: 0.82rem;
    color: var(--portal-color-text-muted);
}

.portal-scan-viewer {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.portal-scan-viewer[hidden] {
    display: none !important;
}

.portal-scan-modal-scrim--dark {
    background: rgba(6, 10, 8, 0.78);
}

.portal-scan-viewer-inner {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: max(8px, env(safe-area-inset-top)) 0 max(12px, env(safe-area-inset-bottom));
}

.portal-scan-viewer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 16px 10px;
}

.portal-scan-viewer-caption {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f4fff0;
    flex: 1;
    min-width: 0;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.portal-scan-viewer-close {
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.portal-scan-viewer-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.portal-scan-qc-viewport {
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.portal-scan-qc-strip {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px calc(50vw - min(41vw, 260px)) 28px;
    min-height: min(56vh, 460px);
}

.portal-scan-qc-peek-slide {
    flex: 0 0 min(82vw, 520px);
    scroll-snap-align: center;
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #0d0d0d;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}

.portal-scan-qc-peek-slide img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(58vh, 520px);
    object-fit: contain;
    background: #000;
}