/* Global Styles */
:root {
    --primary-color: #c9101e; /* Red color from FUYI logo */
    --secondary-color: #000000; /* Black from logo text */
    --light-color: #ffffff; /* White color */
    --gray-color: #f4f4f4;
    --dark-gray: #333333;
    --accent-gray: #8a8a8a; /* Gray color for line in logo */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--secondary-color);
    background-color: var(--light-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    margin-bottom: 20px;
    font-weight: 600;
}

h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
}

section h2 {
    text-align: center;
    margin-bottom: 40px;
}

section h2::after {
    left: 50%;
    transform: translateX(-50%);
}

p {
    margin-bottom: 15px;
}

img {
    max-width: 100%;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--light-color);
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #a5000e; /* Darker red on hover */
    transform: translateY(-2px);
}

section {
    padding: 80px 0;
}

/* Header */
header {
    background-color: var(--light-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    padding: 10px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
    background-color: transparent;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: width 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
    font-size: 24px;
}

.mobile-menu {
    position: fixed;
    top: 90px;
    left: 0;
    width: 100%;
    background-color: var(--light-color);
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 99;
    display: none;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul li {
    margin: 15px 0;
    text-align: center;
}

.mobile-menu ul li a {
    font-size: 18px;
    font-weight: 500;
}

/* Hero Section */
.hero {
    position: relative;
    height: auto;
    min-height: 300px;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--light-color);
    margin-top: 80px; /* Adjusted to account for the header */
    overflow: hidden;
}

.banner-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 0;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* About Section */
.about {
    background-color: var(--gray-color);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.about-image:hover {
    transform: scale(1.02);
}

/* Products Section */
.products {
    background-color: var(--light-color);
}

.product-tabs {
    width: 100%;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 10px 20px;
    background-color: var(--gray-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.product-gallery-container {
    width: 100%;
}

.product-gallery {
    display: none;
    text-align: center;
}

.product-gallery.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.product-gallery h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.product-gallery p {
    margin-bottom: 30px;
    color: var(--dark-gray);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.product-item {
    background: var(--light-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #f9f9f9;
    padding: 10px;
    transition: opacity 0.3s ease;
}

.product-caption {
    padding: 15px;
    font-weight: 500;
    color: var(--secondary-color);
    background-color: var(--light-color);
    margin-top: auto;
}

/* Contact Section */
.contact {
    background-color: var(--gray-color);
}

.contact-content {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.contact-info {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    flex: 1;
    min-width: 250px;
    max-width: 500px;
    padding: 25px;
    background-color: var(--light-color);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.info-item i {
    background-color: var(--primary-color);
    color: var(--light-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-text {
    flex: 1;
}

.info-text h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-text p {
    margin-bottom: 10px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.info-text p:last-child {
    margin-bottom: 0;
}

.contact-icon {
    color: var(--primary-color);
    font-size: 12px;
    margin-right: 8px;
    width: 12px;
    height: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    background: none;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--light-color);
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    align-items: center;
    text-align: left;
    gap: 20px;
}

.footer-logo img {
    width: 120px;
    height: auto;
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
}

.footer-links {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-links ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--light-color);
    transition: color 0.3s;
    font-size: 1.1rem;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.footer-social {
    flex: 1;
    min-width: 200px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--light-color);
    transition: all 0.3s;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 992px) {
    .header-right {
        gap: 20px;
    }
    
    nav ul li {
        margin-left: 20px;
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding: 40px 20px;
        max-width: 90%;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    nav ul {
        display: none;
    }
    
    .about-content, 
    .contact-content {
        flex-direction: column;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* Added transition for smooth opening/closing of mobile menu */
    .mobile-menu {
        transition: all 0.3s ease;
    }
    
    /* Adjust footer layout for mobile */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .logo img {
        height: 50px;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tab-buttons {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .tab-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    
    .footer-links ul {
        flex-direction: column;
        align-items: center;
    }
    
    .info-item {
        padding: 20px;
        min-width: 100%;
        margin-bottom: 15px;
    }
    
    .info-item i {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-right: 15px;
    }
    
    .info-text h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .info-text p {
        font-size: 1rem;
    }
    
    .footer-logo {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .footer-logo img {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 40px;
    }
    
    .hero {
        margin-top: 60px;
        min-height: 250px;
    }
    
    .hero-content {
        padding: 30px 15px;
    }
    
    .banner-image {
        object-position: center;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-item img {
        height: 180px;
        object-fit: contain;
    }
    
    .info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 15px;
    }
    
    .info-item i {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .contact-icon {
        font-size: 12px;
        margin-right: 6px;
        width: 12px;
        height: 12px;
    }
    
    .contact-detail-item {
        justify-content: center;
    }
    
    .contact-detail-item span {
        font-size: 1.1rem;
        line-height: 1.5;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

/* Modal Image Viewer */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    transition: 0.3s;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    animation: zoom 0.6s;
}

@keyframes zoom {
    from {transform: scale(0.1)}
    to {transform: scale(1)}
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: var(--light-color);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
}

#modalCaption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--light-color);
    padding: 20px 0;
    font-size: 1.2rem;
}

.product-item {
    cursor: pointer;
}

/* Clickable Images */
.clickable-image {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.clickable-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s;
}

.clickable-image:hover::after {
    opacity: 1;
}

.clickable-image::before {
    content: '\f00e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--light-color);
    font-size: 2rem;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
}

.clickable-image:hover::before {
    opacity: 1;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-detail-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.contact-detail-item span {
    font-size: 1.1rem;
    line-height: 1.5;
}

/* 图片优化 */
.product-item img, .about-image img, .banner-image {
    will-change: opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* 优化产品图片加载 */
.product-item img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #f9f9f9;
    padding: 10px;
    transition: opacity 0.3s ease;
}

/* 为所有加载中的图片添加淡入效果 */
img.lazy-load {
    opacity: 0;
    transition: opacity 0.5s;
}

img.lazy-load.loaded {
    opacity: 1;
}

/* VR Modal */
.vr-modal {
    padding-top: 30px;
}

.vr-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 75vh;
    margin: 0 auto;
}

.vr-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

#vrCaption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--light-color);
    padding: 20px 0;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .vr-container {
        height: 60vh;
    }
}

@media (max-width: 480px) {
    .vr-container {
        height: 50vh;
    }
} 