/* ============================================
   Official Website - Main Stylesheet
   ============================================ */

:root {
    --primary-color: #0d6efd;
    --primary-dark: #0b5ed7;
    --secondary-color: #6c757d;
    --accent-color: #ff6b35;
    --bg-light: #f8f9fa;
    --text-dark: #212529;
    --text-muted: #6c757d;
}

html { overflow-x: hidden; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    padding-top: 76px;
    overflow-x: hidden;
}

/* ======== Navbar ======== */
.navbar {
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}
.navbar-brand img { height: 52px; width: 52px; object-fit: contain; }
.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s;
    position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--primary-color) !important; }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--primary-color);
}

/* ======== Language Switcher ======== */
.lang-switcher .dropdown-toggle {
    padding: 0.4rem 0.8rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    font-size: 0.85rem;
    font-weight: 500;
}
.lang-switcher .dropdown-toggle:hover { border-color: var(--primary-color); color: var(--primary-color); }
.lang-switcher .dropdown-item.active { background-color: var(--primary-color); color: white; }

/* 手机端语言下拉以内联方式展示，避免裁切 */
@media (max-width: 991.98px) {
    .lang-switcher {
        padding: 0.5rem 1rem;
    }
    .lang-switcher .dropdown-menu {
        position: static !important;
        transform: none !important;
        float: none;
        border: none;
        background: transparent;
        box-shadow: none;
        padding: 0.25rem 0 0 0;
        margin: 0;
    }
    .lang-switcher .dropdown-item {
        color: rgba(0,0,0,0.55);
        padding: 0.4rem 0.8rem;
        border-radius: 4px;
    }
    .lang-switcher .dropdown-item:hover {
        background: rgba(0,0,0,0.04);
        color: var(--primary-color);
    }
    .lang-switcher .dropdown-item.active {
        background: transparent;
        color: var(--primary-color);
        font-weight: 600;
    }
}

/* ======== Page Banner (shared for sub-pages) ======== */
.page-banner {
    position: relative;
    height: 350px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}
.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
}
.page-banner .banner-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    padding: 0 2rem;
}
.page-banner h1 {
    font-weight: 800;
    font-size: 2.8rem;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.page-banner p {
    font-size: 1.15rem;
    opacity: 0.9;
    line-height: 1.7;
}
.page-banner .breadcrumb {
    justify-content: center;
    margin-bottom: 0;
    margin-top: 10px;
}
.page-banner .breadcrumb-item a { color: rgba(255,255,255,0.8); text-decoration: none; }
.page-banner .breadcrumb-item.active { color: rgba(255,255,255,0.6); }
.page-banner .breadcrumb-item+.breadcrumb-item::before { color: rgba(255,255,255,0.5); }

/* ======== Section Titles ======== */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}
.section-title h2 {
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}
.section-title .divider {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 0 auto 1rem;
}
.section-title p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ======== Product Card ======== */
.product-card {
    border: 1px solid #eef0f2;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border-color: transparent;
}
.product-card .product-img {
    height: 220px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-card .product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.product-card:hover .product-img img { transform: scale(1.08); }
.product-card .product-body { padding: 1.25rem; }
.product-card .product-category {
    font-size: 0.8rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.product-card .product-name { font-weight: 600; font-size: 1.1rem; margin: 0.3rem 0; }
.product-card .product-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ======== Swiper Hero ======== */
.hero-swiper { height: 520px; }
.hero-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: #1a1d23;
}
.slide-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero-swiper .swiper-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
}
.hero-swiper .slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 700px;
    padding: 0 2rem;
}
.hero-swiper .slide-content h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.hero-swiper .slide-content p { font-size: 1.25rem; opacity: 0.95; margin-bottom: 1.5rem; }
.hero-swiper .slide-content .btn { padding: 0.7rem 2rem; font-weight: 600; border-radius: 50px; }
.swiper-pagination-bullet { background: white !important; opacity: 0.5 !important; width: 12px !important; height: 12px !important; }
.swiper-pagination-bullet-active { opacity: 1 !important; }
.swiper-button-next, .swiper-button-prev { color: white !important; }

/* ======== Home About Section ======== */
.about-section { padding: 80px 0; background: white; }
.about-section .about-img { border-radius: 16px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.1); }

/* ======== Content Section (About/Page text) ======== */
.content-section { padding: 60px 0; }
.content-section .content-body { line-height: 1.9; font-size: 1.05rem; color: #444; }
.content-section .content-body img { max-width: 100%; border-radius: 12px; margin: 20px 0; }
.content-section .content-body h2 { font-weight: 700; margin-bottom: 1.25rem; }
.content-section .content-body h3 { font-weight: 600; margin: 1.5rem 0 1rem; }
.content-section .content-body p { margin-bottom: 1rem; }
.content-section .feature-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    height: 100%;
    transition: transform 0.3s;
}
.content-section .feature-card:hover { transform: translateY(-3px); }
.content-section .feature-card .feat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* ======== Footer ======== */
.site-footer { background: #1a1d23; color: #adb5bd; padding-top: 60px; }
.site-footer h5 { color: white; font-weight: 600; margin-bottom: 1.25rem; font-size: 1.1rem; }
.site-footer .footer-links { list-style: none; padding: 0; }
.site-footer .footer-links li { margin-bottom: 0.6rem; }
.site-footer .footer-links a { color: #adb5bd; text-decoration: none; transition: color 0.3s; }
.site-footer .footer-links a:hover { color: white; }
.site-footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #adb5bd;
    text-decoration: none;
    margin-right: 0.5rem;
    transition: all 0.3s;
}
.site-footer .social-icons a:hover { background: var(--primary-color); color: white; transform: translateY(-2px); }
.site-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    margin-top: 40px;
    font-size: 0.9rem;
}

/* ======== Contact Page ======== */
.contact-form-card {
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border-radius: 16px;
}
.contact-info-card {
    text-align: center;
    padding: 2rem;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    transition: all 0.3s;
    height: 100%;
}
.contact-info-card:hover { border-color: transparent; box-shadow: 0 10px 40px rgba(0,0,0,0.08); }
.contact-info-card .ci-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(13,110,253,0.1);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ======== Back to Top ======== */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(13,110,253,0.4);
    transition: all 0.3s;
}
.btn-back-to-top:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(13,110,253,0.6); }

/* ======== Pagination ======== */
.pagination-wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.pagination-wrap .page-info { color: var(--text-muted); font-size: 0.95rem; }

/* ======== Responsive ======== */
@media (max-width: 1025px) {
    .hero-swiper { height: 360px; }
    .hero-swiper .slide-content h2 { font-size: 2.2rem; }
    .hero-swiper .slide-content p { font-size: 1.1rem; }
}

@media (max-width: 768px) {
    .hero-swiper { height: 280px; }
    .hero-swiper .slide-content h2 { font-size: 1.8rem; }
    .hero-swiper .slide-content p { font-size: 1rem; }
    .page-banner { height: 250px; }
    .page-banner h1 { font-size: 1.8rem; }
    .page-banner p { font-size: 1rem; }
    .section-title h2 { font-size: 1.6rem; }
}

@media (max-width: 640px) {
    .hero-swiper { height: auto; }
    .hero-swiper .swiper-slide {
        aspect-ratio: 16 / 5;
    }
    .slide-bg-img {
        object-fit: contain;
    }
    .hero-swiper .slide-content h2 { font-size: 1.4rem; }
    .hero-swiper .slide-content p { font-size: 0.9rem; }
    .hero-swiper .slide-content .btn { padding: 0.4rem 1.2rem; font-size: 0.85rem; }
    .swiper-button-next, .swiper-button-prev { display: none; }
}

/* Banner images are 1920x600 (16:5). Keep the same aspect ratio at every
   viewport so the image is never squeezed or unexpectedly cropped. */
.hero-swiper {
    height: clamp(135px, 31.25vw, 600px);
    aspect-ratio: 16 / 5;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}
.hero-swiper .swiper-slide {
    height: 100%;
    aspect-ratio: auto;
}
.hero-swiper .slide-bg-img {
    object-fit: contain;
}
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
    top: 50%;
    width: 44px;
    height: 64px;
    margin-top: -32px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    z-index: 5;
}
.hero-swiper .swiper-button-prev { left: 8px; }
.hero-swiper .swiper-button-next { right: 8px; }
.hero-swiper .swiper-button-prev::after,
.hero-swiper .swiper-button-next::after { font-size: 24px; font-weight: 700; }
@media (max-width: 640px) {
    .hero-swiper {
        height: 31.25vw;
        aspect-ratio: 16 / 5;
    }
    .hero-swiper .slide-content {
        padding: 0 1rem;
    }
    .hero-swiper .slide-content h2,
    .hero-swiper .slide-content p,
    .hero-swiper .slide-content .btn {
        display: none;
    }
}
