/* ============================================
   LIXIN VICTORY — Magnetic Door Curtain Factory
   Color Theme: Deep Blue (#1e40af)
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-bg: #eff6ff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --green: #16a34a;
    --red: #dc2626;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { padding-left: 1.5rem; }

/* ---------- Utility ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.text-center { text-align: center; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0; }

/* ---------- Header ---------- */
.header {
    background: linear-gradient(135deg, var(--gray-900) 0%, #1a365d 100%);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.logo {
    color: var(--white);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.logo strong { font-size: 1.25rem; letter-spacing: 0.5px; }
.logo span { font-size: 0.7rem; opacity: 0.7; }

.nav { display: flex; gap: 0.25rem; }

.nav-link {
    color: rgba(255,255,255,0.85);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: var(--white);
    background: rgba(255,255,255,0.15);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a5f 50%, #0f172a 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/hero-factory.svg') center/cover no-repeat;
    opacity: 0.15;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30,64,175,0.7) 0%, rgba(15,23,42,0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 2rem 1rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    opacity: 0.9;
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
    background: var(--primary);
    color: var(--white);
    padding: 2rem 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}
.stat-number { font-size: 2rem; font-weight: 800; }
.stat-label { font-size: 0.9rem; opacity: 0.85; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30,64,175,0.3);
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}
.btn-ghost {
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border-color: rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.25);
    color: var(--white);
}
.btn-lg { padding: 0.8rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }

/* ---------- Section ---------- */
.section { padding: 4rem 0; }
.section-alt { background: var(--gray-50); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}
.section-subtitle { color: var(--gray-500); font-size: 1.05rem; }

/* ---------- Products Grid ---------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-image-link { display: block; }
.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--gray-100);
}

.product-info { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.product-category {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.product-name { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.product-name a { color: var(--gray-900); }
.product-name a:hover { color: var(--primary); }
.product-short-desc { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 0.75rem; }
.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    margin-top: auto;
}
.product-price { font-weight: 700; color: var(--primary); font-size: 1rem; }
.product-moq { font-size: 0.8rem; color: var(--gray-500); }
.product-actions { display: flex; gap: 0.5rem; }

/* ---------- Product Detail ---------- */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 2rem;
}
.breadcrumb a { color: var(--primary); }

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-gallery { }
.main-image {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: zoom-in;
    transition: var(--transition);
}
.main-image:hover { transform: scale(1.02); }

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.gallery-thumbs img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}
.gallery-thumbs img:hover { border-color: var(--primary); }

.product-detail-info { }
.product-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem; }
.product-price-display, .product-moq-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.price-label, .moq-label { font-weight: 600; color: var(--gray-700); }
.price-value { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.moq-value { font-weight: 600; color: var(--gray-900); }
.product-description {
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}
.product-actions-detail { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Tabs ---------- */
.product-tabs {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 3rem;
}
.tab-content { }
.tab-content h3 { margin-bottom: 1rem; color: var(--primary); }
.feature-list { list-style: none; padding: 0; }
.feature-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
}
.feature-list li:last-child { border-bottom: none; }

.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
}
.spec-label { font-weight: 600; color: var(--gray-700); width: 40%; background: var(--white); }
.spec-value { color: var(--gray-900); }

/* ---------- Features Grid ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-icon { margin-bottom: 1rem; }
.feature-card h3 { margin-bottom: 0.5rem; color: var(--gray-900); }
.feature-card p { color: var(--gray-500); font-size: 0.9rem; }

/* ---------- CTA Section ---------- */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}
.cta-section h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.cta-section p { opacity: 0.9; margin-bottom: 2rem; font-size: 1.1rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-section .btn-outline { color: var(--white); border-color: rgba(255,255,255,0.5); }
.cta-section .btn-outline:hover { background: rgba(255,255,255,0.15); }

/* ---------- Page Banner ---------- */
.page-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a5f 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}
.page-banner h1 { font-size: 2.2rem; margin-bottom: 0.25rem; }
.page-banner p { opacity: 0.85; }

/* ---------- Inquiry Form ---------- */
.inquiry-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.inquiry-form-wrapper { }
.inquiry-form { }

.form-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}
.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-bg);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30,64,175,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.form-actions { text-align: center; margin-top: 1rem; }
.form-actions .btn { min-width: 200px; }

/* ---------- Sidebar ---------- */
.inquiry-sidebar { }
.sidebar-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}
.sidebar-card h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}
.sidebar-card p { font-size: 0.9rem; color: var(--gray-700); margin-bottom: 0.5rem; }
.sidebar-card ol { padding-left: 1.25rem; }
.sidebar-card li {
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

/* ---------- Alert ---------- */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: var(--green); }
.alert-error { background: #fef2f2; border: 1px solid #fca5a5; color: var(--red); }
.alert ul { margin: 0; padding-left: 1.25rem; }
.alert ul li { margin-bottom: 0.25rem; }

/* ---------- Filter Bar ---------- */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.filter-categories { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-tag {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--gray-100);
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
}
.filter-tag:hover, .filter-tag.active {
    background: var(--primary);
    color: var(--white);
}

.search-box { display: flex; gap: 0.5rem; }
.search-box input {
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
    width: 220px;
}
.search-box input:focus { outline: none; border-color: var(--primary); }

.empty-state { text-align: center; padding: 3rem; color: var(--gray-500); }

/* ---------- Page Content ---------- */
.page-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    line-height: 1.8;
}
.page-content h2 { color: var(--primary); margin: 1.5rem 0 0.75rem; }
.page-content h3 { color: var(--gray-900); margin: 1rem 0 0.5rem; }
.page-content ul, .page-content ol { margin: 0.5rem 0 1rem; }
.page-content li { margin-bottom: 0.5rem; }
.page-content a { color: var(--primary); }

/* ---------- FAQ ---------- */
.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}
.faq-item h4 { color: var(--primary); margin-bottom: 0.5rem; }
.faq-item p { color: var(--gray-700); font-size: 0.95rem; }

/* ---------- Footer ---------- */
.footer {
    background: var(--gray-900);
    color: rgba(255,255,255,0.85);
    padding: 3rem 0 1.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-brand h3 { color: var(--white); margin-bottom: 0.5rem; }
.footer-brand p { font-size: 0.85rem; opacity: 0.7; line-height: 1.6; }
.footer-col h4 {
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-col a:hover { color: var(--white); }
.footer-col p { font-size: 0.85rem; opacity: 0.7; margin-bottom: 0.35rem; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.5;
}

/* ---------- Floating Buttons ---------- */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: var(--transition);
    position: relative;
}
.float-btn:hover { transform: scale(1.1); }

.whatsapp-btn { background: #25d366; }
.whatsapp-btn:hover { background: #1fa855; }

.wechat-btn { background: #07c160; }
.wechat-btn:hover { background: #06a84f; }

.top-btn { background: var(--primary); }
.top-btn:hover { background: var(--primary-dark); }

.float-label {
    position: absolute;
    right: 68px;
    background: var(--gray-900);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: var(--transition);
    pointer-events: none;
}
.float-btn:hover .float-label {
    opacity: 1;
    transform: translateX(0);
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    line-height: 1;
}
.modal-close:hover { color: var(--gray-900); }
.modal-content h3 { color: var(--primary); margin-bottom: 1rem; }

.wechat-qr {
    margin: 1rem auto;
    width: 200px;
    height: 200px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.wechat-qr img { width: 100%; height: 100%; object-fit: contain; }
.wechat-id { font-weight: 700; color: var(--gray-900); margin: 0.75rem 0 0.25rem; }
.wechat-hint { font-size: 0.85rem; color: var(--gray-500); }

/* ---------- Related Products ---------- */
.related-products { margin-top: 3rem; }

/* ---------- Scroll Animation ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .product-detail { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--gray-900);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    .nav.active { display: flex; }
    .nav-link { padding: 0.75rem 1rem; }

    .hero { min-height: 60vh; }
    .hero-actions { flex-direction: column; align-items: center; }

    .products-grid { grid-template-columns: 1fr; }

    .inquiry-layout { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }

    .filter-bar { flex-direction: column; align-items: stretch; }
    .search-box { flex-direction: column; }
    .search-box input { width: 100%; }

    .footer-grid { grid-template-columns: 1fr; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .stat-number { font-size: 1.5rem; }

    .product-detail { gap: 1.5rem; }

    .floating-buttons { right: 12px; bottom: 12px; }
    .float-btn { width: 48px; height: 48px; }
    .float-label { display: none; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.75rem; }
    .section { padding: 2.5rem 0; }
    .product-tabs { padding: 1rem; }
    .form-section { padding: 1rem; }
}

/* ---------- Print ---------- */
@media print {
    .header, .footer, .floating-buttons, .modal-overlay, .cta-section { display: none; }
    .hero { min-height: auto; padding: 1rem; }
    .section { padding: 1rem 0; }
}
