/* ==========================================================================
   FACTORY PAGE STYLES
   依赖公共样式变量：
   --secondary-color / --secondary-hover-color / --title-color
   --text-color / --border-color
   ========================================================================== */
/* ==========================================================================
   1. HERO WITH VIDEO BACKGROUND
   ========================================================================== */
.factory-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    max-height: 900px;
    display: flex;
    align-items: center;
    overflow: hidden;
}
/* Video Container */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}
.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 2;
}
/* Hero Content */
.factory-hero .hero-inner {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}
.factory-hero .hero-copy {
    max-width: 800px;
}
.factory-hero .hero-eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 20px;
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    backdrop-filter: blur(4px);
}
.factory-hero h1 {
    line-height: 1.14;
    font-size: clamp(38px, 5.5vw, 58px);
    color: #fff;
    margin: 0 0 28px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.factory-hero .hero-desc {
    font-size: 18px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 18px;
    max-width: 720px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}
.factory-hero .hero-desc:last-of-type {
    margin-bottom: 36px;
}
.factory-hero .btn {
    font-size: 16px;
    padding: 16px 32px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.factory-hero .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   2. GOOGLE MAP - Left Info + Right Map
   ========================================================================== */
.factory-map-section {
    width: 100%;
    padding: 60px 0;
    background: #f8fafc;
}

.factory-map-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 40px;
    align-items: start;
}

.factory-map-info {
    padding: 20px;
}

.factory-map-info__eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #3B82F6;
    margin-bottom: 12px;
    display: inline-block;
}

.factory-map-info__title {
    font-size: 32px;
    font-weight: 600;
    color: var(--title-color);
    margin: 0 0 24px 0;
    line-height: 1.3;
}

.factory-map-info__item {
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.factory-map-info__item strong {
    display: block;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 4px;
    font-size:16px;
}

.factory-map-info .btn {
    align-self: flex-start;
    background: #fff;
    color: var(--title-color);
    border: 1px solid #ddd;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.factory-map-info .btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.factory-map-info .btn i {
    font-size: 14px;
}

#factoryMap {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.factory-map-address {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    background: #fff;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.5;
}
.factory-map-address i {
    color: var(--secondary-color);
    font-size: 15px;
    margin-top: 2px;
    flex-shrink: 0;
}
.factory-gallery-item {
    position: relative;
    overflow: hidden;
    background: #eef2f7;
    margin: 0;
    transition: all 0.3s ease;
}
.factory-gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.factory-gallery-item:hover img {
    transform: scale(1.06);
}
.factory-gallery-item--large {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
}
.factory-gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(8, 13, 26, 0.85) 0%, rgba(8, 13, 26, 0.4) 70%, transparent 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

/* ==========================================================================
   3. 车间轮播卡片 - Swiper
   ========================================================================== */
.workshop-swiper-container {
    position: relative;
    margin-top: 48px;
}
.workshopSwiper {
    overflow: visible;
    padding: 0 0 60px 0;
}
.workshopSwiper .swiper-wrapper {
    display: flex;
}
.workshopSwiper .swiper-slide {
    height: auto;
}
.workshop-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.workshop-card__img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eef2f7;
}
.workshop-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.workshop-card:hover .workshop-card__img img {
    transform: scale(1.06);
}
.workshop-card__title {
    padding: 20px 24px;
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--title-color);
    text-align: center;
    line-height: 1.4;
}
/* Navigation Buttons */
.workshop-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
}
.workshop-nav__btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.workshop-nav__btn:hover {
    background: var(--secondary-color);
    color: white !important;
}
.swiper-button-next:after, .swiper-button-prev:after{
    font-size: 16px;
}

/* ==========================================================================
   4. 生产资源模块
   ========================================================================== */
.production-resources-layout {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 30px;
    align-items: start;
}
.production-resources-left {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.production-resources-left .section-head {
    margin-bottom: 0;
}
/* Equipment List */
.equipment-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-color);
    overflow: hidden;
}
.equipment-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    background: #fff;
    transition: all 0.2s ease;
}
.equipment-list-item:hover {
    background: #F8FAFC;
}
.equipment-list-item__name {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 400;
}
.equipment-list-item__qty {
    font-size: 14px;
    font-weight: 500;
    color: var(--title-color);
    min-width: 40px;
    text-align: right;
}
/* Bulk Order Card */
.production-resources-right {
    display: flex;
    align-items: center;
}
.bulk-order-card {
    width: 100%;
    padding: 48px 40px;
    background: linear-gradient(135deg, #F0F9FF 0%, #e4f3ea 100%);
    border: 1px solid #BAE6FD;
    border-radius: 16px;
}
.bulk-order-card__title {
    font-size: 28px;
    font-weight: 600;
    color: var(--title-color);
    margin: 0 0 16px 0;
}
.bulk-order-card__desc {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    margin: 0 0 40px 0;
}
.bulk-order-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.bulk-order-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.bulk-order-step__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 24px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}
.bulk-order-step:hover .bulk-order-step__icon {
    background: var(--secondary-color);
    color: #fff;
    transform: scale(1.05);
}
.bulk-order-step__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--title-color);
}
.bulk-order-step__arrow {
    color: #BAE6FD;
    font-size: 20px;
    flex-shrink: 0;
}

/* ==========================================================================
   5. Quality Control Section
   ========================================================================== */
.quality-control-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 60px;
    align-items: start;
}
.quality-control-image {
    border-radius: 5px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.quality-control-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.quality-control-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.quality-control-content .section-head {
    margin-bottom: 0;
}
/* QC Steps Grid */
.qc-steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.qc-step-item {
    display: flex;
    gap: 16px;
    padding: 15px;
    background: #fff;
    transition: all 0.3s ease;
}
.qc-step-item__icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 20px;
    flex-shrink: 0;
}
.qc-step-item__content {
    flex: 1;
}
.qc-step-item__title {
    font-size: 18px;
    font-weight: 500;
    color: var(--title-color);
    margin: 0 0 8px 0;
}
.qc-step-item__desc {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

/* ==========================================================================
   6. Warranty Section
   ========================================================================== */
.warranty-content{
    display: flex;
    align-items: center ;
    justify-content: space-between;
    gap: 40px;
}
.warranty-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    height: 100%;
    margin-bottom: 30px;
}
.warranty-card {
    padding: 15px;
    background: #fff;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #ccc;
}
.warranty-card__icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    color: var(--secondary-color);
    font-size: 40px;
    text-align: left;
}
.warranty-card__title {
    font-size: 18px;
    font-weight: 500;
    color: var(--title-color);
    margin: 0 0 10px 0;
    text-align: left;
}
.warranty-card__desc {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
    text-align: left;
}
.warranty-container{
    width: 1400px;
    margin: 0 auto;
    background: rgba(50, 150, 148, 0.7) url(/dist/img/banner/cta-banner.webp) no-repeat center center;
    background-blend-mode: multiply;
    background-size: cover;
    margin-bottom: 60px;
    padding: 0;
}
.warranty-cta {
    text-align: left;
    margin-top: 25px;
}
.warranty-cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-top: 64px;
    padding: 32px 40px;
}
.warranty-cta-box__content {
    flex: 1;
}
.warranty-cta-box__title {
    font-size: 22px;
    font-weight: 600;
    color: var(--title-color);
    margin: 0 0 10px 0;
}
.warranty-cta-box__desc {
    font-size: 15px;
    line-height: 1.6;
    color: #fff;
    margin: 0;
}
.warranty-cta-box__actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* ==========================================================================
   7. 表单增强（补充 .form-card / .field 公共样式）
   ========================================================================== */
.form-card .section-sub {
    text-align: left;
}
/* 文件上传 */
.file-drop {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    transition:
            border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
            background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: #FAFBFC;
}
.file-drop:hover,
.file-drop.is-dragover {
    border-color: var(--secondary-color);
    background: rgba(50, 150, 148, 0.04);
}
.file-drop input[type="file"] {
    display: none;
}
.file-drop__icon {
    font-size: 24px;
    color: var(--secondary-color);
    margin-bottom: 8px;
    line-height: 1;
}
.file-drop__text {
    font-size: 15px;
    font-weight: 600;
    color: var(--title-color);
}
.file-drop__hint {
    font-size: 13px;
    color: var(--text-color);
    margin-top: 4px;
    line-height: 1.5;
}
.file-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}
.file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 12px;
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 14px;
}
.file-list li .file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.file-list li .file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--title-color);
}
.file-list li .file-size {
    color: var(--text-color);
    font-size: 13px;
    white-space: nowrap;
}
.file-remove {
    background: none;
    border: none;
    color: #DC2626;
    font-size: 18px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.file-remove:hover {
    background: #FEE2E2;
}
/* 表单状态补充 */
.form-success.is-error {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #991B1B;
}
.form-success.is-error strong {
    color: #991B1B;
}

/* ==========================================================================
   8. 证书 Lightbox
   ========================================================================== */
.cert-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(8, 13, 26, 0.92);
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.cert-lightbox.is-open {
    display: flex;
}
.cert-lightbox__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}
.cert-lightbox__content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    display: block;
    margin: 0 auto;
}
.cert-lightbox__caption {
    color: #fff;
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.cert-lightbox__close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.cert-lightbox__close:hover {
    color: var(--secondary-color);
    background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   9. 工具类
   ========================================================================== */
.text-muted {
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.6;
}


/* ==========================================================================
   FACTORY PAGE — RESPONSIVE MEDIA QUERIES
   Breakpoint: max‑width:1024px | 996px | 768px | 480px
   放在原factory page css的最底部
========================================================================== */

/* ---------- ≤1024px 平板横屏 ---------- */
@media only screen and (max-width: 1024px) {
    /* Hero */
    .factory-hero {
        min-height: 520px;
    }
    .factory-hero .hero-inner {
        padding: 0 30px;
    }

    /* Overview 左右布局 */
    .factory-overview-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .factory-overview-content {
        gap: 24px;
    }

    /* Gallery grid */
    .factory-gallery-grid {
        grid-template-columns: repeat(2,1fr);
    }
    .factory-gallery-item img {
        height: 220px;
    }
    /* Map */
    .factory-map-container {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 30px;
    }
    #factoryMap {
        height: 400px;
    }

    /* Production resources 3列 */
    .production-resources-layout {
        grid-template-columns: repeat(2,1fr);
    }

    /* QC 左右布局 */
    .quality-control-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Warranty 4列卡片 */
    .warranty-grid {
        grid-template-columns: repeat(2,1fr);
    }
    .warranty-container {
        width: 100%;
    }
}

/* ---------- ≤996px 小平板 / 大屏折叠 ---------- */
@media only screen and (max-width: 996px) {
    .factory-overview-header .section-title {
        font-size: 32px;
    }

    /* stats 两列 */
    .factory-stats-compact {
        gap:16px;
    }

    /* bulk‑order‑card */
    .bulk-order-card {
        padding: 36px 28px;
    }
    .bulk-order-card__title {
        font-size: 24px;
    }

    /* QC steps grid */
    .qc-steps-grid {
        gap:18px;
    }

    /* cta box */
    .warranty-cta-box {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 24px;
        gap:20px;
    }
}

/* ---------- ≤768px 手机横屏 / 小平板竖屏 ---------- */
@media only screen and (max-width: 768px) {
    /* Hero video banner */
    .factory-hero {
        height: auto;
        min-height: 480px;
        max-height: none;
        padding-top: 100px;
    }
    .factory-hero .hero-inner {
        padding: 0 20px;
    }
    .factory-hero .hero-eyebrow {
        font-size:12px;
        padding:6px 12px;
    }
    .factory-hero .hero-desc {
        font-size:16px;
    }
    .factory-hero .btn {
        width:100%;
        text-align:center;
    }

    /* overview */
    .factory-overview-header .section-title {
        font-size:28px;
    }
    .factory-stats-compact {
        grid-template-columns: 1fr;
    }

    /* gallery */
    .factory-gallery-grid {
        grid-template-columns: 1fr;
    }
    .factory-gallery-item--large {
        grid-column: auto;
        grid-row: auto;
    }
    .factory-gallery-item img {
        height: 180px;
    }
    /* Map */
    .factory-map-section {
        padding: 40px 0;
    }
    .factory-map-container {
        padding: 0 20px;
    }
    .factory-map-info {
        padding: 24px 20px;
    }
    .factory-map-info__title {
        font-size: 20px;
    }
    #factoryMap {
        height: 320px;
    }

    /* workshop swiper */
    .workshopSwiper {
        padding-bottom: 48px;
    }

    /* production resources */
    .production-resources-layout {
        grid-template-columns: 1fr;
        gap:24px;
    }

    /* bulk‑order steps 横向转纵向 */
    .bulk-order-steps {
        flex-direction: column;
    }
    .bulk-order-step__arrow {
        transform: rotate(90deg);
    }

    /* qc steps grid */
    .qc-steps-grid {
        grid-template-columns: 1fr;
    }

    /* warranty */
    .warranty-grid {
        grid-template-columns: 1fr;
    }
    .warranty-content {
        flex-direction: column;
        align-items: flex-start;
    }

    /* file drop上传区域 */
    .file-drop {
        padding:24px 16px;
    }
}

/* ---------- ≤480px 小屏手机竖屏 ---------- */
@media only screen and (max-width: 480px) {
    .factory-hero .hero-eyebrow {
        margin-bottom:14px;
    }
    .factory-hero h1 {
        margin-bottom:20px;
    }
    .factory-hero .hero-desc {
        font-size:15px;
    }

    .factory-overview-header .section-title {
        font-size:24px;
    }
    .factory-stat-item__number {
        font-size:20px;
    }

    .bulk-order-card {
        padding:28px 20px;
    }
    .bulk-order-card__title {
        font-size:20px;
    }

    .qc-step-item {
        padding:12px 10px;
    }
    .qc-step-item__title {
        font-size:16px;
    }
    .qc-step-item__desc {
        font-size:14px;
    }

    .warranty-cta-box {
        padding:20px 16px;
    }
    .warranty-cta-box__actions {
        flex-direction:column;
        width:100%;
    }
    .warranty-cta-box__actions .btn {
        width:100%;
        text-align:center;
    }

    /* lightbox 证书弹窗 */
    .cert-lightbox {
        padding:12px;
    }
    .cert-lightbox__close {
        top:-36px;
        font-size:26px;
    }
}
