/* ============================
   EMSHOP Test Template
   简约现代 · 发卡网风格
   ============================ */

/* --- Logo Font --- */
@font-face {
    font-family: 'LogoFont';
    src: url('fonts/logo-font.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    background: #f4f6f9;
    -webkit-font-smoothing: antialiased;
    /* Sticky footer：三行 grid，main 吃掉剩余高度，内容不足一屏时 footer 仍贴底 */
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

/* --- Layout --- */
.wrapper { max-width: 1320px; margin: 0 auto; padding: 0 12px; }
/* width:100% 是给 grid item 用的：body 改成 grid 后，margin:0 auto 会让 #main 触发
 * shrink-to-fit、塌缩到内容宽度；显式 width:100% 让它先撑满列再由 max-width 限顶 */
#main { max-width: 1320px; width: 100%; margin: 0 auto; padding: 0 12px; }
.page-body { padding-top: 24px; }

/* --- PJAX Progress Bar --- */
.pjax-bar {
    position: fixed; top: 0; left: 0; height: 2px;
    background: linear-gradient(90deg, #4e6ef2, #7c93f8);
    z-index: 99999; width: 0;
    transition: width 0.15s ease-out;
    pointer-events: none;
}
.pjax-bar.running { width: 85%; transition: width 8s cubic-bezier(0.1, 0.5, 0.3, 1); }
.pjax-bar.done { width: 100%; transition: width 0.15s ease-in; }

/* --- 店铺公告（首页 / 商品列表页通用） ---
   外层一个白底圆角卡片把 head + body 包成一个整体单元；head 用浅灰底 + 下分割线
   清楚地撑出"标题区"，避免 head 透明地坐在页面背景上跟整页融为一体。 */
.site-announcement {
    margin: 18px -12px;       /* 左右负 margin 抵消 .wrapper 的 12px padding，使公告贴齐 wrapper 内宽度 */
    background: #fff;
    border: 1px solid #e8ecf7;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
/* 标题行：浅灰底 + 1px 下分割线；icon 圆角徽章保留蓝紫渐变 */
.site-announcement__head {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px;
    background: #f0f3ff;
    border-bottom: 1px solid #e8ecf7;
}
.site-announcement__head .site-announcement__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    border-radius: 6px;
    background: linear-gradient(135deg, #4e6ef2 0%, #7c93f8 100%);
    color: #fff; font-size: 12px;
    box-shadow: 0 2px 6px rgba(78, 110, 242, 0.25);
    flex-shrink: 0;
}
.site-announcement__title {
    font-size: 14px; font-weight: 600; color: #1f2937;
    letter-spacing: 0.3px;
}
.site-announcement__title-sep { flex: 1; }
/* 正文：白底容器，仅负责"框"——不干预内部 wangeditor 输出的任何元素样式
   （颜色 / 字号 / 行高 / 链接 / 图片 / 列表等都由富文本 inline style 自己说了算） */
.site-announcement__body {
    padding: 14px 18px;
    background: #fff;
    word-break: break-word;
    line-height: 200%;
}
/* 仅保留：避免富文本首末元素的 margin 撑破容器内边距 —— 这属于容器布局，不是内容样式 */
.site-announcement__body > *:first-child { margin-top: 0; }
.site-announcement__body > *:last-child  { margin-bottom: 0; }
/* 安全约束：图片不允许溢出容器宽度，这是必要的防护，不修饰外观 */
.site-announcement__body img { max-width: 100%; height: auto; }
@media (max-width: 600px) {
    .site-announcement__body { padding: 12px 14px; }
}

/* --- Header --- */
.site-header {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.site-header.scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    border-bottom-color: transparent;
}
.site-header .wrapper { display: flex; align-items: center; height: 64px; }

/* Logo */
.site-logo {
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0; text-decoration: none;
}
.site-logo-text {
    font-family: 'LogoFont', 'Orbitron', sans-serif;
    font-size: 21px; font-weight: 500; text-transform: uppercase;
    background: linear-gradient(135deg, #4e6ef2 0%, #2b7de9 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px; transition: opacity 0.25s;
}
.site-logo:hover .site-logo-text { opacity: 0.75; }

/* Logo 图片模式 */
.site-logo-img {
    height: 36px; width: auto; max-width: 160px;
    object-fit: contain; display: block;
    transition: opacity 0.25s;
}
.site-logo:hover .site-logo-img { opacity: 0.8; }

/* Navigation */
.main-nav { display: flex; gap: 4px; margin-left: 22px; flex: 1; height: 100%; }
.main-nav a {
    font-size: 15px; color: #5a5a6e; padding: 0 18px;
    display: flex; align-items: center; height: 100%;
    position: relative; transition: color 0.25s; font-weight: 500;
}
.main-nav a::after {
    content: ''; position: absolute; bottom: 0; left: 50%; width: 0;
    height: 2.5px; background: linear-gradient(90deg, #4e6ef2, #7c93f8);
    border-radius: 2px; transition: width 0.3s ease, left 0.3s ease;
}
.main-nav a:hover { color: #4e6ef2; }
.main-nav a:hover::after { width: 20px; left: calc(50% - 10px); }
.main-nav a.active { color: #4e6ef2; font-weight: 600; }
.main-nav a.active::after { width: calc(100% - 36px); left: 18px; }

/* Desktop dropdown */
.nav-dropdown {
    position: relative; height: 100%;
}
.nav-dropdown > a {
    gap: 4px;
}
.nav-arrow {
    flex-shrink: 0; opacity: 0.5;
    transition: transform 0.25s, opacity 0.25s;
}
.nav-dropdown:hover .nav-arrow { transform: rotate(180deg); opacity: 1; }
.nav-dropdown-menu {
    position: absolute; top: calc(100% - 10px); left: 50%;
    transform: translateX(-50%) translateY(4px);
    min-width: 150px; padding: 8px 0;
    background: #fff; border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
    opacity: 0; visibility: hidden;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu::before {
    content: ''; position: absolute; top: -6px; left: 50%;
    width: 12px; height: 12px;
    background: #fff; border-radius: 2px;
    border-top: 1px solid rgba(0,0,0,0.05);
    border-left: 1px solid rgba(0,0,0,0.05);
    transform: translateX(-50%) rotate(45deg);
}
.nav-dropdown-menu a {
    display: block; padding: 9px 20px;
    font-size: 14px; color: #555; white-space: nowrap;
    position: relative;
    transition: background 0.2s, color 0.2s, padding-left 0.2s;
}
.nav-dropdown-menu a::before {
    content: ''; position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px; height: 16px; border-radius: 2px;
    background: #4e6ef2;
    transition: transform 0.2s ease;
}
.nav-dropdown-menu a::after { display: none; }
.nav-dropdown-menu a:hover {
    background: #f0f4ff; color: #4e6ef2;
    padding-left: 26px;
}
.nav-dropdown-menu a:hover::before {
    transform: translateY(-50%) scaleY(1);
}

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.header-action-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; border: none; background: transparent;
    color: #6b7280; cursor: pointer; transition: all 0.25s;
    text-decoration: none;
}
.header-action-btn:hover { background: #f0f3ff; color: #4e6ef2; }
.header-action-btn svg { width: 20px; height: 20px; }
.header-action-btn--text {
    width: auto; padding: 0 12px; gap: 5px; font-size: 13px; font-weight: 500;
    background: #f0f3ff; color: #4e6ef2;
}

/* User avatar & dropdown */
.header-user-dropdown { position: relative; margin-left: 4px; }
.header-user {
    display: flex; align-items: center;
    text-decoration: none; border: none; background: transparent; cursor: pointer;
    padding: 4px 8px; border-radius: 10px;
    transition: background 0.2s;
}
.header-user:hover,
.header-user-dropdown:hover .header-user { background: #f0f3ff; }
.header-user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    object-fit: cover; border: 2px solid #ebeef5;
    flex-shrink: 0;
}
.header-user-avatar--default {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e8ecf4, #d5dbe8);
    color: #a0aec0; font-size: 15px;
}
.header-user-menu {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: #fff; border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    min-width: 160px; padding: 6px 0;
    opacity: 0; visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 200;
}
.header-user-dropdown:hover .header-user-menu,
.header-user-dropdown.open .header-user-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.header-user-menu-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 18px; font-size: 13px; color: #555;
    text-decoration: none; transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.header-user-menu-item:hover { background: #f5f7fb; color: #333; }
.header-user-menu-item i.fa { width: 16px; text-align: center; color: #999; font-size: 14px; }
.header-user-menu-item:hover i.fa { color: #4e6ef2; }
.header-user-menu-divider { height: 1px; background: #f0f0f0; margin: 4px 0; }
.header-user-menu-item--danger { color: #cf1322; }
.header-user-menu-item--danger:hover { background: #fff2f0; color: #cf1322; }
.header-user-menu-item--danger i.fa { color: #cf1322; }
.header-user-menu-item--danger:hover i.fa { color: #cf1322; }

/* 已登录：账号 + 余额 */
.header-user-info {
    display: flex; flex-direction: column; align-items: flex-start;
    margin-left: 8px; line-height: 1.3;
}
.header-user-name {
    font-size: 13px; font-weight: 600; color: #333;
    max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.header-user-money { font-size: 13px; color: #f5222d; font-weight: 500; }

/* Hamburger menu button (mobile) */
.header-menu-btn {
    display: none; width: 40px; height: 40px;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; border: none; background: transparent;
    cursor: pointer; border-radius: 10px; padding: 10px;
    transition: background 0.25s;
}
.header-menu-btn:hover { background: #f0f3ff; }
.hamburger-line {
    display: block; width: 18px; height: 2px;
    background: #6b7280; border-radius: 1px;
    transition: all 0.3s ease;
}
.header-menu-btn.active .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header-menu-btn.active .hamburger-line:nth-child(2) { opacity: 0; }
.header-menu-btn.active .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端侧滑菜单遮罩（桌面不展示） */
.mobile-nav-backdrop { display: none; }

/* 移动端导航：桌面隐藏；≤768px 由下方媒体查询改为右侧抽屉 */
.mobile-nav { display: none; }
.mobile-nav-inner { padding: 8px 20px 16px; }
.mobile-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; font-size: 15px; color: #5a5a6e;
    border-radius: 10px; transition: all 0.2s; text-decoration: none;
}
.mobile-nav-item:hover,
.mobile-nav-item.active { background: #f0f3ff; color: #4e6ef2; }
.mobile-nav-item .fa { width: 20px; text-align: center; font-size: 16px; }
.mobile-nav-logout { color: #cf1322; }
.mobile-nav-logout:hover { background: #fff2f0; color: #cf1322; }
.mobile-nav-toggle { cursor: pointer; }
.mobile-nav-toggle .mobile-nav-arrow {
    margin-left: auto; font-size: 12px; width: auto;
    transition: transform 0.25s; color: #adb5bd;
}
.mobile-nav-toggle.open .mobile-nav-arrow { transform: rotate(180deg); }
.mobile-nav-sub {
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease;
}
.mobile-nav-sub.open { max-height: 300px; }
.mobile-nav-sub-item {
    display: block; padding: 10px 16px 10px 52px;
    font-size: 14px; color: #666; text-decoration: none;
    border-radius: 8px; transition: background 0.15s, color 0.15s;
}
.mobile-nav-sub-item:hover { background: #f0f4ff; color: #4e6ef2; }
.mobile-nav-divider { height: 1px; background: #f0f0f0; margin: 8px 16px; }

/* --- Footer：极简版权 + ICP 备案，居中两行布局 --- */
.site-footer {
    background: #1e2a3a;
    color: rgba(255,255,255,0.55);
    padding: 28px 0;
    margin-top: 48px;
    font-size: 13px;
}
.site-footer .wrapper {
    display: flex; flex-direction: column; align-items: center;
    gap: 6px; text-align: center;
}
.site-footer__copy {
    display: inline-flex; align-items: center; gap: 8px;
    color: rgba(255,255,255,0.7);
    flex-wrap: wrap; justify-content: center;
}
.site-footer__icp { font-size: 12.5px; }
.site-footer__icp a {
    color: rgba(255,255,255,0.45);
    transition: color 0.2s;
    letter-spacing: 0.3px;
}
.site-footer__icp a:hover { color: rgba(255,255,255,0.85); }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 20px; border-radius: 6px; font-size: 14px;
    cursor: pointer; transition: all 0.2s; border: none;
    line-height: 1.5; gap: 6px;
}
.btn-primary { background: #4e6ef2; color: #fff; box-shadow: 0 2px 8px rgba(78, 110, 242, 0.25); }
.btn-primary:hover { background: #3d5bd9; color: #fff; box-shadow: 0 4px 12px rgba(78, 110, 242, 0.35); transform: translateY(-1px); }
.btn-outline { background: #fff; border: 1px solid #dcdfe6; color: #606266; }
.btn-outline:hover { border-color: #4e6ef2; color: #4e6ef2; background: #f0f3ff; }
.btn-lg { padding: 12px 32px; font-size: 15px; border-radius: 8px; }
.btn-sm { padding: 5px 14px; font-size: 12px; }
.btn-block { display: flex; width: 100%; }

/* --- Card Base --- */
.card {
    background: #fff; border-radius: 10px; border: 1px solid #ebeef5;
    transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); transform: translateY(-2px); }

/* --- Goods Card --- */
.goods-card { display: block; overflow: hidden; border-radius: 10px; }
.goods-card .card-img {
    aspect-ratio: 1; background: #f8f9fa;
    border-bottom: 1px solid #ebeef5;
    overflow: hidden;
    position: relative;
}
.goods-card .card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.goods-card:hover .card-img img { transform: scale(1.06); }
/* 商品无封面：不输出 img，白灰底占位 */
.goods-no-image {
    display: block;
    width: 100%;
    height: 100%;
    background: #F8F9FA;
    box-sizing: border-box;
}
.goods-card .card-img .goods-no-image {
    position: absolute;
    left: 0;
    top: 0;
}
.goods-card .card-body { padding: 14px; }
.goods-card .card-title {
    font-size: 14px; color: #333; margin-bottom: 5px;
    height: 40px; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; line-height: 1.45;
}
.goods-card:hover .card-title { color: #4e6ef2; }
.goods-card .card-bottom { display: flex; align-items: baseline; justify-content: space-between; }
.goods-card .price { font-size: 18px; font-weight: 700; color: #fa5252; letter-spacing: -0.5px; }
.goods-card .price-original { font-size: 12px; color: #adb5bd; text-decoration: line-through; margin-left: 6px; font-weight: normal; }

/* 发货类型角标 */
.goods-badge {
    position: absolute; top: 8px; right: 8px;
    color: #fff; font-size: 11px; line-height: 1;
    padding: 5px 10px; border-radius: 4px; white-space: nowrap;
}
.goods-badge--auto {
    background: linear-gradient(135deg, #34c759, #2aa845);
    box-shadow: 0 2px 6px rgba(52, 199, 89, 0.3);
}
.goods-badge--manual {
    background: linear-gradient(135deg, #f5222d, #cf1322);
    box-shadow: 0 2px 6px rgba(245, 34, 45, 0.3);
}
/* 库存与销量 */
.card-stats {
    display: flex; justify-content: space-between; font-size: 12px; color: #999;
}

/* --- Goods Grid --- */
.goods-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

/* --- Article Card (horizontal list style) --- */
.article-card { display: flex; gap: 20px; padding: 20px; align-items: flex-start; }
.article-card .card-content { flex: 1; min-width: 0; }
.article-card .card-title {
    font-size: 16px; font-weight: 600; color: #333;
    margin-bottom: 8px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.article-card:hover .card-title { color: #4e6ef2; }
.article-card .card-excerpt {
    font-size: 13px; color: #888; line-height: 1.7; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.article-card .card-meta { font-size: 12px; color: #adb5bd; display: flex; gap: 16px; flex-wrap: wrap; }

/* --- Article Grid (for index pages, card style) --- */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.article-grid .card { display: block; padding: 20px; border-radius: 10px; }
.article-grid-card { display: flex !important; gap: 14px; align-items: stretch; overflow: hidden; }
.article-grid-img {
    width: 90px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: #f8f9fa;
}
.article-grid-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.article-grid-card:hover .article-grid-img img { transform: scale(1.06); }
.article-grid-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.article-grid .card-title {
    font-size: 15px; font-weight: 600; color: #333;
    margin-bottom: 8px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.article-grid .card:hover .card-title { color: #4e6ef2; }
.article-grid .card-excerpt {
    font-size: 13px; color: #888; line-height: 1.7; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.article-grid .card-meta { font-size: 12px; color: #adb5bd; }

/* --- Breadcrumb --- */
.breadcrumb { padding: 16px 0 12px; font-size: 13px; color: #c0c4cc; }
.breadcrumb a { color: #909399; transition: color .2s; }
.breadcrumb a:hover { color: #4e6ef2; }
.breadcrumb .sep { margin: 0 6px; color: #dcdfe6; font-size: 11px; }

/* --- Section --- */
.section { margin-bottom: 36px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title {
    font-size: 18px; font-weight: 600; color: #2c3e50;
    position: relative; padding-left: 14px;
}
.section-title::before {
    content: ''; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 16px; border-radius: 2px;
    background: #4e6ef2;
}
.section-more { font-size: 13px; color: #888; transition: color .2s; }
.section-more:hover { color: #4e6ef2; }

/* --- Hero Carousel --- */
.hero-carousel {
    max-width: 1320px; margin: 20px auto 0;
    position: relative; overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #4e6ef2 0%, #1a6dd6 100%);
}
.hero-track { position: relative; }
.hero-slide {
    display: none; padding: 45px 20px;
    color: #fff; position: relative;
    background: linear-gradient(135deg, #4e6ef2 0%, #1a6dd6 100%);
    animation: heroFadeIn 0.5s ease;
}
.hero-slide.active { display: block; }
@keyframes heroFadeIn { from { opacity: 0; } to { opacity: 1; } }
.hero-slide__overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.15);
    pointer-events: none;
}
/* 无背景图时不需要遮罩 */
.hero-slide:not([style*="background-image"]) .hero-slide__overlay { background: none; }
.hero-slide__content { position: relative; z-index: 1; }
.hero-title { font-size: 32px; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.5px; text-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.hero-desc { font-size: 15px; opacity: 0.9; margin-bottom: 50px; text-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.hero-slide .btn, .hero .btn {
    background: rgba(255,255,255,0.18); color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
    backdrop-filter: blur(4px); transition: all 0.3s;
}
.hero-slide .btn:hover, .hero .btn:hover {
    background: #fff; color: #4e6ef2; border-color: #fff;
    transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* 轮播指示点 */
.hero-dots {
    position: absolute; bottom: 16px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 2;
}
.hero-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.4); cursor: pointer;
    transition: all 0.3s;
}
.hero-dot:hover { background: rgba(255,255,255,0.7); }
.hero-dot.active { background: #fff; width: 24px; border-radius: 4px; }

/* 轮播箭头 */
.hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.15); color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 20px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; z-index: 2; opacity: 0;
    backdrop-filter: blur(4px);
}
.hero-carousel:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: rgba(255,255,255,0.3); }
.hero-arrow--prev { left: 16px; }
.hero-arrow--next { right: 16px; }

.hero-blog {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

/* --- Product Detail --- */
.detail-card { background: #fff; border-radius: 10px; border: 1px solid #ebeef5; padding: 32px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.03); }
.detail-layout { display: grid; grid-template-columns: 420px 1fr; gap: 40px; }
.detail-gallery { display: flex; flex-direction: column; gap: 10px; }
.detail-img {
    width: 100%; aspect-ratio: 1; background: #f8f9fa;
    border-radius: 8px; overflow: hidden;
    border: 1px solid #ebeef5;
    position: relative;
}
.detail-img .goods-no-image {
    position: absolute;
    left: 0;
    top: 0;
    border-radius: inherit;
}
.detail-img img {
    width: 100%; height: 100%; object-fit: cover;
}
/* 缩略图列表 */
.detail-thumbs {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.detail-thumb {
    width: 64px; height: 64px; border-radius: 6px; overflow: hidden;
    border: 2px solid transparent; cursor: pointer;
    transition: border-color .2s;
}
.detail-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    display: block;
}
.detail-thumb:hover { border-color: #ccc; }
.detail-thumb.active { border-color: #4e6ef2; }
.detail-info { display: flex; flex-direction: column; }
.detail-name { font-size: 22px; font-weight: 700; color: #2c3e50; margin-bottom: 16px; line-height: 1.4; }
.detail-price-box {
    background: #fef5f5; border-radius: 8px; padding: 16px 20px;
    margin-bottom: 24px; display: flex; align-items: baseline; gap: 12px;
}
.detail-price { font-size: 28px; font-weight: 700; color: #fa5252; letter-spacing: -0.5px; }
.detail-price-original { font-size: 15px; color: #adb5bd; text-decoration: line-through; }
/* 命中商品满减时：原小计删除线 + "满 X 减 Y" 标签（仅当 JS pickDiscountAmount 返回 > 0 时显示） */
.detail-price-discount-hint { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.detail-price-strike { font-size: 14px; color: #adb5bd; text-decoration: line-through; }
.detail-price-discount-label {
    font-size: 12px; color: #fa5252;
    background: #ffe5e5; border-radius: 4px;
    padding: 2px 8px;
}
.detail-meta { margin-bottom: 24px; }
.detail-meta-row { display: flex; padding: 10px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px; }
.detail-meta-label { color: #999; width: 80px; flex-shrink: 0; }
.detail-meta-value { color: #333; }
.detail-intro {
    font-size: 14px; color: #888; line-height: 1.7; margin-bottom: 16px;
}
.detail-desc {
    background: #f8f9fa; border-radius: 8px; padding: 16px 20px;
    margin-bottom: 24px; font-size: 14px; color: #666; line-height: 1.8;
}
/* --- Spec Selector --- */
.spec-section { margin-bottom: 24px; }
.spec-group { margin-bottom: 16px; }
.spec-group-label { font-size: 13px; color: #999; margin-bottom: 8px; }
.spec-group-options { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
/* 每个规格按钮的容器：tags 在上、按钮在下；多维度时 tags 由 JS 动态填充 */
.spec-item { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.spec-item-tags {
    display: flex; flex-wrap: wrap; gap: 3px;
    padding: 0 2px;
}
.spec-tag {
    display: inline-flex; align-items: center;
    padding: 0 6px; font-size: 11px; line-height: 16px;
    color: #c2410c; background: #fff7ed;
    border: 1px solid #fed7aa; border-radius: 8px;
    letter-spacing: 0.2px; white-space: nowrap;
}
.spec-btn {
    padding: 8px 20px; border: 1px solid #dcdfe6; border-radius: 6px;
    background: #fff; cursor: pointer; font-size: 14px; color: #333;
    transition: all 0.2s; line-height: 1.4;
}
.spec-btn:hover { border-color: #4e6ef2; color: #4e6ef2; }
.spec-btn.active { border-color: #4e6ef2; background: #eef1fe; color: #4e6ef2; font-weight: 600; }
.spec-btn.disabled { color: #ccc; border-color: #eee; background: #fafafa; cursor: not-allowed; }
.spec-stock-hint { font-size: 12px; color: #adb5bd; margin-top: 8px; }

/* 购买数量选择器 */
.detail-qty-row { margin-bottom: 24px; }
.detail-qty-label { font-size: 13px; color: #999; display: block; margin-bottom: 8px; }
.detail-qty-wrap { display: flex; align-items: center; gap: 12px; }
.detail-qty-selector {
    display: inline-flex; align-items: center;
    border: 1px solid #dcdfe6; border-radius: 6px; overflow: hidden;
}
.detail-qty-btn {
    width: 36px; height: 36px; border: none; background: #f5f7fa;
    font-size: 18px; color: #606266; cursor: pointer; transition: background 0.2s;
    display: flex; align-items: center; justify-content: center;
}
.detail-qty-btn:hover { background: #e8eaed; }
.detail-qty-input {
    width: 52px; height: 36px; border: none; border-left: 1px solid #dcdfe6; border-right: 1px solid #dcdfe6;
    text-align: center; font-size: 14px; color: #333; outline: none;
    -moz-appearance: textfield;
}
.detail-qty-input::-webkit-inner-spin-button,
.detail-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.detail-stock-info { font-size: 13px; color: #67c23a; }
.detail-min-buy { font-size: 12px; color: #e6a23c; margin-top: 6px; }

/* 详情页通用表单字段（附加选项 + 查单模式共用同一套样式） */
.detail-form-field { margin-bottom: 14px; }
.detail-form-field-label {
    display: block; font-size: 13px; color: #666;
    margin-bottom: 5px; font-weight: 500;
}
.detail-form-field-input {
    width: 100%; height: 38px;
    padding: 0 12px; border: 1.5px solid #e0e0e0;
    border-radius: 6px; font-size: 14px; color: #333;
    background: #fff; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.detail-form-field-input:focus {
    border-color: #4e6ef2;
    box-shadow: 0 0 0 3px rgba(78,110,242,0.1);
}
/* 查单模式 section 容器（仅作 DOM 锚点，供 guest_find.js 判断；不加额外样式） */
.detail-guest-find-section { /* no-op */ }

/* 商品数据/优惠信息 选项卡 */
.detail-meta-tabs { margin-bottom: 24px; }
.detail-meta-tab-nav {
    display: flex; gap: 0; border-bottom: 1px solid #f0f0f0; margin-bottom: 16px;
}
.detail-meta-tab-btn {
    padding: 8px 20px; border: none; background: none;
    font-size: 14px; color: #999; cursor: pointer;
    border-bottom: 2px solid transparent; transition: all 0.2s;
}
.detail-meta-tab-btn:hover { color: #333; }
.detail-meta-tab-btn.active { color: #4e6ef2; border-bottom-color: #4e6ef2; font-weight: 500; }
.detail-meta-tab-pane { display: none; }
.detail-meta-tab-pane.active { display: block; }
.detail-discount-list { display: flex; flex-direction: column; gap: 8px; }
.detail-discount-item {
    font-size: 14px; color: #333; padding: 8px 12px;
    background: #fff7ed; border-radius: 6px; display: flex; align-items: center; gap: 8px;
}
.detail-discount-tag {
    display: inline-block; padding: 1px 8px; font-size: 12px;
    color: #fff; background: #f59e0b; border-radius: 4px; flex-shrink: 0;
}

/* 销量/库存 */
.detail-stats-row {
    display: flex; align-items: center; gap: 12px;
    font-size: 13px; color: #999; margin-bottom: 16px;
}
.detail-stat-item strong { color: #666; font-weight: 600; }
.detail-stat-sep { color: #e0e0e0; }

/* 支付方式 */
.detail-payment-section { margin-bottom: 24px; }
.detail-payment-title { font-size: 13px; color: #999; margin-bottom: 10px; }
.detail-payment-list { display: flex; flex-wrap: wrap; gap: 10px; }
.detail-payment-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 18px; border: 1.5px solid #e0e0e0; border-radius: 8px;
    background: #fff; cursor: pointer; transition: all 0.2s;
    font-size: 14px; color: #333;
}
.detail-payment-item img { width: 24px; height: 24px; object-fit: contain; }
.detail-payment-item:hover { border-color: #4e6ef2; }
.detail-payment-item.active {
    border-color: #4e6ef2; background: #eef1fe; color: #4e6ef2; font-weight: 500;
}
/* 禁用态（如未登录时的余额支付） */
.detail-payment-item.is-disabled {
    opacity: 0.45; cursor: not-allowed; background: #f5f5f5; color: #999;
}
.detail-payment-item.is-disabled:hover { border-color: #e0e0e0; }

.detail-actions { display: flex; gap: 12px; margin-bottom: 24px; }

/* --- Article Detail --- */
.article-detail {
    background: #fff; border-radius: 8px; border: 1px solid #ebeef5;
    padding: 40px; margin-bottom: 16px;
}
.article-detail .detail-title { font-size: 24px; font-weight: 700; color: #2c3e50; margin-bottom: 16px; line-height: 1.5; }
.article-detail .detail-meta {
    font-size: 13px; color: #adb5bd; padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0; margin-bottom: 24px;
    display: flex; gap: 16px; flex-wrap: wrap;
}
.article-detail .detail-body img { max-width: 100%; height: auto; }
.article-nav {
    display: flex; justify-content: space-between;
    background: #fff; border-radius: 8px; border: 1px solid #ebeef5; padding: 16px 20px;
}
.article-nav a { font-size: 13px; color: #888; }
.article-nav a:hover { color: #4e6ef2; }

/* --- Search --- */
.search-box { display: flex; gap: 12px; margin-bottom: 20px; }
.search-input {
    flex: 1; padding: 10px 16px; border: 1px solid #dcdfe6;
    border-radius: 6px; font-size: 14px; outline: none;
    transition: border-color 0.2s; background: #fff;
}
.search-input:focus { border-color: #4e6ef2; box-shadow: 0 0 0 3px rgba(78,110,242,0.08); }
.search-hint { font-size: 13px; color: #adb5bd; margin-bottom: 16px; }

/* --- Order Result --- */
.order-result { max-width: 680px; margin: 0 auto; }
.order-result-card {
    text-align: center; padding: 40px 20px;
    background: #fff; border-radius: 12px; border: 1px solid #ebeef5;
    margin-bottom: 20px;
}
.order-result-card--success .order-result-icon { color: #52c41a; }
.order-result-icon { font-size: 48px; color: #f59e0b; margin-bottom: 12px; }
.order-result-title { font-size: 20px; font-weight: 600; color: #333; margin-bottom: 8px; }
.order-result-desc { font-size: 14px; color: #999; }
.order-info-card {
    background: #fff; border-radius: 12px; border: 1px solid #ebeef5;
    padding: 24px; margin-bottom: 20px;
}
.order-info-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }
.order-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 50px; }
.order-info-item { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.order-info-label { color: #999; }
.order-info-value { color: #333; }
.order-goods-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 0;
    border-bottom: 1px solid #f8f8f8;
}
.order-goods-item:last-child { border-bottom: none; }
.order-goods-img { width: 56px; height: 56px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: #f5f7fa; }
.order-goods-img img { width: 100%; height: 100%; object-fit: cover; }
.order-goods-img-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #ddd; font-size: 20px; }
.order-goods-info { flex: 1; min-width: 0; }
.order-goods-name { font-size: 14px; color: #333; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-goods-spec { font-size: 12px; color: #999; margin-top: 2px; }
.order-goods-qty { font-size: 14px; color: #999; min-width: 40px; text-align: center; }
.order-goods-price { font-size: 15px; font-weight: 600; color: #fa5252; min-width: 80px; text-align: right; }
.order-delivery-content {
    background: #f8faf5; border-radius: 8px; padding: 12px 16px; margin: 8px 0 12px;
    border-left: 3px solid #52c41a;
}
.order-delivery-label { font-size: 13px; color: #52c41a; font-weight: 500; margin-bottom: 6px; }
.order-delivery-text { font-size: 14px; color: #333; line-height: 1.8; word-break: break-all; }

/* --- Empty State（白底扁平 · 双按钮 · 小贴士三连）--- */
.empty-state {
    text-align: center;
    padding: 56px 24px 44px;
    background: #fff;
    border-radius: 14px;
}
.empty-state .empty-icon {
    width: 72px; height: 72px;
    margin: 0 auto 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #eef2ff;
    border-radius: 20px;
    font-size: 30px;
    color: #6366f1;
    opacity: 1;
}
.empty-state h3 {
    font-size: 17px; color: #1f2937;
    margin-bottom: 8px; font-weight: 600;
    letter-spacing: 0.3px;
}
.empty-state p {
    font-size: 13px; color: #94a3b8;
    line-height: 1.75;
    max-width: 480px;
    margin: 0 auto 22px;
}

/* 按钮组（主 CTA + 次按钮并列） */
.empty-actions {
    display: inline-flex; gap: 10px; flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 24px;
}
.empty-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 22px;
    font-size: 13px; font-weight: 500;
    color: #fff;
    background: #6366f1;
    border: 1px solid #6366f1;
    border-radius: 999px;
    transition: background 0.18s ease, transform 0.18s ease;
    text-decoration: none;
}
.empty-btn:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    transform: translateY(-1px);
    color: #fff;
}
.empty-btn i { font-size: 12px; }
.empty-btn--ghost {
    background: #fff;
    color: #6366f1;
    border-color: #c7d2fe;
}
.empty-btn--ghost:hover {
    background: #eef2ff;
    color: #6366f1;
    border-color: #a5b4fc;
}

/* 贴士三连：icon + 短句，分隔在一行或换行 */
.empty-tips {
    display: flex; flex-wrap: wrap; gap: 14px 22px;
    justify-content: center;
    padding-top: 18px;
    border-top: 1px dashed #f3f4f6;
    max-width: 640px;
    margin: 0 auto;
}
.empty-tips span {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; color: #9ca3af;
    line-height: 1.6;
}
.empty-tips i { color: #c7d2fe; font-size: 13px; }
@media (max-width: 640px) {
    .empty-state { padding: 40px 18px 32px; }
    .empty-state .empty-icon { width: 60px; height: 60px; font-size: 24px; }
    .empty-state h3 { font-size: 15px; }
    .empty-tips { gap: 10px 18px; }
}

/* ============================================================
   空态 · 丰富版（.empty-state--rich）
   装饰圆点 + 光晕 icon + 4 宫格特色 + 双 CTA
   ============================================================ */
.empty-state--rich {
    position: relative;
    overflow: hidden;
    padding: 56px 32px 15px;
}

/* 装饰层：角落小圆点 + 光环 */
.empty-decor { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.empty-decor__dot {
    position: absolute;
    border-radius: 50%;
    opacity: 0.65;
}
.empty-decor__dot--1 { width: 10px; height: 10px; background: #c7d2fe; top: 30px;  left: 10%; }
.empty-decor__dot--2 { width: 14px; height: 14px; background: #fbcfe8; top: 60px;  right: 14%; }
.empty-decor__dot--3 { width: 8px;  height: 8px;  background: #fde68a; bottom: 46px; left: 18%; }
.empty-decor__ring {
    position: absolute;
    width: 160px; height: 160px;
    top: 20px; right: -40px;
    border: 2px dashed #e0e7ff;
    border-radius: 50%;
    opacity: 0.6;
}

/* 相对定位让内容在装饰层之上 */
.empty-state--rich > *:not(.empty-decor) { position: relative; z-index: 1; }

/* Icon 升级：外圈脉冲光晕 */
.empty-icon--glow {
    width: 88px; height: 88px;
    font-size: 38px;
    position: relative;
    margin-bottom: 18px;
}
.empty-icon--glow::before,
.empty-icon--glow::after {
    content: ''; position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid #c7d2fe;
    opacity: 0;
    animation: empty-pulse 2.4s ease-out infinite;
}
.empty-icon--glow::after { animation-delay: 1.2s; }
@keyframes empty-pulse {
    0%   { opacity: 0; transform: scale(0.9); }
    40%  { opacity: 0.5; }
    100% { opacity: 0; transform: scale(1.35); }
}

/* 特色 4 宫格 */
.empty-features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 4px auto 28px;
    max-width: 780px;
}
.empty-feature {
    text-align: center;
    padding: 16px 12px;
    background: #fafbfc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.empty-feature:hover {
    transform: translateY(-2px);
    border-color: #e0e7ff;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.08);
}
.empty-feature__icon {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    font-size: 17px;
    margin-bottom: 8px;
}
.empty-feature__title {
    font-size: 13px; font-weight: 600; color: #1f2937;
    margin-bottom: 3px;
}
.empty-feature__desc { font-size: 11px; color: #94a3b8; line-height: 1.5; }

@media (max-width: 768px) {
    .empty-features { grid-template-columns: repeat(2, 1fr); }
    .empty-decor__ring { display: none; }
}
@media (max-width: 480px) {
    .empty-state--rich { padding: 40px 20px 32px; }
    .empty-features { gap: 10px; }
    .empty-feature { padding: 12px 8px; }
    .empty-feature__icon { width: 34px; height: 34px; font-size: 14px; }
}

/* --- Page Title --- */
.page-title { font-size: 20px; font-weight: 600; color: #2c3e50; margin-bottom: 20px; }

/* --- 404 --- */
.not-found { text-align: center; padding: 80px 20px; }
.not-found-code { font-size: 100px; font-weight: 800; color: #4e6ef2; line-height: 1; margin-bottom: 12px; opacity: 0.3; }
.not-found-title { font-size: 20px; font-weight: 600; color: #333; margin-bottom: 8px; }
.not-found-desc { font-size: 14px; color: #adb5bd; margin-bottom: 32px; line-height: 1.8; }
.not-found-desc code { background: #f4f6f9; padding: 2px 8px; border-radius: 4px; font-size: 12px; color: #888; }

/* --- Article List (stacked) --- */
.article-list { display: flex; flex-direction: column; gap: 12px; }

/* --- Blog Layout (content + sidebar) --- */
.blog-layout { display: grid; grid-template-columns: 1fr 320px; gap: 15px; align-items: start; }
.blog-main { min-width: 0; }
.blog-sidebar { position: sticky; top: 72px; }
.sidebar-widget {
    background: #fff; border-radius: 10px; border: 1px solid #ebeef5;
    padding: 20px; margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.sidebar-title {
    font-size: 15px; font-weight: 600; color: #2c3e50;
    margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0;
    position: relative; padding-left: 14px;
}
.sidebar-title::before {
    content: ''; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%); margin-top: -5px;
    width: 4px; height: 14px; border-radius: 2px;
    background: #4e6ef2;
}
.sidebar-list a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; font-size: 14px; color: #666; border-bottom: 1px dashed #f5f5f5;
}
.sidebar-list a:last-child { border-bottom: none; }
.sidebar-list a:hover { color: #4e6ef2; }
.sidebar-list .count { font-size: 12px; color: #adb5bd; background: #f4f6f9; padding: 1px 8px; border-radius: 10px; }
.sidebar-posts { display: flex; flex-direction: column; gap: 10px; }
.sidebar-post {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13px; color: #666; line-height: 1.5;
}
.sidebar-post:hover { color: #4e6ef2; }
.sidebar-rank {
    flex-shrink: 0; width: 20px; height: 20px; border-radius: 4px;
    background: #ebeef5; color: #999; font-size: 12px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.sidebar-rank.top { background: #4e6ef2; color: #fff; }
.sidebar-post-title {
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.sidebar-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sidebar-tag {
    padding: 4px 12px; border-radius: 14px; font-size: 12px;
    background: #f4f6f9; color: #888; border: 1px solid #ebeef5;
    transition: all 0.2s;
}
.sidebar-tag:hover { border-color: #4e6ef2; color: #4e6ef2; background: #f0f3ff; }
.sidebar-list .price-tag { font-size: 13px; color: #fa5252; font-weight: 600; flex-shrink: 0; }

/* 侧边栏最新商品（左图右文） */
.sidebar-goods-list { display: flex; flex-direction: column; gap: 12px; }
.sidebar-goods-item {
    display: flex; gap: 10px; align-items: center;
    text-decoration: none; color: #333;
    padding: 8px; margin: -8px; border-radius: 8px;
    transition: background .2s;
}
.sidebar-goods-item:hover { background: #f8f9fa; }
.sidebar-goods-item:hover .sidebar-goods-name { color: #4e6ef2; }
.sidebar-goods-img {
    width: 56px; height: 56px; flex-shrink: 0;
    border-radius: 6px; overflow: hidden; background: #f8f9fa;
    border: 1px solid #ebeef5;
    position: relative;
}
.sidebar-goods-img img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-goods-img .goods-no-image {
    position: absolute;
    left: 0;
    top: 0;
    border-radius: inherit;
}
.sidebar-goods-info { flex: 1; min-width: 0; }
.sidebar-goods-name {
    font-size: 13px; line-height: 1.4; color: #333;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    transition: color .2s;
}
.sidebar-goods-price { margin-top: 4px; }
.sidebar-goods-price .price { font-size: 14px; font-weight: 600; color: #fa5252; }
.sidebar-goods-price .price-original { font-size: 11px; color: #adb5bd; text-decoration: line-through; margin-left: 4px; }

/* 侧边栏二级分类 */
.sidebar-cat-list { display: flex; flex-direction: column; }
.sidebar-cat-group { border-bottom: 1px solid #f0f0f0; }
.sidebar-cat-group:last-child { border-bottom: none; }
/* 父分类行：链接 + 箭头 */
.sidebar-cat-parent-row {
    display: flex; align-items: center;
}
.sidebar-cat-parent {
    flex: 1; min-width: 0;
    display: flex; align-items: center; gap: 8px;
    padding: 10px 0; font-size: 14px; color: #333; font-weight: 500;
    text-decoration: none; transition: color .2s;
}
.sidebar-cat-parent:hover { color: #4e6ef2; }
/* 折叠箭头 */
.sidebar-cat-arrow {
    flex-shrink: 0; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #adb5bd; font-size: 12px;
    border-radius: 4px; transition: color .2s, background .2s;
}
.sidebar-cat-arrow:hover { color: #666; background: #f4f6f9; }
.sidebar-cat-arrow .fa { transition: transform .25s ease; }
.sidebar-cat-arrow.is-open .fa { transform: rotate(180deg); }
.sidebar-cat-children { padding: 0 0 8px 30px; }
.sidebar-cat-child {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0; font-size: 13px; color: #666;
    text-decoration: none; transition: color .2s;
}
.sidebar-cat-child:hover { color: #4e6ef2; }

/* 分类图标 */
.sidebar-cat-icon {
    width: 22px; height: 22px; border-radius: 4px;
    object-fit: cover; flex-shrink: 0;
}
.sidebar-cat-icon--sm { width: 18px; height: 18px; border-radius: 3px; }

/* 分类名称撑满剩余空间，数字右对齐统一大小 */
.sidebar-cat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-cat-count {
    flex-shrink: 0; min-width: 28px; height: 28px; line-height: 28px;
    text-align: center; font-size: 12px; color: #adb5bd;
    background: #f4f6f9; padding: 0 6px; border-radius: 4px;
    box-sizing: border-box;
}

/* --- Sidebar User Info --- */
.sidebar-user {
    display: flex; align-items: center; gap: 12px; padding: 4px 0 12px;
}
.sidebar-user-avatar {
    width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: #f0f2f5;
}
.sidebar-user-avatar img {
    width: 100%; height: 100%; object-fit: cover;
}
.sidebar-user-avatar--guest {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e8ecf4, #d5dbe8);
    color: #a0aec0; font-size: 22px;
}
.sidebar-user-avatar--default {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; border-radius: 50%;
    background: linear-gradient(135deg, #e8ecf4, #d5dbe8);
    color: #a0aec0; font-size: 22px;
}
.sidebar-user-name {
    font-size: 15px; font-weight: 600; color: #333; line-height: 1.3;
}
.sidebar-user-meta {
    font-size: 12px; color: #999; margin-top: 2px;
}
.sidebar-user-links {
    display: flex; gap: 8px;
}
.sidebar-user-links > a {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
    padding: 7px 0; font-size: 13px; color: #666; text-decoration: none;
    background: #f5f7fa; border-radius: 6px; transition: background .2s, color .2s;
}
.sidebar-user-links > a:hover { background: #ebeef5; color: #333; }
.sidebar-user-btn--primary {
    background: #4e6ef2 !important; color: #fff !important;
}
.sidebar-user-btn--primary:hover {
    background: #3d5bd9 !important;
}

/* --- Category Tabs (goods list filter) --- */
.category-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.category-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 8px; font-size: 13px;
    border: 1px solid #e5e7eb; color: #666; background: #fff;
    text-decoration: none; cursor: pointer; transition: all 0.2s;
}
.category-tab:hover { border-color: #4e6ef2; color: #4e6ef2; }
.category-tab.active { background: #4e6ef2; color: #fff; border-color: #4e6ef2; box-shadow: 0 2px 6px rgba(78, 110, 242, 0.25); }
.category-tab-icon {
    width: 20px; height: 20px; border-radius: 4px;
    object-fit: cover; flex-shrink: 0;
}
.category-tab-name { white-space: nowrap; }
.category-tab-count {
    font-size: 11px; background: rgba(0,0,0,0.06); padding: 1px 6px;
    border-radius: 8px; line-height: 16px; flex-shrink: 0;
}
.category-tab.active .category-tab-count { background: rgba(255,255,255,0.25); color: #fff; }
.category-tabs--sub { margin-top: -12px; }
.category-tabs--sub .category-tab { font-size: 12px; padding: 5px 12px; background: #f8f9fa; border-color: #ebeef5; border-radius: 6px; }
.category-tabs--sub .category-tab.active { background: #4e6ef2; color: #fff; border-color: #4e6ef2; }

.goods-sort-bar {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin: 0 0 18px;
}
.goods-sort-link {
    display: inline-block; padding: 6px 12px; border-radius: 6px; font-size: 13px;
    border: 1px solid #e5e7eb; color: #666; background: #fff; text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.goods-sort-link:hover { border-color: #4e6ef2; color: #4e6ef2; }
.goods-sort-link.active { background: #4e6ef2; color: #fff; border-color: #4e6ef2; }

/* --- Blog Article Grid (blog_index 2-column layout) --- */
.blog-article-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.blog-article-card {
    display: flex; flex-direction: row; overflow: hidden;
    border-radius: 10px; text-decoration: none; color: #333;
    transition: box-shadow 0.3s, transform 0.2s;
}
.blog-article-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.blog-article-img {
    width: 108px; min-height: 84px; flex-shrink: 0; overflow: hidden; background: #f8f9fa;
    margin: 12px; border-radius: 8px;
}
.blog-article-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.blog-article-card:hover .blog-article-img img { transform: scale(1.05); }
.blog-article-body { padding: 12px 16px 12px 0; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.blog-article-title {
    font-size: 16px; font-weight: 600; color: #2c3e50; line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.blog-article-card:hover .blog-article-title { color: #4e6ef2; }
.blog-article-excerpt {
    font-size: 13px; color: #888; line-height: 1.7; margin-bottom: 12px; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.blog-article-meta {
    font-size: 12px; color: #adb5bd; display: flex; gap: 14px; flex-wrap: wrap;
}
.blog-article-meta .fa { margin-right: 3px; }
/* 3列变体（blog_list 页面，纵向卡片） */
.blog-article-grid--3col { grid-template-columns: repeat(5, 1fr); }
.blog-article-grid--3col .blog-article-card { flex-direction: column; }
.blog-article-grid--3col .blog-article-img {
    width: auto; min-height: 0; aspect-ratio: 1 / 1;
    margin: 0; border-radius: 10px 10px 0 0;
}
.blog-article-grid--3col .blog-article-body { padding: 14px 16px; }

/* 侧边栏最新文章（左图右文） */
.sidebar-article-list { display: flex; flex-direction: column; gap: 12px; }
.sidebar-article-item {
    display: flex; gap: 10px; align-items: center;
    text-decoration: none; color: #333;
    padding: 8px; margin: -8px; border-radius: 8px;
    transition: background .2s;
}
.sidebar-article-item:hover { background: #f8f9fa; }
.sidebar-article-item:hover .sidebar-article-title { color: #4e6ef2; }
.sidebar-article-img {
    width: 56px; height: 56px; flex-shrink: 0;
    border-radius: 6px; overflow: hidden; background: #f8f9fa;
    border: 1px solid #ebeef5;
}
.sidebar-article-img img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-article-img--empty {
    display: flex; align-items: center; justify-content: center;
    color: #ccc; font-size: 20px;
}
.sidebar-article-info { flex: 1; min-width: 0; }
.sidebar-article-title {
    font-size: 13px; line-height: 1.4; color: #333;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    transition: color .2s;
}
.sidebar-article-date { margin-top: 4px; font-size: 12px; color: #adb5bd; }

/* Sidebar layout 内的网格列数调整 */
.blog-layout .goods-grid { grid-template-columns: repeat(4, 1fr); }
.blog-layout .article-grid { grid-template-columns: repeat(2, 1fr); }

/* --- Search Modal Overlay ---
 * 移动端 WebKit 上「position:fixed + 子元素 width:100%/百分比」易出现横向溢出或参照宽度异常。
 * 做法：fixed 外层只用 top/left/right/bottom 钉满视口 + overflow:hidden 裁剪；真正放表单的是 .search-modal-stage（非 fixed），
 * 其宽度恒为外层内容盒，百分比与 grid 的 minmax(0,1fr) 都相对这一层，可稳定自适应。 */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    /* 高于顶栏/侧滑菜单(≈10060)，且置于 body 末尾，避免层叠上下文被 header 内 transform 影响 */
    z-index: 50000;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}
.search-modal.active {
    display: flex;
    flex-direction: column;
}
.search-modal-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
}
.search-modal-stage {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px 20px;
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.search-modal-body {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    margin: min(16vh, 120px) 0 0;
    padding: 0;
    animation: searchSlideIn 0.2s ease-out;
}
@keyframes searchSlideIn {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}
.search-modal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    justify-content: center;
}
.search-modal-tab {
    padding: 5px 18px; border: none;
    background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.6);
    border-radius: 16px; cursor: pointer; font-size: 13px; transition: all 0.2s;
}
.search-modal-tab:hover { background: rgba(255,255,255,0.22); color: #fff; }
.search-modal-tab.active { background: #fff; color: #4e6ef2; }
.search-modal-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.search-modal-bar input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 16px 14px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}
.search-modal-bar button {
    padding: 14px 16px;
    border: none;
    background: none;
    color: #4e6ef2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}
.search-modal-bar button:hover { color: #3d5bd9; }
.search-modal-hint {
    text-align: center; margin-top: 14px;
    font-size: 12px; color: rgba(255,255,255,0.35);
}

/* 弹层内表单：抵消 UA / 其它样式对 form 的 min-width:auto */
#searchModal .search-modal-bar {
    min-width: 0;
}
#searchModal .search-modal-bar input {
    min-width: 0 !important;
    max-width: 100% !important;
}

/* --- Search Result Page Tabs --- */
.search-type-tabs {
    display: flex; gap: 0; margin-bottom: 20px;
    border-bottom: 1px solid #ebeef5;
}
.search-type-tab {
    padding: 10px 20px; font-size: 14px; color: #888;
    border-bottom: 2px solid transparent; transition: all 0.2s; margin-bottom: -1px;
}
.search-type-tab:hover { color: #4e6ef2; }
.search-type-tab.active { color: #4e6ef2; border-bottom-color: #4e6ef2; font-weight: 500; }

/* --- Pagination --- */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; margin-top: 32px; padding: 8px 0;
}
.pagination-btn, .pagination-num {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 8px;
    border: 1px solid #e5e7eb; border-radius: 6px;
    font-size: 14px; color: #333; background: #fff;
    text-decoration: none; transition: all .2s; cursor: pointer;
}
.pagination-btn:hover, .pagination-num:hover { border-color: #4e6ef2; color: #4e6ef2; }
.pagination-num.active {
    background: #4e6ef2; color: #fff; border-color: #4e6ef2;
    font-weight: 600; pointer-events: none;
}
.pagination-btn.disabled {
    color: #ccc; border-color: #eee; cursor: not-allowed; pointer-events: none;
}
.pagination-dots {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; font-size: 14px; color: #999;
    letter-spacing: 1px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .goods-grid { grid-template-columns: repeat(3, 1fr); }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-layout { grid-template-columns: 340px 1fr; gap: 24px; }
    .blog-layout { grid-template-columns: 1fr 240px; gap: 16px; }
    .blog-layout .goods-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-layout .article-grid { grid-template-columns: 1fr; }
    .blog-article-grid { grid-template-columns: 1fr; }
    .blog-article-grid--3col { grid-template-columns: repeat(3, 1fr); }
    .blog-article-img { width: 92px; min-height: 72px; }
}
@media (max-width: 768px) {
    /* 顶栏高度：侧滑已移出 header，须挂在 :root 上，#mobileNav / 遮罩才能用到 var(--header-bar-h) */
    :root {
        --header-bar-h: 56px;
    }
    .goods-grid { grid-template-columns: repeat(2, 1fr); }
    .article-grid { grid-template-columns: 1fr; }
    .detail-layout { grid-template-columns: 1fr; }
    .blog-layout { grid-template-columns: 1fr; }
    .blog-sidebar { position: static; }
    .blog-article-grid { grid-template-columns: 1fr; }
    .blog-article-grid.blog-article-grid--3col { grid-template-columns: repeat(2, 1fr); }
    /* 移动端页头：整宽贴边，左 logo 右功能区（避免 flex-start 导致右侧大块留白） */
    .site-header {
        z-index: 10060;
    }
    .site-header .wrapper {
        height: var(--header-bar-h);
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        max-width: none;
        width: 100%;
        padding-left: 14px;
        padding-right: 14px;
        box-sizing: border-box;
    }
    .site-logo { min-width: 0; flex-shrink: 1; }
    .site-logo-text { font-size: 17px; letter-spacing: 1px; }
    .site-logo-img { max-width: 132px; height: 32px; }
    .header-actions { flex-shrink: 0; margin-left: auto; }
    .main-nav { display: none; }
    .header-menu-btn { display: flex; }
    .header-user-dropdown { display: none; }

    /* 侧滑遮罩：关闭 display:none 不占任何盒；打开才显示（与 #mobileNav 由 JS 同步 .mobile-nav--shown） */
    .mobile-nav-backdrop {
        display: none;
        position: fixed;
        top: var(--header-bar-h);
        left: 0;
        right: 0;
        bottom: 0;
        height: auto;
        z-index: 10040;
        background: rgba(15, 23, 42, 0.45);
    }
    .mobile-nav-backdrop.mobile-nav--shown {
        display: block;
        opacity: 0;
        transition: opacity 0.28s ease;
    }
    .mobile-nav-backdrop.mobile-nav--shown.is-open {
        opacity: 1;
    }

    /* 侧滑菜单：默认 display:none；.mobile-nav--shown 才生成盒 + 屏外；.open 滑入（避免隐藏时仍为 display:block 参与滚动宽度） */
    .mobile-nav {
        display: none;
        position: fixed;
        top: var(--header-bar-h);
        right: 0;
        bottom: 0;
        width: min(80vw, 250px);
        height: auto;
        max-height: none;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        border: none;
        border-left: 1px solid #e8ecf7;
        border-radius: 0;
        background: #fff;
        box-shadow: -12px 0 36px rgba(15, 23, 42, 0.14);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 10050;
        transform: translateX(105%);
        transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .mobile-nav.mobile-nav--shown {
        display: block;
    }
    .mobile-nav.mobile-nav--shown.open {
        transform: translateX(0);
    }
    .mobile-nav-inner { padding: 12px 16px 28px; }

    .hero-slide { padding: 40px 16px; }
    .hero-title { font-size: 24px; }
    .hero-carousel { margin-top: 12px; border-radius: 8px; }
    .detail-card { padding: 20px; }
    .article-detail { padding: 24px; }

    /* 搜索弹窗：小屏略抬高 + 再收紧内边距（宽度仍由全局 max-width: min(...) 控制） */
    #searchModal .search-modal-stage {
        padding-left: 12px;
        padding-right: 12px;
    }
    #searchModal .search-modal-body {
        margin-top: max(12px, 8vh);
    }
    #searchModal .search-modal-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
    #searchModal .search-modal-bar input {
        padding: 14px 12px;
    }
    #searchModal .search-modal-bar button {
        padding: 12px 14px;
    }
    #searchModal .search-modal-hint { margin-top: 10px; }

    /* 商品详情：主图与缩略图约为原视觉的一半（仅详情页 .detail-*，列表卡片区保持默认） */
    .detail-gallery {
        align-items: center;
    }
    .detail-img {
        width: 50%;
        max-width: 50%;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }
    .detail-thumb {
        width: 32px;
        height: 32px;
    }
}
body.mobile-nav-drawer-open {
    overflow: hidden;
    touch-action: none;
}
/* 搜索打开时锁滚动（与侧滑菜单一致；弹层在 footer 后，避免被顶栏子树层叠盖住） */
body.search-modal-open {
    overflow: hidden;
    touch-action: none;
}
@media (max-width: 480px) {
    .goods-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .goods-card .card-body { padding: 10px; }
    .goods-card .price { font-size: 16px; }
    .hero-carousel { margin-left: 12px; margin-right: 12px; }
}

/* 极窄屏：搜索栏两行 grid（与桌面同一套 grid，只改列定义） */
@media (max-width: 400px) {
    #searchModal .search-modal-bar {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }
    #searchModal .search-modal-bar input {
        border-bottom: 1px solid #eef0f4;
    }
    #searchModal .search-modal-bar button {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }
}

/* ============================================================
   评论区
   ============================================================ */
.comment-section {
    margin-top: 16px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ebeef5;
    padding: 32px 40px;
}
.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.comment-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.comment-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}
.comment-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    font-size: 12px;
    font-weight: 600;
    color: #4e6ef2;
    background: #eef1fd;
    border-radius: 11px;
}
.comment-sort {
    display: flex;
    gap: 2px;
    background: #f5f7fa;
    border-radius: 6px;
    padding: 3px;
}
.comment-sort-btn {
    padding: 5px 14px;
    font-size: 13px;
    color: #999;
    border-radius: 4px;
    cursor: pointer;
    transition: all .2s;
    user-select: none;
}
.comment-sort-btn:hover { color: #666; }
.comment-sort-btn.active {
    color: #333;
    background: #fff;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* 评论表单 */
.comment-form-box {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}
.comment-form-wrapper {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.comment-form-avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #e8ecf4, #d6dce8);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}
.comment-form-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comment-form-avatar i {
    font-size: 18px;
    color: #a0aec0;
}
.comment-form-body { flex: 1; }
.comment-textarea {
    width: 100%;
    min-height: 88px;
    padding: 12px 14px;
    border: 1.5px solid #e4e7ed;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    transition: border-color .25s, box-shadow .25s;
    font-family: inherit;
    box-sizing: border-box;
    background: #fafbfc;
}
.comment-textarea:focus {
    border-color: #4e6ef2;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(78,110,242,.1);
}
.comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
}
.comment-char-count {
    font-size: 12px;
    color: #c0c4cc;
}
.comment-submit-btn {
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #4e6ef2;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all .25s;
}
.comment-submit-btn:hover { background: #3d5bd9; box-shadow: 0 4px 12px rgba(78,110,242,.3); }
.comment-submit-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    box-shadow: none;
}
.comment-cancel-btn {
    padding: 8px 18px;
    font-size: 13px;
    color: #909399;
    background: #f5f7fa;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
}
.comment-cancel-btn:hover { background: #ebeef5; color: #606266; border-color: #dcdfe6; }

/* 未登录提示 */
.comment-login-tip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    background: #f8f9fc;
    border-radius: 10px;
    border: 1px dashed #dcdfe6;
    font-size: 14px;
    color: #909399;
}
.comment-login-tip i { font-size: 22px; color: #c0c4cc; }
.comment-login-btn {
    margin-left: auto;
    padding: 7px 22px;
    font-size: 13px;
    font-weight: 500;
    color: #4e6ef2;
    border: 1px solid #4e6ef2;
    border-radius: 8px;
    text-decoration: none;
    transition: all .25s;
}
.comment-login-btn:hover {
    background: #4e6ef2;
    color: #fff;
}

/* 评论列表 */
.comment-list { min-height: 60px; }
.comment-loading {
    text-align: center;
    padding: 32px;
    color: #c0c4cc;
    font-size: 14px;
}
.comment-empty {
    text-align: center;
    padding: 48px 20px;
    color: #c0c4cc;
    font-size: 14px;
}

/* 单条评论 */
.comment-item {
    display: flex;
    gap: 14px;
    padding: 20px 0;
    border-bottom: 1px solid #f2f3f5;
}
.comment-item:first-child { padding-top: 0; }
.comment-item:last-child { border-bottom: none; padding-bottom: 0; }
.comment-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #e8ecf4, #d6dce8);
    display: flex;
    align-items: center;
    justify-content: center;
}
.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comment-avatar i {
    font-size: 17px;
    color: #a0aec0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.comment-author {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}
.comment-reply-to {
    font-size: 13px;
    color: #909399;
}
.comment-reply-to b {
    color: #4e6ef2;
    font-weight: 500;
}
.comment-time {
    font-size: 12px;
    color: #c0c4cc;
}
.comment-content {
    font-size: 14px;
    line-height: 1.75;
    color: #4a4a4a;
    word-break: break-word;
}
.comment-actions {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}
.comment-action-btn {
    font-size: 12px;
    color: #c0c4cc;
    text-decoration: none;
    transition: color .2s;
}
.comment-action-btn:hover { color: #4e6ef2; }
.comment-action-btn i { margin-right: 3px; }

/* 回复评论 */
.comment-replies {
    margin-top: 14px;
    padding: 12px 16px;
    background: #f8f9fc;
    border-radius: 10px;
}
.comment-item--reply {
    padding: 12px 0;
    border-bottom: 1px solid #eef0f4;
}
.comment-item--reply:first-child { padding-top: 0; }
.comment-item--reply:last-child { border-bottom: none; padding-bottom: 0; }
.comment-item--reply .comment-avatar {
    width: 30px;
    height: 30px;
}
.comment-item--reply .comment-avatar i { font-size: 13px; }
.comment-item--reply .comment-content { font-size: 13px; }
.comment-item--reply .comment-author { font-size: 13px; }
.comment-item--reply .comment-meta { margin-bottom: 5px; }

/* 加载更多回复 */
.comment-load-more-replies {
    padding: 10px 0 2px;
}
.comment-load-replies-btn {
    font-size: 13px;
    color: #4e6ef2;
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
}
.comment-load-replies-btn:hover { color: #3d5bd9; }
.comment-load-replies-btn i { margin-left: 4px; font-size: 11px; }

/* 回复表单 */
.comment-reply-form {
    margin-top: 12px;
    padding: 14px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e4e7ed;
}
.comment-reply-textarea {
    min-height: 64px;
    font-size: 13px;
    background: #fff;
}

/* 评论分页 */
.comment-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f2f3f5;
}
.comment-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
    color: #606266;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    text-decoration: none;
    transition: all .2s;
}
.comment-page-btn:hover {
    border-color: #4e6ef2;
    color: #4e6ef2;
}
.comment-page-btn.active {
    background: #4e6ef2;
    color: #fff;
    border-color: #4e6ef2;
}
.comment-page-dots {
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    color: #c0c4cc;
    font-size: 13px;
}

/* 评论区响应式 */
@media (max-width: 768px) {
    .comment-section { padding: 20px 16px; }
    .comment-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .comment-form-avatar { width: 34px; height: 34px; }
    .comment-form-wrapper { gap: 10px; }
    .comment-avatar { width: 34px; height: 34px; }
    .comment-item--reply .comment-avatar { width: 26px; height: 26px; }
    .comment-replies { padding: 10px 12px; }
    .comment-reply-form { padding: 10px; }
}

/* ============ 标签样式 ============ */

/* 文章详情页标签 */
.detail-tags {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 24px; padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}
.article-tag {
    display: inline-block; padding: 3px 12px;
    font-size: 12px; line-height: 20px;
    color: #5b8ff9; background: #eef3ff;
    border-radius: 12px; text-decoration: none;
    transition: background .2s, color .2s;
}
.article-tag:hover {
    background: #5b8ff9; color: #fff;
}

/* 商品详情页标签（间距调整） */
.goods-detail-tags {
    margin-top: 16px; padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

/* 文章卡片中的标签 */
.blog-article-tags {
    display: flex; flex-wrap: wrap; gap: 5px;
    margin-top: 8px;
}
.article-tag-label {
    display: inline-block; padding: 1px 8px;
    font-size: 11px; line-height: 18px;
    color: #5b8ff9; background: #eef3ff;
    border-radius: 9px; white-space: nowrap;
}

/* 侧边栏标签云 */
.sidebar-tag-cloud {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.sidebar-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 12px; font-size: 13px;
    color: #555; background: #f5f7fa;
    border-radius: 14px; text-decoration: none;
    transition: background .2s, color .2s;
}
.sidebar-tag:hover {
    background: #5b8ff9; color: #fff;
}
.sidebar-tag .tag-count {
    font-size: 11px; color: #adb5bd;
    transition: color .2s;
}
.sidebar-tag:hover .tag-count {
    color: rgba(255,255,255,.8);
}

/* ============ 标签详情页 ============ */

/* 标签头部 */
.tag-page-header {
    display: flex; align-items: center; gap: 16px;
    background: #fff; border-radius: 8px; border: 1px solid #ebeef5;
    padding: 24px 28px; margin-bottom: 16px;
}
.tag-page-icon {
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, #5b8ff9, #3d6fe0);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.tag-page-icon .fa {
    font-size: 22px; color: #fff;
}
.tag-page-name {
    font-size: 22px; font-weight: 700; color: #2c3e50;
    margin: 0 0 4px;
}
.tag-page-count {
    font-size: 13px; color: #adb5bd;
}

/* 标签切换列表 */
.tag-page-related {
    display: flex; flex-wrap: wrap; gap: 8px;
    background: #fff; border-radius: 8px; border: 1px solid #ebeef5;
    padding: 16px 20px; margin-bottom: 16px;
}
.tag-page-item {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 14px; font-size: 13px;
    color: #555; background: #f5f7fa;
    border-radius: 16px; text-decoration: none;
    transition: background .2s, color .2s;
}
.tag-page-item:hover {
    background: #e8edf5; color: #333;
}
.tag-page-item.active {
    background: #5b8ff9; color: #fff;
}
.tag-page-item-count {
    font-size: 11px; color: #adb5bd;
    transition: color .2s;
}
.tag-page-item:hover .tag-page-item-count { color: #888; }
.tag-page-item.active .tag-page-item-count { color: rgba(255,255,255,.8); }

/* 标签页响应式 */
@media (max-width: 768px) {
    .tag-page-header { padding: 16px 18px; gap: 12px; }
    .tag-page-icon { width: 42px; height: 42px; }
    .tag-page-icon .fa { font-size: 18px; }
    .tag-page-name { font-size: 18px; }
    .tag-page-related { padding: 12px 14px; gap: 6px; }
    .tag-page-item { padding: 4px 10px; font-size: 12px; }
}

/* ============================
   Auth Pages (Login / Register)
   ============================ */
.auth-page {
    display: flex; align-items: center; justify-content: center;
    min-height: calc(100vh - 64px - 120px);
    padding: 40px 20px;
}
.auth-card {
    width: 100%; max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.06);
    padding: 40px 36px;
}
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-title {
    font-size: 24px; font-weight: 700; color: #1a1a1a;
    margin-bottom: 8px;
}
.auth-subtitle { font-size: 14px; color: #999; }

/* 表单字段 */
.auth-field { margin-bottom: 20px; }
.auth-label {
    display: block; font-size: 13px; font-weight: 600;
    color: #555; margin-bottom: 6px;
}
.auth-input-wrap {
    display: flex; align-items: center;
    border: 1.5px solid #e0e0e0; border-radius: 10px;
    padding: 0 14px; height: 46px;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-input-wrap:focus-within {
    border-color: #4e6ef2; background: #fff;
    box-shadow: 0 0 0 3px rgba(78,110,242,0.1);
}
.auth-input-wrap > i.fa {
    color: #bbb; font-size: 15px; width: 20px; text-align: center;
    flex-shrink: 0; transition: color 0.2s;
}
.auth-input-wrap:focus-within > i.fa { color: #4e6ef2; }
.auth-input-wrap input {
    flex: 1; border: none; outline: none; background: transparent;
    padding: 0 10px; height: 100%; font-size: 14px; color: #333;
}
.auth-input-wrap input::placeholder { color: #c0c0c0; }

/* 密码显示/隐藏 */
.auth-eye {
    border: none; background: transparent; cursor: pointer;
    padding: 4px; color: #bbb; font-size: 15px;
    transition: color 0.2s; flex-shrink: 0;
}
.auth-eye:hover { color: #666; }

/* 提交按钮 */
.auth-submit {
    display: block; width: 100%; height: 46px;
    border: none; border-radius: 10px; cursor: pointer;
    background: linear-gradient(135deg, #4e6ef2, #2b7de9);
    color: #fff; font-size: 15px; font-weight: 600;
    letter-spacing: 4px; margin-top: 8px;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(78,110,242,0.25);
}
.auth-submit:hover {
    opacity: 0.92;
    box-shadow: 0 6px 24px rgba(78,110,242,0.35);
}
.auth-submit:active { transform: scale(0.98); }
.auth-submit.is-loading {
    opacity: 0.7; pointer-events: none; letter-spacing: 2px;
}

/* 底部链接 */
.auth-footer {
    text-align: center; margin-top: 24px;
    font-size: 13px; color: #999;
}
.auth-footer a {
    color: #4e6ef2; font-weight: 500;
    transition: color 0.2s;
}
.auth-footer a:hover { color: #2b5dd6; }

/* Auth 响应式 */
@media (max-width: 480px) {
    .auth-card { padding: 32px 24px; border-radius: 12px; }
    .auth-title { font-size: 20px; }
    .auth-input-wrap { height: 42px; }
    .auth-submit { height: 42px; font-size: 14px; }
}

/* ======== 领券中心 ======== */
.coupon-intro {
    font-size: 13px; color: #999; margin-bottom: 20px;
    display: flex; align-items: center; gap: 6px;
}
.coupon-intro i { color: #4e6ef2; }

.coupon-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 14px;
}
.coupon-card {
    display: flex; background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, transform 0.2s;
}
.coupon-card:hover { box-shadow: 0 6px 20px rgba(78,110,242,0.12); transform: translateY(-1px); }

/* 左侧大数字块：渐变主色 */
.coupon-card__left {
    width: 130px; flex-shrink: 0;
    background: linear-gradient(135deg, #4e6ef2, #2b7de9);
    color: #fff; padding: 18px 10px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    position: relative;
}
.coupon-card__left::before,
.coupon-card__left::after {
    content: ''; position: absolute; right: -8px; width: 16px; height: 16px;
    background: #f5f6fa; border-radius: 50%;
}
.coupon-card__left::before { top: -8px; }
.coupon-card__left::after { bottom: -8px; }
.coupon-card__value { font-size: 28px; font-weight: 700; letter-spacing: 0.5px; }
.coupon-card__caption { font-size: 12px; opacity: 0.9; margin-top: 4px; }

/* 右侧信息块 */
.coupon-card__right {
    flex: 1; padding: 14px 16px;
    display: flex; flex-direction: column;
    border-left: 2px dashed #e8ecf4;
}
.coupon-card__title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 4px; }
.coupon-card__desc { font-size: 12px; color: #999; line-height: 1.5; margin-bottom: 8px; }
.coupon-card__meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: #999; margin-bottom: 6px; flex-wrap: wrap; }
.coupon-card__tag {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    background: #eef2ff; color: #4e6ef2; font-size: 11px; font-weight: 500;
}
.coupon-card__valid { color: #999; }
.coupon-card__code { font-size: 12px; color: #666; margin-bottom: 10px; }
.coupon-card__code-val { font-family: monospace; color: #4e6ef2; font-weight: 600; }

.coupon-card__actions { display: flex; gap: 8px; margin-top: auto; }
.coupon-btn {
    flex: 1; height: 32px; border: 1px solid transparent; border-radius: 6px;
    font-size: 13px; cursor: pointer; transition: all 0.2s;
    display: inline-flex; align-items: center; justify-content: center;
}
.coupon-btn-ghost {
    background: #fff; color: #4e6ef2; border-color: #4e6ef2;
}
.coupon-btn-ghost:hover { background: #eef2ff; }
.coupon-btn-primary {
    background: #4e6ef2; color: #fff;
}
.coupon-btn-primary:hover { background: #3d5ce0; box-shadow: 0 2px 8px rgba(78,110,242,0.3); }
.coupon-btn.is-disabled {
    background: #f0f0f0; color: #999; border-color: #f0f0f0; cursor: not-allowed;
}
.coupon-btn.is-disabled:hover { background: #f0f0f0; box-shadow: none; }

@media (max-width: 600px) {
    .coupon-grid { grid-template-columns: 1fr; }
    .coupon-card__left { width: 100px; padding: 14px 6px; }
    .coupon-card__value { font-size: 22px; }
}

/* 商品详情页 · 立即购买地址弹层 */
.detail-addr-layer { padding: 16px 20px; }
.detail-addr-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.detail-addr-item {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px 12px; background: #fff;
    border: 1px solid #e5e7eb; border-radius: 6px; cursor: pointer;
    transition: all 0.15s;
}
.detail-addr-item:hover { border-color: #a5b4fc; background: #fafaff; }
.detail-addr-item.is-active { border-color: #7c3aed; background: #faf5ff; box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1); }
.detail-addr-item input[type="radio"] { margin-top: 3px; flex: 0 0 auto; accent-color: #7c3aed; }
.detail-addr-item-body { flex: 1; min-width: 0; font-size: 12.5px; }
.detail-addr-item-head { margin-bottom: 4px; }
.detail-addr-item-head strong { color: #111; font-size: 13px; }
.detail-addr-item-mobile { color: #6b7280; margin-left: 8px; }
.detail-addr-item-default {
    display: inline-block; padding: 1px 6px; margin-left: 6px;
    background: #7c3aed; color: #fff; border-radius: 3px;
    font-size: 10.5px;
}
.detail-addr-item-text { color: #4b5563; line-height: 1.5; word-break: break-all; }
.detail-addr-manage { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 12.5px; color: #7c3aed; }
.detail-addr-manage:hover { text-decoration: underline; }

.detail-addr-form { }
.detail-addr-row { display: flex; gap: 12px; margin-bottom: 12px; }
.detail-addr-row > .detail-addr-field { flex: 1; min-width: 0; margin-bottom: 0; }
.detail-addr-field { margin-bottom: 12px; }
.detail-addr-field > label { display: block; font-size: 12.5px; color: #555; margin-bottom: 5px; }
.detail-addr-input, .detail-addr-textarea, .detail-addr-select {
    width: 100%; box-sizing: border-box;
    padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 5px;
    font-size: 13px; color: #111; background: #fff;
    outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.detail-addr-input:focus, .detail-addr-textarea:focus, .detail-addr-select:focus {
    border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.detail-addr-textarea { resize: vertical; min-height: 60px; line-height: 1.6; }
.detail-addr-cascade { display: flex; gap: 8px; }
.detail-addr-cascade .detail-addr-select { flex: 1; }
.detail-addr-tip { font-size: 12px; color: #6b7280; }
.detail-addr-tip .fa { color: #f59e0b; margin-right: 3px; }
.detail-addr-tip a { color: #7c3aed; text-decoration: underline; }

/* 详情页选券弹窗 */
.detail-coupon-picker {
    padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.detail-coupon-pick-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border: 1px solid #ebeef5; border-radius: 8px;
    transition: all 0.2s;
}
.detail-coupon-pick-item:hover { border-color: #fa8c16; background: #fff7e6; }
.detail-coupon-pick-value {
    width: 80px; flex-shrink: 0; text-align: center;
    color: #d46b08; font-size: 18px; font-weight: 700;
}
.detail-coupon-pick-main { flex: 1; min-width: 0; }
.detail-coupon-pick-title {
    font-size: 14px; color: #333; font-weight: 500;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.detail-coupon-pick-meta { font-size: 12px; color: #999; margin-top: 2px; }
.detail-coupon-pick-btn {
    height: 30px; padding: 0 14px; border: none; border-radius: 6px;
    background: #fa8c16; color: #fff; cursor: pointer; font-size: 13px;
    transition: background 0.2s;
}
.detail-coupon-pick-btn:hover { background: #d46b08; }

/* ======== 商品详情页 - 优惠券 ======== */
.detail-coupon {
    margin: 14px 0;
    padding: 12px 14px;
    background: #fff7e6;
    border: 1px solid #ffe7ba;
    border-radius: 8px;
    max-width: 560px;
}
.detail-coupon-title {
    font-size: 13px; color: #d46b08; font-weight: 500;
    margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.detail-coupon-input-row { display: flex; gap: 8px; margin-bottom: 8px; }
.detail-coupon-input {
    flex: 1; height: 36px; padding: 0 12px; max-width: 330px;
    border: 1.5px solid #e0e0e0; border-radius: 6px;
    font-size: 13px; color: #333; background: #fff; outline: none;
}
.detail-coupon-input:focus {
    border-color: #d46b08; box-shadow: 0 0 0 3px rgba(212,107,8,0.12);
}
.detail-coupon-input[readonly] { background: #fafafa; color: #999; }
.detail-coupon-btn {
    height: 36px; padding: 0 16px; border: none; border-radius: 6px;
    font-size: 13px; cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.detail-coupon-btn--primary { background: #fa8c16; color: #fff; }
.detail-coupon-btn--primary:hover { background: #d46b08; }
.detail-coupon-btn--ghost { background: #fff; color: #fa8c16; border: 1px solid #fa8c16; }
.detail-coupon-btn--ghost:hover { background: #fff7e6; }
.detail-coupon-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-coupon-choose {
    height: 30px; padding: 0 12px; border: 1px dashed #d46b08; border-radius: 6px;
    background: transparent; color: #d46b08; cursor: pointer;
    font-size: 12px; display: inline-flex; align-items: center; gap: 4px;
    transition: all 0.2s; text-decoration: none;
}
.detail-coupon-choose:hover { background: rgba(212,107,8,0.05); }
/* "去领优惠券"入口：换一种颜色区分于"已领中选择"，视觉上告诉用户这是跳转到另一个页面 */
.detail-coupon-goget { border-color: #1890ff; color: #1890ff; }
.detail-coupon-goget:hover { background: rgba(24,144,255,0.05); color: #1890ff; }
.detail-coupon-guest-tip { font-size: 12px; color: #999; }
.detail-coupon-guest-tip a { color: #fa8c16; }
.detail-coupon-guest-tip a:hover { text-decoration: underline; }
.detail-coupon-applied {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 10px; margin-top: 8px;
    background: #fff; border-radius: 6px; font-size: 12px;
}
.detail-coupon-applied-name { color: #333; font-weight: 500; }
.detail-coupon-applied-saved { color: #fa5252; font-weight: 600; }

/* ======== Hero 按钮组 ======== */
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.hero-btns .btn { display: inline-flex; align-items: center; gap: 6px; }
.btn--outline {
    background: rgba(255,255,255,0.12); color: #fff; border: 1.5px solid rgba(255,255,255,0.7);
    backdrop-filter: blur(4px);
}
.btn--outline:hover { background: #fff; color: #4e6ef2; border-color: #fff; }
