/* ==========================================================
   口腔健康网站 - 全站前台样式 style.css (最终版)
   包含：重置、页首、全屏轮播、分类入口、新闻卡片、
        产品中心、文章详情、美化页脚、响应式
   ========================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

img {
    max-width: 100%;
    vertical-align: middle;
}

ul, ol {
    list-style: none;
}

/* ---------- 2. 页首 header ---------- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10%;
    height: 76px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .logo a {
    display: flex;
    align-items: center;
}

.header nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.header nav a {
    font-size: 15px;
    color: #333;
    padding: 6px 2px;
    position: relative;
}

.header nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: #1e50ae;
    transition: width 0.25s;
}

.header nav a:hover {
    color: #1e50ae;
}

.header nav a:hover::after {
    width: 100%;
}

/* ---------- 3. 全屏轮播 Banner ---------- */
.banner-slider {
    position: relative;
    width: 100%;
    height: 720px;
    overflow: hidden;
    background: #0b1f4d;
}

.banner-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s;
    display: flex;
    align-items: center;
}

.banner-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.65) 0%,
        rgba(255,255,255,0.25) 45%,
        rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.banner-slide .banner-content {
    position: relative;
    z-index: 2;
    padding-left: 10%;
    max-width: 700px;
}

.banner-slide.active .banner-content {
    animation: bannerTextIn 0.8s ease both;
}

@keyframes bannerTextIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.banner-slide .banner-content h1 {
    font-size: 60px;
    color: #1e50ae;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(255,255,255,0.6);
}

.banner-slide .banner-content h2 {
    font-size: 36px;
    color: #ed8c21;
    font-weight: 600;
    margin-bottom: 26px;
    text-shadow: 0 2px 10px rgba(255,255,255,0.5);
}

.banner-slide .banner-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #fff;
    border: 2px solid #1e50ae;
    border-radius: 30px;
    font-size: 16px;
    color: #1e50ae;
    transition: all 0.25s;
}

.banner-slide .banner-btn:hover {
    background: #1e50ae;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(30, 80, 174, 0.35);
}

/* 轮播左右箭头 */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    color: #1e50ae;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px;
}

.slider-arrow:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.08);
}

.slider-arrow.prev { left: 30px; }
.slider-arrow.next { right: 30px; }

/* 轮播底部圆点 */
.slider-dots {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 10px;
}

.slider-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: all 0.25s;
}

.slider-dots .dot:hover {
    background: rgba(255, 255, 255, 0.85);
}

.slider-dots .dot.active {
    width: 26px;
    border-radius: 6px;
    background: #1e50ae;
}

/* ---------- 4. 产品分类入口 ---------- */
.category-section {
    background: #fff;
    padding: 40px 10%;
    margin-top: 30px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    text-align: center;
}

.category-item {
    display: block;
    color: #333;
    padding: 18px 10px;
    border-radius: 10px;
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.category-item:hover {
    background: #f5f8ff;
    transform: translateY(-4px);
    color: #1e50ae;
    box-shadow: 0 6px 18px rgba(30, 80, 174, 0.08);
}

.category-icon {
    font-size: 36px;
    line-height: 1;
    margin-bottom: 12px;
}

.category-item span {
    font-size: 14px;
    font-weight: 500;
}

/* ---------- 5. 小节标题 ---------- */
.section-title {
    font-size: 26px;
    color: #1e50ae;
    text-align: center;
    margin-bottom: 36px;
    position: relative;
    padding-bottom: 14px;
    font-weight: 700;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #f5b301;
    border-radius: 2px;
}

/* ---------- 6. 新闻 / 护齿课堂卡片 ---------- */
.news-section {
    padding: 60px 10% 70px;
    background: #fff;
    margin-top: 30px;
}

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

.news-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.09);
}

.news-card > a img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.no-cover {
    height: 200px;
    background: #eef2f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 14px;
}

.news-content {
    padding: 20px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-content h3 {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 10px;
    color: #222;
    font-weight: 600;
}

.news-content h3 a:hover {
    color: #1e50ae;
}

.news-content p {
    font-size: 14px;
    color: #888;
    line-height: 1.7;
    flex: 1;
}

/* ---------- 7. 产品中心 (列表与详情) ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eef0f4;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    color: #333;
    transition: transform 0.25s, box-shadow 0.25s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 26px rgba(0,0,0,0.09);
}

.product-thumb img,
.product-thumb .no-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.product-thumb .no-img {
    background: #eef2f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 14px;
}

.product-info {
    padding: 16px 18px 20px;
}

.product-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #222;
}

.product-info p {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    min-height: 38px;
}

.product-price {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #e5484d;
}

/* 产品详情页 */
.product-detail {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.product-detail .breadcrumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}

.product-main {
    display: flex;
    gap: 40px;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.product-cover {
    flex: 0 0 420px;
}

.product-cover img,
.product-cover .no-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.product-cover .no-img {
    background: #eef2f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
}

.product-meta {
    flex: 1;
    min-width: 0;
}

.product-meta h1 {
    font-size: 26px;
    margin-bottom: 12px;
    color: #222;
}

.product-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.product-price-large {
    font-size: 28px;
    font-weight: 700;
    color: #e5484d;
    margin-bottom: 24px;
}

.product-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px 34px;
    margin-top: 24px;
    font-size: 15px;
    line-height: 1.9;
    color: #333;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.product-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 10px 0;
}

/* ---------- 8. 文章详情页 ---------- */
.article-page {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.article-card {
    background: #fff;
    border-radius: 10px;
    padding: 40px 45px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.breadcrumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 18px;
}

.breadcrumb a {
    color: #1e50ae;
}

.article-title {
    font-size: 28px;
    color: #222;
    line-height: 1.4;
    margin-bottom: 12px;
    font-weight: 700;
}

.article-meta {
    font-size: 13px;
    color: #999;
    padding-bottom: 18px;
    margin-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.article-meta span {
    margin-right: 18px;
}

.article-cover {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 25px;
    display: block;
}

.article-body {
    font-size: 16px;
    line-height: 2;
    color: #333;
    word-break: break-word;
}

.article-body p {
    margin-bottom: 18px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
    display: block;
}

.article-body h2 { font-size: 22px; margin: 24px 0 12px; color: #222; }
.article-body h3 { font-size: 18px; margin: 20px 0 10px; color: #333; }
.article-body ul, .article-body ol { margin: 12px 0 12px 24px; list-style: auto; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: #1e50ae; text-decoration: underline; }

.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
    font-size: 14px;
    gap: 20px;
}

.article-nav a {
    color: #1e50ae;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-nav .disabled {
    color: #ccc;
}

.related-section {
    margin-top: 40px;
}

.related-section h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 3px solid #1e50ae;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.related-card:hover {
    transform: translateY(-3px);
}

.related-card img,
.related-card .no-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.related-card .no-img {
    background: #eef2f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 13px;
}

.related-card h4 {
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.back-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 24px;
    background: #1e50ae;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.back-btn:hover {
    background: #163d87;
    color: #fff;
}

/* ---------- 9. 美化版页脚 site-footer ---------- */
.site-footer {
    background: linear-gradient(180deg, #101b35 0%, #0b1327 100%);
    color: #aab4c5;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: -160px;
    right: -160px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 80, 174, 0.35), transparent 65%);
    pointer-events: none;
}

/* 顶部 CTA */
.footer-cta {
    background: linear-gradient(135deg, #1e50ae, #2f6be0);
    padding: 42px 10%;
    position: relative;
    overflow: hidden;
}

.footer-cta::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.footer-cta-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.footer-cta .cta-text h2 {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

.footer-cta .cta-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.cta-btn {
    display: inline-block;
    padding: 13px 32px;
    background: #fff;
    color: #1e50ae;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.25s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cta-btn:hover {
    background: #f5b301;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

/* 主体四栏 */
.footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 10% 40px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.4fr 1fr;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.footer-col h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 26px;
    height: 2px;
    background: #f5b301;
    border-radius: 1px;
}

/* 品牌栏 */
.footer-logo {
    margin-bottom: 16px;
}
.footer-logo img {
    max-height: 44px;
}

.footer-logo .logo-text {
    display: inline-flex;
    align-items: baseline;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}

.footer-logo .logo-text em {
    font-style: normal;
    color: #6b8fd6;
    font-weight: 400;
    font-size: 16px;
    margin-left: 6px;
}

.footer-desc {
    font-size: 13px;
    line-height: 1.9;
    color: #8b98ac;
    margin-bottom: 20px;
}

/* 社交 SVG 图标 */
.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #aab4c5;
    transition: all 0.25s;
}

.footer-social a:hover {
    transform: translateY(-3px);
    color: #fff;
}

.footer-social a[title="微信"]:hover { background: #07c160; }
.footer-social a[title="微博"]:hover { background: #e6162d; }
.footer-social a[title="抖音"]:hover { background: #000; color: #fff; }
.footer-social a[title="小红书"]:hover { background: #ff2442; }

/* 快速导航 */
.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #8b98ac;
    font-size: 14px;
    position: relative;
    padding-left: 0;
    transition: all 0.25s;
}

.footer-links a::before {
    content: "›";
    margin-right: 6px;
    color: #4f8cff;
    opacity: 0;
    transition: opacity 0.25s;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-links a:hover::before {
    opacity: 1;
}

/* 联系方式 */
.footer-contact-list li {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.7;
    color: #8b98ac;
}

.footer-contact-list .ci {
    flex-shrink: 0;
    font-size: 14px;
    opacity: 0.85;
}

/* 二维码 */
.footer-qr p {
    font-size: 12px;
    color: #8b98ac;
    margin-top: 10px;
    text-align: center;
}

.qr-box {
    width: 130px;
    height: 130px;
    background: #fff;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.qr-placeholder {
    background: rgba(255, 255, 255, 0.06);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: #5f6b80;
    font-size: 13px;
}

/* 底部版权 */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 22px 10%;
}

.footer-bottom-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #6b768a;
}

.footer-bottom a {
    color: #8b98ac;
}

.footer-bottom a:hover {
    color: #fff;
}

.footer-bottom .sep {
    color: #3a4558;
}

/* ---------- 10. 通用工具类 ---------- */
.text-center { text-align: center; }
.mt-30 { margin-top: 30px; }
.mt-50 { margin-top: 50px; }
.mb-30 { margin-bottom: 30px; }
.clearfix::after { content: ""; display: table; clear: both; }

/* ---------- 11. 响应式 (Media Queries) ---------- */
@media (max-width: 1200px) {
    .header,
    .category-section,
    .news-section,
    .footer-cta,
    .footer-main,
    .footer-bottom {
        padding-left: 6%;
        padding-right: 6%;
    }
}

@media (max-width: 992px) {
    .banner-slider { height: 560px; }
    .banner-slide .banner-content h1 { font-size: 44px; }
    .banner-slide .banner-content h2 { font-size: 28px; }
    .slider-arrow { width: 42px; height: 42px; font-size: 24px; }
    .slider-arrow.prev { left: 16px; }
    .slider-arrow.next { right: 16px; }

    .category-grid { grid-template-columns: repeat(3, 1fr); }

    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: repeat(2, 1fr); }

    .article-card { padding: 30px 28px; }
    .article-title { font-size: 24px; }

    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .product-main { flex-direction: column; gap: 20px; }
    .product-cover { flex: none; }
    .product-cover img,
    .product-cover .no-img { height: 280px; }

    .footer-main { grid-template-columns: 1fr 1fr; gap: 36px; padding-top: 50px; }
    .footer-cta { padding-top: 36px; padding-bottom: 36px; }
    .footer-cta .cta-text h2 { font-size: 22px; }
}

@media (max-width: 768px) {
    .header {
        height: auto;
        flex-direction: column;
        gap: 10px;
        padding: 14px 5%;
    }
    .header nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    .header nav a { font-size: 14px; }

    .banner-slider { height: 420px; }
    .banner-slide .banner-content { padding-left: 6%; padding-right: 6%; }
    .banner-slide .banner-content h1 { font-size: 30px; }
    .banner-slide .banner-content h2 { font-size: 20px; margin-bottom: 18px; }
    .banner-slide .banner-btn { padding: 9px 22px; font-size: 14px; }
    .slider-arrow { display: none; }
    .slider-dots { bottom: 16px; }

    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .section-title { font-size: 22px; }

    .news-grid { grid-template-columns: 1fr; }
    .news-card > a img,
    .no-cover { height: 180px; }

    .product-grid { grid-template-columns: 1fr; }
    .product-detail { margin: 20px auto; padding: 0 12px; }
    .product-main { padding: 18px; }
    .product-meta h1 { font-size: 20px; }
    .product-content { padding: 20px; }

    .article-page { margin: 20px auto; padding: 0 12px; }
    .article-card { padding: 22px 18px; }
    .article-title { font-size: 20px; }
    .article-body { font-size: 15px; }
    .article-nav { flex-direction: column; gap: 12px; }
    .article-nav a { max-width: 100%; }

    .related-grid { grid-template-columns: 1fr; }

    .footer-cta-inner { flex-direction: column; align-items: flex-start; }
    .footer-main { grid-template-columns: 1fr; gap: 30px; padding-top: 40px; }
    .footer-cta { padding: 30px 5%; }
    .footer-cta .cta-text h2 { font-size: 20px; }
    .cta-btn { width: 100%; text-align: center; }
    .footer-bottom { padding: 20px 5%; }
    .footer-bottom-inner { flex-direction: column; gap: 6px; text-align: center; }
    .footer-social { justify-content: flex-start; }
}

@media (max-width: 480px) {
    .banner-slider { height: 360px; }
    .banner-slide .banner-content h1 { font-size: 26px; }
    .banner-slide .banner-content h2 { font-size: 17px; }
    .category-icon { font-size: 28px; }
    .news-content { padding: 16px 16px 20px; }
}