/* 
 * 茶叶百科导航系统 - 优化版样式
 * 现代化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;
    text-decoration: none;
    transition: all 0.3s ease;
}

.site-logo-wrapper:hover {
    opacity: 0.85;
}

.site-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    overflow: hidden;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.logo-icon {
    font-size: 24px;
    color: white;
}

.site-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.site-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
    line-height: 1.2;
    margin: 0;
}

.site-slogan {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 移动端适配 */
@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.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    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;
}

/* 滚动偏移 */
.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 {
    padding: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.mobile-detail-btn {
    width: 100%;
    padding: 0.5rem;
    background: linear-gradient(135deg, #2E7D32 0%, #388E3C 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mobile-detail-btn:hover {
    background: linear-gradient(135deg, #388E3C 0%, #43A047 100%);
}

.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 56px 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);
}

/* 搜索结果下拉框 */
.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-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 {
    max-width: 600px;
    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;
    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;
}

/* ==================== 筛选标签 ==================== */
.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 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .tea-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .tea-grid {
        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;
}

/* ==================== 卡片网格 ==================== */
.tea-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .tea-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .tea-grid {
        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);
}

/* 图片容器和悬停遮罩层 */
.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-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;
}

/* ==================== 模态框（动画增强） ==================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
    backdrop-filter: blur(0);
}

.modal-backdrop.visible {
    opacity: 1;
    visibility: visible;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal {
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(30px) scale(0.9);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-backdrop.visible .modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-backdrop:not(.visible) .modal {
    transform: translateY(30px) scale(0.9);
    opacity: 0;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* ==================== 茶叶详情样式 ==================== */
.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);
}

/* ==================== 返回顶部 / 跳转底部按钮 ==================== */
#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);
}

/* ==================== 编辑模式按钮 ==================== */
#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;
}

.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.75rem;
    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: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tea-card .card-overlay p {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    opacity: 0.9;
}

.tea-card .card-overlay .overlay-btn {
    padding: 6px 14px;
    background: white;
    color: var(--primary);
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.75rem;
    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);
}

/* 购买咨询按钮 */
.tea-card .card-overlay .consult-btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    margin-top: 0.4rem;
    padding: 6px 14px;
    border: none;
    font-weight: 600;
    font-size: 0.75rem;
}

.tea-card .card-overlay .consult-btn:hover {
    background: linear-gradient(135deg, #FFA726 0%, #FF9800 100%);
}

.tea-card .card-overlay .consult-btn i {
    color: white;
}

/* 联系咨询模态框样式 */

/* 温馨提示卡片 */
.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;
}

/* ==================== 联系人居中网格布局 ==================== */
.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;
}

.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-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%);
}

/* 详情区块 */
.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;
}

/* 添加表单 */
.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;
    }
}
