/* ===========================================
   Topcake 前台样式
   设计原则：年轻、自由、松弛
   - 大幅留白
   - 圆润字体
   - 柔和低饱和配色
   - 无动画
=========================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.7;
    font-size: 16px;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; height: auto; display: block; }

:root {
    --primary: #7C4325;
    --primary-soft: #C8A87F;
    --accent: #F7C7BE;
    --bg: #FDF5E0;
    --ink: #1D1819;
    --muted: #8B8B8C;
    --paper: #FEFEFE;
    --highlight: #BB8E4F;
    --font-heading: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
    --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --radius-s: 8px;
    --radius-m: 16px;
    --radius-l: 24px;
    --shadow: 0 4px 24px rgba(124, 67, 37, 0.08);
    --shadow-l: 0 12px 48px rgba(124, 67, 37, 0.12);
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; color: var(--ink); line-height: 1.3; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
p { margin-bottom: 1rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-family: var(--font-body); letter-spacing: 6px; font-size: 13px; color: var(--primary); text-transform: uppercase; }
.muted { color: var(--muted); }
.divider { width: 60px; height: 2px; background: var(--primary); margin: 18px 0 36px; }

/* ============== 导航 ============== */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(254, 254, 254, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(124,67,37,0.06); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand-link { display: flex; align-items: center; gap: 12px; }
.brand-link img { height: 44px; width: auto; }
.brand-link .brand-text { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 600; color: var(--primary); }
.main-nav ul { display: flex; gap: 36px; list-style: none; }
.main-nav a { font-size: 15px; color: var(--ink); position: relative; padding: 6px 0; transition: color .2s; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); }
.main-nav a.active::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: -2px; width: 18px; height: 2px; background: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.btn { display: inline-block; padding: 12px 28px; border-radius: 100px; border: 1px solid var(--primary); background: var(--primary); color: var(--paper); font-size: 14px; font-weight: 500; cursor: pointer; transition: opacity .2s; text-align: center; }
.btn:hover { opacity: 0.85; }
.btn-outline { background: transparent; color: var(--primary); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--muted); }
.btn-small { padding: 8px 18px; font-size: 13px; }
.mobile-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--ink); }
@media (max-width: 768px) {
    .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--paper); padding: 24px; box-shadow: var(--shadow); }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 18px; }
    .mobile-toggle { display: block; }
    .header-actions .btn-small { display: none; }
}

/* ============== 首页轮播 ============== */
.banner { position: relative; height: clamp(420px, 70vh, 720px); overflow: hidden; }
.banner-track { display: flex; height: 100%; transition: transform .6s ease; }
.banner-track.no-anim { transition: none; }
.banner-slide { min-width: 100%; position: relative; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-dots { position: absolute; bottom: 24px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }
.banner-dots button { width: 32px; height: 4px; border-radius: 2px; background: rgba(254, 254, 254, 0.5); border: 0; cursor: pointer; padding: 0; }
.banner-dots button.active { background: var(--paper); }
.banner-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(254, 254, 254, 0.3); border: 0; color: var(--paper); font-size: 28px; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }
.banner-arrow.prev { left: 24px; }
.banner-arrow.next { right: 24px; }
@media (max-width: 768px) { .banner-arrow { display: none; } }

/* ============== 通用区块 ============== */
.section { padding: clamp(60px, 10vw, 120px) 0; }
.section.tight { padding: clamp(40px, 6vw, 80px) 0; }
.section.bg-soft { background: var(--bg); }
.section.bg-accent { background: var(--accent); }
.section-header { text-align: center; max-width: 720px; margin: 0 auto 60px; }
.section-header h2 { margin-top: 12px; }
.section-header p { color: var(--muted); margin-top: 16px; }

/* ============== 卡片网格 ============== */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card { background: var(--paper); border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .3s, transform .3s; }
.card:hover { box-shadow: var(--shadow-l); transform: translateY(-4px); }
.card .img-wrap { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg); }
.card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 24px; }
.card .eyebrow { font-size: 11px; }
.card h3 { margin: 8px 0; font-size: 1.25rem; }
.card p { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.card .more { color: var(--primary); font-size: 13px; font-weight: 500; }

.product-card .img-wrap { aspect-ratio: 1 / 1; }
.product-card .price { font-family: var(--font-heading); color: var(--primary); font-size: 1.4rem; font-weight: 600; margin: 8px 0; }
.product-card .spec { color: var(--muted); font-size: 13px; }

/* 产品系列页：分类区块大标题，形成视觉分割 */
.cat-section-title { font-family: var(--font-heading); font-size: clamp(2.2rem, 3.8vw, 3.25rem); font-weight: 600; color: var(--ink); line-height: 1.1; letter-spacing: 1px; }

.news-card .img-wrap { aspect-ratio: 16 / 9; }
.news-card .meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ============== 按钮区 ============== */
.actions { display: flex; gap: 16px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }

/* ============== 产品筛选 ============== */
.category-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }
.category-tabs a { padding: 10px 20px; border-radius: 100px; border: 1px solid rgba(124,67,37,0.15); color: var(--ink); font-size: 14px; }
.category-tabs a.active, .category-tabs a:hover { background: var(--primary); color: var(--paper); border-color: var(--primary); }

/* ============== 产品详情 ============== */
.product-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; padding: 60px 0; }
.product-hero .gallery .main-img { aspect-ratio: 1 / 1; border-radius: var(--radius-l); overflow: hidden; background: var(--bg); }
.product-hero .gallery .thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.product-hero .gallery .thumbs img { aspect-ratio: 1 / 1; border-radius: var(--radius-s); cursor: pointer; opacity: .85; }
.product-hero .gallery .thumbs img:hover, .product-hero .gallery .thumbs img.active { opacity: 1; outline: 2px solid var(--primary); }
.product-hero .info .category-label { color: var(--muted); font-size: 13px; letter-spacing: 4px; text-transform: uppercase; }
.product-hero .info h1 { margin: 12px 0 24px; }
.product-hero .price-row { display: flex; align-items: baseline; gap: 16px; margin: 24px 0; padding: 24px 0; border-top: 1px solid rgba(124,67,37,0.1); border-bottom: 1px solid rgba(124,67,37,0.1); }
.product-hero .price { font-family: var(--font-heading); font-size: 2.4rem; color: var(--primary); font-weight: 600; }
.product-hero .spec { color: var(--muted); font-size: 14px; }
.product-hero .selling-points { list-style: none; margin: 24px 0; }
.product-hero .selling-points li { padding: 8px 0 8px 28px; position: relative; font-size: 15px; color: var(--ink); }
.product-hero .selling-points li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 600; }
.product-hero .actions-row { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
@media (max-width: 768px) { .product-hero { grid-template-columns: 1fr; gap: 32px; } }

/* ============== 品牌页 ============== */
.philosophy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-top: 60px; }
.philosophy-item { background: var(--paper); padding: 36px 24px; border-radius: var(--radius-l); text-align: center; box-shadow: var(--shadow); }
.philosophy-item h3 { color: var(--primary); margin-bottom: 12px; }
.timeline { position: relative; max-width: 720px; margin: 60px auto 0; padding-left: 80px; }
.timeline::before { content: ""; position: absolute; left: 30px; top: 0; bottom: 0; width: 2px; background: var(--primary-soft); }
.timeline-item { position: relative; padding: 24px 0; }
.timeline-item::before { content: ""; position: absolute; left: -57px; top: 32px; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); }
.timeline-year { font-family: var(--font-heading); font-size: 1.4rem; color: var(--primary); font-weight: 600; }
.partner-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 40px; }
.partner-item { padding: 20px 24px; background: var(--paper); border-left: 4px solid var(--primary); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.partner-item .name { font-family: var(--font-heading); font-weight: 600; color: var(--primary); font-size: 1.1rem; }

/* ============== 文章详情 ============== */
.article-page { max-width: 760px; margin: 0 auto; padding: 60px 24px; }
.article-page .meta { display: flex; gap: 16px; color: var(--muted); font-size: 13px; margin: 16px 0 32px; }
.article-page .cover { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-l); object-fit: cover; margin: 24px 0 36px; }
.article-page .content { font-size: 16px; line-height: 1.9; color: var(--ink); }
.article-page .content p, .article-page .content li { margin-bottom: 1rem; }
.article-page .content h2, .article-page .content h3 { margin: 2rem 0 1rem; }
.article-page .content ol, .article-page .content ul { padding-left: 24px; }
.article-page .content blockquote { border-left: 3px solid var(--primary-soft, #C8A87F); background: var(--bg, #FDF5E0); padding: 12px 18px; margin: 1.2rem 0; border-radius: 0 8px 8px 0; color: var(--muted, #8B8B8C); }
.article-page .content img { max-width: 100%; height: auto; border-radius: 12px; margin: 1.6rem auto; display: block; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); }
.article-page .content a { color: var(--primary, #7C4325); text-decoration: underline; text-underline-offset: 3px; }

/* ============== 我们页 · 公司介绍（图文混排，同文章页排版） ============== */
.about-content .content p, .about-content .content li { margin-bottom: 1rem; }
.about-content .content h2, .about-content .content h3 { margin: 2rem 0 1rem; font-family: var(--font-heading); }
.about-content .content ol, .about-content .content ul { padding-left: 24px; margin-bottom: 1rem; }
.about-content .content blockquote { border-left: 3px solid var(--primary-soft, #C8A87F); background: var(--bg, #FDF5E0); padding: 12px 18px; margin: 1.2rem 0; border-radius: 0 8px 8px 0; color: var(--muted, #8B8B8C); }
.about-content .content img { max-width: 100%; height: auto; border-radius: 12px; margin: 1.6rem auto; display: block; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); }
.about-content .content a { color: var(--primary, #7C4325); text-decoration: underline; text-underline-offset: 3px; }

/* ============== 联系我们 ============== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; margin-top: 40px; }
.contact-grid .qr-card { text-align: center; padding: 36px 24px; background: var(--paper); border-radius: var(--radius-l); box-shadow: var(--shadow); }
.contact-grid .qr-card img { width: 220px; height: 220px; margin: 0 auto; }
.contact-info { list-style: none; }
.contact-info li { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(124,67,37,0.1); }
.contact-info .label { color: var(--muted); width: 100px; flex-shrink: 0; }
.contact-info .value { color: var(--ink); }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ============== 页脚 ============== */
.site-footer { background: #1D1819; color: rgba(254, 254, 254, 0.7); padding: 60px 0 24px; }
.site-footer .container { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 60px; }
.site-footer h4 { color: var(--paper); font-size: 1rem; margin-bottom: 16px; font-family: var(--font-body); font-weight: 600; }
.site-footer ul { list-style: none; }
.site-footer li { padding: 6px 0; }
.site-footer a:hover { color: var(--paper); }
.site-footer .footer-brand img { height: 36px; margin-bottom: 12px; }
.site-footer .copyright { border-top: 1px solid rgba(254, 254, 254, 0.1); padding-top: 24px; margin-top: 40px; text-align: center; font-size: 12px; color: rgba(254, 254, 254, 0.4); }
@media (max-width: 768px) {
    .site-footer .container { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ============== 表单 ============== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; color: var(--ink); margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.form-control { width: 100%; padding: 12px 16px; border-radius: var(--radius-s); border: 1px solid rgba(124,67,37,0.2); background: var(--paper); font-size: 14px; font-family: inherit; color: var(--ink); }
.form-control:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
textarea.form-control { resize: vertical; min-height: 100px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* 错误提示 */
.alert { padding: 12px 16px; border-radius: var(--radius-s); margin: 16px 0; }
.alert-error { background: #F7C7BE; color: #7C4325; }
.alert-success { background: #C8A87F; color: #1D1819; }

/* ============== 工具类 ============== */
.hide-mobile { }
@media (max-width: 768px) { .hide-mobile { display: none; } }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-32 { margin-top: 32px; }
.mt-60 { margin-top: 60px; }
