/* Modern site styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Tech Background Effects */
.tech-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Tech Grid */
.tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(102, 126, 234, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 126, 234, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Gradient Overlay */
.tech-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(118, 75, 162, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(240, 147, 251, 0.04) 0%, transparent 60%);
    animation: gradientShift 15s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Floating Particles */
.tech-floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.tech-particle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6) 0%, rgba(118, 75, 162, 0.4) 100%);
    box-shadow: 
        0 0 20px rgba(102, 126, 234, 0.5),
        0 0 40px rgba(118, 75, 162, 0.3),
        0 0 60px rgba(240, 147, 251, 0.2);
    animation: floatParticle 12s ease-in-out infinite;
}

.tech-particle-1 {
    width: 8px;
    height: 8px;
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.tech-particle-2 {
    width: 6px;
    height: 6px;
    top: 40%;
    right: 15%;
    animation-delay: 2s;
}

.tech-particle-3 {
    width: 10px;
    height: 10px;
    bottom: 30%;
    left: 20%;
    animation-delay: 1s;
}

.tech-particle-4 {
    width: 5px;
    height: 5px;
    top: 60%;
    right: 25%;
    animation-delay: 3s;
}

.tech-particle-5 {
    width: 7px;
    height: 7px;
    bottom: 20%;
    right: 40%;
    animation-delay: 0.5s;
}

.tech-particle-6 {
    width: 9px;
    height: 9px;
    top: 25%;
    left: 60%;
    animation-delay: 1.5s;
}

.tech-particle-7 {
    width: 6px;
    height: 6px;
    bottom: 40%;
    left: 75%;
    animation-delay: 2.5s;
}

.tech-particle-8 {
    width: 8px;
    height: 8px;
    top: 70%;
    left: 45%;
    animation-delay: 4s;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translateY(-30px) translateX(20px) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-50px) translateX(-10px) scale(1);
        opacity: 0.6;
    }
    75% {
        transform: translateY(-20px) translateX(-30px) scale(0.8);
        opacity: 0.9;
    }
}

/* Glow Spots */
.tech-glow-spots {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.glow-spot {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: glowPulse 8s ease-in-out infinite;
}

.glow-spot-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.2) 100%);
    animation-delay: 0s;
}

.glow-spot-2 {
    width: 350px;
    height: 350px;
    bottom: -80px;
    left: -80px;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.25) 0%, rgba(118, 75, 162, 0.15) 100%);
    animation-delay: 3s;
}

.glow-spot-3 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(102, 126, 234, 0.1) 100%);
    animation-delay: 5s;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

/* Ensure main content is above background */
main {
    position: relative;
    z-index: 1;
    flex: 1;
}

.container {
    width: 97%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-links a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

/* Primary CTA in navbar: .nav-links a would otherwise win specificity over .btn-primary */
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
    color: #fff;
}

.nav-links .btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
}

.navbar-user-email-group {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.navbar-user-email-link {
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.navbar-user-email-link:hover {
    color: var(--primary-color);
}

.navbar-user-email-link--staff {
    color: var(--primary-color);
}

.navbar-user-email-link--staff:hover {
    color: var(--primary-hover);
}

.navbar-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.navbar-role-badge__svg {
    width: 1.05rem;
    height: 1.05rem;
}

.navbar-role-badge--user {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
}

.navbar-role-badge--supplier {
    background: rgba(5, 150, 105, 0.14);
    color: #047857;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.user-tier-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: var(--tier-fg, #64748b);
    background: var(--tier-bg, #f1f5f9);
    border: 1px solid color-mix(in srgb, var(--tier-fg, #64748b) 22%, transparent);
    white-space: nowrap;
    flex-shrink: 0;
}

.user-tier-badge--l1 { --tier-fg: #64748b; --tier-bg: #f1f5f9; }
.user-tier-badge--l2 { --tier-fg: #b45309; --tier-bg: #fef3c7; }
.user-tier-badge--l3 { --tier-fg: #0d9488; --tier-bg: #ccfbf1; }
.user-tier-badge--l4 { --tier-fg: #2563eb; --tier-bg: #dbeafe; }
.user-tier-badge--l5 { --tier-fg: #7c3aed; --tier-bg: #ede9fe; }
.user-tier-badge--l6 { --tier-fg: #a16207; --tier-bg: #fef9c3; }

.user-tier-badge-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.user-tier-badge-wrap .user-tier-badge {
    cursor: help;
}

.user-tier-rules-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1200;
    width: min(240px, 88vw);
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--card-bg, #fff);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-primary, #111827);
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.user-tier-rules-tooltip__title {
    display: block;
    margin: 0 0 0.45rem;
    font-size: 0.8125rem;
    font-weight: 700;
}

.user-tier-rules-tooltip__summary {
    margin: 0 0 0.5rem;
    font-size: 0.72rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.4;
}

.user-tier-rules-tooltip__heading {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
}

.user-tier-rules-tooltip__tiers {
    margin: 0;
    padding: 0;
    list-style: none;
}

.user-tier-rules-tooltip__tiers li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.15rem 0;
    font-size: 0.72rem;
}

.user-tier-rules-tooltip__tiers li span:last-child {
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    white-space: nowrap;
}

.user-tier-badge-wrap:hover .user-tier-rules-tooltip,
.user-tier-badge-wrap:focus-within .user-tier-rules-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.navbar,
.navbar .container,
.nav-links,
.navbar-user-email-group {
    overflow: visible;
}

.membership-section {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.membership-section__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.membership-section__header h2 {
    margin: 0;
    font-size: 1.125rem;
}

.membership-section__tier-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.membership-section__spend {
    margin: 0 0 1rem;
    color: var(--text-secondary, #6b7280);
    font-size: 0.9rem;
}

.membership-section__spend strong {
    color: var(--text-primary, #111827);
    font-weight: 700;
}

.membership-progress {
    margin-top: 0.25rem;
}

.membership-progress__label {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 0.35rem;
}

.membership-progress__bar {
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.membership-progress__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--tier-fg, #2563eb), color-mix(in srgb, var(--tier-fg, #2563eb) 70%, #fff));
    transition: width 0.3s ease;
}

.membership-section__max {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
}

.user-panel-header-tier {
    display: inline-flex;
    align-items: center;
    margin-right: 0.75rem;
}

.user-header .header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem 0;
}

/* 商品首页：Hero 贴紧导航栏，去掉 main 顶部留白（空白来自 main 的 padding-top） */
main:has(.products-index-page),
main:has(.products-store-page) {
    padding-top: 0;
}

/* 商品页二级导航 — 参考截图：白底细顶边、图标+文案、灰/紫层次、当前项粉紫药丸、热销绿点 */
.store-subnav {
    width: 100%;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    border-bottom: 1px solid rgba(118, 75, 162, 0.2);
    padding: 0.6rem 0 0.65rem;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 20px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 与 main > .container 内其它区块同宽：不再套一层 97%，避免左侧与筛选区/分类条错位 */
.store-subnav__inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 有序横向列表：严格从左到右依次排列（不受 RTL 影响） */
.store-subnav__row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem 1.15rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
    padding: 2px 0;
    margin: 0;
    list-style: none;
    direction: ltr;
    width: 100%;
    box-sizing: border-box;
}

.store-subnav__cell {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.store-subnav__row::-webkit-scrollbar {
    height: 4px;
}

.store-subnav__row::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}

.store-subnav__item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 46px;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    text-decoration: none;
    color: #374151;
    background: transparent;
    border: 2px solid transparent;
    white-space: nowrap;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

/* 鼠标悬停：对比更明显 */
.store-subnav__item:hover {
    color: #111827;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.25),
        0 0 0 1px rgba(102, 126, 234, 0.1) inset;
    transform: translateY(-2px);
    animation: navItemPulse 1s ease-in-out infinite;
}

@keyframes navItemPulse {
    0%, 100% {
        box-shadow: 
            0 4px 15px rgba(102, 126, 234, 0.25),
            0 0 0 1px rgba(102, 126, 234, 0.1) inset;
    }
    50% {
        box-shadow: 
            0 6px 20px rgba(102, 126, 234, 0.35),
            0 0 0 2px rgba(102, 126, 234, 0.2) inset;
    }
}

/* 键盘焦点：粗描边 */
.store-subnav__item:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
}

.store-subnav__item:focus:not(:focus-visible) {
    outline: none;
}

.store-subnav__item:active {
    transform: translateY(0);
    box-shadow: 0 1px 6px rgba(99, 102, 241, 0.2);
}

/* 「全部」：始终紫色强调（参考 All） */
.store-subnav__item--all,
.store-subnav__item--all .store-subnav__icon {
    color: var(--primary-color);
}

.store-subnav__item--all:hover {
    color: var(--primary-hover);
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 3px 14px rgba(99, 102, 241, 0.22);
}

/* 当前选中项：底色 + 边框更明显 */
.store-subnav__item.is-current {
    color: #4f46e5;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.15) 50%, rgba(240, 147, 251, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow:
        0 4px 15px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(102, 126, 234, 0.2) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation: currentItemGlow 2s ease-in-out infinite;
}

@keyframes currentItemGlow {
    0%, 100% {
        box-shadow:
            0 4px 15px rgba(102, 126, 234, 0.3),
            0 0 0 1px rgba(102, 126, 234, 0.2) inset,
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    50% {
        box-shadow:
            0 6px 25px rgba(102, 126, 234, 0.4),
            0 0 0 2px rgba(102, 126, 234, 0.3) inset,
            inset 0 1px 0 rgba(255, 255, 255, 0.95);
    }
}

.store-subnav__item.is-current .store-subnav__icon {
    color: #4f46e5;
    filter: drop-shadow(0 0 8px rgba(79, 70, 229, 0.5));
}

.store-subnav__item.is-current:hover {
    color: #4338ca;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-color: rgba(102, 126, 234, 0.7);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

/* 未选中的「热销」：灰图标（参考 Top Picks） */
.store-subnav__item--picks:not(.is-current) .store-subnav__icon {
    color: #4b5563;
}

.store-subnav__item--picks:not(.is-current) {
    color: #4b5563;
}

/* 绿点（参考 Top Picks 旁小圆点） */
.store-subnav__badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 0.15rem;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px #ffffff;
}

.store-subnav__icon {
    flex-shrink: 0;
    display: block;
    width: 22px;
    height: 22px;
}

.store-subnav__icon--img {
    object-fit: contain;
    border-radius: 4px;
}

.store-subnav__label {
    line-height: 1.25;
}

/* 用鼠标拖选文字时的背景色（更明显） */
.store-subnav ::selection {
    background: rgba(99, 102, 241, 0.35);
    color: #111827;
}

.store-subnav .store-subnav__item--all ::selection {
    background: rgba(99, 102, 241, 0.4);
    color: #1e1b4b;
}

/* 提供商目录（与 main.container 同宽对齐，卡片等高、统一样式与悬停） */
.suppliers-directory {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.5rem 0 2.75rem;
    box-sizing: border-box;
}

.suppliers-directory__header {
    margin: 0 0 1.5rem;
    padding: 0;
}

.suppliers-directory__title {
    font-size: clamp(1.5rem, 2.5vw, 1.875rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.2;
}

.suppliers-directory__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.suppliers-directory__card {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.suppliers-directory__link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    min-height: 248px;
    height: 100%;
    padding: 1.5rem 1.25rem 1.35rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition:
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease,
        background 0.22s ease;
}

.suppliers-directory__link:hover {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow:
        0 12px 36px -12px rgba(99, 102, 241, 0.28),
        0 4px 14px rgba(15, 23, 42, 0.06);
    transform: translateY(-4px);
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
}

.suppliers-directory__link:active {
    transform: translateY(-2px);
}

.suppliers-directory__link:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

.suppliers-directory__media {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(229, 231, 235, 0.9);
}

.suppliers-directory__logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.suppliers-directory__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.suppliers-directory__placeholder-svg {
    opacity: 0.85;
}

.suppliers-directory__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 4.5rem;
}

.suppliers-directory__name {
    font-weight: 700;
    font-size: 1.0625rem;
    line-height: 1.4;
    text-align: center;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.suppliers-directory__cta {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary-color);
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.suppliers-directory__link:hover .suppliers-directory__cta {
    opacity: 1;
    transform: translateX(2px);
}

.suppliers-directory__stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    margin: 0.15rem 0 0.1rem;
}

.suppliers-directory__stat {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.35;
    text-align: center;
}

.suppliers-directory__empty-wrap {
    padding: 3rem 1.5rem;
    text-align: center;
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
}

.suppliers-directory__empty {
    margin: 0;
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 收藏心形 SVG（商品卡角标 + 详情按钮共用） */
.favorite-heart-icons {
    position: relative;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: block;
}

/* 勿在此处写 display:block：会盖过下方 __solid 的 display:none，导致所有卡片都显示红心 */
.favorite-heart-icons svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.favorite-heart-icons__line {
    display: block;
    color: #64748b;
}

.favorite-heart-icons__solid {
    display: none;
    color: #e11d48;
    filter: drop-shadow(0 1px 2px rgba(225, 29, 72, 0.22));
}

.is-favorited .favorite-heart-icons__line {
    display: none;
}

.is-favorited .favorite-heart-icons__solid {
    display: block;
}

/* 商品详情：收藏按钮 */
.product-favorite-row {
    margin-bottom: 1.25rem;
}

.product-favorite-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.product-favorite-btn .favorite-heart-icons {
    width: 1.4rem;
    height: 1.4rem;
}

.product-favorite-btn:hover {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.15);
}

.product-favorite-btn:hover .favorite-heart-icons__line {
    color: #6366f1;
}

.product-favorite-btn.is-favorited {
    border-color: rgba(244, 63, 94, 0.4);
    background: linear-gradient(180deg, #fff 0%, #fff1f2 100%);
}

.product-favorite-btn.is-favorited:hover {
    border-color: rgba(225, 29, 72, 0.5);
    box-shadow: 0 2px 14px rgba(244, 63, 94, 0.12);
}

.product-favorite-btn:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* 我的收藏页 */
.favorites-page {
    padding: 0.5rem 0 2rem;
}

.favorites-page--panel {
    padding: 0;
}

.favorites-page__toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.25rem;
}

.favorites-page__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.favorites-page__title {
    margin: 0;
    font-size: clamp(1.5rem, 2.5vw, 1.875rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.favorites-page__empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
}

.favorites-page__empty p {
    margin: 0 0 1.25rem;
    font-size: 1.0625rem;
    color: var(--text-secondary);
}

/* Messages */
.messages {
    margin: 1rem 0;
}

.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: var(--success-color);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: var(--danger-color);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    color: #9ca3af;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--card-bg);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(16, 185, 129, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(102, 126, 234, 0.6);
    color: #4f46e5;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.15);
}

.btn-outline:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 12px;
}

/* Product Cards — 列表：宽屏固定 6 列；较窄屏幕逐级减少，更协调 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin-top: 1.25rem;
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 880px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1100px) {
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.product-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 
        0 2px 10px rgba(102, 126, 234, 0.08),
        0 4px 20px rgba(118, 75, 162, 0.05);
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 8px 30px rgba(102, 126, 234, 0.2),
        0 0 0 2px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.4);
}

/* 列表网格卡片：简洁配色（主色 + 中性灰，低/缺货略提示） */
.product-card--grid {
    padding: 0.7rem 0.75rem 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.12);
    box-shadow: 
        0 2px 10px rgba(102, 126, 234, 0.06),
        0 4px 15px rgba(118, 75, 162, 0.04);
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
}

.product-card--grid:hover {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.15),
        0 0 0 2px rgba(102, 126, 234, 0.1);
}

.product-card--grid .product-card__head {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.product-card--grid .product-card__thumb-wrap {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(102, 126, 234, 0.15);
    background: linear-gradient(135deg, #f8f9ff 0%, #eef2ff 100%);
    display: block;
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 8px rgba(102, 126, 234, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.product-card--grid .product-card__thumb-wrap:hover {
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 
        0 4px 12px rgba(102, 126, 234, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

.product-card--grid .product-card__thumb-wrap:hover .product-card__thumb {
    transform: scale(1.05);
}

.product-card--grid .product-card__thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-card--grid .product-card__thumb--placeholder {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: linear-gradient(135deg, #eef2ff 0%, #ddd6fe 100%);
    box-shadow: 
        0 2px 8px rgba(102, 126, 234, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.product-card--grid .product-card__head-right {
    flex: 1;
    min-width: 0;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0.35rem;
}

.product-card--grid .product-card__shop-block {
    width: 100%;
    min-width: 0;
    text-align: right;
    line-height: 1.3;
}

.product-card--grid .product-card__shop-link {
    display: block;
    width: 100%;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card--grid .product-card__shop-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.product-card--grid .product-card__shop-fallback {
    display: block;
    width: 100%;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card--grid .product-card__favorite {
    position: relative;
    top: auto;
    right: auto;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin: -0.15rem -0.1rem 0 0;
}

.product-card--grid .product-card__title {
    margin: 0.45rem 0 0 0;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.38;
    min-height: calc(0.8125rem * 1.38 * 2);
}

.product-card--grid .product-card__title a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.product-card--grid .product-card__title a:hover {
    color: var(--primary-color);
}

.product-card--grid .product-card__foot {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-direction: row;
    gap: 0.5rem;
    margin-top: 0.4rem;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    padding: 0.55rem 0.75rem 0.65rem;
    border-top: 1px solid var(--border-color);
    background: rgba(99, 102, 241, 0.07);
    border-radius: 0 0 11px 11px;
}

.product-card--grid .product-card__price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    white-space: nowrap;
}

.product-card--grid .product-card__stock {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.2;
    text-align: right;
}

.product-card--grid .product-card__stock--low {
    color: #b45309;
    font-weight: 600;
}

.product-card--grid .product-card__stock--out {
    color: #b91c1c;
    font-weight: 600;
}

.product-card__media {
    position: relative;
}

.product-card__favorite {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 4;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 2px 12px rgba(15, 23, 42, 0.1);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.product-card__favorite .favorite-heart-icons {
    width: 17px;
    height: 17px;
}

.product-card__favorite:hover {
    transform: scale(1.06);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 4px 16px rgba(99, 102, 241, 0.22);
}

.product-card__favorite:hover .favorite-heart-icons__line {
    color: #6366f1;
}

.product-card__favorite.is-favorited {
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 0 0 1px rgba(244, 63, 94, 0.2),
        0 2px 14px rgba(225, 29, 72, 0.12);
}

.product-card__favorite:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.product-image {
    width: 100%;
    height: 104px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-image-placeholder {
    width: 100%;
    height: 104px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.45rem;
}

.product-info {
    padding: 0.55rem 0.65rem 0.6rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* 列表卡片标题：最多 2 行，不强制 min-height，短标题卡片更矮 */
.product-card .product-info h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
}

.product-card .product-info h3 a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.product-card .product-info h3 a:hover {
    color: var(--primary-color);
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin: 0.35rem 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin: 0;
    margin-top: auto;
    padding-top: 0.4rem;
    border-top: 1px solid var(--border-color);
}

.product-card .price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9375rem;
    line-height: 1.2;
}

.price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.125rem;
}

.product-card .stock {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
    line-height: 1.2;
}

.stock {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.product-card .rating {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.6875rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.product-actions {
    display: flex;
    gap: 0.35rem;
    margin-top: 0;
}

.product-actions .btn {
    flex: 1;
    padding: 0.35rem 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 0;
    line-height: 1.25;
}

/* Filters */
.filters {
    background: var(--card-bg);
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.filters form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    font-size: 0.875rem;
    cursor: pointer;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding: 1rem 0;
}

.pagination a {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
    background: var(--card-bg);
}

.pagination a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.current-page {
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Empty State */
.no-products {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-products p {
    font-size: 1.125rem;
}

/* Hero Section - Bright Tech Design */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 30%, #f093fb 60%, #00d4ff 100%);
    color: #fff;
    padding: 5rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
    box-shadow: 
        0 0 60px rgba(102, 126, 234, 0.5),
        0 0 100px rgba(118, 75, 162, 0.3),
        inset 0 0 100px rgba(255, 255, 255, 0.1);
}

/* Background decoration - bright tech grid */
.hero-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 35px 35px;
    opacity: 0.8;
    animation: gridMove 15s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(35px, 35px);
    }
}

/* Main glow effect */
.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(102, 126, 234, 0.3) 30%, rgba(118, 75, 162, 0.2) 50%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: pulseGlow 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

/* Secondary glow rings */
.hero-glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ringPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.hero-glow-ring::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 50%;
    animation: ringPulse 4s ease-in-out infinite 1s;
}

@keyframes ringPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3);
    }
}

/* Particles */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 
        0 0 15px rgba(255, 255, 255, 0.9),
        0 0 30px rgba(102, 126, 234, 0.6),
        0 0 45px rgba(118, 75, 162, 0.4);
}

.particle:nth-child(1) {
    top: 15%;
    left: 8%;
    animation: floatParticle 6s ease-in-out infinite;
}

.particle:nth-child(2) {
    top: 35%;
    right: 12%;
    animation: floatParticle 8s ease-in-out infinite 1.5s;
}

.particle:nth-child(3) {
    bottom: 25%;
    left: 18%;
    animation: floatParticle 7s ease-in-out infinite 0.8s;
}

.particle:nth-child(4) {
    top: 55%;
    right: 22%;
    animation: floatParticle 9s ease-in-out infinite 2.5s;
}

.particle:nth-child(5) {
    bottom: 15%;
    right: 35%;
    animation: floatParticle 6.5s ease-in-out infinite 0.3s;
}

.particle:nth-child(6) {
    top: 25%;
    left: 60%;
    animation: floatParticle 7.5s ease-in-out infinite 1s;
}

.particle:nth-child(7) {
    bottom: 40%;
    left: 75%;
    animation: floatParticle 8.5s ease-in-out infinite 2s;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-40px) scale(1.3);
        opacity: 1;
    }
}

/* Sparkle effects */
.hero-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #ffffff;
    border-radius: 50%;
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle:nth-child(1) {
    top: 20%;
    left: 25%;
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    top: 45%;
    left: 70%;
    animation-delay: 0.5s;
}

.sparkle:nth-child(3) {
    bottom: 30%;
    left: 40%;
    animation-delay: 1s;
}

.sparkle:nth-child(4) {
    top: 60%;
    left: 15%;
    animation-delay: 1.5s;
}

.sparkle:nth-child(5) {
    bottom: 20%;
    right: 20%;
    animation-delay: 0.3s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
    }
}

/* Content */
.hero-content {
    position: relative;
    z-index: 10;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #fce7f3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 0 30px rgba(255, 255, 255, 0.5),
        0 0 60px rgba(102, 126, 234, 0.3),
        0 0 90px rgba(118, 75, 162, 0.2);
    animation: textGlow 2.5s ease-in-out infinite alternate;
    letter-spacing: -0.02em;
}

@keyframes textGlow {
    0% {
        filter: brightness(1) drop-shadow(0 0 30px rgba(255, 255, 255, 0.4));
    }
    100% {
        filter: brightness(1.15) drop-shadow(0 0 50px rgba(255, 255, 255, 0.6));
    }
}

.hero-section p {
    font-size: 1.3rem;
    text-align: center;
    opacity: 0.98;
    max-width: 700px;
    margin: 0 auto;
    color: #ffffff;
    font-weight: 400;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Category Icons */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.category-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
}

.category-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.category-item-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.category-item-name {
    font-size: 0.875rem;
    font-weight: 500;
}

/* —— Category showcase（首页 + 分类浏览）—— */
.category-showcase {
    margin: 0 0 1.5rem;
    padding: 1.5rem 1.35rem 1.35rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 50%, #f0f4ff 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    box-shadow: 
        0 4px 20px rgba(102, 126, 234, 0.1),
        0 8px 40px rgba(118, 75, 162, 0.05);
    backdrop-filter: blur(10px);
}

.category-showcase__intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.35rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.15);
}

.category-showcase__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.2;
    background: linear-gradient(135deg, #1f2937 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-showcase__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.15rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    background: var(--primary-color);
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.32);
}

.category-showcase__cta:hover {
    background: var(--primary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.38);
}

.category-showcase__panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.category-showcase__panel {
    display: flex;
    min-width: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

.category-showcase__accent {
    width: 4px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.category-showcase__body {
    flex: 1;
    min-width: 0;
    padding: 1rem 1rem 1rem 0.9rem;
}

.category-showcase__panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.category-showcase__parent {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

.category-showcase__parent--page {
    font-size: 1.125rem;
}

.category-showcase__panel-link {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.category-showcase__panel-link:hover {
    text-decoration: underline;
}

.category-showcase__strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.category-showcase__strip::-webkit-scrollbar {
    height: 5px;
}

.category-showcase__strip::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.category-showcase__strip--wrap {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 0.65rem;
}

.category-showcase__chip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 4.85rem;
    padding: 0.5rem 0.35rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.category-showcase__strip--wrap .category-showcase__chip {
    width: 5.5rem;
}

.category-showcase__chip:hover {
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.2),
        0 0 0 2px rgba(102, 126, 234, 0.1) inset;
    transform: translateY(-4px) scale(1.05);
    animation: chipGlow 1.5s ease-in-out infinite;
}

@keyframes chipGlow {
    0%, 100% {
        box-shadow: 
            0 8px 25px rgba(102, 126, 234, 0.2),
            0 0 0 2px rgba(102, 126, 234, 0.1) inset;
    }
    50% {
        box-shadow: 
            0 12px 35px rgba(102, 126, 234, 0.3),
            0 0 0 3px rgba(102, 126, 234, 0.2) inset;
    }
}

.category-showcase__chip-media {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f8faff 0%, #eef2ff 50%, #e0e7ff 100%);
    margin-bottom: 0.4rem;
    overflow: hidden;
    box-shadow: 
        0 2px 10px rgba(102, 126, 234, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.category-showcase__chip:hover .category-showcase__chip-media {
    background: linear-gradient(145deg, #eef2ff 0%, #ddd6fe 100%);
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.category-showcase__chip-media img {
    width: 72%;
    height: 72%;
    object-fit: contain;
}

.category-showcase__chip-letter {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    filter: drop-shadow(0 0 4px rgba(102, 126, 234, 0.3));
}

.category-showcase__chip-text {
    font-size: 0.65rem;
    line-height: 1.25;
    font-weight: 600;
    text-align: center;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.category-showcase__chip:hover .category-showcase__chip-text {
    color: #4f46e5;
    font-weight: 700;
}

.category-showcase__fallback {
    margin: 0;
    font-size: 0.8125rem;
}

.category-showcase__fallback a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.category-showcase__fallback a:hover {
    text-decoration: underline;
}

.category-showcase--browse-block {
    margin: 0 0 1rem;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.category-showcase__panel--solo {
    width: 100%;
}

@media (max-width: 768px) {
    .category-showcase__panels {
        grid-template-columns: 1fr;
    }

    .category-showcase__intro {
        align-items: stretch;
    }

    .category-showcase__cta {
        width: 100%;
    }
}

/* 分类浏览页 */
.category-browse-page {
    padding-bottom: 2.5rem;
}

.category-browse-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.category-browse-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.category-browse-breadcrumb a:hover {
    color: var(--primary-color);
}

.category-browse-breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-sep {
    opacity: 0.5;
}

.category-browse-header h1 {
    margin: 0 0 1.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.category-browse-empty {
    color: var(--text-secondary);
    padding: 2rem 0;
}

.category-browse-back {
    margin-top: 2rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }

    .product-image,
    .product-image-placeholder {
        height: 92px;
    }
    
    .filters form {
        flex-direction: column;
    }
    
    .search-box,
    .filter-group {
        width: 100%;
    }
    
    .hero-section {
        padding: 3.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .hero-glow {
        width: 400px;
        height: 400px;
    }
    
    .hero-bg-decoration {
        background-size: 30px 30px;
    }
}

/* Floating Telegram — fixed bottom-right, stays on scroll */
.fab-telegram {
    position: fixed;
    z-index: 998;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    right: calc(1.25rem + env(safe-area-inset-right, 0px));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.7rem 1.15rem 0.7rem 0.85rem;
    min-height: 3.25rem;
    border-radius: 999px;
    text-decoration: none;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    background: linear-gradient(160deg, #3fc0ff 0%, #0099e6 40%, #0077b5 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 14px 28px -6px rgba(0, 153, 230, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition:
        transform 0.28s cubic-bezier(0.34, 1.45, 0.64, 1),
        box-shadow 0.28s ease,
        filter 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.fab-telegram:hover {
    transform: translateY(-4px);
    box-shadow:
        0 10px 20px -4px rgba(0, 0, 0, 0.14),
        0 20px 40px -8px rgba(0, 153, 230, 0.55);
    filter: brightness(1.05);
}

.fab-telegram:active {
    transform: translateY(-2px);
    filter: brightness(0.98);
}

.fab-telegram__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.fab-telegram__label {
    line-height: 1.2;
    white-space: nowrap;
}

/* Narrow screens: icon-only circle (tooltip = full title on long-press / native title) */
@media (max-width: 480px) {
    .fab-telegram__label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .fab-telegram {
        padding: 0;
        width: 3.5rem;
        height: 3.5rem;
        min-height: unset;
        border-radius: 50%;
    }

    .fab-telegram__icon svg {
        width: 26px;
        height: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fab-telegram {
        transition: box-shadow 0.2s ease, filter 0.2s ease;
    }

    .fab-telegram:hover {
        transform: none;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* User finance dashboard（整页 /users/finance/ 与会员中心右侧嵌入共用） */
.user-finance-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.user-finance-page--embedded {
    max-width: none;
    margin: 0;
    padding: 0;
}

.user-finance-page .admin-filters {
    margin-bottom: 1.5rem;
}

.user-finance-page .filter-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.user-finance-page .filter-form .form-control {
    min-width: 200px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9375rem;
}

.user-finance-page .finance-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.user-finance-page .stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-finance-page .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.user-finance-page .stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-finance-page .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.user-finance-page .stat-number.positive {
    color: #059669;
}

.user-finance-page .stat-number.negative {
    color: #dc2626;
}

.user-finance-page .admin-table-container {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
}

.user-finance-page .admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.user-finance-page .admin-table thead {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.user-finance-page .admin-table thead th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.user-finance-page .admin-table tbody tr {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.user-finance-page .admin-table tbody tr:hover {
    background-color: #f8f9fa;
}

.user-finance-page .admin-table tbody td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    color: var(--text-primary);
}

.user-finance-page .admin-table .text-center {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-style: italic;
}

.user-finance-page .date-value {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.user-finance-page .amount-value {
    font-weight: 600;
    font-size: 0.9375rem;
}

.user-finance-page .amount-value.positive {
    color: #059669;
}

.user-finance-page .amount-value.negative {
    color: #dc2626;
}

.user-finance-page .finance-transactions-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    margin-top: 0;
}

.user-finance-page .finance-transactions-container h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-finance-page .transaction-type-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-finance-page .transaction-type-recharge {
    background-color: #d1fae5;
    color: #065f46;
}

.user-finance-page .transaction-type-order_payment {
    background-color: #fee2e2;
    color: #991b1b;
}

.user-finance-page .transaction-type-order_refund {
    background-color: #dbeafe;
    color: #1e40af;
}

.user-finance-page .transaction-type-balance_adjust {
    background-color: #fef3c7;
    color: #92400e;
}

.user-finance-page .reason-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    max-width: 300px;
    word-wrap: break-word;
}

.user-finance-page .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.user-finance-page .page-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.user-finance-page .btn-secondary {
    background-color: #6b7280;
    color: white;
}

.user-finance-page .btn-secondary:hover {
    background-color: #4b5563;
    color: white;
}

/* Order detail: Contact Seller inline panel (expand below card header) */
.contact-seller-card .contact-seller-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.contact-seller-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.contact-seller-header-actions .contact-seller-resolved-form {
    margin: 0;
    display: inline-flex;
    flex-shrink: 0;
}

.contact-seller-header-actions .btn,
.contact-seller-header-actions .resolved-badge {
    white-space: nowrap;
    flex-shrink: 0;
}

.contact-seller-header-actions .btn,
.contact-seller-header-actions .btn-mark-resolved,
.contact-seller-header-actions .resolved-badge {
    padding: 0.6rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 8px;
    min-height: 2.4rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.contact-seller-card-inline-header {
    align-items: flex-start;
}

.contact-seller-card-inline-header h2 {
    line-height: 1.3;
}

.contact-seller-panel .contact-seller-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.contact-seller-panel .messages-history {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.contact-seller-panel .messages-container {
    max-height: min(50vh, 420px);
    overflow-y: auto;
}

.contact-seller-card-inline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.contact-seller-card-inline-header h2 {
    margin: 0;
    flex: 1;
}

.contact-seller-card-hint {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
}

.contact-seller-stub-desc {
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.5;
}
