/* ========================================
   饮茶者之家 - 高端模板样式系统
   版本: 2.0
   编码: UTF-8
   ======================================== */

/* ========== CSS变量定义 ========== */
:root {
    --primary-color: #5D4E37;      /* 深茶色 */
    --accent-color: #C9A961;       /* 金色 */
    --bg-light: #FDFBF7;           /* 米白 */
    --bg-cream: #F5F1E8;           /* 浅茶 */
    --text-dark: #3D2E17;          /* 深文字 */
    --text-muted: #6B5D4D;         /* 浅文字 */
    --border-color: #E5D4A1;       /* 边框色 */
    --shadow: 0 4px 20px rgba(93,78,55,0.1);
    --shadow-hover: 0 8px 30px rgba(201,169,97,0.2);
    --transition: all 0.3s ease;
}

/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 14px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 顶部公告栏 ========== */
.body-top {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4A3E2B 100%);
    color: white;
    padding: 8px 0;
    font-size: 13px;
}

.body-top .content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#announ {
    flex: 1;
    overflow: hidden;
}

#announ ul {
    display: flex;
    animation: scroll-left 20s linear infinite;
}

#announ li {
    white-space: nowrap;
    padding-right: 50px;
}

#announ a {
    color: #E5D4A1;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.login {
    display: flex;
    gap: 15px;
    align-items: center;
}

.login a {
    color: #E5D4A1;
    font-size: 13px;
}

.login .btn-register {
    background: var(--accent-color);
    color: white;
    padding: 5px 20px;
    border-radius: 15px;
    font-weight: 500;
}

.login .btn-register:hover {
    background: #D4B56A;
    color: white;
}

/* ========== Header主区域 ========== */
.header {
    background: white;
    padding: 25px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header .content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo img {
    height: 60px;
    width: auto;
}

/* ========== 搜索框 ========== */
.search {
    flex: 1;
    max-width: 500px;
}

.search .tab {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.search .tab a {
    color: var(--text-muted);
    font-size: 13px;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.search .tab a.on {
    color: var(--primary-color);
    border-bottom-color: var(--accent-color);
}

.search .bd {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    transition: var(--transition);
}

.search .bd:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(201,169,97,0.1);
}

.search .text {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    outline: none;
}

.search .button {
    background: linear-gradient(135deg, var(--accent-color) 0%, #D4B56A 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search .button:hover {
    opacity: 0.9;
}

/* ========== 导航栏 ========== */
.nav-bar {
    background: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-site {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.nav-site li {
    position: relative;
}

.nav-site li.line {
    color: rgba(255,255,255,0.2);
    padding: 0 5px;
}

.nav-site a {
    display: block;
    color: white;
    padding: 15px 25px;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-site a:hover,
.nav-site a.on {
    background: rgba(201,169,97,0.2);
    color: var(--accent-color);
}

/* ========== 子导航 ========== */
.subnav {
    background: var(--bg-cream);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.subnav a {
    display: inline-block;
    padding: 8px 20px;
    color: var(--text-muted);
    font-size: 14px;
    border-radius: 20px;
    margin-right: 10px;
    transition: var(--transition);
}

.subnav a:hover {
    background: var(--accent-color);
    color: white;
}

/* ========== 主内容区 ========== */
.main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.main-content {
    min-width: 0;
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 13px;
    box-shadow: var(--shadow);
}

.breadcrumb a {
    color: var(--text-muted);
    margin: 0 5px;
}

.breadcrumb a:hover {
    color: var(--accent-color);
}

/* ========== 区块标题 ========== */
.section-title {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--accent-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* ========== 产品网格 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* ========== 产品卡片 ========== */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-card .img-wrap {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.product-card .img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .img-wrap img {
    transform: scale(1.05);
}

.product-card .info {
    padding: 15px;
}

.product-card .title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card .title a:hover {
    color: var(--accent-color);
}

.product-card .meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========== 侧边栏 ========== */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-box {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.sidebar-box h3 {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.sidebar-box ul li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.sidebar-box ul li:last-child {
    border-bottom: none;
}

.sidebar-box ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 14px;
}

.sidebar-box ul li a:hover {
    color: var(--accent-color);
}

/* ========== 筛选面板 ========== */
.filter-panel {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-cream);
}

.filter-header h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin: 0;
}

.filter-actions {
    display: flex;
    gap: 15px;
}

.filter-actions a {
    color: var(--accent-color);
    font-size: 14px;
}

.filter-row {
    margin-bottom: 20px;
}

.filter-label {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-option {
    display: inline-block;
    padding: 8px 20px;
    background: var(--bg-cream);
    color: var(--text-dark);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.filter-option:hover {
    background: var(--accent-color);
    color: white;
}

.filter-option.active {
    background: var(--accent-color);
    color: white;
}

/* ========== 已选条件 ========== */
.filter-selected {
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-selected-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 15px;
    background: var(--accent-color);
    color: white;
    border-radius: 20px;
    font-size: 13px;
}

.filter-selected-item a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
}

.filter-selected .clear-all {
    margin-left: auto;
    color: var(--accent-color);
    font-weight: 500;
}

/* ========== 详情页样式 ========== */
.detail-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.detail-header h1 {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
}

.detail-meta {
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    gap: 20px;
}

.detail-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    line-height: 1.8;
    font-size: 15px;
}

.detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.product-info-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.product-info-card h2 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-cream);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.info-item {
    padding: 15px;
    background: var(--bg-cream);
    border-radius: 8px;
}

/* ========== 分页 ========== */
.pagination {
    text-align: center;
    padding: 20px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background: white;
    color: var(--text-dark);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pagination a:hover,
.pagination .current {
    background: var(--accent-color);
    color: white;
}

/* ========== Footer ========== */
#footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4A3E2B 100%);
    color: white;
    margin-top: 50px;
    padding: 50px 0 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    color: var(--accent-color);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(201,169,97,0.3);
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #E5D4A1;
    font-size: 14px;
}

.footer-column ul li a:hover {
    color: white;
}

.footer-column .contact-info p {
    color: #E5D4A1;
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.footer-copyright p {
    margin-bottom: 10px;
    color: #E5D4A1;
    font-size: 13px;
}

.footer-copyright a {
    color: var(--accent-color);
}

/* ========== 响应式设计 ========== */
@media (max-width: 1200px) {
    .main {
        grid-template-columns: 1fr 250px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .main {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .header .content {
        flex-wrap: wrap;
    }
    
    .search {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 15px;
    }
    
    .nav-site {
        flex-wrap: wrap;
    }
    
    .nav-site li.line {
        display: none;
    }
    
    .nav-site a {
        padding: 12px 15px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .body-top .content {
        flex-direction: column;
        gap: 10px;
    }
    
    #announ {
        width: 100%;
    }
    
    .logo img {
        height: 45px;
    }
    
    .contact-info {
        display: none;
    }
    
    .nav-site a {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .detail-header h1 {
        font-size: 22px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .filter-options {
        gap: 8px;
    }
    
    .filter-option {
        padding: 6px 15px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card .info {
        padding: 10px;
    }
    
    .product-card .title {
        font-size: 13px;
    }
    
    .product-card .meta {
        font-size: 11px;
    }
    
    .sidebar-box {
        padding: 20px;
    }
    
    .detail-header,
    .detail-content,
    .product-info-card {
        padding: 20px;
    }
    
    .filter-panel,
    .filter-selected {
        padding: 15px;
    }
}

/* ========== 工具类 ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.pt-20 { padding-top: 20px; }
.pb-20 { padding-bottom: 20px; }
