/* 
 * 茶叶百科导航系统 - 优化版样式
 * 现代化UI设计，茶文化主题
 */

/* ==================== 固定顶部导航栏 ==================== */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 1px solid #e8f5e9;
}

.main-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.main-header .container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Logo和网站名称样式 */
.site-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.site-logo-wrapper:hover,
.site-logo-wrapper:focus {
    opacity: 0.85;
    text-decoration: none !important;
}

.site-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.logo-icon {
    font-size: 24px;
    color: #10b981;
}

/* 悬浮快捷菜单中的站点 logo */
.floating-logo-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
}

.site-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    text-align: center;
}

/* 去掉 LOGO 文字的导航栏下划线动画 */
.site-logo-wrapper:hover .site-brand span::after,
.site-logo-wrapper .site-brand span::after {
    width: 0 !important;
    display: none;
}

.site-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
    line-height: 1.2;
    margin: 0;
    text-decoration: none !important;
}

.site-slogan {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-decoration: none !important;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .site-logo {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    
    .logo-icon {
        font-size: 20px;
    }
    
    .site-brand {
        display: none;
    }
}

/* 导航分类项：单行紧凑排列，茶类过多时横向滚动（不换行、不遮挡右侧茶友圈/随机一茶） */
.nav-categories {
    flex-wrap: nowrap;
    gap: 0;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav-categories::-webkit-scrollbar {
    height: 0;
    background: transparent;
}
/* li 只当容器，避免与内部 a 形成双重 padding */
.nav-categories li.nav-item {
    padding: 0;
    background: transparent;
    color: inherit;
}
.nav-categories .nav-item {
    padding: 0.4rem 0.65rem;
    font-size: 0.9rem;
    gap: 0.3rem;
}
.nav-categories .nav-item i {
    font-size: 0.85rem;
}
/* 右侧随机一茶 / 茶友圈 */
.header-nav-right > a.nav-link {
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
}

/* 中等屏（笔记本常见 992–1200px）收紧：去品牌副标题/茶类图标，保整行放得下不裁切覆盖 */
@media (min-width: 992px) and (max-width: 1200px) {
    .header-nav-right { gap: 0.35rem; }
    .nav-categories { gap: 0; }
    .nav-categories .nav-item { padding: 0.2rem 0.45rem; font-size: 0.72rem; }
    .nav-categories .nav-item i { display: none; }
    .header-nav-right > a.nav-link { padding: 0.2rem 0.45rem; font-size: 0.72rem; }
    .site-slogan { display: none; }
    .site-name { font-size: 0.95rem; }
}

/* 中大屏（1201–1399px）：折中尺寸，防止溢出裁切 */
@media (min-width: 1201px) and (max-width: 1399px) {
    .nav-categories { gap: 0.05rem; }
    .nav-categories .nav-item { padding: 0.35rem 0.55rem; font-size: 0.85rem; }
    .nav-categories .nav-item i { font-size: 0.8rem; }
    .header-nav-right > a.nav-link { padding: 0.35rem 0.55rem; font-size: 0.85rem; }
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.6rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.nav-item:hover {
    background: #f0f7f0;
    color: var(--primary);
}

.nav-item i {
    font-size: 0.8rem;
}

.nav-contact {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white !important;
}

.nav-contact:hover {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    color: white !important;
    transform: translateY(-2px);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f0f7f0;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: #e8f5e9;
}

/* 移动端导航菜单 */
.mobile-nav {
    padding: 0.75rem 0;
    border-top: 1px solid #e8f5e9;
    margin-top: 0.5rem;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-nav-item:hover {
    color: var(--primary);
}

.mobile-nav-item i {
    width: 24px;
    color: var(--primary);
}

/* ==================== Toast提示 ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--gray-800);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2s forwards;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.success {
    background: var(--primary);
}

.toast.error {
    background: var(--red-500);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

/* ==================== CSS变量定义 ==================== */
:root {
    --primary: #2E7D32;
    --primary-hover: #1B5E20;
    --primary-light: #4CAF50;
    --primary-50: #E8F5E9;
    --primary-100: #C8E6C9;
    --secondary: #8D6E63;
    --accent: #FFCC80;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #9E9E9E;
    --gray-500: #757575;
    --gray-600: #616161;
    --gray-700: #424242;
    --gray-800: #212121;
    --red-500: #EF4444;
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --rounded: 0.375rem;
    --rounded-lg: 0.75rem;
    --rounded-xl: 1rem;
    --rounded-2xl: 1.5rem;
    --rounded-full: 9999px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.15);
    --font-sans: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ==================== 全局样式 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: clip;
}

/* 滚动偏移 */
.scroll-mt-20 { scroll-margin-top: 5rem; }

/* 卡片阴影 */
.card-shadow {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 卡片悬停效果 */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* 卡片悬停遮罩层 */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(46,125,50,0.95) 0%, rgba(139,110,99,0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    color: white;
    text-align: center;
    padding: 1rem;
    border-radius: 0.75rem;
}

.tea-card:hover .card-overlay {
    opacity: 1;
    visibility: visible;
}

.card-overlay h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-overlay p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.overlay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 4px;
}

.overlay-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.overlay-btn i {
    color: var(--primary);
}

.consult-btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
}

.consult-btn:hover {
    background: linear-gradient(135deg, #FFA726 0%, #FF9800 100%);
}

.consult-btn i {
    color: white;
}

/* 移动端/平板卡片操作按钮（详情 + 对比） */
.mobile-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.mobile-card-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.mobile-card-actions .btn-detail {
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #333;
}

.mobile-card-actions .btn-detail:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.mobile-card-actions .btn-compare {
    background: #fff;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
}

.mobile-card-actions .btn-compare:hover {
    background: #e8f5e9;
}

.mobile-card-actions .btn-compare.active {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}

.mobile-card {
    cursor: default;
}

/* 价格悬停显示 */
.price-overlay {
    font-size: 0.85rem;
    color: #FFD700;
    margin-top: 8px;
    font-weight: 500;
}

.price-overlay span {
    margin: 0 4px;
}

.price-overlay .normal {
    color: rgba(255,255,255,0.7);
    font-size: 0.75rem;
}

/* 全局链接样式 */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}



/* ==================== 布局类 ==================== */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--spacing-4); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }

/* ==================== 尺寸与间距 ==================== */
.w-full { width: 100%; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.gap-1 { gap: var(--spacing-1); }
.gap-2 { gap: var(--spacing-2); }
.gap-3 { gap: var(--spacing-3); }
.gap-4 { gap: var(--spacing-4); }
.gap-6 { gap: var(--spacing-6); }
.space-y-4 > * + * { margin-top: var(--spacing-4); }
.space-y-3 > * + * { margin-top: var(--spacing-3); }
.space-y-2 > * + * { margin-top: var(--spacing-2); }
.m-0 { margin: 0; }
.mb-1 { margin-bottom: var(--spacing-1); }
.mb-2 { margin-bottom: var(--spacing-2); }
.mb-4 { margin-bottom: var(--spacing-4); }
.mb-6 { margin-bottom: var(--spacing-6); }
.mb-10 { margin-bottom: 2.5rem; }
.mb-16 { margin-bottom: 4rem; }
.mr-1 { margin-right: var(--spacing-1); }
.mr-2 { margin-right: var(--spacing-2); }
.mr-4 { margin-right: var(--spacing-4); }
.ml-auto { margin-left: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.p-2 { padding: var(--spacing-2); }
.p-3 { padding: var(--spacing-3); }
.p-4 { padding: var(--spacing-4); }
.p-6 { padding: var(--spacing-6); }
.px-2 { padding-left: var(--spacing-2); padding-right: var(--spacing-2); }
.px-4 { padding-left: var(--spacing-4); padding-right: var(--spacing-4); }
.py-1 { padding-top: var(--spacing-1); padding-bottom: var(--spacing-1); }
.py-2 { padding-top: var(--spacing-2); padding-bottom: var(--spacing-2); }
.py-3 { padding-top: var(--spacing-3); padding-bottom: var(--spacing-3); }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }

/* ==================== 文字样式 ==================== */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-white { color: white; }
.text-primary { color: var(--primary); }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-800 { color: var(--gray-800); }

.bg-dark { background-color: var(--gray-800); }

/* ==================== 背景与边框 ==================== */
.bg-white { background-color: white; }
.bg-white\/80 { background-color: rgba(255,255,255,0.8); }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-gray-100 { background-color: var(--gray-100); }
.bg-gray-200 { background-color: var(--gray-200); }
.bg-gray-700 { background-color: #374151; }
.bg-gray-800 { background-color: #1f2937; }
.bg-primary { background-color: var(--primary); }
.bg-primary\/80 { background-color: rgba(46,125,50,0.8); }
.bg-primary\/90 { background-color: rgba(46,125,50,0.9); }
.bg-secondary { background-color: var(--secondary); }
.bg-secondary\/80 { background-color: rgba(141,110,99,0.8); }
.bg-red-500 { background-color: var(--red-500); }
.bg-accent { background-color: var(--accent); }
.border { border: 1px solid var(--gray-300); }
.border-t { border-top: 1px solid var(--gray-200); }
.rounded { border-radius: var(--rounded); }
.rounded-lg { border-radius: var(--rounded-lg); }
.rounded-xl { border-radius: var(--rounded-xl); }
.rounded-2xl { border-radius: var(--rounded-2xl); }
.rounded-full { border-radius: var(--rounded-full); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* ==================== 可见性与定位 ==================== */
.hidden { display: none; }
.block { display: block; }
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
.invisible { visibility: hidden; }
.visible { visibility: visible; }

/* ==================== group-hover支持 ==================== */
.group { position: relative; }

.group:hover .group-hover\:block {
    display: block;
}

.group:hover .group-hover\:hidden {
    display: none;
}
.inline-block { display: inline-block; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.right-full { right: 100%; }
.right-4 { right: 1rem; }
.right-5 { right: 1.25rem; }
.right-6 { right: 1.5rem; }
.top-0 { top: 0; }
.top-1\/2 { top: 50%; }
.bottom-0 { bottom: 0; }
.bottom-20 { bottom: 5rem; }
.bottom-24 { bottom: 6rem; }
.-translate-y-1\/2 { transform: translateY(-50%); }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-998 { z-index: 998; }
.z-999 { z-index: 999; }
.z-1000 { z-index: 1000; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.cursor-pointer { cursor: pointer; }
.transition-all { transition: all var(--transition-base); }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }

/* ==================== 响应式断点 ==================== */
@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .md\:flex-row { flex-direction: row; }
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
    .md\:block { display: block; }
    .md\:mb-0 { margin-bottom: 0; }
    .md\:h-80 { height: 20rem; }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ==================== 导航栏样式 ==================== */
/* 主内容区域，避免被固定导航栏遮挡 */
main.container {
    padding-top: 1.5rem;
}

nav a {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    transition: all var(--transition-base);
}

nav a:hover {
    color: var(--primary);
}

nav a span {
    position: relative;
}

nav a span::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
}

nav a:hover span::after {
    width: 100%;
}

/* 移动端菜单 */
#mobile-menu {
    border-top: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
}

#menu-toggle {
    padding: 0.5rem;
    border-radius: var(--rounded);
    transition: background-color var(--transition-fast);
}

#menu-toggle:hover {
    background-color: var(--gray-100);
}

/* ==================== 搜索区域 ==================== */
.search-wrapper {
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 14px 88px 14px 48px;
    border-radius: 50px;
    border: 2px solid var(--gray-200);
    font-size: 16px;
    transition: all var(--transition-base);
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 18px;
    pointer-events: none;
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #388E3C 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.4);
}

.search-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* 一键清除搜索词按钮（X） */
.search-clear {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--gray-200, #e5e7eb);
    color: var(--gray-600, #6b7280);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    z-index: 6;
    transition: background 0.2s, color 0.2s;
}

.search-clear:hover {
    background: var(--gray-300, #d1d5db);
    color: var(--gray-900, #111827);
}

/* 搜索结果下拉框 */
.search-container #search-results,
#search-results {
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid #e5e7eb;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    z-index: 100;
}

.search-result-item {
    padding: 14px 18px;
    transition: background-color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f0f9f0;
}

.search-result-item:active {
    background-color: #e3f2e3;
}

/* 搜索类型标签 */
.search-type-tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 10px;
    font-weight: 500;
    flex-shrink: 0;
}

/* 搜索更多提示 */
.search-more-hint {
    padding: 10px 16px;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.8rem;
    border-top: 1px dashed var(--border-color);
}

/* 搜索结果项目样式 */
.search-result-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-result-category {
    font-size: 0.8rem;
    color: #6b7280;
    margin-left: auto;
}

/* 搜索命中高亮 */
.search-result-item mark {
    background: linear-gradient(135deg, #fde68a, #fcd34d);
    color: #78350f;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 700;
}

/* 键盘选中态 */
.search-result-item.selected {
    background-color: #ecfdf5;
    border-left: 3px solid #10b981;
    padding-left: 15px;
}

/* 无结果推荐 */
.search-empty-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

/* AI 智能推荐区块 */
.ai-recommend-block {
    padding: 6px 0;
}
.ai-recommend-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #047857;
    padding: 8px 18px 4px;
    letter-spacing: 0.5px;
}
.search-result-item.ai-suggest {
    background: linear-gradient(90deg, rgba(16,185,129,0.06), transparent);
}
.search-result-item.ai-suggest:hover {
    background: #ecfdf5;
}
.search-empty-tags,
.search-suggest-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.search-suggest-tag {
    display: inline-block;
    padding: 5px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 0.82rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}
.search-suggest-tag:hover {
    background: #ecfdf5;
    border-color: #10b981;
    color: #059669;
}

/* 移动端：搜索框内联显示，不再默认隐藏/全屏 */
@media (max-width: 767px) {
    .search-wrapper {
        display: block;
    }

    .search-wrapper.mobile-active {
        display: block;
    }

    .search-wrapper.mobile-active .search-container {
        max-width: 100%;
        margin: 0 auto;
    }

    .search-wrapper.mobile-active .search-input {
        font-size: 1rem;
        padding: 14px 48px;
    }

    /* 内联模式下隐藏右上角关闭按钮 */
    .mobile-search-close {
        display: none !important;
    }

    /* 搜索结果下拉跟随搜索框定位 */
    #search-results {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        max-height: 60vh;
        z-index: 1080;
    }

    .search-container .search-input {
        font-size: 1rem;
        padding-top: 14px;
        padding-bottom: 14px;
    }
}

/* ==================== 右侧悬浮快捷操作 ==================== */
.floating-actions {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1050;
}

.floating-actions-toggle {
    display: none;
}

.floating-actions-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.floating-action-item {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    font-size: 1rem;
    padding: 0;
}

.floating-action-item:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    color: var(--primary);
}

.floating-action-label {
    display: none;
}

.floating-action-divider {
    width: 24px;
    margin: 2px 0;
    border: 0;
    border-top: 1px solid var(--gray-200);
}

#wechat-icon-container .wechat-qrcode {
    display: none;
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    width: 130px;
    height: 130px;
    background: white;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1060;
}

#wechat-icon-container .wechat-qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#wechat-icon-container:hover .wechat-qrcode,
#wechat-icon-container:focus-within .wechat-qrcode {
    display: block;
}

@media (max-width: 991.98px) {
    .floating-actions {
        top: auto;
        bottom: 90px;
        right: 16px;
        transform: none;
    }

    body.compare-bar-visible .floating-actions {
        bottom: 170px;
    }

    /* 有底部菜单时，两图标整体上移，避免遮挡底部菜单（约 0-60px） */
    body.has-bottom-nav .floating-actions {
        bottom: 140px;
    }
    /* 同时存在底部菜单与对比栏：两图标都抬到对比栏（顶部约 74px）之上，且保持间距不重叠 */
    body.has-bottom-nav.compare-bar-visible .floating-actions {
        bottom: 170px;
    }

    .floating-actions-toggle {
        display: flex;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary) 0%, #388E3C 100%);
        color: white;
        border: none;
        box-shadow: 0 4px 16px rgba(46,125,50,0.35);
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        z-index: 1051;
    }

    .floating-actions-toggle:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 24px rgba(46,125,50,0.45);
    }

    .floating-actions-toggle i {
        transition: transform 0.3s ease;
    }

    .floating-actions.is-open .floating-actions-toggle i {
        transform: rotate(45deg);
    }

    .floating-actions-menu {
        position: absolute;
        bottom: calc(100% + 10px);
        right: 0;
        gap: 10px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.25s ease;
        pointer-events: none;
    }

    .floating-actions.is-open .floating-actions-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .floating-action-item {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .floating-action-divider {
        display: none;
    }

    #wechat-icon-container .wechat-qrcode {
        right: auto;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%);
    }
}

/* ==================== 搜索历史 ==================== */
.search-history {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.search-history:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.search-history-title {
    font-size: 0.75rem;
    color: var(--gray-500);
    padding: 4px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clear-history {
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

.clear-history:hover {
    color: var(--red-500);
}

.history-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color var(--transition-fast);
    color: var(--text-secondary);
}

.history-item:hover {
    background-color: var(--primary-50);
}

.history-item i {
    color: var(--gray-400);
    font-size: 0.875rem;
}

/* ==================== 热门搜索词 ==================== */
.hot-search-area {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 2rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 1px solid var(--gray-200);
}

.hot-search-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.hot-search-title {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hot-search-title i {
    color: #ef4444;
    font-size: 0.85rem;
}

.hot-search-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.hot-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: white;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hot-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.hot-tag:hover .hot-rank {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.hot-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
}

/* ==================== 热门搜索词响应式 ==================== */
@media (max-width: 991.98px) {
    .hot-search-area {
        width: 100%;
    }
    .hot-search-tags {
        gap: 6px;
    }
    .hot-tag {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 575.98px) {
    .hot-search-area {
        padding: 0.75rem 0.875rem;
    }
    .hot-search-tags {
        gap: 6px;
        justify-content: flex-start;
    }
    .hot-tag {
        padding: 5px 10px;
        font-size: 0.78rem;
    }
}

/* ==================== 筛选标签 ==================== */
.filter-chip {
    padding: 8px 18px;
    border-radius: 50px;
    background-color: var(--bg-primary);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* ==================== Hero区域 ==================== */
.hero-section {
    position: relative;
    height: 16rem;
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-xl);
}

@media (min-width: 768px) {
    .hero-section {
        height: 22rem;
        border-radius: 2rem;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.85) 0%, rgba(141, 110, 99, 0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    color: white;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 600px;
    opacity: 0.95;
}

@media (min-width: 768px) {
    .hero-content h2 {
        font-size: 2.5rem;
    }
}

/* ==================== 分类区域标题 ==================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e8f5e9;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    background: #e8f5e9;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.section-count {
    font-size: 0.85rem;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
}

/* 茶叶分类区块 */
.tea-section {
    margin-bottom: 3rem;
    scroll-margin-top: 2rem;
}

.tea-grid:not(.row) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .tea-grid:not(.row) {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .tea-grid:not(.row) {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ==================== 分类卡片网格 ==================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 1rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
    text-align: center;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.category-card.active {
    background: linear-gradient(135deg, var(--primary) 0%, #388E3C 100%);
    color: white;
}

.category-card .category-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    color: var(--primary);
    transition: all var(--transition-base);
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-card .category-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
}

.category-card.active .category-name {
    color: white;
}

/* ==================== 分类标题区域 ==================== */
.category-section {
    margin-bottom: 4rem;
    scroll-margin-top: 6rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    transition: background var(--transition-base);
}

.category-header:hover {
    background: rgba(0,0,0,0.03);
}

.category-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.category-icon-default {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #43a047, #66bb6a);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-md);
}

.category-header:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
}

.category-header:hover .category-icon-default {
    transform: scale(1.1) rotate(5deg);
}

/* 折叠按钮 */
.collapse-btn {
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--gray-600);
}

.collapse-btn:hover {
    background: var(--primary);
    color: white;
}

.collapse-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

/* 折叠状态 */
.category-section.collapsed .collapse-btn i {
    transform: rotate(-90deg);
}

.category-section.collapsed .category-content {
    display: none;
}

/* 分类内容区 */
.category-content {
    animation: fadeIn 0.3s ease;
}

.category-intro {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--shadow-sm);
}

.category-intro p {
    color: var(--gray-600);
    line-height: 1.8;
}

/* ==================== 卡片网格 ==================== */
/* 仅对旧版非 Bootstrap row 结构生效；首页新版同时使用 .row 时走 Bootstrap flex 网格 */
.tea-grid:not(.row) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .tea-grid:not(.row) {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .tea-grid:not(.row) {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ==================== 茶叶卡片（紧凑型） ==================== */
.tea-card,
.tea-item {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
}

.tea-card:hover,
.tea-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tea-card img,
.tea-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    transition: transform var(--transition-base);
    loading: lazy;
}

.tea-card:hover img,
.tea-item:hover img {
    transform: scale(1.03);
}

/* 首页新版 Bootstrap 卡片：圆形图片容器内图片保持容器尺寸，
   覆盖上面 .tea-card img 的 height:100px，避免破坏圆形布局 */
.tea-card-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* 图片容器和悬停遮罩层 */
.image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 悬停遮罩层 */
.tea-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(46,125,50,0.95) 0%, rgba(139,110,99,0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    color: white;
    text-align: center;
    padding: 0.75rem;
}

.tea-item:hover .tea-overlay {
    opacity: 1;
    visibility: visible;
}

.tea-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 20px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.tea-detail-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.tea-detail-btn i {
    color: var(--primary);
}

/* 分类标签样式 */
.category-tag-inline {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
    background: #C8E6C9;
    color: #2E7D32;
    margin-bottom: 0.5rem;
}

/* 价格区域 */
.tea-price {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0.5rem;
}

.price-item {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #5D4037;
    font-weight: 500;
}

.price-item.normal {
    background: #E8F5E9;
    color: #2E7D32;
}

.price-item i {
    font-size: 0.6rem;
}

/* 茶叶信息区域 */
.tea-info {
    padding: 0.75rem;
}

.tea-info .tea-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tea-info .tea-origin {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tea-info .tea-origin i {
    color: var(--primary);
}

/* 首页卡片标题/产地字号（桌面端），避免默认过小 */
.tea-card .card-title {
    font-size: 1.1rem;
}
.tea-card .card-text {
    font-size: 0.9rem;
}

.tea-card .card-content,
.tea-info {
    padding: 0.75rem;
}

.tea-card .tea-name,
.tea-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tea-card .tea-origin,
.tea-origin {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tea-desc {
    font-size: 0.75rem;
    color: var(--gray-600);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 0.5rem;
}

/* ==================== 添加卡片按钮（紧凑型） ==================== */
.add-card-btn {
    border: 2px dashed var(--gray-300);
    border-radius: 0.75rem;
    background: rgba(255,255,255,0.5);
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 140px;
    font-size: 0.875rem;
}

.add-card-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.add-card-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* 编辑按钮 */
.card-edit-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    z-index: 10;
}

.card-edit-btn:hover {
    background: var(--primary);
    color: white;
}

.edit-mode .card-edit-btn,
.edit-mode .add-card-btn {
    display: flex;
}

.edit-mode .tea-card {
    cursor: pointer;
}

.edit-mode .tea-card:hover {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* 收藏按钮 */
.card-favorite-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    z-index: 10;
    color: var(--gray-400);
}

.card-favorite-btn:hover {
    transform: scale(1.1);
}

.card-favorite-btn.active {
    color: #EF4444;
}

.card-favorite-btn.active i {
    animation: pulse 0.3s ease;
}

.card-favorite-btn i {
    font-size: 14px;
}

/* ==================== 茶叶详情样式 ==================== */
.tea-detail-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.tea-detail-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(46, 125, 50, 0.2);
    border: 4px solid #f0f7f0;
}

.tea-detail-info {
    flex: 1;
}

.tea-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.tea-detail-location {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.tea-detail-desc {
    color: var(--gray-700);
    line-height: 1.6;
}

.tea-detail-section {
    margin-bottom: 1.25rem;
}

.tea-detail-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tea-detail-section-title i {
    color: var(--primary);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

/* 详情页面价格区间网格 */
.detail-price-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.price-level-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #fff9f0 0%, #fff3e6 100%);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.price-level-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.price-level-label i {
    color: var(--primary);
}

.price-level-value {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.95rem;
}



/* ==================== 表单样式 ==================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--rounded-lg);
    font-size: 1rem;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* ==================== 按钮样式 ==================== */
button {
    font-family: inherit;
    cursor: pointer;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--rounded-lg);
    font-weight: 500;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

/* ==================== 管理员入口 ==================== */
.admin-entry {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 998;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    color: white;
}

.admin-entry:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.admin-menu {
    position: fixed;
    bottom: 80px;
    left: 24px;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    padding: 0.75rem;
    z-index: 999;
    display: none;
    min-width: 180px;
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-menu.visible {
    display: block;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--rounded-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--gray-700);
}

.admin-menu-item:hover {
    background: var(--primary-50);
    color: var(--primary);
}

/* ==================== 移动/平板端顶部栏：汉堡左 | logo中 | 搜索右 ==================== */
.mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
}
.mobile-topbar-btn {
    flex: 0 0 auto;
    width: 42px; height: 42px;
    border: 0; background: transparent;
    font-size: 1.3rem; color: #2e7d32;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
}
.mobile-topbar-btn:active { background: rgba(46,125,50,.12); }
.mobile-topbar-logo {
    flex: 1 1 auto;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none; color: #1f2937; min-width: 0;
}
.mobile-topbar-logo:active { opacity: .8; }
.mobile-topbar-logo .site-logo {
    width: 28px; height: 28px; border-radius: 8px;
}
.mobile-topbar-logo .site-name {
    font-size: 0.95rem;
}

@media (max-width: 991.98px) {
    .main-header { padding-top: 0.25rem; padding-bottom: 0.25rem; }
    .mobile-topbar { min-height: 46px; }
    .mobile-topbar-btn { width: 36px; height: 36px; font-size: 1.1rem; }
}


/* ==================== 移动端左侧抽屉菜单 ==================== */
.mobile-drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    z-index: 1080;
}
.mobile-drawer-overlay.show { opacity: 1; visibility: visible; }
.mobile-drawer {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 78%; max-width: 320px;
    background: #fff;
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 1081;
    display: flex; flex-direction: column;
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid #eee; font-size: 1.05rem;
}
.mobile-drawer-close { border: 0; background: transparent; font-size: 1.2rem; color: #666; }
.mobile-drawer-body { padding: 10px 12px; overflow-y: auto; flex: 1; }
.mobile-drawer-link {
    display: flex; align-items: center;
    padding: 12px 14px; border-radius: 10px;
    color: #333; text-decoration: none; font-size: .95rem;
}
.mobile-drawer-link:active, .mobile-drawer-link:hover { background: #f1f8f1; color: #2e7d32; }
.mobile-drawer-divider { height: 1px; background: #eee; margin: 8px 4px; }

/* ==================== 移动端底部菜单（后台可管理） ==================== */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0;
    height: 60px;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
    display: flex; align-items: flex-end; justify-content: space-between;
    padding: 0 8px 6px;
    z-index: 1070;
}
.bottom-nav-group {
    flex: 1 1 0; display: flex; align-items: flex-end; justify-content: space-around; min-width: 0;
}
.bottom-nav-item {
    border: 0; background: transparent;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 4px; min-width: 46px;
    color: #555; font-size: .7rem; text-decoration: none; cursor: pointer;
}
.bottom-nav-item i { font-size: 1.25rem; }
.bottom-nav-item:active { color: #2e7d32; }
.bottom-nav-center {
    position: absolute; left: 50%; transform: translateX(-50%) translateY(-16px);
    width: 58px; height: 58px; border-radius: 50%;
    border: 3px solid #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    font-size: .6rem; font-weight: 600;
    box-shadow: 0 4px 14px rgba(0,0,0,.2); cursor: pointer;
}
.bottom-nav-center i { font-size: 1.3rem; }
body.has-bottom-nav { padding-bottom: 70px; }

/* ==================== 返回顶部 / 跳转底部按钮 ==================== */
#back-to-top,
#go-to-bottom {
    opacity: 1;
    visibility: visible;
    position: static;
    width: 36px;
    height: 36px;
}

#back-to-top:hover,
#go-to-bottom:hover {
    transform: none;
}

/* 快捷键提示 */
.shortcut-hint {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-left: 8px;
    padding: 2px 6px;
    background: var(--gray-100);
    border-radius: 4px;
}

/* 键盘导航焦点样式 */
.tea-card:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.tea-card.keyboard-focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(46, 125, 50, 0.2);
    transform: translateY(-4px);
}

/* 键盘导航指示器 */
.keyboard-nav-indicator {
    position: fixed;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    color: var(--gray-700);
    z-index: 999;
    display: none;
}

.keyboard-nav-indicator.visible {
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeInUp 0.3s ease;
}

/* ==================== Footer ==================== */
footer {
    background: linear-gradient(135deg, var(--gray-800) 0%, #1a1a2e 100%);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

footer a {
    color: inherit;
    transition: color var(--transition-fast);
}

footer a:hover {
    color: var(--primary-light);
}

footer .social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

footer .social-icon:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

footer .border-t {
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ==================== 前台页脚（新版） ==================== */
.site-footer {
    background: linear-gradient(135deg, #1a1f1a 0%, #0d120d 100%);
    color: rgba(255,255,255,0.85);
    padding: 0;
    margin-top: 4rem;
    position: relative;
    font-size: 0.95rem;
}

.site-footer::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary) 100%);
}

.footer-patriotism {
    padding: 2.25rem 0 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 1.5rem;
}

.footer-patriotism .core-values-title {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-align: center;
}

.footer-patriotism .values-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0.75rem;
}

.footer-patriotism .values-group:last-child {
    margin-bottom: 0;
}

.footer-patriotism .value-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.footer-patriotism .value-nation {
    background: linear-gradient(135deg, #e53935, #c62828);
    border: 1px solid rgba(255,255,255,0.3);
}

.footer-patriotism .value-society {
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    border: 1px solid rgba(255,255,255,0.3);
}

.footer-patriotism .value-personal {
    background: linear-gradient(135deg, #43a047, #2e7d32);
    border: 1px solid rgba(255,255,255,0.3);
}

.site-footer .container {
    padding-top: 3rem;
    padding-bottom: 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.75rem;
}

.footer-logo i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.35);
}

.footer-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
}

.footer-desc {
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
    max-width: 320px;
    margin-bottom: 0;
}

.footer-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 28px;
    height: 2px;
    background: var(--primary-light);
    border-radius: 1px;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-list li {
    margin-bottom: 0.55rem;
}

.footer-links-list a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition-fast);
}

.footer-links-list a::before {
    content: '\f105';
    font-family: 'FontAwesome';
    font-size: 0.75rem;
    color: var(--primary-light);
    opacity: 0.8;
}

.footer-links-list a:hover {
    color: var(--primary-light);
    transform: translateX(3px);
}

.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact-list li {
    color: rgba(255,255,255,0.65);
    margin-bottom: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact-list i {
    color: var(--primary-light);
    width: 18px;
    text-align: center;
}

.footer-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 1.5rem 0;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

.footer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
}

.footer-meta a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-meta a:hover {
    color: var(--primary-light);
}

.footer-meta img {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    margin-right: 3px;
}

.footer-meta .divider {
    color: rgba(255,255,255,0.25);
}

@media (max-width: 991.98px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        margin-bottom: 2rem;
    }
    .footer-brand {
        grid-column: auto;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-meta {
        justify-content: center;
    }
    .footer-patriotism {
        padding: 1.75rem 0 1rem;
    }
    .footer-patriotism .value-badge {
        min-width: 46px;
        height: 28px;
        font-size: 0.8rem;
        padding: 0 10px;
    }
}

/* ==================== 编辑模式按钮 ==================== */
#toggle-edit-mode,
#mobile-edit-mode {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: var(--rounded-lg);
    padding: 8px 16px;
    font-weight: 500;
    transition: all var(--transition-base);
}

#toggle-edit-mode:hover,
#mobile-edit-mode:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ==================== 图片预览 ==================== */
.image-preview {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--rounded-lg);
    margin-top: 1rem;
    display: none;
    border: 2px solid var(--gray-200);
}

.image-preview.visible {
    display: block;
}

/* ==================== 动画效果 ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes highlight {
    0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(46, 125, 50, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* 卡片交错入场动画 */
.tea-card {
    animation: fadeInUp 0.3s ease backwards;
    min-height: 210px;
}

.tea-card:nth-child(1) { animation-delay: 0.05s; }
.tea-card:nth-child(2) { animation-delay: 0.1s; }
.tea-card:nth-child(3) { animation-delay: 0.15s; }
.tea-card:nth-child(4) { animation-delay: 0.2s; }
.tea-card:nth-child(5) { animation-delay: 0.25s; }
.tea-card:nth-child(6) { animation-delay: 0.3s; }
.tea-card:nth-child(7) { animation-delay: 0.35s; }
.tea-card:nth-child(8) { animation-delay: 0.4s; }
.tea-card:nth-child(n+9) { animation-delay: 0.45s; }

.highlight-animation {
    animation: highlight 0.5s ease-out;
}

/* 滚动入场动画 */
.tea-item,
.category-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.tea-item.visible,
.category-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== 完整骨架屏系统 ==================== */
.skeleton-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-50);
    z-index: 9999;
    padding: 1rem;
    overflow-y: auto;
}

.skeleton-screen.hidden {
    display: none;
}

.skeleton-header {
    height: 120px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.skeleton-categories {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skeleton-category {
    padding: 1rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.skeleton-title {
    width: 120px;
    height: 24px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.skeleton-card {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.75rem;
    height: 160px;
}

@media (max-width: 768px) {
    .skeleton-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 骨架屏加载动画 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

.skeleton-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skeleton-image {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.w-24 { width: 6rem; }
.skeleton-text.w-16 { width: 4rem; }

/* ==================== 卡片悬停预览（紧凑型） ==================== */
.tea-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(46,125,50,0.95) 0%, rgba(139,110,99,0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.6rem 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    color: white;
    text-align: center;
}

.tea-card:hover .card-overlay {
    opacity: 1;
    visibility: visible;
}

.tea-card .card-overlay h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tea-card .card-overlay p {
    font-size: 0.72rem;
    margin-bottom: 0.5rem;
    line-height: 1.35;
    opacity: 0.9;
}

/* 悬停操作按钮：横向两列换行，避免竖排过高把名称/产地顶上去 */
.tea-card .card-overlay .overlay-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.tea-card .card-overlay .overlay-btn {
    flex: 1 1 calc(50% - 6px);
    max-width: 100%;
    justify-content: center;
    padding: 5px 8px;
    background: white;
    color: var(--primary);
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.7rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tea-card .card-overlay .overlay-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 购买咨询按钮（继承 overlay-btn 的紧凑两列布局，仅换配色） */
.tea-card .card-overlay .consult-btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.tea-card .card-overlay .consult-btn:hover {
    background: linear-gradient(135deg, #FFA726 0%, #FF9800 100%);
}

.tea-card .card-overlay .consult-btn i {
    color: white;
}

/* 卡片内容纵向居中，避免 min-height 后下方留白过多 */
.tea-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

/* 茶叶卡片热度角标（右上角） */
.heat-badge {
    position: absolute;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%);
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    white-space: nowrap;
}
.heat-badge i {
    font-size: 0.62rem;
}
/* 角标位置（带边距，不贴边） */
.heat-badge--top-right    { top: 10px; right: 10px; }
.heat-badge--top-left     { top: 10px; left: 10px; }
.heat-badge--bottom-right { bottom: 10px; right: 10px; }
.heat-badge--bottom-left  { bottom: 10px; left: 10px; }
@media (max-width: 640px) {
    .heat-badge {
        padding: 2px 6px;
        font-size: 0.65rem;
    }
    .heat-badge--top-right    { top: 7px; right: 7px; }
    .heat-badge--top-left     { top: 7px; left: 7px; }
    .heat-badge--bottom-right { bottom: 7px; right: 7px; }
    .heat-badge--bottom-left  { bottom: 7px; left: 7px; }
}

/* 热门推荐「推荐」角标（右上角，颜色随热度绿→红） */
.rec-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 9px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .rec-badge {
        top: 7px;
        right: 7px;
        padding: 2px 7px;
        font-size: 0.65rem;
    }
}
/* 随机切换淡入动画 */
.rec-anim {
    animation: recFade .45s ease;
}
@keyframes recFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* 联系咨询模态框样式 */

/* 温馨提示卡片 */
.contact-reminder {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    border-radius: 12px;
    border-left: 4px solid #FFB300;
}

.contact-reminder .reminder-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #FFB300;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.contact-reminder .reminder-text {
    flex: 1;
}

.contact-reminder .reminder-title {
    font-weight: 700;
    color: #F57C00;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.contact-reminder .reminder-content {
    color: #795548;
    font-size: 0.9rem;
    line-height: 1.5;
}

.contact-reminder .highlight {
    color: #E65100;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.6);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ==================== 联系方式网格布局 ==================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.contact-grid-single {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 0 auto;
}

/* 按类型分行布局 */
.contact-type-row {
    margin-bottom: 0.75rem;
}

.contact-type-row:last-child {
    margin-bottom: 0;
}

.contact-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.contact-type-grid:has(.contact-btn:only-child) {
    grid-template-columns: 1fr;
    max-width: 280px;
}

/* ==================== 茶叶详情弹窗样式 ==================== */

/* 详情头部 */
.detail-header {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 1.25rem;
}

.detail-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(46, 125, 50, 0.2);
    border: 4px solid #f0f7f0;
    flex-shrink: 0;
}

.detail-image-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 4rem;
    flex-shrink: 0;
}

.detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-name {
    font-size: 1.6rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.detail-origin {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.detail-origin i {
    color: var(--primary);
}

.detail-category {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #C8E6C9;
    color: #2E7D32;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.detail-desc {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.7;
    background: linear-gradient(135deg, #f8faf8 0%, #f0f7f0 100%);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border-left: 3px solid var(--primary);
    margin-bottom: 1rem;
}

/* 详情区块 */
.detail-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed #e0e0e0;
}

.detail-section-title {
    font-size: 1.05rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8f5e9;
}

.detail-section-title i {
    color: var(--primary);
    background: #e8f5e9;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 价格区间网格 */
.price-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.price-box {
    background: linear-gradient(145deg, #ffffff 0%, #f8faf8 100%);
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.price-label {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.price-value {
    font-size: 1.1rem;
    color: #333;
    font-weight: 700;
}

/* 品质特征网格 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.feature-item {
    background: linear-gradient(145deg, #ffffff 0%, #f8faf8 100%);
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.feature-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.15);
    border-left-color: #66BB6A;
}

.feature-label {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.feature-value {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
}

/* 详情文本 */
.detail-text {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* 适宜与禁忌 */
.suitable-contraindicated {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sc-item {
    padding: 1rem;
    border-radius: 12px;
}

.sc-item.suitable {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
}

.sc-item.contraindicated {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
}

.sc-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sc-item.suitable h4 {
    color: #065f46;
}

.sc-item.contraindicated h4 {
    color: #991b1b;
}

.sc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sc-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    gap: 0.4rem;
}

.sc-item.suitable .sc-tag {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065F46;
    border: 1px solid #6ee7b7;
}

.sc-item.contraindicated .sc-tag {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991B1B;
    border: 1px solid #fca5a5;
}

/* 详情操作按钮 */
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed #e0e0e0;
}

/* 内联详情操作按钮 */
.detail-actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.detail-actions-inline .tea-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.detail-actions-inline .tea-btn-secondary {
    background: white;
    color: #2E7D32;
    border: 1.5px solid #2E7D32;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15);
}

.detail-actions-inline .tea-btn-secondary:hover {
    background: #2E7D32;
    color: white;
}

.detail-actions-inline .tea-btn-primary {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.25);
}

.tea-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.tea-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
    background: linear-gradient(135deg, #fb8c00 0%, #ef6c00 100%);
}

/* 联系信息列表 */
.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8faf8;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--primary);
    background: #f0f7f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
}

.contact-icon .fa-qq { background: linear-gradient(135deg, #12b7f5 0%, #248acc 100%); }
.contact-icon .fa-weixin { background: linear-gradient(135deg, #07c160 0%, #05903d 100%); }
.contact-icon .fa-phone { background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%); }
.contact-icon .fa-envelope { background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%); }

.contact-info {
    flex: 1;
}

.contact-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.2rem;
}

.contact-value {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

/* 联系按钮样式 - index.html风格 */
.contact-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.contact-btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.contact-btn:hover .contact-btn-icon {
    transform: scale(1.08);
}

.contact-btn-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.contact-btn-label {
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.contact-btn-action {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* QQ按钮 */
.contact-btn.qq-item {
    border-color: rgba(18, 183, 245, 0.15);
    background: linear-gradient(135deg, rgba(18, 183, 245, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}
.contact-btn.qq-item:hover {
    border-color: rgba(18, 183, 245, 0.4);
}
.contact-btn.qq-item .contact-btn-icon {
    background: linear-gradient(135deg, #12b7f5 0%, #248acc 100%);
}
.contact-btn.qq-item .contact-btn-label {
    color: #1a8ccc;
}

/* 微信按钮 */
.contact-btn.wechat-item {
    border-color: rgba(7, 193, 96, 0.15);
    background: linear-gradient(135deg, rgba(7, 193, 96, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}
.contact-btn.wechat-item:hover {
    border-color: rgba(7, 193, 96, 0.4);
}
.contact-btn.wechat-item .contact-btn-icon {
    background: linear-gradient(135deg, #07c160 0%, #05903d 100%);
}
.contact-btn.wechat-item .contact-btn-label {
    color: #05903d;
}

/* 电话按钮 */
.contact-btn.phone-item {
    border-color: rgba(255, 149, 0, 0.15);
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}
.contact-btn.phone-item:hover {
    border-color: rgba(255, 149, 0, 0.4);
}
.contact-btn.phone-item .contact-btn-icon {
    background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
}
.contact-btn.phone-item .contact-btn-label {
    color: #e67e00;
}

/* 联系方式按钮 - 人性化设计 */
.contact-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.contact-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.contact-btn:active {
    transform: translateY(0) scale(0.98);
}

/* 图标 */
.contact-btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.contact-btn:hover .contact-btn-icon {
    transform: scale(1.08);
}

/* 文字区域 */
.contact-btn-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.contact-btn-label {
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.contact-btn-action {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.contact-btn-action i {
    font-size: 0.7rem;
}

/* ==================== QQ按钮样式 ==================== */
.contact-btn.qq-item {
    border-color: rgba(18, 183, 245, 0.15);
    background: linear-gradient(135deg, rgba(18, 183, 245, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

.contact-btn.qq-item::before {
    background: linear-gradient(135deg, rgba(18, 183, 245, 0.08) 0%, rgba(18, 183, 245, 0.02) 100%);
}

.contact-btn.qq-item:hover {
    border-color: rgba(18, 183, 245, 0.4);
}

.contact-btn.qq-item:hover::before {
    opacity: 1;
}

.contact-btn.qq-item .contact-btn-icon {
    background: linear-gradient(135deg, #12b7f5 0%, #248acc 100%);
}

.contact-btn.qq-item .contact-btn-label {
    color: #1a8ccc;
}

.contact-btn.qq-item:hover .contact-btn-label {
    color: #0e7ab8;
}

/* ==================== 微信按钮样式 ==================== */
.contact-btn.wechat-item {
    border-color: rgba(7, 193, 96, 0.15);
    background: linear-gradient(135deg, rgba(7, 193, 96, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

.contact-btn.wechat-item::before {
    background: linear-gradient(135deg, rgba(7, 193, 96, 0.08) 0%, rgba(7, 193, 96, 0.02) 100%);
}

.contact-btn.wechat-item:hover {
    border-color: rgba(7, 193, 96, 0.4);
}

.contact-btn.wechat-item:hover::before {
    opacity: 1;
}

.contact-btn.wechat-item .contact-btn-icon {
    background: linear-gradient(135deg, #07c160 0%, #05903d 100%);
}

.contact-btn.wechat-item .contact-btn-label {
    color: #05903d;
}

.contact-btn.wechat-item:hover .contact-btn-label {
    color: #038a35;
}

/* ==================== 电话按钮样式 ==================== */
.contact-btn.phone-item {
    border-color: rgba(255, 149, 0, 0.15);
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

.contact-btn.phone-item::before {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.08) 0%, rgba(255, 149, 0, 0.02) 100%);
}

.contact-btn.phone-item:hover {
    border-color: rgba(255, 149, 0, 0.4);
}

.contact-btn.phone-item:hover::before {
    opacity: 1;
}

.contact-btn.phone-item .contact-btn-icon {
    background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
}

.contact-btn.phone-item .contact-btn-label {
    color: #e67e00;
}

.contact-btn.phone-item:hover .contact-btn-label {
    color: #cc6d00;
}

/* ==================== 微信按钮特殊样式 ==================== */
.contact-btn.wechat-item {
    position: relative;
    cursor: pointer;
}

.contact-btn.wechat-item .contact-btn-action.wechat-copy-hint {
    color: #07c160;
    font-weight: 500;
}

/* 微信二维码弹出层（弹窗内） */
.wechat-qrcode-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 100;
    text-align: center;
}

.wechat-qrcode-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: white;
}

.wechat-qrcode-popup img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 8px;
}

.wechat-qrcode-tip {
    margin: 8px 0 0 0;
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

/* 复制成功提示 */
.wechat-copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: linear-gradient(135deg, #07c160, #05903d);
    color: white;
    padding: 20px 30px;
    border-radius: 16px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(7, 193, 96, 0.4);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.6;
}

.wechat-copy-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.wechat-copy-toast i {
    font-size: 1.5rem;
    margin-bottom: 5px;
    display: block;
}

.wechat-copy-toast small {
    font-weight: 400;
    opacity: 0.9;
    font-size: 0.85rem;
}

/* ==================== 手动复制引导层（微信/不可靠环境） ==================== */
.wechat-manual-copy {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
}

.wechat-manual-box {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.wechat-manual-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #07c160;
    margin-bottom: 8px;
}

.wechat-manual-tip {
    font-size: 0.8rem;
    color: #666;
    margin: 0 0 14px;
    line-height: 1.5;
}

.wechat-manual-input {
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    margin-bottom: 16px;
    -webkit-user-select: text;
    user-select: text;
}

.wechat-manual-close {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, #07c160, #05903d);
    color: #fff;
    font-weight: 600;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
}

/* ==================== 联系人居中网格布局 ==================== */
.contact-grid-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.contact-grid-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
}

.contact-grid-row.last-row {
    padding-bottom: 0.5rem;
}

.contact-grid-row .contact-btn {
    flex: 1;
    max-width: 220px;
    min-width: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .wechat-qrcode-popup {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .contact-grid-row {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .contact-grid-row .contact-btn {
        max-width: 100%;
        width: 100%;
    }
    
    .contact-btn {
        padding: 0.75rem 0.85rem;
    }
    
    .contact-btn-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .contact-btn-label {
        font-size: 0.9rem;
    }
    
    .contact-btn-action {
        font-size: 0.7rem;
    }
}

/* 联系信息管理模态框输入框样式 */
#manage-contact-modal input {
    background: white;
    color: var(--gray-800);
}

#manage-contact-modal label {
    color: var(--gray-700);
    font-weight: 500;
}

/* ==================== 分类标签颜色 ==================== */
.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.category-tag.green-tea { background: #C8E6C9; color: #2E7D32; }
.category-tag.black-tea { background: #FFCDD2; color: #C62828; }
.category-tag.dark-tea { background: #E0E0E0; color: #424242; }
.category-tag.white-tea { background: #F5F5F5; color: #757575; }
.category-tag.oolong-tea { background: #FFE0B2; color: #E65100; }
.category-tag.yellow-tea { background: #FFF9C4; color: #F57F17; }
.category-tag.pu-erh-tea { background: #D7CCC8; color: #5D4037; }
.category-tag.reprocessed-tea { background: #C5CAE9; color: #3949AB; }
.category-tag.herbal-tea { background: #C8E6C9; color: #2E7D32; }

/* ==================== 茶叶价格标签 ==================== */
.tea-price-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    max-width: 180px;
}

.price-tag {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
}

.price-tag.level1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #5D4037;
}

.price-tag.level2 {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #424242;
}

.price-tag.level3 {
    background: linear-gradient(135deg, #CD7F32, #B87333);
    color: #fff;
}

.price-tag.normal {
    background: #E8F5E9;
    color: #2E7D32;
}

.price-tag i {
    font-size: 0.6rem;
}

/* 卡片悬停层价格显示 */
.price-overlay {
    font-size: 0.85rem;
    color: #FFD700;
    margin: 4px 0;
    font-weight: 500;
}

/* 价格编辑网格 */
.price-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 480px) {
    .price-edit-grid {
        grid-template-columns: 1fr;
    }
}

/* 分类边框颜色 */
.border-green-100 { border-color: #C8E6C9; }
.border-red-100 { border-color: #FFCDD2; }
.border-yellow-100 { border-color: #FFF9C4; }
.border-yellow-200 { border-color: #FFF59D; }
.border-amber-200 { border-color: #FFE0B2; }
.border-indigo-100 { border-color: #C5CAE9; }
.border-green-200 { border-color: #A5D6A7; }
.border-gray-100 { border-color: #F5F5F5; }
.border-gray-200 { border-color: #EEEEEE; }

/* 分类图标颜色 */
.text-green-600 { color: #22C55E; }
.text-blue-600 { color: #2563EB; }
.text-brown-600 { color: #5D4037; }

/* 分类背景颜色 */
.bg-green-50 { background-color: #F0FDF4; }
.bg-red-50 { background-color: #FEF2F2; }
.bg-yellow-50 { background-color: #FEFCE8; }
.bg-brown-50 { background-color: #FBF6F3; }
.bg-blue-50 { background-color: #EFF6FF; }

/* ==================== 卡片数量统计 ==================== */
.category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--primary-50);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 0.75rem;
}

/* ==================== 空状态提示 ==================== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
}

/* ==================== 搜索高亮 ==================== */
.search-highlight {
    background: linear-gradient(120deg, #fff3c4 0%, #ffe082 100%);
    padding: 0 4px;
    border-radius: 4px;
    font-weight: 500;
}

/* ==================== 加载进度条 ==================== */
#loading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    z-index: 9999;
    width: 0;
    transition: width 0.3s ease;
}

#loading-progress.complete {
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}

/* ==================== 键盘焦点样式 ==================== */
.tea-card:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.tea-card.keyboard-focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 6px rgba(46, 125, 50, 0.2);
}

/* ==================== 隐藏滚动条 ==================== */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* ==================== 移动端优化 ==================== */
@media (max-width: 640px) {
    .tea-card img,
    .tea-item img {
        height: 120px;
    }
    
    .tea-card .card-content,
    .tea-info {
        padding: 1rem;
    }
    
    .tea-card .tea-name,
    .tea-name {
        font-size: 1rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .detail-image {
        width: 120px;
        height: 120px;
    }
    
    .price-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .suitable-contraindicated {
        gap: 0.75rem;
    }
}

/* ==================== 弹窗UI优化 ==================== */

/* 详情标签组 */
.detail-tags-group {
    margin-bottom: 1rem;
}

.detail-tags-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.detail-tags-label i {
    color: #888;
}

/* 品质特征标签样式优化 */
.detail-item {
    background: linear-gradient(135deg, #f8faf8 0%, #f0f7f0 100%);
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border-left: 3px solid #2E7D32;
    transition: transform 0.2s, box-shadow 0.2s;
}

.detail-item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15);
}

.detail-item-label {
    font-size: 0.75rem;
    color: #2E7D32;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.detail-item-label::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #2E7D32;
    border-radius: 50%;
}

.detail-item-value {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
}

/* 新增字段样式：简洁文本项 */
.detail-simple-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-top: 0.75rem;
}

.detail-simple-value {
    font-size: 1.05rem;
    color: #2c3e50;
    font-weight: 500;
}

/* ==================== 手机/平板端适配增强 ==================== */
@media (max-width: 991.98px) {
    /* 分类标题更紧凑 */
    .category-header {
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .category-header .h5 {
        font-size: 1rem;
    }

    .category-count {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

@media (max-width: 767.98px) {
    main.container {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* 茶叶卡片移动端紧凑化 */
    .tea-card .card-body {
        padding: 0.5rem 0.375rem;
    }

    .tea-card-image-wrapper {
        width: 80px !important;
        height: 80px !important;
        margin-bottom: 0.5rem !important;
    }

    .tea-card .card-title {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }

    .tea-card .card-text {
        font-size: 0.82rem;
    }

    .tea-card .card-text i {
        font-size: 0.7rem;
    }

    .mobile-card-actions {
        padding: 0.5rem;
    }

    .mobile-card-actions .btn {
        padding: 0.35rem 0.25rem;
        font-size: 0.7rem;
        border-radius: 6px;
    }

    .mobile-card-actions .btn i {
        font-size: 0.7rem;
    }

    .tea-grid.row {
        --bs-gutter-x: 0.5rem;
    }

    /* 幻灯片在移动端高度自适应 */
    .home-slides {
        --slide-height: 220px !important;
    }

    .home-slides .slide-title {
        font-size: 1.25rem;
    }

    .home-slides .slide-desc {
        font-size: 0.85rem;
    }

    .home-slides .slide-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
    }
}

@media (max-width: 575.98px) {
    main.container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .tea-card-image-wrapper {
        width: 72px !important;
        height: 72px !important;
    }

    .tea-card .card-title {
        font-size: 0.9rem;
    }

    .tea-card .card-text {
        font-size: 0.78rem;
    }
}

.detail-text-value {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* 标签样式优化 */
.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    gap: 0.35rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tag-item:hover {
    transform: scale(1.05);
}

.tag-item.suitable {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065F46;
    border: 1px solid #6ee7b7;
}

.tag-item.contraindicated {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991B1B;
    border: 1px solid #fca5a5;
}

.tag-item i {
    font-size: 0.7rem;
}

/* 茶叶详情弹窗头部优化 */
.tea-detail-header {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 1rem;
}

.tea-detail-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(46, 125, 50, 0.2);
    border: 4px solid #f0f7f0;
}

.tea-detail-info {
    flex: 1;
}

.tea-detail-title {
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.tea-detail-location {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.tea-detail-desc {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 详情区块标题 */
.tea-detail-section {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed #e0e0e0;
}

.tea-detail-section-title {
    font-size: 1rem;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.tea-detail-section-title i {
    color: #2E7D32;
}

/* 详情网格布局 */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

/* 无详情提示优化 */
.no-detail-tip {
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, #f8faf8 0%, #f0f7f0 100%);
    border-radius: 12px;
    border: 2px dashed #2E7D32;
}

.no-detail-tip i {
    font-size: 3.5rem;
    color: #2E7D32;
    margin-bottom: 1rem;
}

/* ==================== 优化弹窗UI样式 ==================== */

/* 茶叶详情弹窗主体 */
.tea-modal {
    background: #fff;
    border-radius: 20px;
    padding: 0;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 编辑弹窗内容区域可滚动 */
.tea-modal .tea-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    max-height: calc(90vh - 140px); /* 减去头部和底部高度 */
}

.modal-backdrop.visible .tea-modal {
    transform: translateY(0) scale(1);
}

/* 弹窗头部 */
.tea-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #2E7D32 0%, #43A047 50%, #66BB6A 100%);
    color: white;
}

.tea-modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.tea-modal-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.tea-modal-title .fa-leaf {
    font-size: 1.1rem;
}

.tea-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* 弹窗按钮 */
.tea-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.tea-btn-edit {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tea-btn-edit:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.tea-btn-close {
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tea-btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* 弹窗内容区域 */
.tea-modal-body {
    padding: 1.5rem;
    max-height: calc(88vh - 80px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #c1e1c1 transparent;
}

.tea-modal-body::-webkit-scrollbar {
    width: 6px;
}

.tea-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.tea-modal-body::-webkit-scrollbar-thumb {
    background: #c1e1c1;
    border-radius: 3px;
}

/* 联系信息管理弹窗表单样式 */
.manage-contact-tip {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8faf8 0%, #f0f7f0 100%);
    border-radius: 10px;
    border-left: 3px solid #2E7D32;
}

.manage-contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
}

.form-label i {
    color: #2E7D32;
    width: 20px;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fafcfb;
}

.form-input:focus {
    outline: none;
    border-color: #2E7D32;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-input::placeholder {
    color: #aaa;
}

/* 茶叶风格按钮 */
.tea-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, #2E7D32 0%, #388E3C 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.tea-btn-primary:hover {
    background: linear-gradient(135deg, #388E3C 0%, #43A047 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4);
}

.tea-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    background: white;
    color: #2E7D32;
    border: 2px solid #2E7D32;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
}

.tea-btn-secondary:hover {
    background: #2E7D32;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.3);
}

/* 优化后的详情头部 */
.tea-detail-header {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 1.25rem;
}

.tea-detail-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(46, 125, 50, 0.2);
    border: 4px solid #f0f7f0;
}

.tea-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tea-detail-title {
    font-size: 1.6rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.tea-detail-location {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.tea-detail-location i {
    color: #2E7D32;
}

.tea-detail-desc {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.7;
    background: linear-gradient(135deg, #f8faf8 0%, #f0f7f0 100%);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border-left: 3px solid #2E7D32;
    margin-bottom: 1rem;
}

/* 查看更多按钮 */
.tea-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
    color: white;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.tea-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    background: linear-gradient(135deg, #388E3C 0%, #4CAF50 100%);
}

.tea-link-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.tea-link-btn:hover i {
    transform: translateX(3px);
}

/* 详情弹窗按钮组 */
.tea-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* ==================== 茶叶操作按钮：视觉层级 + 全端居中 + 移动端小按钮（弹窗与详情页共用） ==================== */
.tea-action-bar { row-gap: .5rem; justify-content: center; }
.tea-action-bar .btn { white-space: nowrap; }
.tea-action-bar .tea-act-primary { font-weight: 600; }
/* 收藏/对比 选中态：加白色内描边环强化反馈（兜底 Bootstrap 的 .active） */
.tea-action-bar .btn.active {
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.75);
}
/* 手机端：图标+文字的小按钮，紧凑内边距（文字始终显示，避免茶友看不懂） */
@media (max-width: 575.98px) {
    .tea-action-bar .btn { padding-left: .55rem; padding-right: .55rem; font-size: .8rem; }
    .tea-action-bar .btn i { margin-right: .25rem !important; }
}

/* 购买咨询按钮 */
.tea-consult-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.tea-consult-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
    background: linear-gradient(135deg, #fb8c00 0%, #ef6c00 100%);
}

/* ==================== 茶叶对比（侧滑抽屉，独立于 Modal 体系） ==================== */
.compare-bar {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 2000;
    width: min(94vw, 760px);
}
.compare-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e3e8e3;
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 10px 30px rgba(31, 61, 43, .18);
}
.compare-bar-title { font-weight: 600; color: #1f3d2b; white-space: nowrap; }
.compare-bar-items { display: flex; gap: 8px; flex: 1; overflow-x: auto; }
.compare-bar-item { position: relative; width: 44px; height: 44px; flex: 0 0 auto; }
.compare-bar-thumb {
    width: 44px; height: 44px; border-radius: 10px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: #f3f7f3; color: #2e7d32; border: 1px solid #e3e8e3;
}
.compare-bar-thumb img { width: 100%; height: 100%; object-fit: cover; }
.compare-bar-remove {
    position: absolute; top: -6px; right: -6px;
    width: 18px; height: 18px; border-radius: 50%;
    border: none; background: #e53935; color: #fff; font-size: 10px;
    line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.compare-bar-actions { display: flex; gap: 8px; white-space: nowrap; }

.compare-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .45);
    z-index: 1990; opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
}
.compare-overlay.show { opacity: 1; visibility: visible; }

.compare-drawer {
    position: fixed; top: 0; right: 0; height: 100%;
    width: min(94vw, 760px);
    background: #fff; z-index: 2000;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    display: flex; flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, .15);
}
.compare-drawer.open { transform: translateX(0); }
.compare-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid #eee; flex: 0 0 auto;
}
.compare-drawer-body { padding: 16px 18px; overflow-y: auto; flex: 1; }

.compare-table { white-space: normal; }
.compare-table th.compare-label-col,
.compare-table td.compare-label-col {
    background: #f7faf7; font-weight: 600; color: #1f3d2b;
    width: 110px; min-width: 90px; position: sticky; left: 0; z-index: 1;
}
.compare-table .compare-cell { font-size: .9rem; vertical-align: top; }
.compare-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid #eee; }
.compare-table thead th { vertical-align: bottom; }

/* 抽屉顶部属性筛选栏 */
.compare-attr-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    margin-bottom: 14px;
    background: #f7faf7;
    border: 1px solid #e3e8e3;
    border-radius: 12px;
}
.compare-filter-label {
    font-size: .8rem;
    font-weight: 600;
    color: #1f3d2b;
    white-space: nowrap;
    margin-right: 2px;
}
.compare-filter-chip {
    padding: 4px 12px;
    border: 1px solid #cfd8cf;
    background: #fff;
    color: #5a6b5a;
    border-radius: 50px;
    font-size: .75rem;
    line-height: 1.4;
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
}
.compare-filter-chip:hover {
    border-color: #2e7d32;
    color: #2e7d32;
}
.compare-filter-chip.active {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
    font-weight: 500;
}

/* 功效作用标签（详情弹窗内，可点击跳转到 /tag/功效 列表） */
.effect-tag {
    cursor: pointer;
    transition: all .15s ease;
    font-weight: 500;
    font-size: 0.875rem;
}
.effect-tag:hover {
    background: #2e7d32 !important;
    color: #fff !important;
    text-decoration: none;
}

.compare-toast {
    position: fixed; left: 50%; bottom: 90px;
    transform: translateX(-50%) translateY(10px);
    background: rgba(31, 61, 43, .92); color: #fff; padding: 9px 18px; border-radius: 22px;
    font-size: .85rem; z-index: 2100; opacity: 0; visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s; pointer-events: none;
}
.compare-toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

@media (max-width: 575.98px) {
    .compare-drawer { width: 100vw; }
    .compare-bar { width: 96vw; bottom: 10px; }
}

/* ==================== 我的茶单（收藏，侧滑抽屉，独立于 Modal 体系） ==================== */
.favorites-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .45);
    z-index: 1990; opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
}
.favorites-overlay.show { opacity: 1; visibility: visible; }

.favorites-drawer {
    position: fixed; top: 0; right: 0; height: 100%;
    width: min(94vw, 760px);
    background: #fff; z-index: 2000;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    display: flex; flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, .15);
}
.favorites-drawer.open { transform: translateX(0); }
.favorites-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid #eee; flex: 0 0 auto;
}
.favorites-drawer-header .tea-ad-marquee { flex: 1 1 auto; min-width: 0; }
.favorites-drawer-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.favorites-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.favorites-drawer-footer {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 18px; border-top: 1px solid #eee; flex: 0 0 auto; background: #fff;
}

.fav-card {
    display: flex; align-items: center; gap: 12px;
    padding: 10px; border: 1px solid #eee; border-radius: 12px;
    background: #fff; cursor: pointer; position: relative;
    transition: all .15s ease;
}
.fav-card:hover { border-color: #c8e6c9; background: #f6fbf6; }
.fav-thumb {
    width: 56px; height: 56px; border-radius: 10px; overflow: hidden; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    background: #f3f7f3; color: #2e7d32; border: 1px solid #e3e8e3;
}
.fav-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fav-info { flex: 1; min-width: 0; }
.fav-name { font-weight: 600; color: #1f3d2b; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-origin { font-size: .8rem; color: #888; margin-top: 2px; }
.fav-remove {
    position: absolute; top: 8px; right: 8px;
    width: 22px; height: 22px; border-radius: 50%;
    border: none; background: #f3f3f3; color: #999; font-size: 12px; line-height: 1;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: all .15s ease;
}
.fav-remove:hover { background: #e53935; color: #fff; }

.favorites-badge {
    position: absolute; top: -4px; right: -6px;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 9px; background: #e53935; color: #fff;
    font-size: 10px; line-height: 16px; text-align: center; font-weight: 700;
}

@media (max-width: 575.98px) {
    .favorites-drawer { width: 100vw; }
}

/* ==================== 收藏榜单（我的茶单抽屉内，Top2 轮播切换） ==================== */
.fav-rank {
    margin-bottom: 16px; padding: 12px 14px;
    background: linear-gradient(135deg, #fff7f3, #fdeef0);
    border: 1px solid #f6d9dd; border-radius: 14px;
}
.fav-rank-head {
    display: flex; align-items: center; gap: 6px;
    font-weight: 700; color: #c2185b; font-size: .95rem; margin-bottom: 10px;
}
.fav-rank-head .fav-rank-sub {
    font-weight: 400; font-size: .72rem; color: #b07d8b;
    background: #fff; border: 1px solid #f3d6dc; border-radius: 999px;
    padding: 1px 8px; margin-left: 2px;
}
.fav-rank-body { position: relative; min-height: 56px; }
.fav-rank-slide {
    display: flex; align-items: center; gap: 12px; cursor: pointer;
    opacity: 0; visibility: hidden; position: absolute; inset: 0;
    transition: opacity .4s ease;
}
.fav-rank-slide.active { opacity: 1; visibility: visible; position: relative; }
.fav-rank-no {
    flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .85rem; color: #fff; background: #c9c9c9;
}
.fav-rank-no-1 { background: linear-gradient(135deg, #ff6a3d, #e53935); }
.fav-rank-no-2 { background: linear-gradient(135deg, #ffa726, #fb8c00); }
.fav-rank-thumb {
    flex: 0 0 auto; width: 48px; height: 48px; border-radius: 10px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: #f3f7f3; color: #2e7d32; border: 1px solid #e3e8e3;
}
.fav-rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fav-rank-info { flex: 1; min-width: 0; }
.fav-rank-name {
    font-weight: 600; color: #1f3d2b; font-size: .92rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fav-rank-origin { font-size: .76rem; color: #888; margin-top: 2px; }
.fav-rank-count { flex: 0 0 auto; font-size: .74rem; color: #e53935; font-weight: 600; white-space: nowrap; }
.fav-rank-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.fav-rank-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #e7c4cc; cursor: pointer;
    transition: all .2s ease;
}
.fav-rank-dot.active { background: #e53935; width: 18px; border-radius: 4px; }

/* ==================== 详情弹窗：关联探索（同类目横向卡） ==================== */
.related-scroll { scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.related-card {
    width: 112px; cursor: pointer; border-radius: 12px; overflow: hidden;
    background: #fff; border: 1px solid #e8efe8;
    transition: transform .15s ease, box-shadow .15s ease;
}
.related-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(46,125,50,.15); }
.related-thumb {
    width: 100%; height: 84px; display: flex; align-items: center; justify-content: center;
    background: #f3f7f3; color: #2e7d32; border-bottom: 1px solid #eef3ee; font-size: 1.6rem;
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-name { font-size: .8rem; font-weight: 600; color: #1f3d2b; padding: 6px 8px 0; }
.related-origin { font-size: .7rem; color: #999; padding: 0 8px 8px; }

/* 详情区块 */
.tea-detail-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed #e0e0e0;
}

.tea-detail-section-title {
    font-size: 1.05rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8f5e9;
}

.tea-detail-section-title i {
    color: #2E7D32;
    background: #e8f5e9;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 品质特征网格 */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

/* 品质特征卡片 */
.detail-item {
    background: linear-gradient(145deg, #ffffff 0%, #f8faf8 100%);
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid #2E7D32;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.detail-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(46, 125, 50, 0.15);
    border-left-color: #66BB6A;
}

.detail-item-label {
    font-size: 0.75rem;
    color: #2E7D32;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.detail-item-label::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #2E7D32, #66BB6A);
    border-radius: 50%;
}

.detail-item-value {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
}

/* 标签组 */
.detail-tags-group {
    margin-bottom: 1.25rem;
}

.detail-tags-label {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

.detail-tags-label i {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.detail-tags-label .fa-thumbs-up {
    background: #e8f5e9;
    color: #2E7D32;
}

.detail-tags-label .fa-thumbs-down {
    background: #ffebee;
    color: #c62828;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    gap: 0.4rem;
    transition: all 0.2s;
    cursor: default;
}

.tag-item:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tag-item.suitable {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065F46;
    border: 1px solid #6ee7b7;
}

.tag-item.contraindicated {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991B1B;
    border: 1px solid #fca5a5;
}

.tag-item i {
    font-size: 0.7rem;
}

/* 无详情提示 */
.no-detail-tip {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, #f8faf8 0%, #f0f7f0 100%);
    border-radius: 16px;
    border: 2px dashed #2E7D32;
}

.no-detail-tip i {
    font-size: 4rem;
    color: #2E7D32;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.no-detail-tip p {
    margin: 0.3rem 0;
    color: #666;
}

/* 响应式优化 */
@media (max-width: 640px) {
    .tea-modal {
        max-width: 95%;
        border-radius: 16px;
    }
    
    .tea-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .tea-detail-image,
    .detail-image {
        width: 120px;
        height: 120px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 编辑表单样式 ==================== */

/* 弹窗底部按钮区域 */
.tea-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #f8faf8;
    border-top: 1px solid #eee;
}

/* 编辑表单按钮 */
.tea-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}

.tea-btn-cancel {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.tea-btn-cancel:hover {
    background: #eee;
    color: #333;
}

.tea-btn-save {
    background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.tea-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
}

/* 编辑表单区域 */
.edit-form-section {
    margin-bottom: 1.5rem;
}

.edit-form-section-title {
    font-size: 1rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8f5e9;
}

.edit-form-section-title i {
    color: #2E7D32;
    background: #e8f5e9;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.edit-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.edit-form-group {
    margin-bottom: 1rem;
}

.edit-form-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.edit-form-label i {
    color: #888;
    font-size: 0.8rem;
}

.edit-form-label-green {
    color: #2E7D32;
}

.edit-form-label-green i {
    color: #2E7D32;
}

.edit-form-label-red {
    color: #c62828;
}

.edit-form-label-red i {
    color: #c62828;
}

.edit-form-label span {
    font-size: 0.75rem;
    color: #999;
    font-weight: normal;
}

.edit-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.25s ease;
    background: #fafafa;
}

.edit-form-input:focus {
    outline: none;
    border-color: #2E7D32;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.edit-form-input::placeholder {
    color: #aaa;
}

textarea.edit-form-input {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* 移动端编辑表单优化 */
@media (max-width: 640px) {
    .edit-form-grid {
        grid-template-columns: 1fr;
    }
    
    .tea-modal-footer {
        flex-direction: column;
        position: sticky;
        bottom: 0;
        z-index: 10;
    }
    
    .tea-btn {
        width: 100%;
    }
    
    /* 确保编辑模态框底部按钮可见 */
    .tea-modal .tea-modal-body {
        max-height: calc(85vh - 130px);
        padding-bottom: 1rem;
    }
}

/* ==================== 图片上传样式 ==================== */

.image-upload-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.image-upload-wrapper .edit-form-input {
    flex: 1;
}

.upload-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.image-preview {
    max-width: 150px;
    max-height: 100px;
    margin-top: 0.75rem;
    border-radius: 10px;
    border: 2px solid #e8f5e9;
    object-fit: cover;
}

/* 必填标记 */
.edit-form-label .required {
    color: #e53935;
    font-size: 0.8rem;
}

/* 编辑弹窗底部布局 */
.tea-modal-footer-edit {
    justify-content: space-between !important;
}

.tea-modal-footer-right {
    display: flex;
    gap: 0.75rem;
}

/* 删除按钮 */
.tea-btn-delete {
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

.tea-btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.4);
}

/* 图片预览区域 */
#new-tea-image-preview,
#edit-tea-image-preview {
    display: none;
}

#new-tea-image-preview.visible,
#edit-tea-image-preview.visible {
    display: block;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .tea-modal-footer-edit {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .tea-modal-footer-right {
        width: 100%;
    }
    
    .tea-btn-delete {
        width: 100%;
    }
    
    /* 茶叶详情弹窗移动端优化 */
    .tea-modal {
        max-width: 95%;
        margin: 2.5% auto;
        max-height: 90vh;
        border-radius: 16px;
    }
    
    .tea-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
    }
    
    .tea-detail-image {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
    }
    
    .tea-detail-info {
        width: 100%;
    }
    
    .tea-detail-title {
        font-size: 1.5rem;
    }
    
    .tea-detail-desc {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
    }
    
    .tea-detail-actions {
        justify-content: center;
    }
    
    .tea-link-btn,
    .tea-consult-btn {
        flex: 1;
        max-width: 45%;
        justify-content: center;
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .tea-detail-section {
        padding: 0.75rem 1rem;
    }
    
    .tea-detail-section-title {
        font-size: 1rem;
    }
    
    .detail-simple-item {
        padding: 0.5rem;
    }
    
    .detail-text-value {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .detail-tags-group {
        margin-bottom: 0.75rem;
    }
    
    .tag-container {
        flex-wrap: wrap;
    }
    
    .tag-item {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ==================== 导入导出按钮工具栏 ==================== */
.action-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #f8faf8 0%, #ffffff 100%);
    border-bottom: 2px solid #e8e8e8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 隐藏状态优先于display属性 */
.action-toolbar.hidden {
    display: none !important;
}

.action-toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-toolbar-label {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    padding-right: 0.5rem;
    border-right: 1px solid #ddd;
}

.action-toolbar-divider {
    width: 2px;
    height: 28px;
    background: linear-gradient(to bottom, transparent, #ccc, transparent);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.action-btn i {
    font-size: 0.9rem;
}

.action-btn-import {
    background: linear-gradient(135deg, #43A047 0%, #2E7D32 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.3);
}

.action-btn-import:hover {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.4);
}

.action-btn-export {
    background: linear-gradient(135deg, #7B1FA2 0%, #6A1B9A 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(123, 31, 162, 0.3);
}

.action-btn-export:hover {
    background: linear-gradient(135deg, #8E24AA 0%, #7B1FA2 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(123, 31, 162, 0.4);
}

.action-btn:active {
    transform: translateY(0) scale(0.98);
}

/* 移动端适配 */
@media (max-width: 640px) {
    .action-toolbar {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.6rem 1rem;
    }
    
    .action-toolbar-label {
        width: 100%;
        border-right: none;
        border-bottom: 1px dashed #ddd;
        padding-bottom: 0.5rem;
        margin-bottom: 0.25rem;
    }
    
    .action-toolbar-divider {
        display: none;
    }
    
    .action-btn {
        flex: 1;
        justify-content: center;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .action-btn span {
        display: inline;
    }
}

/* ==================== 联系信息管理弹窗增强样式 ==================== */

/* 联系人列表 */
.manage-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* 单个联系人项 */
.manage-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #f8faf8;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.manage-contact-item:hover {
    border-color: #2E7D32;
    background: #f0f7f0;
}

.manage-contact-item.dragging {
    opacity: 0.5;
    border-color: #2E7D32;
    background: #e8f5e8;
}

.manage-contact-item.contact-disabled {
    opacity: 0.5;
    background: #f5f5f5;
}

.manage-contact-item.contact-disabled .contact-info input {
    text-decoration: line-through;
    color: #999;
}

/* 拖拽手柄 */
.contact-drag-handle {
    cursor: grab;
    color: #aaa;
    padding: 0.25rem;
    display: flex;
    align-items: center;
}

.contact-drag-handle:hover {
    color: #2E7D32;
}

.contact-drag-handle:active {
    cursor: grabbing;
}

/* 类型图标 */
.contact-type-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-type-icon .fa-qq { color: #12b7f5; }
.contact-type-icon .fa-weixin { color: #07c160; }
.contact-type-icon .fa-phone { color: #ff9500; }

/* 联系人信息输入 */
.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.contact-label-input,
.contact-value-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.contact-label-input {
    background: #fff;
    font-weight: 600;
    color: #333;
}

.contact-value-input {
    background: #fff;
    color: #666;
}

.contact-label-input:focus,
.contact-value-input:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* 开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #2E7D32;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* 删除按钮 */
.contact-delete {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #ccc;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.contact-delete:hover {
    background: #fee;
    color: #e53935;
}

/* 添加按钮 */
.manage-add-section {
    margin-top: 0.5rem;
}

.tea-btn-add {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 2px dashed #ccc;
    border-radius: 12px;
    color: #666;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.tea-btn-add:hover {
    border-color: #2E7D32;
    color: #2E7D32;
    background: #f0f7f0;
}

/* ==================== 首页宽屏幻灯片 ==================== */
.home-slides {
    --slide-height: 320px;
    width: 100%;
    height: var(--slide-height);
    border-radius: 16px;
    overflow: hidden;
    margin: 1.25rem 0 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    background: #000;
}

.home-slides .carousel-inner,
.home-slides .slide-link,
.home-slides .slide-media-el {
    height: 100%;
    display: block;
}

/* 注意：不要在此强制 .carousel-item 为 display:block，
   非 active 的 item 需由 Bootstrap 保持 display:none，否则轮播会堆叠导致切换失效 */
.home-slides .carousel-item {
    height: 100%;
}

/* ---------- 容器级切换动画（扩展） ---------- */
/* 淡入+缩放 */
.home-slides.ce-fade-zoom .carousel-item {
    transform: scale(0.94);
    transition: opacity .8s ease, transform .8s ease;
}
.home-slides.ce-fade-zoom .carousel-item.active {
    transform: scale(1);
}
/* 翻转进入 */
.home-slides.ce-flip .carousel-item {
    transform: perspective(1200px) rotateX(32deg);
    opacity: 0;
    transition: opacity .7s ease, transform .7s ease;
}
.home-slides.ce-flip .carousel-item.active {
    transform: perspective(1200px) rotateX(0);
    opacity: 1;
}
/* 自下而上 */
.home-slides.ce-slide-up .carousel-item {
    transform: translateY(42px);
    opacity: 0;
    transition: opacity .7s ease, transform .7s ease;
}
.home-slides.ce-slide-up .carousel-item.active {
    transform: translateY(0);
    opacity: 1;
}
/* ken-burns：激活幻灯片主图缓慢推近 */
.home-slides.ce-ken-burns .carousel-item.active .slide-media-el-img,
.home-slides.ce-ken-burns .carousel-item.active .slide-media-el-video {
    animation: slideKenBurns 6.5s ease-out forwards;
}
@keyframes slideKenBurns {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}

.home-slides .slide-link {
    text-decoration: none;
}

/* 主图 / 视频容器（可独立定位） */
.home-slides .slide-media-el {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-slides .slide-media-el-img,
.home-slides .slide-media-el-video {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 铺满（默认） */
.home-slides .slide-media-el.pos-full {
    inset: 0;
    padding: 0;
}
.home-slides .slide-media-el.pos-full .slide-media-el-img,
.home-slides .slide-media-el.pos-full .slide-media-el-video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
}

/* 左右半幅 */
.home-slides .slide-media-el.pos-left {
    left: 0; top: 0;
    width: 50%; height: 100%;
    padding: 1.5%;
}
.home-slides .slide-media-el.pos-right {
    right: 0; top: 0;
    width: 50%; height: 100%;
    padding: 1.5%;
}

/* 居中浮层 */
.home-slides .slide-media-el.pos-center {
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: auto; height: auto;
    max-width: 70%; max-height: 86%;
    padding: 0;
}
.home-slides .slide-media-el.pos-center .slide-media-el-img,
.home-slides .slide-media-el.pos-center .slide-media-el-video {
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

/* 四角浮层（主图） */
.home-slides .slide-media-el.pos-top-left,
.home-slides .slide-media-el.pos-top-right,
.home-slides .slide-media-el.pos-top-center,
.home-slides .slide-media-el.pos-bottom-left,
.home-slides .slide-media-el.pos-bottom-right,
.home-slides .slide-media-el.pos-bottom-center,
.home-slides .slide-media-el.pos-middle-left,
.home-slides .slide-media-el.pos-middle-right {
    width: auto; height: auto;
    max-width: 46%; max-height: 62%;
    padding: 0;
}
.home-slides .slide-media-el.pos-top-left { left: 4%; top: 4%; }
.home-slides .slide-media-el.pos-top-right { right: 4%; top: 4%; }
.home-slides .slide-media-el.pos-bottom-left { left: 4%; bottom: 4%; }
.home-slides .slide-media-el.pos-bottom-right { right: 4%; bottom: 4%; }
.home-slides .slide-media-el.pos-top-center { left: 50%; top: 4%; transform: translateX(-50%); }
.home-slides .slide-media-el.pos-bottom-center { left: 50%; bottom: 4%; transform: translateX(-50%); }
.home-slides .slide-media-el.pos-middle-left { left: 4%; top: 50%; transform: translateY(-50%); }
.home-slides .slide-media-el.pos-middle-right { right: 4%; top: 50%; transform: translateY(-50%); }
.home-slides .slide-media-el.pos-top-left .slide-media-el-img,
.home-slides .slide-media-el.pos-top-right .slide-media-el-img,
.home-slides .slide-media-el.pos-top-center .slide-media-el-img,
.home-slides .slide-media-el.pos-bottom-left .slide-media-el-img,
.home-slides .slide-media-el.pos-bottom-right .slide-media-el-img,
.home-slides .slide-media-el.pos-bottom-center .slide-media-el-img,
.home-slides .slide-media-el.pos-middle-left .slide-media-el-img,
.home-slides .slide-media-el.pos-middle-right .slide-media-el-img,
.home-slides .slide-media-el.pos-top-left .slide-media-el-video,
.home-slides .slide-media-el.pos-top-right .slide-media-el-video,
.home-slides .slide-media-el.pos-top-center .slide-media-el-video,
.home-slides .slide-media-el.pos-bottom-left .slide-media-el-video,
.home-slides .slide-media-el.pos-bottom-right .slide-media-el-video,
.home-slides .slide-media-el.pos-bottom-center .slide-media-el-video,
.home-slides .slide-media-el.pos-middle-left .slide-media-el-video,
.home-slides .slide-media-el.pos-middle-right .slide-media-el-video {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

/* 多图浮层 */
.home-slides .slide-extra-el {
    position: absolute;
    max-width: 60%;
    max-height: 82%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    pointer-events: none;
}
.home-slides .slide-extra-el.pos-left { left: 4%; top: 50%; transform: translateY(-50%); }
.home-slides .slide-extra-el.pos-right { right: 4%; top: 50%; transform: translateY(-50%); }
.home-slides .slide-extra-el.pos-center { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.home-slides .slide-extra-el.pos-top-left { left: 4%; top: 4%; }
.home-slides .slide-extra-el.pos-top-right { right: 4%; top: 4%; }
.home-slides .slide-extra-el.pos-bottom-left { left: 4%; bottom: 4%; }
.home-slides .slide-extra-el.pos-bottom-right { right: 4%; bottom: 4%; }
.home-slides .slide-extra-el.pos-top-center { left: 50%; top: 4%; transform: translateX(-50%); }
.home-slides .slide-extra-el.pos-bottom-center { left: 50%; bottom: 4%; transform: translateX(-50%); }
.home-slides .slide-extra-el.pos-middle-left { left: 4%; top: 50%; transform: translateY(-50%); }
.home-slides .slide-extra-el.pos-middle-right { right: 4%; top: 50%; transform: translateY(-50%); }

/* 主图 / 多图 动画（仅当前激活张执行） */
.home-slides .carousel-item.active .media-anim-fade-up { animation: slideFadeUp 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-fade-down { animation: slideFadeDown 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-zoom-in { animation: slideZoomIn 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-slide-left { animation: slideFromLeft 0.7s ease both; }
/* 新增动画 */
.home-slides .carousel-item.active .media-anim-fade { animation: slideFade 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-zoom-out { animation: slideZoomOut 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-slide-right { animation: slideFromRight 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-slide-up { animation: slideFromBottom 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-slide-down { animation: slideFromTop 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-flip-x { animation: slideFlipX 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-flip-y { animation: slideFlipY 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-rotate-in { animation: slideRotateIn 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-bounce-in { animation: slideBounceIn 0.75s ease both; }
.home-slides .carousel-item.active .media-anim-elastic { animation: slideElastic 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-blur-in { animation: slideBlurIn 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-reveal-up { animation: slideRevealUp 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-reveal-left { animation: slideRevealLeft 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-scale-up { animation: slideScaleUp 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-parallax { animation: slideParallax 0.8s ease both; }
/* 新增主图/多图动画 */
.home-slides .carousel-item.active .media-anim-swing { animation: slideSwing 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-light-speed { animation: slideLightSpeed 0.7s ease-out both; }
.home-slides .carousel-item.active .media-anim-roll-in { animation: slideRollIn 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-jack-box { animation: slideJackBox 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-glitch { animation: slideGlitch 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-float-up { animation: slideFloatUp 0.8s ease both; }
.home-slides .carousel-item.active .media-anim-expand-out { animation: slideExpandOut 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-wobble { animation: slideWobble 0.7s ease both; }
.home-slides .carousel-item.active .media-anim-drop-in { animation: slideDropIn 0.7s ease both; }

.home-slides .slide-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.home-slides .slide-overlay .container {
    position: relative;
    height: 100%;
    pointer-events: none;
}

.home-slides .slide-caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 3rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

/* 整块位置：仅当元素未单独设位置时生效，控制堆叠流的 对齐 / 垂直分布 */
.home-slides .slide-caption.pos-bottom-left { align-items: flex-start; justify-content: flex-end; text-align: left; }
.home-slides .slide-caption.pos-bottom-right { align-items: flex-end; justify-content: flex-end; text-align: right; }
.home-slides .slide-caption.pos-middle-left { align-items: flex-start; text-align: left; }
.home-slides .slide-caption.pos-middle-right { align-items: flex-end; text-align: right; }
.home-slides .slide-caption.pos-top-left { align-items: flex-start; justify-content: flex-start; text-align: left; }
.home-slides .slide-caption.pos-top-right { align-items: flex-end; justify-content: flex-start; text-align: right; }
.home-slides .slide-caption.pos-center { align-items: center; text-align: center; }
.home-slides .slide-caption.pos-top-center { align-items: center; justify-content: flex-start; text-align: center; }
.home-slides .slide-caption.pos-bottom-center { align-items: center; justify-content: flex-end; text-align: center; }

/* 元素级独立定位包装层 .slide-el：标题 / 描述 / 按钮 各自锚定到 11 个方位（脱离堆叠流）
   定位 transform 写在此层；动画 transform 写在内部 .slide-title/.slide-desc/.slide-btn，二者分离不冲突 */
.home-slides .slide-el { max-width: min(92%, 760px); pointer-events: auto; }
.home-slides .slide-el.pos-left { position: absolute; left: 4%; top: 50%; transform: translateY(-50%); text-align: left; }
.home-slides .slide-el.pos-right { position: absolute; right: 4%; top: 50%; transform: translateY(-50%); text-align: right; }
.home-slides .slide-el.pos-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; }
.home-slides .slide-el.pos-top-left { position: absolute; left: 4%; top: 4%; text-align: left; }
.home-slides .slide-el.pos-middle-left { position: absolute; left: 4%; top: 50%; transform: translateY(-50%); text-align: left; }
.home-slides .slide-el.pos-bottom-left { position: absolute; left: 4%; bottom: 4%; text-align: left; }
.home-slides .slide-el.pos-top-center { position: absolute; left: 50%; top: 4%; transform: translateX(-50%); text-align: center; }
.home-slides .slide-el.pos-bottom-center { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); text-align: center; }
.home-slides .slide-el.pos-top-right { position: absolute; right: 4%; top: 4%; text-align: right; }
.home-slides .slide-el.pos-middle-right { position: absolute; right: 4%; top: 50%; transform: translateY(-50%); text-align: right; }
.home-slides .slide-el.pos-bottom-right { position: absolute; right: 4%; bottom: 4%; text-align: right; }

.home-slides .slide-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.home-slides .slide-desc {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    line-height: 1.5;
}

.home-slides .slide-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1.25rem;
    background: linear-gradient(135deg, #2E7D32 0%, #43A047 100%);
    color: #fff;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s, box-shadow 0.25s;
}

.home-slides .slide-link:hover .slide-btn {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* 轮播指示器 */
.home-slides .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    margin: 0 5px;
    background: rgba(255, 255, 255, 0.55);
    transition: background 0.25s, transform 0.25s;
}

.home-slides .carousel-indicators button.active {
    background: #fff;
    transform: scale(1.2);
}

/* 左右控制 */
.home-slides .carousel-control-prev,
.home-slides .carousel-control-next {
    width: 8%;
    opacity: 0.7;
}

.home-slides .carousel-control-prev:hover,
.home-slides .carousel-control-next:hover {
    opacity: 1;
}

.home-slides .carousel-control-prev-icon,
.home-slides .carousel-control-next-icon {
    width: 2.2rem;
    height: 2.2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* 文字进入动画 */
.home-slides .carousel-item.active .anim-fade-up .slide-title,
.home-slides .carousel-item.active .anim-fade-up .slide-desc,
.home-slides .carousel-item.active .anim-fade-up .slide-btn {
    opacity: 0;
    animation: slideFadeUp 0.7s ease forwards;
}

.home-slides .carousel-item.active .anim-fade-down .slide-title,
.home-slides .carousel-item.active .anim-fade-down .slide-desc,
.home-slides .carousel-item.active .anim-fade-down .slide-btn {
    opacity: 0;
    animation: slideFadeDown 0.7s ease forwards;
}

.home-slides .carousel-item.active .anim-zoom-in .slide-title,
.home-slides .carousel-item.active .anim-zoom-in .slide-desc,
.home-slides .carousel-item.active .anim-zoom-in .slide-btn {
    opacity: 0;
    animation: slideZoomIn 0.7s ease forwards;
}

.home-slides .carousel-item.active .anim-slide-left .slide-title,
.home-slides .carousel-item.active .anim-slide-left .slide-desc,
.home-slides .carousel-item.active .anim-slide-left .slide-btn {
    opacity: 0;
    animation: slideFromLeft 0.7s ease forwards;
}

.home-slides .carousel-item.active .anim-fade-up .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-fade-up .slide-btn { animation-delay: 0.24s; }
.home-slides .carousel-item.active .anim-fade-down .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-fade-down .slide-btn { animation-delay: 0.24s; }
.home-slides .carousel-item.active .anim-zoom-in .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-zoom-in .slide-btn { animation-delay: 0.24s; }
.home-slides .carousel-item.active .anim-slide-left .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-slide-left .slide-btn { animation-delay: 0.24s; }

/* === 文字元素级独立动画（标题/描述/按钮各自带 anim-* 类） === */
.home-slides .carousel-item.active .slide-title.anim-fade,.home-slides .carousel-item.active .slide-desc.anim-fade,.home-slides .carousel-item.active .slide-btn.anim-fade{opacity:0;animation:slideFade .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-fade-up,.home-slides .carousel-item.active .slide-desc.anim-fade-up,.home-slides .carousel-item.active .slide-btn.anim-fade-up{opacity:0;animation:slideFadeUp .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-fade-down,.home-slides .carousel-item.active .slide-desc.anim-fade-down,.home-slides .carousel-item.active .slide-btn.anim-fade-down{opacity:0;animation:slideFadeDown .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-zoom-in,.home-slides .carousel-item.active .slide-desc.anim-zoom-in,.home-slides .carousel-item.active .slide-btn.anim-zoom-in{opacity:0;animation:slideZoomIn .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-zoom-out,.home-slides .carousel-item.active .slide-desc.anim-zoom-out,.home-slides .carousel-item.active .slide-btn.anim-zoom-out{opacity:0;animation:slideZoomOut .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-slide-left,.home-slides .carousel-item.active .slide-desc.anim-slide-left,.home-slides .carousel-item.active .slide-btn.anim-slide-left{opacity:0;animation:slideFromLeft .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-slide-right,.home-slides .carousel-item.active .slide-desc.anim-slide-right,.home-slides .carousel-item.active .slide-btn.anim-slide-right{opacity:0;animation:slideFromRight .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-slide-up,.home-slides .carousel-item.active .slide-desc.anim-slide-up,.home-slides .carousel-item.active .slide-btn.anim-slide-up{opacity:0;animation:slideFromBottom .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-slide-down,.home-slides .carousel-item.active .slide-desc.anim-slide-down,.home-slides .carousel-item.active .slide-btn.anim-slide-down{opacity:0;animation:slideFromTop .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-flip-x,.home-slides .carousel-item.active .slide-desc.anim-flip-x,.home-slides .carousel-item.active .slide-btn.anim-flip-x{opacity:0;animation:slideFlipX .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-flip-y,.home-slides .carousel-item.active .slide-desc.anim-flip-y,.home-slides .carousel-item.active .slide-btn.anim-flip-y{opacity:0;animation:slideFlipY .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-rotate-in,.home-slides .carousel-item.active .slide-desc.anim-rotate-in,.home-slides .carousel-item.active .slide-btn.anim-rotate-in{opacity:0;animation:slideRotateIn .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-bounce-in,.home-slides .carousel-item.active .slide-desc.anim-bounce-in,.home-slides .carousel-item.active .slide-btn.anim-bounce-in{opacity:0;animation:slideBounceIn .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-elastic,.home-slides .carousel-item.active .slide-desc.anim-elastic,.home-slides .carousel-item.active .slide-btn.anim-elastic{opacity:0;animation:slideElastic .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-blur-in,.home-slides .carousel-item.active .slide-desc.anim-blur-in,.home-slides .carousel-item.active .slide-btn.anim-blur-in{opacity:0;animation:slideBlurIn .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-reveal-up,.home-slides .carousel-item.active .slide-desc.anim-reveal-up,.home-slides .carousel-item.active .slide-btn.anim-reveal-up{opacity:0;animation:slideRevealUp .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-reveal-left,.home-slides .carousel-item.active .slide-desc.anim-reveal-left,.home-slides .carousel-item.active .slide-btn.anim-reveal-left{opacity:0;animation:slideRevealLeft .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-scale-up,.home-slides .carousel-item.active .slide-desc.anim-scale-up,.home-slides .carousel-item.active .slide-btn.anim-scale-up{opacity:0;animation:slideScaleUp .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-parallax,.home-slides .carousel-item.active .slide-desc.anim-parallax,.home-slides .carousel-item.active .slide-btn.anim-parallax{opacity:0;animation:slideParallax .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-swing,.home-slides .carousel-item.active .slide-desc.anim-swing,.home-slides .carousel-item.active .slide-btn.anim-swing{opacity:0;animation:slideSwing .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-light-speed,.home-slides .carousel-item.active .slide-desc.anim-light-speed,.home-slides .carousel-item.active .slide-btn.anim-light-speed{opacity:0;animation:slideLightSpeed .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-roll-in,.home-slides .carousel-item.active .slide-desc.anim-roll-in,.home-slides .carousel-item.active .slide-btn.anim-roll-in{opacity:0;animation:slideRollIn .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-jack-box,.home-slides .carousel-item.active .slide-desc.anim-jack-box,.home-slides .carousel-item.active .slide-btn.anim-jack-box{opacity:0;animation:slideJackBox .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-glitch,.home-slides .carousel-item.active .slide-desc.anim-glitch,.home-slides .carousel-item.active .slide-btn.anim-glitch{opacity:0;animation:slideGlitch .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-float-up,.home-slides .carousel-item.active .slide-desc.anim-float-up,.home-slides .carousel-item.active .slide-btn.anim-float-up{opacity:0;animation:slideFloatUp .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-expand-out,.home-slides .carousel-item.active .slide-desc.anim-expand-out,.home-slides .carousel-item.active .slide-btn.anim-expand-out{opacity:0;animation:slideExpandOut .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-wobble,.home-slides .carousel-item.active .slide-desc.anim-wobble,.home-slides .carousel-item.active .slide-btn.anim-wobble{opacity:0;animation:slideWobble .7s ease forwards}
.home-slides .carousel-item.active .slide-title.anim-drop-in,.home-slides .carousel-item.active .slide-desc.anim-drop-in,.home-slides .carousel-item.active .slide-btn.anim-drop-in{opacity:0;animation:slideDropIn .7s ease forwards}
/* 元素级动画错峰延迟（与旧整块逻辑一致：描述 0.12s、按钮 0.24s） */
.home-slides .carousel-item.active .slide-desc[class*="anim-"]{animation-delay:.12s}
.home-slides .carousel-item.active .slide-btn[class*="anim-"]{animation-delay:.24s}

/* --- 新增文字动画 --- */
/* fade */
.home-slides .carousel-item.active .anim-fade .slide-title,
.home-slides .carousel-item.active .anim-fade .slide-desc,
.home-slides .carousel-item.active .anim-fade .slide-btn { opacity: 0; animation: slideFade 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-fade .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-fade .slide-btn { animation-delay: 0.24s; }
/* zoom-out */
.home-slides .carousel-item.active .anim-zoom-out .slide-title,
.home-slides .carousel-item.active .anim-zoom-out .slide-desc,
.home-slides .carousel-item.active .anim-zoom-out .slide-btn { opacity: 0; animation: slideZoomOut 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-zoom-out .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-zoom-out .slide-btn { animation-delay: 0.24s; }
/* slide-right */
.home-slides .carousel-item.active .anim-slide-right .slide-title,
.home-slides .carousel-item.active .anim-slide-right .slide-desc,
.home-slides .carousel-item.active .anim-slide-right .slide-btn { opacity: 0; animation: slideFromRight 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-slide-right .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-slide-right .slide-btn { animation-delay: 0.24s; }
/* slide-up */
.home-slides .carousel-item.active .anim-slide-up .slide-title,
.home-slides .carousel-item.active .anim-slide-up .slide-desc,
.home-slides .carousel-item.active .anim-slide-up .slide-btn { opacity: 0; animation: slideFromBottom 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-slide-up .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-slide-up .slide-btn { animation-delay: 0.24s; }
/* slide-down */
.home-slides .carousel-item.active .anim-slide-down .slide-title,
.home-slides .carousel-item.active .anim-slide-down .slide-desc,
.home-slides .carousel-item.active .anim-slide-down .slide-btn { opacity: 0; animation: slideFromTop 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-slide-down .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-slide-down .slide-btn { animation-delay: 0.24s; }
/* flip-x */
.home-slides .carousel-item.active .anim-flip-x .slide-title,
.home-slides .carousel-item.active .anim-flip-x .slide-desc,
.home-slides .carousel-item.active .anim-flip-x .slide-btn { opacity: 0; animation: slideFlipX 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-flip-x .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-flip-x .slide-btn { animation-delay: 0.24s; }
/* flip-y */
.home-slides .carousel-item.active .anim-flip-y .slide-title,
.home-slides .carousel-item.active .anim-flip-y .slide-desc,
.home-slides .carousel-item.active .anim-flip-y .slide-btn { opacity: 0; animation: slideFlipY 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-flip-y .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-flip-y .slide-btn { animation-delay: 0.24s; }
/* rotate-in */
.home-slides .carousel-item.active .anim-rotate-in .slide-title,
.home-slides .carousel-item.active .anim-rotate-in .slide-desc,
.home-slides .carousel-item.active .anim-rotate-in .slide-btn { opacity: 0; animation: slideRotateIn 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-rotate-in .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-rotate-in .slide-btn { animation-delay: 0.24s; }
/* bounce-in */
.home-slides .carousel-item.active .anim-bounce-in .slide-title,
.home-slides .carousel-item.active .anim-bounce-in .slide-desc,
.home-slides .carousel-item.active .anim-bounce-in .slide-btn { opacity: 0; animation: slideBounceIn 0.75s ease forwards; }
.home-slides .carousel-item.active .anim-bounce-in .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-bounce-in .slide-btn { animation-delay: 0.24s; }
/* elastic */
.home-slides .carousel-item.active .anim-elastic .slide-title,
.home-slides .carousel-item.active .anim-elastic .slide-desc,
.home-slides .carousel-item.active .anim-elastic .slide-btn { opacity: 0; animation: slideElastic 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-elastic .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-elastic .slide-btn { animation-delay: 0.24s; }
/* blur-in */
.home-slides .carousel-item.active .anim-blur-in .slide-title,
.home-slides .carousel-item.active .anim-blur-in .slide-desc,
.home-slides .carousel-item.active .anim-blur-in .slide-btn { opacity: 0; animation: slideBlurIn 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-blur-in .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-blur-in .slide-btn { animation-delay: 0.24s; }
/* reveal-up */
.home-slides .carousel-item.active .anim-reveal-up .slide-title,
.home-slides .carousel-item.active .anim-reveal-up .slide-desc,
.home-slides .carousel-item.active .anim-reveal-up .slide-btn { opacity: 0; animation: slideRevealUp 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-reveal-up .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-reveal-up .slide-btn { animation-delay: 0.24s; }
/* reveal-left */
.home-slides .carousel-item.active .anim-reveal-left .slide-title,
.home-slides .carousel-item.active .anim-reveal-left .slide-desc,
.home-slides .carousel-item.active .anim-reveal-left .slide-btn { opacity: 0; animation: slideRevealLeft 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-reveal-left .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-reveal-left .slide-btn { animation-delay: 0.24s; }
/* scale-up */
.home-slides .carousel-item.active .anim-scale-up .slide-title,
.home-slides .carousel-item.active .anim-scale-up .slide-desc,
.home-slides .carousel-item.active .anim-scale-up .slide-btn { opacity: 0; animation: slideScaleUp 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-scale-up .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-scale-up .slide-btn { animation-delay: 0.24s; }
/* parallax */
.home-slides .carousel-item.active .anim-parallax .slide-title,
.home-slides .carousel-item.active .anim-parallax .slide-desc,
.home-slides .carousel-item.active .anim-parallax .slide-btn { opacity: 0; animation: slideParallax 0.8s ease forwards; }
.home-slides .carousel-item.active .anim-parallax .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-parallax .slide-btn { animation-delay: 0.24s; }

/* --- 新增文字动画 --- */
/* random 不设固定动画，由 PHP 在服务端解析为具体动画值 */
/* swing */
.home-slides .carousel-item.active .anim-swing .slide-title,
.home-slides .carousel-item.active .anim-swing .slide-desc,
.home-slides .carousel-item.active .anim-swing .slide-btn { opacity: 0; animation: slideSwing 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-swing .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-swing .slide-btn { animation-delay: 0.24s; }
/* light-speed */
.home-slides .carousel-item.active .anim-light-speed .slide-title,
.home-slides .carousel-item.active .anim-light-speed .slide-desc,
.home-slides .carousel-item.active .anim-light-speed .slide-btn { opacity: 0; animation: slideLightSpeed 0.7s ease-out forwards; }
.home-slides .carousel-item.active .anim-light-speed .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-light-speed .slide-btn { animation-delay: 0.24s; }
/* roll-in */
.home-slides .carousel-item.active .anim-roll-in .slide-title,
.home-slides .carousel-item.active .anim-roll-in .slide-desc,
.home-slides .carousel-item.active .anim-roll-in .slide-btn { opacity: 0; animation: slideRollIn 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-roll-in .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-roll-in .slide-btn { animation-delay: 0.24s; }
/* jack-box */
.home-slides .carousel-item.active .anim-jack-box .slide-title,
.home-slides .carousel-item.active .anim-jack-box .slide-desc,
.home-slides .carousel-item.active .anim-jack-box .slide-btn { opacity: 0; animation: slideJackBox 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-jack-box .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-jack-box .slide-btn { animation-delay: 0.24s; }
/* glitch */
.home-slides .carousel-item.active .anim-glitch .slide-title,
.home-slides .carousel-item.active .anim-glitch .slide-desc,
.home-slides .carousel-item.active .anim-glitch .slide-btn { opacity: 0; animation: slideGlitch 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-glitch .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-glitch .slide-btn { animation-delay: 0.24s; }
/* float-up */
.home-slides .carousel-item.active .anim-float-up .slide-title,
.home-slides .carousel-item.active .anim-float-up .slide-desc,
.home-slides .carousel-item.active .anim-float-up .slide-btn { opacity: 0; animation: slideFloatUp 0.8s ease forwards; }
.home-slides .carousel-item.active .anim-float-up .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-float-up .slide-btn { animation-delay: 0.24s; }
/* expand-out */
.home-slides .carousel-item.active .anim-expand-out .slide-title,
.home-slides .carousel-item.active .anim-expand-out .slide-desc,
.home-slides .carousel-item.active .anim-expand-out .slide-btn { opacity: 0; animation: slideExpandOut 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-expand-out .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-expand-out .slide-btn { animation-delay: 0.24s; }
/* wobble */
.home-slides .carousel-item.active .anim-wobble .slide-title,
.home-slides .carousel-item.active .anim-wobble .slide-desc,
.home-slides .carousel-item.active .anim-wobble .slide-btn { opacity: 0; animation: slideWobble 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-wobble .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-wobble .slide-btn { animation-delay: 0.24s; }
/* drop-in */
.home-slides .carousel-item.active .anim-drop-in .slide-title,
.home-slides .carousel-item.active .anim-drop-in .slide-desc,
.home-slides .carousel-item.active .anim-drop-in .slide-btn { opacity: 0; animation: slideDropIn 0.7s ease forwards; }
.home-slides .carousel-item.active .anim-drop-in .slide-desc { animation-delay: 0.12s; }
.home-slides .carousel-item.active .anim-drop-in .slide-btn { animation-delay: 0.24s; }

@keyframes slideFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideFadeDown {
    from { opacity: 0; transform: translateY(-24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideZoomIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes slideFromLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* --- 新增关键帧 --- */
@keyframes slideFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideZoomOut {
    from { opacity: 0; transform: scale(1.15); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes slideFromRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideFromBottom {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideFromTop {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideFlipX {
    from { opacity: 0; transform: perspective(800px) rotateY(-90deg); }
    to   { opacity: 1; transform: perspective(800px) rotateY(0); }
}
@keyframes slideFlipY {
    from { opacity: 0; transform: perspective(800px) rotateX(-90deg); }
    to   { opacity: 1; transform: perspective(800px) rotateX(0); }
}
@keyframes slideRotateIn {
    from { opacity: 0; transform: rotate(-8deg) scale(0.9); }
    to   { opacity: 1; transform: rotate(0) scale(1); }
}
@keyframes slideBounceIn {
    0%   { opacity: 0; transform: scale(0.3); }
    50%  { opacity: 1; transform: scale(1.05); }
    70%  { transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes slideElastic {
    0%   { opacity: 0; transform: scale(0); }
    60%  { opacity: 1; transform: scale(1.25); }
    80%  { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes slideBlurIn {
    from { opacity: 0; filter: blur(8px); }
    to   { opacity: 1; filter: blur(0); }
}
@keyframes slideRevealUp {
    from { opacity: 0; clip-path: inset(100% 0 0 0); }
    to   { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes slideRevealLeft {
    from { opacity: 0; clip-path: inset(0 0 0 100%); }
    to   { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes slideScaleUp {
    from { opacity: 0; transform: translateY(40px) scale(0.8); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideParallax {
    0%   { opacity: 0; transform: translateY(20px); }
    60%  { opacity: 1; transform: translateY(-5px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* --- 新增 @keyframes --- */
@keyframes slideSwing {
    0%   { opacity: 0; transform: rotate(-15deg); transform-origin: top center; }
    60%  { opacity: 1; transform: rotate(5deg); }
    80%  { transform: rotate(-3deg); }
    100% { opacity: 1; transform: rotate(0); }
}
@keyframes slideLightSpeed {
    from { opacity: 0; transform: translateX(80px) skewX(-20deg); filter: brightness(2); }
    60%  { opacity: 1; transform: translateX(-10px) skewX(3deg); filter: brightness(1.3); }
    80%  { transform: translateX(3px) skewX(-1deg); filter: brightness(1); }
    to   { opacity: 1; transform: translateX(0) skewX(0); filter: brightness(1); }
}
@keyframes slideRollIn {
    from { opacity: 0; transform: translateX(-100%) rotate(-120deg); }
    to   { opacity: 1; transform: translateX(0) rotate(0); }
}
@keyframes slideJackBox {
    0%   { opacity: 0; transform: scale(0) rotate(15deg); }
    50%  { opacity: 0.8; transform: scale(1.1) rotate(-5deg); }
    70%  { transform: scale(0.95) rotate(3deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes slideGlitch {
    0%   { opacity: 0; transform: translate(0); clip-path: inset(0 0 0 0); }
    10%  { opacity: 0.8; transform: translate(-3px, 2px); clip-path: inset(20% 0 60% 0); }
    20%  { opacity: 1; transform: translate(3px, -1px); clip-path: inset(50% 0 30% 0); }
    30%  { opacity: 0.9; transform: translate(-2px, -2px); clip-path: inset(80% 0 5% 0); }
    40%  { opacity: 1; transform: translate(0); clip-path: inset(10% 0 70% 0); }
    50%  { opacity: 1; transform: translate(2px, 3px); clip-path: inset(40% 0 40% 0); }
    60%  { opacity: 1; transform: translate(-1px, -1px); clip-path: inset(0 0 80% 0); }
    80%  { opacity: 1; transform: translate(1px, 1px); clip-path: inset(0 0 0 0); }
    100% { opacity: 1; transform: translate(0); clip-path: inset(0 0 0 0); }
}
@keyframes slideFloatUp {
    0%   { opacity: 0; transform: translateY(30px); }
    50%  { opacity: 1; transform: translateY(-8px); }
    70%  { transform: translateY(3px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes slideExpandOut {
    from { opacity: 0; transform: scale(0.3); filter: blur(4px); }
    to   { opacity: 1; transform: scale(1); filter: blur(0); }
}
@keyframes slideWobble {
    0%   { opacity: 0; transform: translateX(-15px); }
    15%  { opacity: 1; transform: translateX(12px); }
    30%  { transform: translateX(-10px); }
    45%  { transform: translateX(8px); }
    60%  { transform: translateX(-5px); }
    75%  { transform: translateX(3px); }
    90%  { transform: translateX(-1px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes slideDropIn {
    0%   { opacity: 0; transform: translateY(-60px); animation-timing-function: ease-in; }
    40%  { opacity: 1; transform: translateY(5px); animation-timing-function: ease-out; }
    60%  { transform: translateY(-15px); animation-timing-function: ease-in; }
    75%  { transform: translateY(3px); animation-timing-function: ease-out; }
    85%  { transform: translateY(-6px); }
    92%  { transform: translateY(2px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* 响应式：平板 */
@media (max-width: 991px) {
    .home-slides {
        --slide-height: 260px;
        border-radius: 12px;
    }
    .home-slides .slide-title { font-size: 1.5rem; }
    .home-slides .slide-desc { font-size: 0.9rem; }
    .home-slides .slide-caption { max-width: 420px; padding: 1rem; }
}

/* 响应式：手机 */
@media (max-width: 640px) {
    .home-slides {
        --slide-height: 200px;
        border-radius: 10px;
        margin: 1rem 0;
    }
    .home-slides .slide-title { font-size: 1.15rem; margin-bottom: 0.25rem; }
    .home-slides .slide-desc { font-size: 0.8rem; margin-bottom: 0.6rem; }
    .home-slides .slide-btn { padding: 0.4rem 1rem; font-size: 0.8rem; }
    .home-slides .slide-caption {
        max-width: 70%;
        padding: 0.75rem;
    }
    .home-slides .carousel-control-prev,
    .home-slides .carousel-control-next { width: 10%; }
    .home-slides .carousel-control-prev-icon,
    .home-slides .carousel-control-next-icon { width: 1.6rem; height: 1.6rem; }
}

/* 添加表单 */
.add-contact-form {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8faf8;
    border-radius: 12px;
    border: 2px solid #e8e8e8;
}

.add-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.add-form-row select,
.add-form-row input {
    padding: 0.65rem 0.85rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
}

.add-form-row select:focus,
.add-form-row input:focus {
    outline: none;
    border-color: #2E7D32;
}

.add-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.tea-btn-primary-sm {
    flex: 1;
    padding: 0.6rem;
    background: linear-gradient(135deg, #2E7D32 0%, #388E3C 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tea-btn-primary-sm:hover {
    background: linear-gradient(135deg, #388E3C 0%, #43A047 100%);
}

.tea-btn-secondary-sm {
    flex: 1;
    padding: 0.6rem;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tea-btn-secondary-sm:hover {
    background: #fff;
    border-color: #ccc;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .manage-contact-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .contact-drag-handle {
        order: 1;
    }
    
    .contact-type-icon {
        order: 2;
    }
    
    .contact-info {
        order: 4;
        width: 100%;
    }
    
    .contact-toggle {
        order: 3;
        margin-left: auto;
    }
    
    .contact-delete {
        order: 5;
    }
}

/* ==================== 每日茶语叠加层（搜索框内） ==================== */
#daily-tea-overlay {
    position: absolute;
    top: 0;
    left: 2.9rem;
    right: 3.2rem;
    bottom: 0;
    display: flex;
    align-items: center;
    z-index: 4;
    cursor: text;
}
#daily-tea-overlay .tea-ad-marquee {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    line-height: normal;
    padding: 0;
    text-align: left;
    background: transparent !important;
    box-shadow: none !important;
}
#daily-tea-overlay .tea-ad-item {
    display: flex;
    align-items: center;
    background: transparent !important;
    box-shadow: none !important;
    padding-left: 0.25rem;
}
#daily-tea-overlay .tea-ad-item a {
    pointer-events: auto;
    text-decoration: none;
}
/* 悬停/按钮暂停时，冻结文字动画（如 scroll-left 滚动），让"悬停"真正定格 */
.tea-ad-marquee.tea-ad-paused .tea-ad-item,
.tea-ad-marquee.tea-ad-paused .tea-ad-track,
.tea-ad-marquee.tea-ad-paused .tea-ad-item * {
    animation-play-state: paused !important;
}
/* 触摸设备暂停/播放按钮：桌面用悬停暂停，故默认隐藏，仅 @media(hover:none) 显示 */
.daily-tea-toggle {
    display: none;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(46, 125, 50, 0.12);
    color: #2e7d32;
    font-size: 0.7rem;
    line-height: 1;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.daily-tea-toggle:active {
    background: rgba(46, 125, 50, 0.25);
}
/* 关联茶叶的茶语可点击（联动搜索） */
.tea-ad-marquee .tea-ad-item.tea-ad-clickable {
    cursor: pointer;
}
.tea-ad-marquee .tea-ad-item.tea-ad-clickable:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}
@media (hover: none) {
    .daily-tea-toggle { display: inline-flex; }
}
@media (max-width: 767px) {
    #daily-tea-overlay { left: 2.6rem; right: 3.2rem; }
}

/* ==================== 茶叶详情弹窗文字广告 ==================== */
.tea-ad-marquee {
    position: relative;
    height: 32px;
    line-height: 32px;
    padding: 0 1rem;
    text-align: center;
    white-space: nowrap;
}

.tea-ad-item {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 999px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
    overflow: hidden;
}

.tea-ad-item.active {
    opacity: 1;
    pointer-events: auto;
}

/* 透明背景：去掉内阴影 */
.tea-ad-item[style*="background:transparent"],
.tea-ad-item[style*="background: transparent"] {
    box-shadow: none;
}

/* 滑动切换 */
.tea-ad-marquee.transition-slide .tea-ad-item {
    transform: translateX(100%);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.tea-ad-marquee.transition-slide .tea-ad-item.active {
    transform: translateX(0);
    opacity: 1;
}

.tea-ad-marquee.transition-slide .tea-ad-item.prev {
    transform: translateX(-100%);
    opacity: 0;
}

.tea-ad-marquee.transition-none .tea-ad-item {
    transition: none;
}

/* 缩放切换 */
.tea-ad-marquee.transition-zoom .tea-ad-item {
    transform: scale(0.6);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.tea-ad-marquee.transition-zoom .tea-ad-item.active {
    transform: scale(1);
    opacity: 1;
}

/* 翻转切换 */
.tea-ad-marquee.transition-flip .tea-ad-item {
    transform: perspective(400px) rotateX(-90deg);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.35s ease;
}

.tea-ad-marquee.transition-flip .tea-ad-item.active {
    transform: perspective(400px) rotateX(0);
    opacity: 1;
}

/* 旋转切换 */
.tea-ad-marquee.transition-rotate .tea-ad-item {
    transform: rotate(90deg) scale(0.5);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.4s ease;
}

.tea-ad-marquee.transition-rotate .tea-ad-item.active {
    transform: rotate(0) scale(1);
    opacity: 1;
}

/* 弹跳切换 */
.tea-ad-marquee.transition-bounce .tea-ad-item {
    transform: translateY(-25px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.35s ease;
}

.tea-ad-marquee.transition-bounce .tea-ad-item.active {
    transform: translateY(0);
    opacity: 1;
}

/* 上滑切换 */
.tea-ad-marquee.transition-slide-up .tea-ad-item {
    transform: translateY(100%);
    transition: transform 0.45s ease, opacity 0.4s ease;
}
.tea-ad-marquee.transition-slide-up .tea-ad-item.active {
    transform: translateY(0);
    opacity: 1;
}
.tea-ad-marquee.transition-slide-up .tea-ad-item.prev {
    transform: translateY(-100%);
    opacity: 0;
}

/* 下滑切换 */
.tea-ad-marquee.transition-slide-down .tea-ad-item {
    transform: translateY(-100%);
    transition: transform 0.45s ease, opacity 0.4s ease;
}
.tea-ad-marquee.transition-slide-down .tea-ad-item.active {
    transform: translateY(0);
    opacity: 1;
}
.tea-ad-marquee.transition-slide-down .tea-ad-item.prev {
    transform: translateY(100%);
    opacity: 0;
}

/* 翻转(纵向)切换 */
.tea-ad-marquee.transition-flip-y .tea-ad-item {
    transform: perspective(400px) rotateY(-90deg);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.35s ease;
}
.tea-ad-marquee.transition-flip-y .tea-ad-item.active {
    transform: perspective(400px) rotateY(0);
    opacity: 1;
}

/* 模糊切换 */
.tea-ad-marquee.transition-blur .tea-ad-item {
    filter: blur(8px);
    opacity: 0;
    transition: filter 0.5s ease, opacity 0.4s ease;
}
.tea-ad-marquee.transition-blur .tea-ad-item.active {
    filter: blur(0);
    opacity: 1;
}

/* 缩放淡入切换 */
.tea-ad-marquee.transition-zoom-fade .tea-ad-item {
    transform: scale(0.85);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.45s ease;
}
.tea-ad-marquee.transition-zoom-fade .tea-ad-item.active {
    transform: scale(1);
    opacity: 1;
}

/* 擦除切换 */
.tea-ad-marquee.transition-sweep .tea-ad-item {
    clip-path: inset(0 100% 0 0);
    opacity: 1;
    transition: clip-path 0.5s ease;
}
.tea-ad-marquee.transition-sweep .tea-ad-item.active {
    clip-path: inset(0 0 0 0);
}
.tea-ad-marquee.transition-sweep .tea-ad-item.prev {
    clip-path: inset(0 0 0 100%);
}



.tea-ad-track {
    display: inline-block;
    white-space: nowrap;
    will-change: transform, opacity;
}

.tea-ad-track a:hover {
    text-decoration: underline !important;
}

/* 向左滚动 */
.tea-ad-track.anim-scroll-left {
    animation: teaAdScrollLeft var(--ad-speed, 8s) linear infinite;
    padding-left: 100%;
}

/* 向右滚动 */
.tea-ad-track.anim-scroll-right {
    animation: teaAdScrollRight var(--ad-speed, 8s) linear infinite;
    padding-right: 100%;
}

/* 淡入淡出 */
.tea-ad-track.anim-fade {
    animation: teaAdFade var(--ad-speed, 3s) ease-in-out infinite;
}

/* 闪烁 */
.tea-ad-track.anim-flash {
    animation: teaAdFlash 1s step-end infinite;
}

/* 弹跳 */
.tea-ad-track.anim-bounce {
    animation: teaAdBounce var(--ad-speed, 1.2s) ease infinite;
}

/* 脉冲 */
.tea-ad-track.anim-pulse {
    animation: teaAdPulse var(--ad-speed, 1.5s) ease-in-out infinite;
}

/* --- 新增弹窗广告动画 --- */
.tea-ad-track.anim-shake {
    animation: teaAdShake var(--ad-speed, 0.6s) ease-in-out infinite;
}
.tea-ad-track.anim-flip {
    animation: teaAdFlip var(--ad-speed, 2s) ease-in-out infinite;
}
.tea-ad-track.anim-rotate {
    animation: teaAdRotate var(--ad-speed, 2s) ease-in-out infinite;
}
.tea-ad-track.anim-swing {
    animation: teaAdSwing var(--ad-speed, 1.5s) ease-in-out infinite;
}

/* --- 新增弹窗广告文字动画 --- */
.tea-ad-track.anim-zoom {
    animation: teaAdZoom var(--ad-speed, 2s) ease-in-out infinite;
}
.tea-ad-track.anim-slide-up {
    animation: teaAdSlideUp var(--ad-speed, 3s) ease-in-out infinite;
}
.tea-ad-track.anim-slide-down {
    animation: teaAdSlideDown var(--ad-speed, 3s) ease-in-out infinite;
}
.tea-ad-track.anim-glow {
    animation: teaAdGlow var(--ad-speed, 2s) ease-in-out infinite;
}
.tea-ad-track.anim-glitch {
    animation: teaAdGlitch 1.2s steps(2, end) infinite;
}
.tea-ad-track.anim-neon {
    animation: teaAdNeon var(--ad-speed, 1.5s) ease-in-out infinite;
}
.tea-ad-track.anim-blink {
    animation: teaAdBlink 1.2s step-start infinite;
}
.tea-ad-track.anim-tada {
    animation: teaAdTada var(--ad-speed, 1.6s) ease-in-out infinite;
}
.tea-ad-track.anim-wobble {
    animation: teaAdWobble var(--ad-speed, 1.5s) ease-in-out infinite;
}

/* 自定义角标 */
.tea-ad-badge {
    display: inline-block;
    line-height: 1;
    padding: 2px 6px;
    margin: 0 4px;
    border-radius: 4px;
    font-style: normal;
    white-space: nowrap;
    vertical-align: middle;
}

/* 角标贴文字顶部（上标式），不压文字、不裁切 */
.tea-ad-badge--corner {
    position: relative;
    top: -2px;
    vertical-align: top;
    margin: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.tea-ad-badge--top-left {
    margin-right: 2px;
    border-radius: 4px 0 4px 0;
}

.tea-ad-badge--top-right {
    margin-left: 2px;
    border-radius: 0 4px 0 4px;
}

/* 角标动画 */
.tea-ad-badge.anim-pulse  { animation: teaAdBadgePulse 1s ease-in-out infinite; }
.tea-ad-badge.anim-blink  { animation: teaAdBadgeBlink 1s step-end infinite; }
.tea-ad-badge.anim-bounce { animation: teaAdBadgeBounce 1s ease infinite; }
.tea-ad-badge.anim-shake  { animation: teaAdBadgeShake 0.6s ease-in-out infinite; }
.tea-ad-badge.anim-rotate { animation: teaAdBadgeRotate 2s linear infinite; }
.tea-ad-badge.anim-swing  { animation: teaAdBadgeSwing 1.5s ease-in-out infinite; }
.tea-ad-badge.anim-flash  { animation: teaAdFlash 1s step-end infinite; }

@keyframes teaAdBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}
@keyframes teaAdBadgeBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}
@keyframes teaAdBadgeBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
@keyframes teaAdBadgeShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}
@keyframes teaAdBadgeRotate {
    0% { transform: rotate(0); }
    100% { transform: rotate(360deg); }
}
@keyframes teaAdBadgeSwing {
    0% { transform: rotate(0); transform-origin: top center; }
    25% { transform: rotate(6deg); }
    50% { transform: rotate(0); }
    75% { transform: rotate(-6deg); }
    100% { transform: rotate(0); }
}

@keyframes teaAdScrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

@keyframes teaAdScrollRight {
    0% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

@keyframes teaAdFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes teaAdFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes teaAdBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes teaAdPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes teaAdShake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-4px); }
    20% { transform: translateX(4px); }
    30% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    50% { transform: translateX(-2px); }
    60% { transform: translateX(2px); }
    70% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
    90% { transform: translateX(0); }
}

@keyframes teaAdFlip {
    0% { transform: perspective(400px) rotateY(0); }
    40% { transform: perspective(400px) rotateY(180deg); }
    60% { transform: perspective(400px) rotateY(180deg); }
    100% { transform: perspective(400px) rotateY(360deg); }
}

@keyframes teaAdRotate {
    0% { transform: rotate(0); opacity: 1; }
    50% { transform: rotate(180deg); opacity: 0.5; }
    100% { transform: rotate(360deg); opacity: 1; }
}

@keyframes teaAdSwing {
    0% { transform: rotate(0); transform-origin: top center; }
    25% { transform: rotate(4deg); }
    50% { transform: rotate(0); }
    75% { transform: rotate(-4deg); }
    100% { transform: rotate(0); }
}

/* 新增弹窗广告文字动画 keyframes */
@keyframes teaAdZoom {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
@keyframes teaAdSlideUp {
    0% { opacity: 0; transform: translateY(10px); }
    15% { opacity: 1; transform: translateY(0); }
    85% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}
@keyframes teaAdSlideDown {
    0% { opacity: 0; transform: translateY(-10px); }
    15% { opacity: 1; transform: translateY(0); }
    85% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}
@keyframes teaAdGlow {
    0%, 100% { text-shadow: 0 0 2px rgba(255,255,255,0.2); opacity: 0.85; }
    50% { text-shadow: 0 0 10px rgba(255,255,255,0.9); opacity: 1; }
}
@keyframes teaAdGlitch {
    0%, 100% { transform: translateX(0); opacity: 1; }
    20% { transform: translateX(-3px) skewX(8deg); opacity: 0.7; }
    40% { transform: translateX(3px) skewX(-8deg); opacity: 1; }
    60% { transform: translateX(-2px); opacity: 0.8; }
    80% { transform: translateX(2px); opacity: 1; }
}
@keyframes teaAdNeon {
    0%, 100% { text-shadow: 0 0 4px rgba(255,255,255,0.6), 0 0 8px rgba(255,255,255,0.3); opacity: 1; }
    50% { text-shadow: 0 0 12px rgba(255,255,255,1), 0 0 20px rgba(255,255,255,0.6); opacity: 0.85; }
}
@keyframes teaAdBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
@keyframes teaAdTada {
    0% { transform: scale(1); }
    10%, 20% { transform: scale(0.92) rotate(-2deg); }
    30%, 50%, 70%, 90% { transform: scale(1.08) rotate(2deg); }
    40%, 60%, 80% { transform: scale(1.08) rotate(-2deg); }
    100% { transform: scale(1); }
}
@keyframes teaAdWobble {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-12px) rotate(-3deg); }
    30% { transform: translateX(8px) rotate(2deg); }
    45% { transform: translateX(-6px) rotate(-1.5deg); }
    60% { transform: translateX(4px) rotate(1deg); }
    75% { transform: translateX(-2px); }
}

/* 弹窗头部广告移动端适配 */
@media (max-width: 640px) {
    .tea-ad-marquee {
        height: 28px;
        line-height: 28px;
        padding: 0 0.75rem;
    }
}

/* ==================== 茶友圈 · 小红书风格 ==================== */
.community-feed { max-width: 1320px; }
.community-feed-header h4 { font-size: 1.25rem; }

/* 分类标签 */
.community-tabs {
    position: sticky;
    top: 60px;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 0.5rem 0;
    margin: 0 -0.75rem;
}
.community-tabs-inner {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 0.75rem;
}
.community-tabs-inner::-webkit-scrollbar { display: none; }
.community-tab {
    flex-shrink: 0;
    padding: 0.45rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: #666;
    background: #f7f7f7;
    white-space: nowrap;
    transition: all .2s;
}
.community-tab:hover { color: var(--primary); background: #f0f7f0; }
.community-tab.active { color: #fff; background: var(--primary); }

/* 瀑布流 */
.community-waterfall {
    column-count: 5;
    column-gap: 1rem;
}
@media (max-width: 1399px) { .community-waterfall { column-count: 4; } }
@media (max-width: 991px) { .community-waterfall { column-count: 3; } }
@media (max-width: 767px) { .community-waterfall { column-count: 2; column-gap: 0.6rem; } }
@media (max-width: 374px) { .community-waterfall { column-count: 1; } }

.community-card {
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}
.community-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.community-card-media {
    position: relative;
    background: #f5f5f5;
}
.community-card-media img {
    display: block;
    width: 100%;
    height: auto;
}
.community-card-noimg {
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 2rem;
}
.community-card-info { padding: 0.75rem; }
.community-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.community-card-desc {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.community-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.community-card-author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #888;
}
.community-card-author img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}
.community-card-like {
    border: none;
    background: transparent;
    font-size: 0.75rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.4rem;
    border-radius: 50px;
}
.community-card-like:hover { background: #fff0f0; color: #e53935; }
.community-card-like i { font-size: 0.85rem; }

/* 详情弹窗（居中） */
.community-drawer {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2vh 2vw;
    visibility: hidden;
    opacity: 0;
    transition: opacity .3s, visibility .3s;
}
.community-drawer.open { visibility: visible; opacity: 1; }
.community-drawer-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.72);
}
.community-drawer-panel {
    position: relative;
    width: 95vw;
    height: 92vh;
    max-width: 1180px;
    max-height: 860px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    transform: scale(0.96) translateY(12px);
    transition: transform .28s ease;
    display: flex;
    flex-direction: column;
}
.community-drawer.open .community-drawer-panel { transform: scale(1) translateY(0); }
.community-drawer-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.2rem;
    height: 2.2rem;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    color: #fff;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.community-drawer-close:hover { background: rgba(0,0,0,0.7); }
.community-drawer-close-sm { display: none; }
.community-drawer-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.community-drawer-content { display: flex; flex: 1; min-height: 0; }
.community-drawer-media {
    flex: 1 1 55%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
.community-drawer-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.community-drawer-noimg {
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.community-drawer-thumbs {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    padding: 0.4rem;
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
    overflow-x: auto;
    max-width: 90%;
}
.community-drawer-thumbs img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
}
.community-drawer-thumbs img.active { opacity: 1; border-color: #fff; }
.community-drawer-info {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-width: 500px;
}
.community-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 3.4rem 1rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}
.community-drawer-author {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #333;
    font-weight: 600;
}
.community-drawer-author img, .community-drawer-author i {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.community-drawer-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 1rem;
}
.community-drawer-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; }
.community-drawer-text { font-size: 0.95rem; line-height: 1.7; color: #333; margin-bottom: 1rem; word-break: break-word; }
.community-drawer-text img { max-width: 100%; border-radius: 8px; margin: 0.5rem 0; }
.community-drawer-tags { margin-bottom: 0.75rem; }
.community-tag {
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.35rem;
    color: var(--primary);
    font-size: 0.85rem;
}
.community-drawer-time { font-size: 0.8rem; color: #999; margin-bottom: 1rem; }
.community-drawer-actions {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid #f5f5f5;
    border-bottom: 1px solid #f5f5f5;
    margin-bottom: 1rem;
}
.community-drawer-actions button {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #666;
    font-size: 0.9rem;
}
.community-drawer-actions button i { font-size: 1.1rem; }
.community-action-like.active, .community-action-like:hover { color: #e53935; }
.community-action-collect.active { color: #ffb300; }
.community-action-collect:hover { color: #ffb300; }
.community-comment-head { font-weight: 600; margin-bottom: 0.75rem; }
.community-comment { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.community-comment-avatar img, .community-comment-avatar i { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.community-comment-main { flex: 1; }
.community-comment-author { font-size: 0.85rem; font-weight: 600; color: #333; margin-bottom: 0.2rem; }
.community-comment-text { font-size: 0.9rem; color: #444; line-height: 1.5; word-break: break-word; }
.community-comment-time { font-size: 0.75rem; color: #999; margin-top: 0.2rem; }
.community-drawer-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #f0f0f0;
}
.community-comment-form { display: flex; gap: 0.5rem; }
.community-comment-form input { flex: 1; }
.community-drawer-loading {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 移动端弹窗全屏 */
@media (max-width: 991px) {
    .community-drawer { padding: 0; }
    .community-drawer-panel {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    .community-drawer-close { top: 0.8rem; right: 0.8rem; }
    .community-drawer-content { flex-direction: column; }
    .community-drawer-media { flex: none; height: 45vh; }
    .community-drawer-media img { max-height: 45vh; }
    .community-drawer-info { flex: 1; max-width: 100%; min-height: 0; }
    .community-drawer-close-sm { display: none; }
}
@media (max-width: 767px) {
    .community-card-title { font-size: 0.85rem; }
    .community-card-desc { font-size: 0.75rem; }
    .community-tabs { top: 52px; }
    .community-feed { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
}


