/* Factory portal redesign */
:root {
    --cw-ink: #101827;
    --cw-muted: #5d6778;
    --cw-line: #d9e1ea;
    --cw-soft: #f4f7fb;
    --cw-blue: #064ea8;
    --cw-blue-dark: #073264;
    --cw-blue-soft: #e8f1ff;
    --cw-green: #0f8f65;
    --cw-radius: 8px;
}

html { scroll-behavior: smooth; }

body {
    background: #fff;
    color: var(--cw-ink);
    padding-top: 0;
    font-size: 15px;
}

.topbar {
    position: static;
    background: #0b1422;
    color: #dce6f5;
    border: 0;
    padding: 8px 0;
}

.topbar .container {
    justify-content: space-between;
    gap: 16px;
}

.topbar .container::before {
    content: "惠州真空镀膜与塑胶表面处理工厂 · 来图来样评估";
    color: #9fb3cf;
    font-size: 13px;
}

.topbar-phone {
    color: #fff !important;
    font-size: 14px;
}

.phone-icon,
.footer-contact-icon { display: none; }

.phone-num,
.phone-label {
    font-size: inherit;
    letter-spacing: 0;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: none;
    border-bottom: 1px solid var(--cw-line);
}

.navbar .container { min-height: 76px; }
.logo { gap: 12px; }
.logo-img { width: 42px; height: 42px; }

.logo-text-cn {
    color: var(--cw-ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
}

.logo-text-en {
    color: var(--cw-muted);
    font-size: 10px;
    letter-spacing: 0;
}

.nav-links { gap: 4px; }

.nav-links a {
    color: #243044;
    padding: 10px 11px;
    font-size: 14px;
    border-radius: 6px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--cw-blue);
    background: var(--cw-blue-soft);
}

.mobile-menu-btn {
    border: 1px solid var(--cw-line);
    border-radius: 6px;
    background: #fff;
    color: var(--cw-ink);
    width: 42px;
    height: 42px;
}

.cw-main { overflow: hidden; }

.cw-container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

.cw-hero {
    background: linear-gradient(90deg, rgba(8, 19, 34, 0.96) 0%, rgba(8, 30, 58, 0.86) 44%, rgba(8, 30, 58, 0.18) 62%), url("../images/coating-line.svg") center right / cover no-repeat;
    color: #fff;
    min-height: 610px;
    display: flex;
}

.cw-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 560px) 1fr;
    gap: 42px;
    align-items: center;
    padding: 68px 0 40px;
}

.cw-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b7d6ff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
}

.cw-kicker::before {
    content: "";
    width: 28px;
    height: 2px;
    background: #62a8ff;
}

.cw-hero h1 {
    font-size: 46px;
    line-height: 1.18;
    margin: 0 0 18px;
    color: #fff;
    letter-spacing: 0;
}

.cw-hero-lead {
    color: #dbe7f7;
    font-size: 17px;
    line-height: 1.8;
    max-width: 560px;
    margin: 0 0 28px;
}

.cw-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 0 0 26px;
}

.cw-metric {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2px 12px;
}

.cw-metric strong {
    display: block;
    font-size: 22px;
    color: #fff;
    line-height: 1.2;
}

.cw-metric span {
    display: block;
    color: #aebed4;
    font-size: 12px;
    margin-top: 5px;
}

.cw-router {
    background: rgba(255, 255, 255, 0.96);
    color: var(--cw-ink);
    border-radius: var(--cw-radius);
    padding: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.cw-router-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.cw-field label,
.quote-field label {
    display: block;
    font-size: 12px;
    color: #334156;
    font-weight: 800;
    margin-bottom: 7px;
}

.cw-field select,
.quote-field input,
.quote-field select,
.quote-field textarea {
    width: 100%;
    border: 1px solid var(--cw-line);
    border-radius: 6px;
    padding: 12px;
    font: inherit;
    color: var(--cw-ink);
    background: #fff;
}

.cw-button,
.cw-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 6px;
    padding: 0 18px;
    font-weight: 800;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.cw-button {
    background: var(--cw-blue);
    color: #fff;
}

.cw-button:hover {
    background: var(--cw-blue-dark);
    color: #fff;
}

.cw-outline {
    background: #fff;
    color: var(--cw-blue);
    border-color: #b6cbed;
}

.cw-outline:hover {
    border-color: var(--cw-blue);
    background: var(--cw-blue-soft);
}

.cw-upload-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    border-top: 1px solid var(--cw-line);
    padding-top: 14px;
}

.cw-upload-strip strong { display: block; font-size: 14px; }
.cw-upload-strip span { display: block; color: var(--cw-muted); font-size: 12px; margin-top: 2px; }

.cw-hero-note {
    justify-self: end;
    align-self: end;
    width: min(360px, 100%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--cw-ink);
    border-radius: var(--cw-radius);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.cw-hero-note strong { display: block; font-size: 16px; margin-bottom: 8px; }
.cw-hero-note p { color: var(--cw-muted); margin: 0; line-height: 1.65; }

.cw-capability-bar { background: var(--cw-blue); color: #fff; }

.cw-capability-bar .cw-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
}

.cw-capability-bar span {
    padding: 17px 10px;
    text-align: center;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 700;
    font-size: 13px;
}

.cw-section { padding: 66px 0; }
.cw-section-soft { background: var(--cw-soft); }

.cw-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 26px;
}

.cw-section h2 {
    font-size: 30px;
    line-height: 1.2;
    margin: 0;
    color: var(--cw-ink);
    letter-spacing: 0;
}

.cw-section-subtitle {
    color: var(--cw-muted);
    margin: 10px 0 0;
    max-width: 640px;
    line-height: 1.7;
}

.cw-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--cw-line);
    border-radius: var(--cw-radius);
    background: #fff;
}

.cw-compare {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.cw-compare th,
.cw-compare td {
    padding: 17px 18px;
    border-bottom: 1px solid var(--cw-line);
    border-right: 1px solid var(--cw-line);
    text-align: left;
    vertical-align: top;
}

.cw-compare th {
    background: #edf3fb;
    color: #27354a;
    font-size: 14px;
}

.cw-compare th:first-child { width: 128px; }
.cw-compare tr:last-child td { border-bottom: 0; }

.cw-compare td:first-child {
    font-weight: 800;
    color: var(--cw-blue);
    background: #f7faff;
}

.cw-swatches { display: flex; gap: 8px; margin-top: 10px; }
.cw-swatch { width: 30px; height: 34px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, 0.12); box-shadow: inset 0 0 10px rgba(255,255,255,.45); }
.s-silver { background: linear-gradient(90deg, #747b85, #f7f9fb, #929aa5); }
.s-black { background: linear-gradient(90deg, #05070b, #313947, #090b10); }
.s-blue { background: linear-gradient(90deg, #102b68, #2f75d1, #0b234f); }
.s-gold { background: linear-gradient(90deg, #8c5b10, #f0c66e, #98610f); }
.s-purple { background: linear-gradient(90deg, #3a1d73, #a55bd8, #1f144d); }
.s-copper { background: linear-gradient(90deg, #7c3d1e, #e9b082, #84411e); }

.industry-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }

.industry-tab {
    border: 1px solid var(--cw-line);
    background: #fff;
    color: #28364b;
    border-radius: 6px;
    padding: 12px 22px;
    font-weight: 800;
    cursor: pointer;
}

.industry-tab.active { background: var(--cw-blue); border-color: var(--cw-blue); color: #fff; }

.industry-panel {
    display: none;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 30px;
    align-items: center;
}

.industry-panel.active { display: grid; }

.industry-copy ul { margin: 18px 0 24px; }

.industry-copy li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: #27354a;
}

.industry-copy li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cw-green);
}

.industry-images,
.factory-grid,
.testing-grid { display: grid; gap: 16px; }

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

.cw-image-card {
    background: #fff;
    border: 1px solid var(--cw-line);
    border-radius: var(--cw-radius);
    overflow: hidden;
}

.cw-image-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.cw-image-card span {
    display: block;
    padding: 12px 14px;
    font-weight: 800;
    font-size: 14px;
}

.factory-grid { grid-template-columns: repeat(5, 1fr); }
.factory-grid .cw-image-card img { height: 150px; }
.factory-grid .cw-image-card span { min-height: 58px; }

.cw-stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-top: 22px;
    border: 1px solid var(--cw-line);
    border-radius: var(--cw-radius);
    overflow: hidden;
}

.cw-stat { background: #fff; padding: 20px; }
.cw-stat strong { display: block; color: var(--cw-blue); font-size: 28px; line-height: 1.1; }
.cw-stat span { color: var(--cw-muted); display: block; margin-top: 8px; }

.testing-grid { grid-template-columns: repeat(6, 1fr); }

.testing-item {
    background: #fff;
    border: 1px solid var(--cw-line);
    border-radius: var(--cw-radius);
    overflow: hidden;
}

.testing-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}

.testing-item div { padding: 12px; }
.testing-item strong { display: block; font-size: 14px; }
.testing-item span { display: block; color: var(--cw-muted); font-size: 12px; margin-top: 5px; line-height: 1.5; }

.cw-bottom-grid {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    gap: 22px;
}

.faq-panel,
.quote-panel {
    background: #fff;
    border: 1px solid var(--cw-line);
    border-radius: var(--cw-radius);
    padding: 24px;
}

.faq-button {
    width: 100%;
    border: 0;
    background: transparent;
    border-bottom: 1px solid var(--cw-line);
    padding: 16px 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    color: var(--cw-ink);
    font-weight: 800;
}

.faq-answer { display: none; color: var(--cw-muted); line-height: 1.75; padding: 12px 0 16px; }
.faq-item.active .faq-answer { display: block; }

.quote-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.quote-field.full,
.quote-actions { grid-column: 1 / -1; }

.file-name {
    display: block;
    color: var(--cw-muted);
    font-size: 12px;
    margin-top: 6px;
}

.quote-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--cw-line);
    padding-top: 16px;
}

.quote-actions label {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: var(--cw-muted);
    font-size: 13px;
}

.cw-footer {
    background: #101827;
    color: #d9e4f4;
    padding: 34px 0 18px;
}

.cw-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 0.7fr;
    gap: 26px;
}

.cw-footer h3,
.cw-footer h4 { color: #fff; margin: 0 0 12px; }
.cw-footer p,
.cw-footer a { color: #b9c7da; line-height: 1.8; }
.cw-footer a:hover { color: #fff; }

.cw-footer-links { display: grid; gap: 7px; }

.qr-box {
    background: #fff;
    color: #253247;
    min-height: 112px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    text-align: center;
    font-size: 12px;
    padding: 12px;
}

.cw-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 26px;
    padding-top: 16px;
    color: #94a3b8;
    font-size: 13px;
}

.cw-floating-contact {
    position: fixed;
    right: 18px;
    bottom: 22px;
    z-index: 999;
    display: grid;
    gap: 8px;
}

.cw-floating-contact a {
    background: var(--cw-blue);
    color: #fff;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(6, 78, 168, 0.24);
}

.cw-floating-contact a:last-child {
    background: #fff;
    color: var(--cw-blue);
    border: 1px solid #bdd0eb;
}

@media (max-width: 1060px) {
    .nav-links {
        position: absolute;
        left: 20px;
        right: 20px;
        top: 76px;
        display: none;
        flex-direction: column;
        background: #fff;
        border: 1px solid var(--cw-line);
        border-radius: var(--cw-radius);
        padding: 10px;
        box-shadow: 0 18px 38px rgba(16, 24, 39, 0.14);
    }

    .nav-links.active { display: flex; }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .cw-hero-grid,
    .industry-panel,
    .cw-bottom-grid { grid-template-columns: 1fr; }

    .cw-hero-note { justify-self: start; }
    .factory-grid,
    .testing-grid { grid-template-columns: repeat(3, 1fr); }
    .cw-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .topbar .container::before { display: none; }
    .topbar .container { justify-content: center; }
    .logo-text-en { display: none; }
    .logo-text-cn { font-size: 13px; }
    .cw-container { width: min(100% - 28px, 1200px); }

    .cw-hero {
        min-height: auto;
        background: linear-gradient(180deg, rgba(8, 19, 34, 0.96), rgba(8, 30, 58, 0.84)), url("../images/coating-line.svg") center / cover no-repeat;
    }

    .cw-hero-grid { padding: 42px 0 28px; }
    .cw-hero h1 { font-size: 32px; }

    .cw-metrics,
    .cw-router-row,
    .cw-capability-bar .cw-container,
    .cw-stat-row,
    .quote-form { grid-template-columns: 1fr 1fr; }

    .cw-router-row .cw-button,
    .quote-field.full,
    .quote-actions { grid-column: 1 / -1; }

    .cw-upload-strip,
    .quote-actions,
    .cw-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .industry-images,
    .factory-grid,
    .testing-grid,
    .cw-footer-grid { grid-template-columns: 1fr; }

    .cw-section { padding: 46px 0; }
    .cw-section h2 { font-size: 24px; }

    .cw-floating-contact {
        left: 14px;
        right: 14px;
        grid-template-columns: 1fr 1fr;
        bottom: 14px;
    }
}
