/* ============================================
   陶瓷雅韵 - 全局样式表
   版本: 1.0
   描述: 所有页面共享的基础样式
   ============================================ */

/* ========== 基础重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f8f4f0;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========== 容器 ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 导航栏 ========== */
.navbar {
    background: linear-gradient(135deg, #5a3e2b, #3d2b1f);
    color: #f0e6d8;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 2px;
}

.navbar .logo a {
    color: #f0e6d8;
    text-decoration: none;
}

.navbar .logo span {
    color: #d4a574;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-links li a {
    color: #f0e6d8;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 15px;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #d4a574;
    transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 60%;
}

.nav-links li a:hover {
    background: rgba(255,255,255,0.1);
}

.nav-links li a.active {
    background: rgba(255,255,255,0.15);
}

.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: #f0e6d8;
    background: none;
    border: none;
    padding: 4px 8px;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-block;
    padding: 10px 28px;
    background: #5a3e2b;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.btn:hover {
    background: #3d2b1f;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(90, 62, 43, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid #5a3e2b;
    color: #5a3e2b;
}

.btn-outline:hover {
    background: #5a3e2b;
    color: white;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 40px;
    font-size: 18px;
}

/* ========== 页面标题区域 ========== */
.page-header {
    background: linear-gradient(135deg, #5a3e2b, #3d2b1f);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '🏺';
    position: absolute;
    font-size: 120px;
    opacity: 0.08;
    right: -20px;
    bottom: -40px;
}

.page-header h1 {
    font-size: 2.8rem;
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 300;
    letter-spacing: 2px;
}

/* ========== 卡片 ========== */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}

/* ========== 产品网格 ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.product-card .image {
    height: 220px;
    background: linear-gradient(135deg, #f0ebe6, #e8ddd0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    color: #b8a89a;
    overflow: hidden;
}

.product-card .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

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

.product-card .info .category {
    font-size: 0.8rem;
    color: #999;
    display: inline-block;
    background: #f0ebe6;
    padding: 2px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.product-card .info h3 {
    font-size: 1.1rem;
    color: #333;
    margin: 8px 0 4px;
}

.product-card .info .desc {
    font-size: 0.9rem;
    color: #888;
    margin: 6px 0 12px;
}

.product-card .info .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #5a3e2b;
}

/* ========== 分类筛选 ========== */
.filter-bar {
    background: #f8f4f0;
    padding: 16px 0;
    border-bottom: 1px solid #e8ddd0;
    position: sticky;
    top: 72px;
    z-index: 99;
}

.filter-bar .container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.filter-bar a {
    padding: 6px 18px;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    font-size: 14px;
    border: 1px solid transparent;
}

.filter-bar a:hover {
    background: #e8ddd0;
    color: #3d2b1f;
}

.filter-bar a.active {
    background: #5a3e2b;
    color: white;
}

/* ========== 页脚 ========== */
footer {
    background: #2d1f14;
    color: #ccc;
    padding: 50px 0 20px;
    margin-top: 40px;
}

footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

footer h3, footer h4 {
    color: #f0e6d8;
    margin-bottom: 16px;
}

footer h3 {
    font-size: 20px;
    letter-spacing: 1px;
}

footer p {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.8;
}

footer a {
    display: block;
    color: #ccc;
    text-decoration: none;
    padding: 4px 0;
    transition: all 0.3s ease;
    font-size: 14px;
}

footer a:hover {
    color: #d4a574;
    padding-left: 4px;
}

footer .social-links {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background: #5a3e2b;
    transform: translateY(-4px);
}

footer .footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 13px;
    opacity: 0.6;
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #5a3e2b;
    outline: none;
    box-shadow: 0 0 0 4px rgba(90, 62, 43, 0.08);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ========== 消息提示 ========== */
.msg {
    background: #d4edda;
    color: #155724;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid #28a745;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid #dc3545;
}

/* ========== 滚动图 ========== */
.slideshow {
    position: relative;
    height: 420px;
    overflow: hidden;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
}

.slide h2 {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.slide p {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
    letter-spacing: 2px;
}

.slide .btn {
    margin-top: 20px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
}

.slide .btn:hover {
    background: white;
    color: #333;
}

.dots {
    text-align: center;
    margin: 16px 0;
}

.dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: #999;
    transform: scale(1.2);
}

.dot.active {
    background: #5a3e2b;
    transform: scale(1.2);
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .slideshow {
        height: 350px;
    }
    .slide h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 16px 0;
        gap: 8px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li a {
        padding: 10px 24px;
        width: 100%;
        text-align: center;
    }
    
    .page-header {
        padding: 50px 0 40px;
    }
    .page-header h1 {
        font-size: 2rem;
    }
    
    .slideshow {
        height: 280px;
        border-radius: 12px;
    }
    .slide h2 {
        font-size: 1.8rem;
    }
    .slide p {
        font-size: 1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
        padding: 20px 0;
    }
    
    footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    
    footer .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .slideshow {
        height: 220px;
    }
    .slide h2 {
        font-size: 1.4rem;
    }
    .slide p {
        font-size: 0.85rem;
    }
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .product-card .image {
        height: 140px;
        font-size: 40px;
    }
    .product-card .info {
        padding: 12px;
    }
    .product-card .info h3 {
        font-size: 0.95rem;
    }
}

/* ========== 工具类 ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mt-60 { margin-top: 60px; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }

.p-20 { padding: 20px; }
.p-40 { padding: 40px; }

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

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ========== 动画 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }