/**
 * 兰州天路石材官网 - 主样式表
 * 配色：深灰(#333) + 金色/暖棕(#C8956C) + 白色
 * 移动端优先，响应式设计
 */

/* ===== CSS变量 ===== */
:root {
    --color-primary: #333;
    --color-secondary: #C8956C;
    --color-secondary-light: #D4A882;
    --color-secondary-dark: #A67750;
    --color-white: #fff;
    --color-bg: #f8f6f3;
    --color-bg-light: #faf9f7;
    --color-text: #333;
    --color-text-light: #666;
    --color-text-muted: #999;
    --color-border: #e0dcd7;
    --color-success: #4caf50;
    --color-danger: #e53935;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-heading: "Source Han Sans CN", "Noto Sans SC", var(--font-stack);
    --shadow-sm: 0 1px 3px 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);
    --radius: 6px;
    --radius-lg: 12px;
    --container: 1200px;
    --header-h: 70px;
    --transition: 0.3s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-stack); color: var(--color-text); background: var(--color-bg); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-secondary-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-secondary); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* ===== 通用 ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 24px; border-radius: var(--radius); font-weight: 600; font-size: 15px; transition: all var(--transition); text-align: center; justify-content: center; }
.btn-primary { background: var(--color-secondary); color: var(--color-white); }
.btn-primary:hover { background: var(--color-secondary-dark); color: var(--color-white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { border: 2px solid var(--color-secondary); color: var(--color-secondary-dark); background: transparent; }
.btn-outline:hover { background: var(--color-secondary); color: var(--color-white); }
.btn-lg { padding: 14px 32px; font-size: 17px; }
.btn-sm { padding: 6px 16px; font-size: 13px; }

/* ===== 顶部联系栏 ===== */
.top-bar { background: var(--color-primary); color: var(--color-white); font-size: 13px; padding: 6px 0; }
.top-bar .container { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.top-bar a { color: var(--color-secondary-light); }
.top-bar a:hover { color: var(--color-white); }
.top-bar-item { white-space: nowrap; }

/* ===== 导航 ===== */
.main-header { background: var(--color-white); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; }
.main-header .container { display: flex; align-items: center; height: var(--header-h); gap: 20px; }
.logo { display: flex; flex-direction: column; flex-shrink: 0; }
.logo-text { font-family: var(--font-heading); font-size: 22px; font-weight: 700; color: var(--color-primary); line-height: 1.2; }
.logo-tagline { font-size: 11px; color: var(--color-text-muted); }
.main-nav { flex: 1; }
.nav-list { display: flex; justify-content: flex-end; gap: 8px; }
.nav-link { padding: 8px 14px; color: var(--color-text); font-weight: 500; font-size: 15px; border-radius: var(--radius); transition: all var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--color-secondary-dark); background: rgba(200,149,108,0.08); }
.header-cta { background: var(--color-secondary); color: var(--color-white) !important; padding: 8px 18px; border-radius: var(--radius); font-weight: 600; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.header-cta:hover { background: var(--color-secondary-dark); color: var(--color-white) !important; }

/* 汉堡菜单 */
.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.mobile-menu-btn span { display: block; width: 22px; height: 2px; background: var(--color-primary); transition: all var(--transition); border-radius: 1px; }
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== Hero区 ===== */
.hero { position: relative; min-height: 500px; display: flex; align-items: center; background: linear-gradient(135deg, #3a3a3a 0%, #555 50%, #444 100%); overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"><rect fill="%23444" width="400" height="400"/><path d="M0 200Q100 180 200 200T400 200V400H0Z" fill="%23555" opacity="0.3"/></svg>') center/cover; opacity: 0.15; }
.hero-content { position: relative; z-index: 1; color: var(--color-white); max-width: 680px; padding: 60px 0; }
.hero h1 { font-family: var(--font-heading); font-size: 42px; font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
.hero h1 .highlight { color: var(--color-secondary-light); }
.hero .tagline { font-size: 20px; color: rgba(255,255,255,0.85); margin-bottom: 30px; line-height: 1.5; }
.hero .cta-group { display: flex; gap: 16px; flex-wrap: wrap; }

/* 石材纹理装饰 */
.hero-stone-texture { position: absolute; right: -50px; top: 50%; transform: translateY(-50%); width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(200,149,108,0.15) 0%, transparent 70%); pointer-events: none; }

/* ===== 核心优势 ===== */
.section { padding: 60px 0; }
.section-alt { background: var(--color-bg-light); }
.section-title { font-family: var(--font-heading); font-size: 30px; font-weight: 700; text-align: center; margin-bottom: 12px; color: var(--color-primary); }
.section-subtitle { text-align: center; color: var(--color-text-light); margin-bottom: 40px; font-size: 16px; }
.section-title .accent { color: var(--color-secondary); }

.highlights-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.highlight-card { background: var(--color-white); border-radius: var(--radius-lg); padding: 28px 24px; text-align: center; box-shadow: var(--shadow-sm); transition: all var(--transition); border: 1px solid var(--color-border); }
.highlight-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--color-secondary-light); }
.highlight-icon { font-size: 36px; margin-bottom: 12px; }
.highlight-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: var(--color-primary); }
.highlight-card p { font-size: 14px; color: var(--color-text-light); line-height: 1.5; }

/* ===== 产品分类卡片 ===== */
.categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.category-card { background: var(--color-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: all var(--transition); border: 1px solid var(--color-border); }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.category-card-img { height: 200px; background: linear-gradient(135deg, #e8e0d8, #d4ccc4); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.category-card-img img { width: 100%; height: 100%; object-fit: cover; }
.category-card-img .placeholder-text { color: var(--color-text-muted); font-size: 14px; }
.category-card-body { padding: 20px; }
.category-card-body h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.category-card-body .price { color: var(--color-secondary-dark); font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.category-card-body .desc { font-size: 13px; color: var(--color-text-light); line-height: 1.4; margin-bottom: 12px; }
.category-card-body .btn { width: 100%; }

/* ===== 合作品牌 ===== */
.brands-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.brand-item { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px 28px; text-align: center; min-width: 150px; transition: all var(--transition); }
.brand-item:hover { border-color: var(--color-secondary); box-shadow: var(--shadow-sm); }
.brand-item h4 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.brand-item p { font-size: 12px; color: var(--color-text-muted); }

/* ===== 服务区域 ===== */
.areas-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.area-tag { background: var(--color-white); border: 1px solid var(--color-border); border-radius: 20px; padding: 8px 18px; font-size: 14px; transition: all var(--transition); }
.area-tag:hover { border-color: var(--color-secondary); background: rgba(200,149,108,0.08); }

/* ===== 文章列表 ===== */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card { background: var(--color-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: all var(--transition); border: 1px solid var(--color-border); }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.article-card-body { padding: 20px; }
.article-card .category-tag { display: inline-block; background: rgba(200,149,108,0.12); color: var(--color-secondary-dark); padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; margin-bottom: 10px; }
.article-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card h3 a { color: var(--color-primary); }
.article-card h3 a:hover { color: var(--color-secondary-dark); }
.article-card .summary { font-size: 14px; color: var(--color-text-light); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-card .meta { font-size: 12px; color: var(--color-text-muted); margin-top: 12px; }

/* ===== 页面通用 ===== */
.page-header { background: linear-gradient(135deg, #3a3a3a, #555); color: var(--color-white); padding: 40px 0; text-align: center; }
.page-header h1 { font-family: var(--font-heading); font-size: 32px; margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,0.7); font-size: 16px; }

/* 面包屑 */
.breadcrumb { padding: 12px 0; font-size: 13px; color: var(--color-text-muted); }
.breadcrumb a { color: var(--color-text-light); }
.breadcrumb a:hover { color: var(--color-secondary-dark); }
.breadcrumb span { margin: 0 6px; }

/* ===== 产品详情 ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-image { border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(135deg, #e8e0d8, #d4ccc4); min-height: 400px; display: flex; align-items: center; justify-content: center; }
.product-image img { width: 100%; height: auto; }
.product-info h1 { font-size: 28px; margin-bottom: 12px; }
.product-price { font-size: 24px; color: var(--color-secondary-dark); font-weight: 700; margin-bottom: 16px; }

/* 价格表 */
.price-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.price-table th { background: var(--color-primary); color: var(--color-white); padding: 12px 16px; text-align: left; font-weight: 600; }
.price-table td { padding: 10px 16px; border-bottom: 1px solid var(--color-border); }
.price-table tr:hover td { background: rgba(200,149,108,0.04); }
.price-table .price-col { color: var(--color-secondary-dark); font-weight: 700; white-space: nowrap; }

/* ===== 文章详情 ===== */
.article-detail { max-width: 800px; margin: 0 auto; }
.article-detail h1 { font-size: 28px; margin-bottom: 16px; line-height: 1.3; }
.article-detail .article-meta { color: var(--color-text-muted); margin-bottom: 24px; font-size: 14px; }
.article-content { line-height: 1.8; }
.article-content h2 { font-size: 22px; margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--color-secondary); }
.article-content h3 { font-size: 18px; margin: 20px 0 8px; }
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin-bottom: 16px; padding-left: 24px; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--color-primary); }
.article-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.article-content table th { background: var(--color-primary); color: var(--color-white); padding: 10px 14px; text-align: left; }
.article-content table td { padding: 8px 14px; border: 1px solid var(--color-border); }

/* ===== 联系页 ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info-card { background: var(--color-white); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.contact-info-card h3 { font-size: 18px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.contact-info-card .info-item { margin-bottom: 10px; font-size: 15px; }
.contact-form { background: var(--color-white); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 14px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 15px; transition: border-color var(--transition); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--color-secondary); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-message { padding: 12px; border-radius: var(--radius); margin-bottom: 20px; }
.form-message.success { background: #e8f5e9; color: #2e7d32; }
.form-message.error { background: #fbe9e7; color: #c62828; }

/* 快速询价 */
.inquiry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.inquiry-item { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px; text-align: center; transition: all var(--transition); }
.inquiry-item:hover { border-color: var(--color-secondary); box-shadow: var(--shadow-sm); }
.inquiry-item h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.inquiry-item .price { color: var(--color-secondary-dark); font-size: 13px; font-weight: 700; }

/* ===== 底部CTA ===== */
.bottom-cta { background: linear-gradient(135deg, var(--color-primary), #4a4a4a); color: var(--color-white); padding: 50px 0; text-align: center; }
.bottom-cta h2 { font-size: 28px; margin-bottom: 10px; }
.bottom-cta p { color: rgba(255,255,255,0.7); margin-bottom: 24px; font-size: 16px; }
.cta-buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ===== 页脚 ===== */
.main-footer { background: #2a2a2a; color: rgba(255,255,255,0.7); padding: 50px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 32px; }
.footer-col h3 { color: var(--color-white); font-size: 16px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--color-secondary); display: inline-block; }
.footer-col p { font-size: 14px; line-height: 1.6; margin-bottom: 8px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer-col ul li a:hover { color: var(--color-secondary-light); }
.footer-col .service-areas { font-size: 13px; margin-top: 12px; line-height: 1.5; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 13px; }
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--color-secondary-light); }

/* ===== 移动端固定栏 ===== */
.mobile-fixed-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--color-white); box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 99; padding: 6px 0; border-top: 1px solid var(--color-border); }
.mobile-bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--color-text); padding: 4px; }
.mobile-bar-icon { font-size: 18px; }

/* ===== 筛选 ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; justify-content: center; }
.filter-btn { padding: 8px 20px; border: 1px solid var(--color-border); border-radius: 20px; font-size: 14px; background: var(--color-white); transition: all var(--transition); }
.filter-btn:hover, .filter-btn.active { background: var(--color-secondary); color: var(--color-white); border-color: var(--color-secondary); }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 12px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 14px; }
.pagination a:hover { background: var(--color-secondary); color: var(--color-white); border-color: var(--color-secondary); }
.pagination .current { background: var(--color-secondary); color: var(--color-white); border-color: var(--color-secondary); }

/* ===== 关于我们 ===== */
.timeline { position: relative; max-width: 600px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 20px; top: 0; bottom: 0; width: 2px; background: var(--color-secondary); }
.timeline-item { position: relative; padding-left: 50px; margin-bottom: 32px; }
.timeline-item::before { content: ''; position: absolute; left: 14px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--color-secondary); border: 3px solid var(--color-white); }
.timeline-item .year { font-size: 18px; font-weight: 700; color: var(--color-secondary-dark); margin-bottom: 4px; }
.timeline-item .event { font-size: 15px; color: var(--color-text-light); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .highlights-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .product-detail { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --header-h: 60px; }

    .top-bar { display: none; }
    .main-header .container { height: var(--header-h); }
    .logo-text { font-size: 18px; }
    .logo-tagline { display: none; }
    .main-nav { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--color-white); z-index: 99; padding: 20px; overflow-y: auto; }
    .main-nav.open { display: block; }
    .nav-list { flex-direction: column; gap: 0; }
    .nav-link { display: block; padding: 14px 16px; border-bottom: 1px solid var(--color-border); font-size: 17px; }
    .header-cta { display: none; }
    .mobile-menu-btn { display: flex; }

    .hero { min-height: 400px; }
    .hero h1 { font-size: 28px; }
    .hero .tagline { font-size: 16px; }
    .hero .cta-group { flex-direction: column; }
    .hero .cta-group .btn { width: 100%; }

    .section { padding: 40px 0; }
    .section-title { font-size: 24px; }
    .highlights-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .highlight-card { padding: 20px 16px; }
    .categories-grid { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: 1fr; }
    .inquiry-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }

    .page-header { padding: 28px 0; }
    .page-header h1 { font-size: 24px; }

    .mobile-fixed-bar { display: flex; }
    body { padding-bottom: 56px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 24px; }
    .highlights-grid { grid-template-columns: 1fr; }
    .inquiry-grid { grid-template-columns: 1fr; }
    .brands-grid { gap: 12px; }
    .brand-item { min-width: 120px; padding: 14px 18px; }
}

/* ===== 加载动画 ===== */
.lazy-img { opacity: 0; transition: opacity 0.4s ease; }
.lazy-img.loaded { opacity: 1; }

/* ===== 消息提示 ===== */
.toast { position: fixed; top: 20px; right: 20px; padding: 14px 24px; border-radius: var(--radius); color: var(--color-white); font-size: 14px; z-index: 1000; animation: slideIn 0.3s ease; }
.toast.success { background: var(--color-success); }
.toast.error { background: var(--color-danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
