/* ============ Reset & Base ============ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background: #000;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
li {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

:root {
    --color1: #1A56DB;
    --color2: #db261d;
    --nav-h: 80px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============ Navigation ============ */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(40px, calc((100vw - 1240px) / 2));
    transition: background 0.4s, box-shadow 0.4s;
    background: transparent;
}

#nav.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

#nav .nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    transition: color 0.4s;
}

#nav .nav-logo .logo-img {
    height: 52px;
    width: auto;
    display: block;
}

#nav.scrolled .nav-logo {
    color: #333;
}

#nav .nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
}

#nav .nav-menu>li {
    position: relative;
}

#nav .nav-menu>li>a {
    display: block;
    padding: 28px 16px;
    font-size: 15px;
    color: #fff;
    transition: color 0.3s;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 1px;
}

#nav.scrolled .nav-menu>li>a {
    color: #333;
}

#nav .nav-menu>li>a:hover,
#nav .nav-menu>li.active>a {
    color: var(--color1);
}

#nav .sub-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    min-width: 150px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(12px);
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

#nav .nav-menu>li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

#nav .sub-menu a {
    display: block;
    padding: 11px 24px;
    font-size: 13px;
    color: #555;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

#nav .sub-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--color1);
    border-radius: 0 2px 2px 0;
    transition: height 0.2s ease;
}

#nav .sub-menu a:hover {
    color: var(--color1);
    background: rgba(26, 86, 219, 0.05);
    padding-left: 30px;
}

#nav .sub-menu a:hover::before {
    height: 55%;
}







#nav .nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

#nav .nav-toggle span {
    width: 26px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
}

#nav.scrolled .nav-toggle span {
    background: #333;
}

/* Mobile nav */
#mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s;
}

#mobile-nav.open {
    opacity: 1;
    visibility: visible;
}

#mobile-nav a {
    font-size: 20px;
    color: #fff;
    padding: 10px 0;
}

#mobile-nav .sub-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 20px;
}

#mobile-nav .sub-links a {
    font-size: 16px;
    color: #aaa;
}

.product-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.35s ease;
    cursor: pointer;
    display: block;
    border: 1px solid #eef0f2;
}

.product-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    border-color: #d0d8e0;
}

.product-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-item:hover img {
    transform: scale(1.05);
}

.product-item .item-body {
    padding: 16px 18px 18px;
}

.product-item .product-name {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
    line-height: 1.4;
}

.product-item .product-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-item .product-btn {
    display: inline-block;
    padding: 5px 16px;
    border: 1px solid var(--color1);
    color: var(--color1);
    font-size: 12px;
    border-radius: 3px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.product-item:hover .product-btn {
    background: var(--color1);
    color: #fff;
}

/* ============ Animations (triggered by JS) ============ */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
    #nav {
        padding: 0 16px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    #nav .nav-logo {
        color: #333;
    }

    #nav .nav-menu {
        display: none;
    }

    #nav .nav-menu>li>a {
        color: #333;
    }



    #nav .nav-toggle {
        display: flex;
    }

    #nav .nav-toggle span {
        background: #333;
    }

    #nav.scrolled {
        background: rgba(255, 255, 255, 0.98);
    }
}

.services .service-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 18px;
}

.services .service-item {
    padding: 24px 22px 22px 18px;
    border-left: 3px solid var(--color1);
    background: #f8fafc;
    border-radius: 0 6px 6px 0;
    transition: 0.35s;
}

.services .service-item:hover {
    background: #eef3f8;
    border-left-color: #002d5a;
    transform: translateX(4px);
}

.services .service-item .svc-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    background: var(--color1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.services .service-item .svc-icon svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.services .service-item .svc-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.services .service-item .svc-desc {
    font-size: 13px;
    color: #999;
    line-height: 1.65;
}

/* ============ Section: Factory ============ */

























/* ============ Responsive: new sections ============ */
@media (max-width: 900px) {

    .services .service-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }






}

/* toast */
.toast-pop {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color1);
    color: #fff;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.toast-pop.show {
    opacity: 1;
}


/* ============ Sub Page ============ */
html,
body {
    overflow: auto;
}

#nav {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

#nav .nav-logo {
    color: #333;
}

#nav .nav-menu>li>a {
    color: #333;
}

#nav .nav-menu>li>a:hover,
#nav .nav-menu>li.active>a {
    color: var(--color1);
}


