/* 鑫佳口腔企业站样式 — 蓝色主色调 */
:root {
    --xj-primary: #149DC7;
    --xj-primary-dark: #0C6E8C;
    --xj-primary-light: #3FB7DA;
    --xj-accent: #5DC8E6;
    --xj-soft: #E3F4FB;
    --xj-text: #1f2d3d;
    --xj-muted: #6b7c93;
    --xj-border: #dde7ee;
    --xj-bg: #f4f9fc;
    --xj-shadow: 0 6px 24px rgba(20, 157, 199, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--xj-text);
    background: #fff;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
}
a { color: var(--xj-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--xj-primary-light); }
img { max-width: 100%; height: auto; vertical-align: middle; }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== Top bar ===== */
.top-bar {
    background: var(--xj-primary-dark);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    padding: 6px 0;
}
.top-bar a { color: rgba(255, 255, 255, 0.85); margin-left: 14px; }
.top-bar a:hover { color: #fff; }
.top-bar .container { display: flex; justify-content: space-between; }

/* ===== Header ===== */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--xj-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(20,157,199,0.06);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 86px;
    gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex-shrink: 1; }
.brand img { height: 50px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; max-width: 260px; }
.brand-text .name {
    font-size: 16px; font-weight: 700; color: var(--xj-primary); letter-spacing: 0.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.25;
}
.brand-text .slogan { font-size: 12px; color: var(--xj-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[lang="en"] .brand-text .name { font-size: 14px; white-space: normal; line-height: 1.2; }
html[lang="en"] .brand-text { max-width: 220px; }

.main-nav { display: flex; align-items: center; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
    display: block;
    padding: 0 14px;
    line-height: 86px;
    font-size: 15px;
    color: var(--xj-text);
    font-weight: 500;
    position: relative;
    white-space: nowrap;
}
html[lang="en"] .main-nav > ul > li > a { padding: 0 11px; font-size: 14px; }
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a { color: var(--xj-primary); }
.main-nav > ul > li > a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 18px;
    height: 3px;
    background: var(--xj-primary);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform .25s ease;
}
.main-nav > ul > li:hover > a::after,
.main-nav > ul > li.active > a::after { transform: scaleX(1); }
.main-nav .sub {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    box-shadow: var(--xj-shadow);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    border-top: 3px solid var(--xj-primary);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .2s ease;
}
.main-nav > ul > li:hover .sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.main-nav .sub li a {
    display: block;
    padding: 9px 18px;
    color: var(--xj-text);
    font-size: 14px;
}
.main-nav .sub li a:hover { background: var(--xj-soft); color: var(--xj-primary); }

.lang-switch {
    margin-left: 18px;
    padding: 6px 16px;
    background: var(--xj-primary);
    color: #fff !important;
    border-radius: 18px;
    font-size: 13px;
}
.lang-switch:hover { background: var(--xj-primary-light); color: #fff; }

/* ===== Hero banner ===== */
.swiper-hero {
    width: 100%;
    height: 480px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--xj-primary) 0%, var(--xj-primary-light) 100%);
    position: relative;
}
.swiper-hero .swiper-slide {
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}
.swiper-hero .swiper-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(12,110,140,0.18), rgba(20,157,199,0));
}
.swiper-hero .hero-text { display: none; }
.swiper-hero .swiper-pagination-bullet-active { background: #fff; }
.swiper-hero .swiper-button-next, .swiper-hero .swiper-button-prev { color: #fff; }

/* ===== Inner banner ===== */
.inner-banner {
    height: 220px;
    background: linear-gradient(135deg, var(--xj-primary-dark), var(--xj-primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}
.inner-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255,255,255,.08), transparent 70%);
}
.inner-banner h1 { margin: 0; font-size: 30px; letter-spacing: 2px; }
.inner-banner .crumb {
    margin-top: 8px;
    font-size: 13px;
    opacity: .85;
}
.inner-banner .crumb a { color: #fff; }

/* ===== Section ===== */
section { padding: 64px 0; }
.section-title { text-align: center; margin-bottom: 38px; }
.section-title .en { color: var(--xj-accent); font-size: 13px; letter-spacing: 4px; text-transform: uppercase; }
.section-title h2 {
    font-size: 30px;
    color: var(--xj-text);
    margin: 6px 0 14px;
    font-weight: 700;
}
.section-title .bar {
    display: inline-block;
    width: 50px;
    height: 3px;
    background: var(--xj-primary);
    border-radius: 2px;
}

.bg-soft { background: var(--xj-bg); }

/* ===== About preview (homepage) ===== */
.about-flex { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-flex .info h2 { font-size: 28px; color: var(--xj-primary); margin: 0 0 10px; }
.about-flex .info .desc { color: var(--xj-muted); line-height: 1.9; font-size: 15px; }
.about-flex .info .desc img { display: none; }
.about-flex .info .desc * { max-width: 100%; }
.about-flex .info .btn { margin-top: 22px; }
.about-flex .visual {
    height: 380px;
    border-radius: 14px;
    box-shadow: var(--xj-shadow);
    position: relative;
    overflow: hidden;
}
.about-flex .visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}
.about-flex .visual:hover img { transform: scale(1.04); }
.about-flex .visual .visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12,110,140,0.55) 0%, rgba(12,110,140,0) 45%);
    pointer-events: none;
}
.about-flex .visual .badge {
    position: absolute;
    left: 20px; bottom: 20px;
    background: rgba(255,255,255,0.95);
    padding: 14px 22px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(12,110,140,0.25);
    pointer-events: auto;
}
.about-flex .visual .badge .num {
    display: block;
    font-size: 11px;
    color: var(--xj-muted);
    letter-spacing: 3px;
}
.about-flex .visual .badge b {
    font-size: 26px;
    color: var(--xj-primary);
    font-family: Arial, sans-serif;
    letter-spacing: 1px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 10px 26px;
    background: var(--xj-primary);
    color: #fff !important;
    border-radius: 22px;
    font-size: 14px;
    border: 0;
    cursor: pointer;
    transition: all .25s;
}
.btn:hover { background: var(--xj-primary-light); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(20,157,199,.28); }
.btn-outline { background: transparent; border: 1px solid var(--xj-primary); color: var(--xj-primary) !important; }
.btn-outline:hover { background: var(--xj-primary); color: #fff !important; }

/* ===== Product grid ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--xj-border);
    transition: all .25s;
    display: block;
    color: var(--xj-text);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--xj-shadow); border-color: transparent; }
.product-card .pic {
    height: 200px;
    background: #f4f8fc;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.product-card .pic img { max-height: 100%; transition: transform .35s; }
.product-card:hover .pic img { transform: scale(1.06); }
.product-card .info { padding: 14px 16px; }
.product-card .name {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.product-card .number {
    font-size: 12px;
    color: var(--xj-muted);
}

/* ===== News ===== */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px dashed var(--xj-border);
    align-items: center;
    gap: 22px;
}
.news-list .date {
    flex: 0 0 88px;
    text-align: center;
    color: var(--xj-primary);
    border-right: 1px solid var(--xj-border);
    padding-right: 22px;
}
.news-list .date .d { font-size: 32px; font-weight: 700; line-height: 1; }
.news-list .date .ym { font-size: 12px; color: var(--xj-muted); margin-top: 4px; }
.news-list .meta { flex: 1; }
.news-list .meta h3 { margin: 0 0 6px; font-size: 17px; font-weight: 500; }
.news-list .meta h3 a:hover { color: var(--xj-primary); }
.news-list .meta p {
    margin: 0;
    color: var(--xj-muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Home news 3-col */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.news-grid .item {
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid var(--xj-border);
    transition: all .25s;
}
.news-grid .item:hover { box-shadow: var(--xj-shadow); transform: translateY(-3px); }
.news-grid .item .date { color: var(--xj-accent); font-size: 13px; margin-bottom: 8px; }
.news-grid .item h3 { font-size: 16px; margin: 0 0 10px; line-height: 1.5; min-height: 48px; }
.news-grid .item p {
    color: var(--xj-muted); font-size: 13px; line-height: 1.7;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; margin: 0;
}

/* ===== Category aside ===== */
.layout-side { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 30px; }
.layout-side > * { min-width: 0; }
/* 主内容在左、侧栏在右 */
.layout-main { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 30px; }
.layout-main > * { min-width: 0; }
.aside-box {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--xj-border);
    overflow: hidden;
}
.aside-box .title {
    background: var(--xj-primary);
    color: #fff;
    padding: 16px 18px;
    font-size: 16px;
}
.aside-box ul { list-style: none; margin: 0; padding: 0; }
.aside-box ul li a {
    display: block;
    padding: 12px 18px;
    border-bottom: 1px solid var(--xj-border);
    color: var(--xj-text);
    font-size: 14px;
    transition: all .2s;
}
.aside-box ul li:last-child a { border-bottom: 0; }
.aside-box ul li a:hover, .aside-box ul li.active a {
    background: var(--xj-soft);
    color: var(--xj-primary);
    padding-left: 24px;
}

/* ===== Detail ===== */
.detail-box {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    border: 1px solid var(--xj-border);
}
.detail-box h1 { font-size: 24px; margin: 0 0 14px; color: var(--xj-text); }
.detail-meta {
    color: var(--xj-muted); font-size: 13px;
    padding-bottom: 18px; border-bottom: 1px solid var(--xj-border); margin-bottom: 24px;
}
.detail-meta span { margin-right: 18px; }
.detail-content {
    font-size: 15px; line-height: 1.9; color: #333;
    word-break: break-word; overflow-wrap: break-word;
    max-width: 100%; overflow-x: auto;
}
.detail-content p { margin: 0 0 14px; }
.detail-content img { max-width: 100%; height: auto; border-radius: 6px; }
.detail-content table { max-width: 100%; }
.detail-content pre, .detail-content code { white-space: pre-wrap; word-break: break-word; }

.product-detail {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--xj-border);
    padding: 30px;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 36px;
}
.product-detail .main-pic {
    background: #f4f8fc;
    height: 360px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.product-detail .main-pic img { max-height: 100%; }
.product-detail h1 { font-size: 24px; margin: 0 0 18px; color: var(--xj-primary); }
.product-detail .attrs { list-style: none; padding: 0; margin: 0 0 24px; }
.product-detail .attrs li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--xj-border);
    font-size: 14px;
    color: var(--xj-text);
}
.product-detail .attrs li strong { color: var(--xj-muted); margin-right: 10px; }

.detail-section { margin-top: 32px; background: #fff; border-radius: 10px; border: 1px solid var(--xj-border); padding: 30px; }
.detail-section h2 { font-size: 18px; margin: 0 0 18px; padding-left: 12px; border-left: 4px solid var(--xj-primary); }

/* ===== Forms ===== */
.form-box {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--xj-border);
    padding: 36px;
    max-width: 720px;
    margin: 0 auto;
}
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--xj-text); }
.form-row label .req { color: #e53935; margin-left: 4px; }
.form-row input[type=text], .form-row input[type=email], .form-row textarea {
    width: 100%;
    border: 1px solid var(--xj-border);
    border-radius: 6px;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    background: #fafcfe;
    transition: border-color .2s, box-shadow .2s;
}
.form-row input:focus, .form-row textarea:focus {
    outline: none;
    border-color: var(--xj-primary);
    box-shadow: 0 0 0 3px rgba(20,157,199,.15);
    background: #fff;
}
.form-row textarea { min-height: 130px; resize: vertical; }
.form-row .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 36px; }
.pagination a, .pagination span {
    padding: 7px 13px;
    border: 1px solid var(--xj-border);
    border-radius: 4px;
    color: var(--xj-text);
    font-size: 13px;
}
.pagination .current, .pagination a:hover {
    background: var(--xj-primary);
    color: #fff;
    border-color: var(--xj-primary);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--xj-primary-dark);
    color: rgba(255,255,255,.78);
    padding: 50px 0 0;
    margin-top: 60px;
}
.site-footer .grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.site-footer .grid > * { min-width: 0; }
.site-footer .info p, .site-footer .info div { word-break: break-word; overflow-wrap: break-word; }
.site-footer h4 {
    color: #fff;
    margin: 0 0 18px;
    font-size: 16px;
    font-weight: 600;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 8px; font-size: 13px; }
.site-footer ul li a { color: rgba(255,255,255,.78); }
.site-footer ul li a:hover { color: #fff; }
.site-footer .info p { margin: 0 0 8px; font-size: 13px; }
.site-footer .copy {
    padding: 18px 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,.55);
}
.site-footer .copy a { color: rgba(255,255,255,.7); }

/* ===== Misc ===== */
.empty { text-align: center; padding: 60px 0; color: var(--xj-muted); }

@media (max-width: 900px) {
    .site-header .container { height: 64px; }
    .brand img { height: 38px; }
    .brand-text .name { font-size: 15px; }
    .brand-text .slogan { display: none; }
    .main-nav { display: none; }
    .swiper-hero { height: 260px; }
    .swiper-hero .hero-text h2 { font-size: 22px; }
    .product-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
    .about-flex, .product-detail { grid-template-columns: 1fr; }
    .layout-side, .layout-main { grid-template-columns: 1fr; }
    .form-row .row-2 { grid-template-columns: 1fr; }
    .site-footer .grid { grid-template-columns: 1fr; }
    section { padding: 40px 0; }
}
