/* ===== CSS Variables ===== */
:root {
    --primary: #c41e2a;
    --primary-dark: #a01820;
    --primary-light: #fdf0f1;
    --primary-soft: #f8e8ea;
    --text: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --bg: #ffffff;
    --bg-warm: #fafafa;
    --bg-gray: #f5f5f5;
    --bg-dark: #1a1a1a;
    --border: #e8e8e8;
    --border-light: #f0f0f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --radius: 6px;
    --radius-lg: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
}

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    line-height: 1.7;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Top Bar ===== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    z-index: 1001;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 3px;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition);
}

.header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo img {
    height: 36px;
    width: auto;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all var(--transition);
    letter-spacing: 0.5px;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: all var(--transition);
    border-radius: 1px;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 71px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(196, 30, 42, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(196, 30, 42, 0.1) 0%, transparent 50%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 80px 0;
}

.hero-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    margin-bottom: 24px;
    padding: 6px 16px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.hero-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin-top: 20px;
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 17px;
    line-height: 1.8;
    color: rgba(255,255,255,0.7);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    transition: all var(--transition);
    letter-spacing: 0.5px;
}

.hero-btn.primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(196, 30, 42, 0.4);
}

.hero-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 42, 0.5);
}

.hero-btn.outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.hero-btn.outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.05);
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    letter-spacing: 1px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== Section Common ===== */
.section {
    padding: 90px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.section-desc {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== About ===== */
.about {
    background: var(--bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.about-lead p {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 20px;
    padding-left: 16px;
    border-left: 3px solid var(--primary);
}

.about-text p {
    margin-bottom: 16px;
    font-size: 14.5px;
    line-height: 1.9;
    color: var(--text-secondary);
    text-align: justify;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.tag {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 20px;
    border: 1px solid rgba(196, 30, 42, 0.1);
}

.about-image {
    position: relative;
}

.about-image .carousel {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-height: 300px;
}

.carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--bg-gray);
}

.carousel-track {
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    font-size: 22px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all var(--transition);
    z-index: 2;
    line-height: 1;
}

.carousel-btn:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

.carousel-dots .dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* Product Carousel */
.product-carousel-wrap {
    margin-bottom: 48px;
    min-height: 340px;
}

.product-carousel .carousel-slide .product-card {
    border-radius: var(--radius-lg);
}

.product-carousel .carousel-slide .product-img {
    height: 280px;
    background: var(--bg-gray);
}

.product-carousel .carousel-slide .product-img img {
    height: 100%;
    object-fit: cover;
}

.product-carousel .carousel-btn {
    background: rgba(255,255,255,0.95);
}

.product-carousel .carousel-dots {
    bottom: -32px;
}

.product-carousel .carousel-dots .dot {
    background: var(--border);
}

.product-carousel .carousel-dots .dot.active {
    background: var(--primary);
}

.about-image-accent {
    position: absolute;
    top: -12px;
    right: -12px;
    bottom: 12px;
    left: 12px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    opacity: 0.15;
    z-index: -1;
}

/* ===== Products ===== */
.products {
    background: var(--bg-warm);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
    cursor: default;
}

.product-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    border-color: transparent;
}

.product-card.has-image {
    cursor: pointer;
}

.product-card .product-img {
    overflow: hidden;
    height: 140px;
    background: #f5f5f5;
}

.product-card .product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card.has-image:hover .product-img img {
    transform: scale(1.04);
}

.product-body {
    padding: 16px 20px 20px;
}

.product-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.product-body p {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Features ===== */
.features {
    background: var(--bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    position: relative;
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
    background: var(--bg);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.feature-number {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 48px;
    font-weight: 900;
    color: var(--border-light);
    line-height: 1;
    font-style: italic;
    transition: color var(--transition);
}

.feature-card:hover .feature-number {
    color: var(--primary-soft);
}

.feature-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 20px;
    color: var(--primary);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.feature-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Stats ===== */
.stats {
    position: relative;
    background: var(--bg-dark);
    padding: 70px 0;
    overflow: hidden;
}

.stats-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(196, 30, 42, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 50%, rgba(196, 30, 42, 0.1) 0%, transparent 50%);
}

.stats-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
    color: #fff;
    align-items: center;
}

.stat-item {
    padding: 10px 0;
}

.stat-number {
    font-size: 52px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.stat-suffix {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    margin-left: 2px;
}

.stat-label {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    letter-spacing: 1px;
    margin-top: 8px;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    justify-self: center;
}

/* ===== Customers ===== */
.customers {
    background: var(--bg-warm);
}

.customers-image {
    margin-bottom: 40px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.customers-image img {
    width: 100%;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.case-card {
    background: var(--bg);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.case-card:hover {
    box-shadow: var(--shadow);
    border-color: transparent;
}

.case-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
    margin-bottom: 16px;
}

.case-icon svg {
    width: 100%;
    height: 100%;
}

.case-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.case-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Service ===== */
.service {
    background: var(--bg);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.service-item {
    text-align: center;
    padding: 32px 16px;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    border: 1px solid transparent;
}

.service-item:hover {
    background: var(--primary-light);
    border-color: rgba(196, 30, 42, 0.08);
}

.service-icon-wrap {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--primary);
}

.service-icon-wrap svg {
    width: 100%;
    height: 100%;
}

.service-item h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.service-item p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== Contact ===== */
.contact {
    background: var(--bg-warm);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 28px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.contact-card:hover {
    box-shadow: var(--shadow);
    border-color: transparent;
}

.contact-icon-wrap {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 10px;
    color: var(--primary);
}

.contact-icon-wrap svg {
    width: 22px;
    height: 22px;
}

.contact-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.contact-card p {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.contact-map img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: #999;
    position: relative;
}

.footer-top-accent {
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1fr;
    gap: 40px;
    padding: 44px 0 36px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-logo {
    height: 30px;
    margin-bottom: 14px;
}

.footer-company {
    font-size: 15px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-detail {
    font-size: 13px;
    color: #777;
    line-height: 1.8;
}

.footer-links h4,
.footer-qrcode h4 {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    margin-bottom: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-links a {
    display: block;
    font-size: 13.5px;
    color: #888;
    padding: 4px 0;
    transition: all var(--transition);
}

.footer-links a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-qrcode {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-qr-img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.08);
    margin-bottom: 8px;
}

.footer-qr-tip {
    font-size: 11.5px;
    color: #666;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 12.5px;
    color: #555;
}

.footer-bottom p {
    margin: 4px 0;
}

.footer-bottom a {
    color: #666;
    transition: color var(--transition);
}

.footer-bottom a:hover {
    color: var(--primary);
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(196, 30, 42, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(196, 30, 42, 0.45);
}

/* ===== Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    font-size: 32px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    opacity: 0.7;
    transition: opacity var(--transition);
    padding: 8px;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .service-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    .stat-divider {
        display: none;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 12px 16px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        border-top: 1px solid var(--border-light);
    }

    .nav.open {
        display: flex;
    }

    .nav-link.active::after {
        display: none;
    }

    .hero {
        min-height: 500px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 28px;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cases-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .stat-number {
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-btn {
        text-align: center;
        justify-content: center;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }
}
