/* ============================================================
   vendor.css - 第三方样式覆盖（灯箱、遮罩、响应式）
   ============================================================ */

/* ---------- 灯箱 ---------- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-overlay .lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: 0.2s;
    z-index: 10;
    background: none;
    border: none;
    opacity: 0.7;
}

.lightbox-overlay .lightbox-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.lightbox-overlay .lightbox-image-wrap {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lightbox-overlay .lightbox-image-wrap img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
    animation: lightboxIn 0.3s ease;
}

@keyframes lightboxIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-overlay .lightbox-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lightbox-overlay .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 2.5rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 15px 20px;
    border-radius: 50%;
    transition: 0.3s;
    backdrop-filter: blur(4px);
}

.lightbox-overlay .lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.lightbox-overlay .lightbox-nav.prev {
    left: 20px;
}

.lightbox-overlay .lightbox-nav.next {
    right: 20px;
}

.lightbox-overlay .lightbox-counter {
    position: absolute;
    top: 20px;
    left: 30px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 300;
}

/* ---------- 翻译加载遮罩 ---------- */
.translating-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.translating-overlay.show {
    display: flex;
}

.translating-overlay .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e8ef;
    border-top-color: #1f2a3f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.translating-overlay p {
    margin-top: 18px;
    color: #1f2a3f;
    font-weight: 400;
    font-size: 1.1rem;
}

body.translating * {
    pointer-events: none;
}

body.translating .translating-overlay {
    pointer-events: auto;
}

/* ---------- 表单反馈 ---------- */
#formFeedback {
    margin-top: 1rem;
    font-weight: 300;
}

#formFeedback .success {
    color: #1f6b3e;
}

#formFeedback .error {
    color: #b13e3e;
}

#formFeedback .info {
    color: #1f2a3f;
}

/* ---------- 响应式 ---------- */
@media screen and (max-width: 992px) {
    .advantage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem 0;
    }
    .nav-links.open {
        display: flex;
    }
    .mobile-nav-toggle {
        display: block;
    }
    .navbar .container {
        flex-wrap: wrap;
    }
    .hero-carousel .carousel-slide {
        padding: 2rem 1.5rem;
        flex-direction: column;
    }
    .carousel-text h2 {
        font-size: 1.8rem;
    }
    .carousel-image-wrap {
        flex: 0 0 100%;
        min-width: unset;
        height: 180px;
        width: 100%;
    }
    .advantage-grid {
        grid-template-columns: 1fr;
    }
    .product-grid {
        grid-template-columns: 1fr 1fr;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .inquiry-form {
        padding: 1.5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .carousel-controls button {
        opacity: 0.6;
        font-size: 1.4rem;
    }
    .filter-bar {
        gap: 0.4rem;
    }
    .filter-bar .filter-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.75rem;
    }
    .lightbox-overlay .lightbox-nav {
        padding: 10px 14px;
        font-size: 1.5rem;
    }
    .lightbox-overlay .lightbox-nav.prev {
        left: 8px;
    }
    .lightbox-overlay .lightbox-nav.next {
        right: 8px;
    }
    .lightbox-overlay .lightbox-info {
        font-size: 0.75rem;
        padding: 6px 14px;
        bottom: 15px;
        white-space: normal;
        max-width: 90%;
    }
    .lightbox-overlay .lightbox-close {
        top: 12px;
        right: 16px;
        font-size: 1.8rem;
    }
    .lightbox-overlay .lightbox-counter {
        top: 12px;
        left: 16px;
        font-size: 0.7rem;
    }
    .gallery-item .label {
        font-size: 0.75rem;
        padding: 0.2rem 0.8rem;
        bottom: 12px;
    }
    .product-selector .product-item {
        flex-wrap: wrap;
    }
    .product-selector .product-item .spec-group {
        flex: 1 1 100%;
        margin-top: 4px;
    }
    .product-selector .product-item .product-info {
        flex: 1;
    }
    .product-selector .product-item .spec-item input[type="number"] {
        width: 38px;
    }
}

@media screen and (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    .product-selector .product-item .spec-item input[type="number"] {
        width: 32px;
    }
    .product-selector .selector-header .actions {
        width: 100%;
    }
    .product-selector .selector-header .actions .btn-sm {
        flex: 1;
        text-align: center;
    }
}