/* ========================================
 * home-index.css — 首页专用样式
 * 从 views/home/index.php 内联 CSS 提取
 * ======================================== */

:root {
    --primary: #7C3AED;
    --primary-light: #A78BFA;
    --bg: #F2F2F7;
    --card: #FFFFFF;
    --text: #1C1C1E;
    --text2: #8E8E93;
    --sep: #C6C6C8;
    --radius: 14px;
}

html, body { height: 100%; -webkit-font-smoothing: antialiased; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    color: var(--text);
    font-size: 17px;
}
body > .container { flex: 1 0 auto; }

/* ===== 顶部公告 ===== */
.announce {
    background: var(--primary);
    color: rgba(255,255,255,0.85);
    font-size: 0.82rem;
    padding: 8px 0;
    text-align: center;
}

/* ===== 导航 ===== */
.navbar-main {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(124,58,237,0.08);
    padding: 12px 0;
    transition: box-shadow .3s;
}
.navbar-main.scrolled { box-shadow: 0 4px 20px rgba(124,58,237,0.10); }
.navbar-main .navbar-brand {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--primary) !important;
    letter-spacing: -0.5px;
}
.navbar-main .navbar-brand .brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: url('/assets/img/tgxdp.jpeg') center/cover no-repeat;
    padding: 28px 20px 24px;
    color: #fff;
    text-align: center;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
}
.hero .hero-floats { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero .hero-floats i {
    position: absolute;
    font-size: 1rem;
    opacity: 0;
    animation: hero-float 3s ease-in infinite;
}
.hero .hero-floats i:nth-child(1) { left: 8%; bottom: 5%; animation-delay: .2s; font-size: 0.9rem; }
.hero .hero-floats i:nth-child(2) { left: 20%; bottom: 15%; animation-delay: .8s; font-size: 1.2rem; }
.hero .hero-floats i:nth-child(3) { right: 10%; bottom: 8%; animation-delay: 1.4s; font-size: 1rem; }
.hero .hero-floats i:nth-child(4) { right: 25%; bottom: 20%; animation-delay: .5s; font-size: 0.8rem; }
.hero .hero-floats i:nth-child(5) { left: 50%; bottom: 2%; animation-delay: 2s; font-size: 1.1rem; margin-left: -10px; }
.hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(4px);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}
.hero .hero-badge i { font-size: 0.7rem; }
.hero h1 {
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.3px;
}
.hero p {
    font-size: 0.82rem;
    opacity: 0.7;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}
.hero .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.hero .hero-actions a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none;
    transition: all .2s cubic-bezier(0.34,1.56,0.64,1);
}
.hero .hero-actions a:active { transform: scale(0.95); }
.hero .hero-actions .ha-primary {
    background: linear-gradient(135deg, #F59E0B, #F97316);
    color: #fff;
    box-shadow: 0 5px 0 #C2410C, 0 6px 16px rgba(245,158,11,0.3);
}
.hero .hero-actions .ha-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #C2410C, 0 10px 24px rgba(245,158,11,0.4);
}
.hero .hero-actions .ha-secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    backdrop-filter: blur(4px);
    border: 1.5px solid rgba(255,255,255,0.25);
}
.hero .hero-actions .ha-secondary:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}
.hero .hero-actions .ha-accent {
    background: linear-gradient(135deg, #EF4444, #F97316);
    color: #fff;
    box-shadow: 0 5px 0 #B91C1C, 0 6px 16px rgba(239,68,68,0.3);
}
.hero .hero-actions .ha-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #B91C1C, 0 10px 24px rgba(239,68,68,0.4);
}

@keyframes hero-float {
    0% { transform: translateY(0); opacity: 0; }
    15% { opacity: 0.5; }
    30% { opacity: 0.5; }
    100% { transform: translateY(-80px); opacity: 0; }
}

/* ===== 快捷入口（圆形网格） ===== */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 6px;
    padding: 10px 10px;
}
@media (min-width: 768px) {
    .quick-grid { grid-template-columns: repeat(5, 1fr); gap: 10px 8px; padding: 12px 12px; }
}
.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 5px;
    padding: 2px;
    cursor: pointer;
    transition: all .2s ease;
    border: none;
    background: transparent;
    position: static;
    overflow: visible;
    box-shadow: none;
    border-radius: 0;
}
.quick-item .q-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff !important;
    background: var(--primary);
    border: 2px solid rgba(255,255,255,0.7);
    transition: all .25s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 4px 12px rgba(124,58,237,0.25);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.quick-item .q-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.08) 100%);
    pointer-events: none;
    z-index: 1;
}
@media (min-width: 768px) {
    .quick-item .q-icon { width: 56px; height: 56px; font-size: 1.35rem; }
}
.quick-item:hover .q-icon { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(124,58,237,0.35); }
.quick-item:active .q-icon { transform: scale(0.88); }

/* 自定义图标 - 无背景 */
.quick-item .q-icon-img { background: none !important; box-shadow: none !important; border: none !important; border-radius: 0 !important; }
.quick-item .q-icon-img::after { display: none; }
.quick-item .q-icon-img img { width:100%; height:100%; object-fit:cover; }
.quick-item .q-icon-img.has-bg {
    background: var(--card-bg, var(--primary)) !important;
    box-shadow: 0 4px 12px rgba(124,58,237,0.25) !important;
    border: 2px solid rgba(255,255,255,0.7) !important;
    border-radius: 50% !important;
}
.quick-item .q-label { font-size: 0.75rem; color: var(--text); font-weight: 600; text-align: center; line-height: 1.3; max-width: 72px; }

/* ===== 通用 ===== */
.ios-group { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.ios-group + .ios-group { margin-top: 16px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-header .sh-title { font-weight: 600; font-size: 1rem; display: flex; align-items: center; gap: 6px; }
.section-header .sh-link { font-size: 0.85rem; color: var(--text2); text-decoration: none; }

/* ===== 分类走马灯 ===== */
.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    flex: 0 0 auto;
    cursor: pointer;
}
.cat-item .cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 12px;
    border-radius: 16px;
    border: 2px solid #E0E7FF;
    background: #FAFBFF;
    box-shadow: 0 2px 0 rgba(124,58,237,0.04), 0 4px 10px rgba(124,58,237,0.04);
    transition: all .25s cubic-bezier(0.34,1.56,0.64,1);
    min-width: 72px;
}
.cat-item:hover .cat-card {
    transform: translateY(-3px);
    box-shadow: 0 4px 0 rgba(124,58,237,0.08), 0 12px 24px rgba(124,58,237,0.12);
    border-color: var(--primary-light);
    background: #fff;
}
.cat-item:active .cat-card { transform: scale(0.94); }
.cat-item .cat-card .ci-icon {
    width: 42px;
    height: 42px;
    background: #EEF2FF;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
}
.cat-item .cat-card .ci-name { font-size: 0.78rem; color: var(--text); text-align: center; line-height: 1.2; font-weight: 600; }

/* ===== 商品卡片 ===== */
.goods-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 16px;
}
.goods-card {
    border-radius: 12px;
    overflow: hidden;
    background: #F8F9FB;
    border: 0.5px solid rgba(0,0,0,0.04);
    text-decoration: none;
    color: var(--text);
    transition: all .2s ease;
    display: block;
    box-shadow: 0 6px 18px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
}
.goods-card:hover {
    box-shadow: 0 10px 32px rgba(124,58,237,0.18), 0 4px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.goods-card:active { background: #F0F1F4; }
.goods-card .gc-img {
    height: 130px;
    background: linear-gradient(135deg,#FAF5FF,#EDE9FE);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.goods-card .gc-img img { width: 100%; height: 100%; object-fit: cover; }
.goods-card .gc-img .gi-placeholder { font-size: 2.2rem; color: var(--primary-light); opacity: 0.4; }
.goods-card .gc-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 600;
}
.goods-card .gc-body { padding: 10px 12px 12px; }
.goods-card .gc-title {
    font-size: 0.88rem;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    line-height: 1.35;
    min-height: 2.3rem;
}
.goods-card .gc-price { font-weight: 700; color: var(--primary); font-size: 1rem; }
.goods-card .gc-body .gc-price-row { text-align: right; }
.goods-card .gc-original {
    font-size: 0.75rem;
    color: var(--text2);
    text-decoration: line-through;
    margin-left: 4px;
}
.goods-card .gc-meta {
    font-size: 0.75rem;
    color: var(--text2);
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
}

/* ===== 列表模式 ===== */
.goods-grid.list-mode { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
.goods-card.list {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #F8F9FB;
    border: 0.5px solid rgba(0,0,0,0.04);
    box-shadow: 0 6px 18px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
    transition: all .2s ease;
}
.goods-card.list:hover {
    box-shadow: 0 10px 32px rgba(124,58,237,0.18), 0 4px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.goods-card.list .gc-img { width: 50px; height: 50px; border-radius: 8px; flex-shrink: 0; }
.goods-card.list .gc-body { flex: 1; padding: 0; min-width: 0; }
.goods-card.list .gc-title {
    font-size: 0.92rem;
    min-height: auto;
    -webkit-line-clamp: 1;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--text);
}
.goods-card.list .gc-body .gc-price-row { text-align: right; }
.goods-card.list .gc-meta { margin-top: 2px; }
.goods-card.list .gc-tag { font-size: 0.6rem; padding: 1px 6px; top: auto; left: auto; }

/* ===== 秒杀走马灯 ===== */
.flash-marquee {
    padding: 12px 16px;
    position: relative;
    margin: 4px 16px 16px;
    background: #FFF5F5;
    border-radius: 16px;
    border: 2px solid #FEE2E2;
    box-shadow: 0 3px 0 rgba(239,68,68,0.06), 0 6px 16px rgba(239,68,68,0.06);
    overflow: hidden;
}
.flash-marquee .flash-track { display: flex; gap: 10px; padding: 0; width: max-content; }
.flash-marquee .flash-track.scroll { animation: flashScroll 30s linear infinite; }
.flash-marquee .flash-track.scroll-paused { animation-play-state: paused; }
.flash-marquee:hover .flash-track.scroll { animation-play-state: paused; }
@keyframes flashScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(var(--fw, -1px)); }
}
@media (prefers-reduced-motion: reduce) {
    .flash-marquee .flash-track.scroll { animation: none; overflow-x: auto; }
}

/* ===== 分类走马灯（方向与秒杀相反，向右滚动） ===== */
.cat-marquee {
    padding: 14px 16px;
    position: relative;
    overflow: hidden;
}
.cat-marquee .cat-track { display: flex; gap: 10px; padding: 0; width: max-content; }
.cat-marquee .cat-track.scroll { animation: catScroll 60s linear infinite; }
.cat-marquee .cat-track.scroll-paused { animation-play-state: paused; }
.cat-marquee:hover .cat-track.scroll { animation-play-state: paused; }
@keyframes catScroll {
    0% { transform: translateX(var(--cfw, 0)); }
    100% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .cat-marquee .cat-track.scroll { animation: none; overflow-x: auto; }
}

.flash-marquee .fcard {
    flex: 0 0 auto;
    width: 146px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 2px solid #FEE2E2;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 0 rgba(239,68,68,0.07), 0 6px 16px rgba(239,68,68,0.06);
    transition: all .25s cubic-bezier(0.34,1.56,0.64,1);
    cursor: pointer;
}
.flash-marquee .fcard:hover {
    box-shadow: 0 8px 0 rgba(239,68,68,0.14), 0 16px 32px rgba(239,68,68,0.16);
    transform: translateY(-4px);
    border-color: #FCA5A5;
}
.flash-marquee .fcard:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 0 rgba(239,68,68,0.06), 0 4px 12px rgba(239,68,68,0.08);
}
.flash-marquee .fcard .fc-img2 {
    position: relative;
    height: 105px;
    background: linear-gradient(135deg,#FEF2F2,#FFF1F0);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.flash-marquee .fcard .fc-img2 img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.flash-marquee .fcard:hover .fc-img2 img { transform: scale(1.06); }
.flash-marquee .fcard .fc-img2 .fcp { font-size: 2rem; color: #F87171; opacity: 0.3; }
.flash-marquee .fcard .fc-img2 .fctag {
    position: absolute;
    top: 4px;
    left: 4px;
    background: linear-gradient(135deg,#DC2626,#B91C1C);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 6px rgba(220,38,38,0.4);
    z-index: 2;
}
.flash-marquee .fcard .fc-img2 .fctag i { font-size: 0.55rem; }
.flash-marquee .fcard .fc-img2 .fccd {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(15,23,42,0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 2;
}
.flash-marquee .fcard .fcb2 { padding: 8px 10px 10px; }
.flash-marquee .fcard .fcb2 .fct {
    font-size: 0.78rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    min-height: 2.5em;
    margin-bottom: 6px;
}
.flash-marquee .fcard .fcb2 .fprow { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.flash-marquee .fcard .fcb2 .fprow .fp { font-weight: 800; font-size: 0.95rem; color: #EF4444; }
.flash-marquee .fcard .fcb2 .fprow .fo { font-size: 0.68rem; color: #9CA3AF; text-decoration: line-through; }
.flash-marquee .fcard .fcb2 .fpbar { height: 4px; background: #FECACA; border-radius: 2px; overflow: hidden; margin-bottom: 4px; }
.flash-marquee .fcard .fcb2 .fpbar .fpb { height: 100%; background: linear-gradient(90deg,#EF4444,#F87171); border-radius: 2px; }
.flash-marquee .fcard .fcb2 .fmeta { font-size: 0.65rem; color: #9CA3AF; }

/* ===== 文章卡片 ===== */
.article-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.article-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #F8F9FB;
    border: 0.5px solid rgba(0,0,0,0.04);
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 6px 18px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
    transition: all .2s ease;
}
.article-card:hover {
    box-shadow: 0 10px 32px rgba(124,58,237,0.18), 0 4px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.article-card:active { background: #F0F1F4; }
.article-card .ac-img {
    width: 76px;
    height: 56px;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg,#FAF5FF,#EDE9FE);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.article-card .ac-img img { width: 100%; height: 100%; object-fit: contain; }
.article-card .ac-img .bi { font-size: 1.3rem; color: var(--primary-light); opacity: 0.4; }
.article-card .ac-body { flex: 1; min-width: 0; }
.article-card .ac-title {
    font-size: 0.92rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    min-height: 2.6em;
}
.article-card .ac-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    color: var(--text2);
    flex-wrap: nowrap;
}
.article-card .ac-meta .badge {
    background: #F5F0FF;
    color: #7C3AED;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.68rem;
    flex-shrink: 0;
}

/* ===== 浮窗：客服 + 返回顶部 ===== */
#floatService:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(124,58,237,0.45);
}
#floatService:active { transform: scale(0.92); }
#floatBackTop:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
#floatBackTop:active { transform: scale(0.92); }

/* ===== 悬浮圆形底部导航 ===== */
.float-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 32px;
    box-shadow: 0 4px 24px rgba(124,58,237,0.10), 0 1px 4px rgba(0,0,0,0.06);
    z-index: 1060;
    border: 0.5px solid rgba(124,58,237,0.08);
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.float-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #9CA3AF;
    font-size: 0.6rem;
    font-weight: 500;
    transition: all .2s;
    -webkit-tap-highlight-color: transparent;
    min-width: 48px;
    height: 52px;
    border-radius: 24px;
    position: relative;
}
.float-nav a .fn-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    background: transparent;
    transition: all .3s cubic-bezier(0.34,1.56,0.64,1);
    flex-shrink: 0;
}
.float-nav a .fn-label {
    font-size: 0.55rem;
    line-height: 1;
    transition: color .2s;
    height: 14px;
    display: flex;
    align-items: center;
    margin-top: 2px;
}
.float-nav a:active .fn-icon {
    transform: scale(0.86);
}
/* 当前激活项 */
.float-nav a.active {
    color: var(--primary);
}
.float-nav a.active .fn-icon {
    background: linear-gradient(135deg,#7C3AED,#A78BFA);
    color: #fff;
    box-shadow: 0 4px 14px rgba(124,58,237,0.35);
}
.float-nav a.active .fn-label {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.58rem;
}
.float-nav a.active::before {
    content: '';
    position: absolute;
    inset: 4px 0;
    border-radius: 24px;
    background: rgba(124,58,237,0.06);
    z-index: -1;
}

/* 底部留白 */
body {
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 80px);
}
/* 内容容器底部留白，避免被固定底部导航遮挡 */
body .container.py-3 {
    padding-bottom: 80px !important;
}

/* ===== 首页动态活动流通知浮层 ===== */
.purchase-float {
    position: fixed;
    top: 68px;
    right: 0;
    z-index: 1040;
    transform: translateX(calc(100% + 24px));
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 340px;
    pointer-events: none;
}
.purchase-float.show {
    transform: translateX(-12px);
}
.purchase-float.hiding {
    transform: translateX(calc(100% + 24px));
    transition: transform 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
.purchase-float .pf-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 10px;
    background: var(--card, #FFFFFF);
    border: 1px solid rgba(124,58,237,0.12);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.10), 0 2px 8px rgba(124,58,237,0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: auto;
    min-height: 44px;
}
.purchase-float .pf-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(124,58,237,0.25);
}
.purchase-float .pf-text {
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
    color: var(--text);
}
.purchase-float .pf-text .pf-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px;
    line-height: 1.35;
}
.purchase-float .pf-text .pf-name {
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}
.purchase-float .pf-text .pf-desc {
    color: var(--text2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
/* ── 移动端：窄屏适配 ── */
@media (max-width: 575.98px) {
    .purchase-float {
        top: 60px;
        max-width: 290px;
    }
    .purchase-float.show {
        transform: translateX(-8px);
    }
    .purchase-float .pf-content {
        padding: 8px 12px 8px 8px;
        gap: 8px;
        border-radius: 10px;
        min-height: 38px;
    }
    .purchase-float .pf-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    .purchase-float .pf-text {
        font-size: 0.74rem;
    }
}

/* ── 中屏适配 ── */
@media (min-width: 576px) and (max-width: 767.98px) {
    .purchase-float {
        top: 68px;
        max-width: 320px;
    }
}

/* ── 桌面端 ── */
@media (min-width: 768px) {
    .purchase-float {
        top: 76px;
        right: 0;
        max-width: 420px;
        transform: translateX(calc(100% + 20px));
        transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .purchase-float.show {
        transform: translateX(0);
        margin-right: 16px;
    }
    .purchase-float.hiding {
        transform: translateX(calc(100% + 20px));
        margin-right: 0;
        transition: transform 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
    }
    .purchase-float .pf-content {
        padding: 14px 20px 14px 14px;
        gap: 14px;
        border-radius: 14px;
        min-height: 52px;
    }
    .purchase-float .pf-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .purchase-float .pf-text {
        font-size: 0.88rem;
    }
}

/* ===== 秒杀预告 ===== */
.upcoming-grid { display: flex; gap: 10px; padding: 12px 16px 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.upcoming-grid::-webkit-scrollbar { display: none; }
.ucard {
    flex: 0 0 auto;
    width: 140px;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 2px solid #FED7AA;
    text-decoration: none;
    color: inherit;
    transition: all .25s ease;
    cursor: pointer;
}
.ucard:hover {
    border-color: #FB923C;
    box-shadow: 0 4px 16px rgba(249,115,22,0.15);
    transform: translateY(-2px);
}
.ucard .uc-img {
    height: 100px;
    background: linear-gradient(135deg,#FFF7ED,#FFEDD5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.ucard .uc-img img { width: 100%; height: 100%; object-fit: cover; }
.ucard .uc-img .uc-tag {
    position: absolute;
    top: 4px;
    left: 4px;
    background: linear-gradient(135deg,#F97316,#EA580C);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 6px rgba(249,115,22,0.4);
    z-index: 2;
}
.ucard .uc-body { padding: 8px 10px 10px; }
.ucard .uc-body .uc-title {
    font-size: 0.78rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    min-height: 2.5em;
    margin-bottom: 4px;
}
.ucard .uc-body .uc-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.ucard .uc-body .uc-price .fp { font-weight: 800; font-size: 0.9rem; color: #F97316; }
.ucard .uc-body .uc-price .fo { font-size: 0.65rem; color: #9CA3AF; text-decoration: line-through; }
.ucard .uc-body .uc-countdown { font-size: 0.65rem; color: #F97316; font-weight: 600; }

/* ===== 搜索建议面板 ===== */
.search-panel {
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 12px rgba(124,58,237,0.08);
    animation: slideDown .2s ease;
}
@keyframes slideDown {
    0% { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
}
.search-panel .ss-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.search-panel .ss-tags .tag {
    padding: 4px 12px;
    border-radius: 16px;
    background: #F5F0FF;
    color: var(--primary);
    font-size: 0.78rem;
    text-decoration: none;
    transition: all .15s;
    cursor: pointer;
}
.search-panel .ss-tags .tag:hover { background: var(--primary); color: #fff; }
.search-panel .ss-list .s-item {
    padding: 8px 0;
    border-bottom: 1px solid #F3F4F6;
    color: var(--text);
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color .15s;
}
.search-panel .ss-list .s-item:hover { color: var(--primary); }
.search-panel .ss-list .s-item:last-child { border-bottom: none; }

/* ===== 商品评价墙 ===== */
.review-wall { padding: 8px 16px 14px; }
.rv-card {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #F3F4F6;
    text-decoration: none;
    color: var(--text);
    transition: all .15s;
}
.rv-card:last-child { border-bottom: none; }
.rv-card:hover { opacity: 0.75; }
.rv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.rv-user { font-size: 0.78rem; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.rv-goods { font-size: 0.7rem; color: var(--text2); max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-content { font-size: 0.82rem; color: #6B7280; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rv-time { font-size: 0.65rem; color: #9CA3AF; margin-top: 4px; }

/* ===== 图片骨架屏：shimmer 加载动效 ===== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.goods-card .gc-img,
.flash-marquee .fcard .fc-img2 {
    position: relative;
    overflow: hidden;
}
/* 图片加载中显示 shimmer 动画（`<img>` 覆盖后自然消失） */
.goods-card .gc-img::before,
.flash-marquee .fcard .fc-img2::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.35) 50%, transparent 75%);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}
/* 图片覆盖 shimmer，加载后淡入 */
.goods-card .gc-img img,
.flash-marquee .fcard .fc-img2 img {
    position: relative;
    z-index: 2;
    animation: imgFadeIn .35s ease;
}
@keyframes imgFadeIn {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}
.flash-marquee .fcard .fc-img2 {
    background: linear-gradient(135deg,#FEF2F2,#FFF1F0);
}

/* ========================================
 * 入场动画
 * ======================================== */

/* 关键帧定义 */
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(18px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes scaleIn {
    0% { opacity: 0; transform: scale(0.92); }
    100% { opacity: 1; transform: scale(1); }
}

/* ── 区块级入场：整体模块从下方滑入 ── */
.ios-group {
    animation: fadeInUp .45s ease both;
}
.hero {
    animation: fadeIn .5s ease both;
}

/* ── 快捷入口：逐个放大 ── */
.quick-item {
    animation: scaleIn .35s ease both;
}
.quick-item:nth-child(1)  { animation-delay: 0.02s; }
.quick-item:nth-child(2)  { animation-delay: 0.06s; }
.quick-item:nth-child(3)  { animation-delay: 0.10s; }
.quick-item:nth-child(4)  { animation-delay: 0.14s; }
.quick-item:nth-child(5)  { animation-delay: 0.18s; }
.quick-item:nth-child(6)  { animation-delay: 0.22s; }
.quick-item:nth-child(7)  { animation-delay: 0.26s; }
.quick-item:nth-child(8)  { animation-delay: 0.30s; }
.quick-item:nth-child(9)  { animation-delay: 0.34s; }
.quick-item:nth-child(10) { animation-delay: 0.38s; }

/* ── 商品卡片：逐个滑入 ── */
.goods-grid .goods-card {
    animation: fadeInUp .4s ease both;
}
.goods-grid .goods-card:nth-child(1)  { animation-delay: 0.04s; }
.goods-grid .goods-card:nth-child(2)  { animation-delay: 0.08s; }
.goods-grid .goods-card:nth-child(3)  { animation-delay: 0.12s; }
.goods-grid .goods-card:nth-child(4)  { animation-delay: 0.16s; }
.goods-grid .goods-card:nth-child(5)  { animation-delay: 0.20s; }
.goods-grid .goods-card:nth-child(6)  { animation-delay: 0.24s; }
.goods-grid .goods-card:nth-child(7)  { animation-delay: 0.28s; }
.goods-grid .goods-card:nth-child(8)  { animation-delay: 0.32s; }

/* ── 秒杀卡片：逐个滑入 ── */
.flash-track .fcard {
    animation: fadeInUp .35s ease both;
}
.flash-track .fcard:nth-child(1)  { animation-delay: 0.03s; }
.flash-track .fcard:nth-child(2)  { animation-delay: 0.06s; }
.flash-track .fcard:nth-child(3)  { animation-delay: 0.09s; }
.flash-track .fcard:nth-child(4)  { animation-delay: 0.12s; }
.flash-track .fcard:nth-child(5)  { animation-delay: 0.15s; }
.flash-track .fcard:nth-child(6)  { animation-delay: 0.18s; }
.flash-track .fcard:nth-child(7)  { animation-delay: 0.21s; }
.flash-track .fcard:nth-child(8)  { animation-delay: 0.24s; }
.flash-track .fcard:nth-child(9)  { animation-delay: 0.27s; }
.flash-track .fcard:nth-child(10) { animation-delay: 0.30s; }

/* ── 秒杀预告卡片 ── */
.upcoming-grid .ucard {
    animation: fadeInUp .35s ease both;
}
.upcoming-grid .ucard:nth-child(1)  { animation-delay: 0.03s; }
.upcoming-grid .ucard:nth-child(2)  { animation-delay: 0.07s; }
.upcoming-grid .ucard:nth-child(3)  { animation-delay: 0.11s; }
.upcoming-grid .ucard:nth-child(4)  { animation-delay: 0.15s; }
.upcoming-grid .ucard:nth-child(5)  { animation-delay: 0.19s; }

/* ── 文章卡片 ── */
.article-list .article-card {
    animation: fadeInUp .4s ease both;
}
.article-list .article-card:nth-child(1) { animation-delay: 0.04s; }
.article-list .article-card:nth-child(2) { animation-delay: 0.10s; }
.article-list .article-card:nth-child(3) { animation-delay: 0.16s; }
.article-list .article-card:nth-child(4) { animation-delay: 0.22s; }
.article-list .article-card:nth-child(5) { animation-delay: 0.28s; }

/* ── 评价卡片 ── */
.review-wall .rv-card {
    animation: fadeInUp .35s ease both;
}
.review-wall .rv-card:nth-child(1) { animation-delay: 0.04s; }
.review-wall .rv-card:nth-child(2) { animation-delay: 0.10s; }
.review-wall .rv-card:nth-child(3) { animation-delay: 0.16s; }
.review-wall .rv-card:nth-child(4) { animation-delay: 0.22s; }
.review-wall .rv-card:nth-child(5) { animation-delay: 0.28s; }

/* 减少运动偏好：关闭动画 */
@media (prefers-reduced-motion: reduce) {
    .ios-group, .hero, .quick-item, .goods-card,
    .fcard, .ucard, .article-card, .rv-card {
        animation: none !important;
    }
}

/* ===== 响应式 ===== */
@media (min-width: 576px) {
    .goods-grid { grid-template-columns: repeat(4, 1fr); }
    .hero h1 { font-size: 1.8rem; }
    .hero { padding: 36px 24px 28px; }
}
/* 移动端浮窗上移，避免被底部导航遮挡 */
@media (max-width: 575.98px) {
    #homeFloating { bottom: 72px !important; }
}
