/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    color: #333;
    background-color: #f9f9f9;
}

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

/* Header Styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.logo img {
    height: 105px;
    width: auto;
    object-fit: contain;
}

.slogan {
    font-size: 0.9rem;
    font-weight: 500;
    color: #27ae60;
    max-width: 300px;
    line-height: 1.4;
    white-space: normal;
    text-align: left;
    margin: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #27ae60;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 1100;
    align-self: center;
    margin-left: auto;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger Menu Animation */
.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 2rem;
}

/* Services Section */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
    margin-bottom: 1rem;
    color: #27ae60;
}

/* Factory Demo Section */
.factory-demo {
    background: white;
}

.factory-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.factory-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

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

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.product-info p {
    margin-bottom: 1rem;
    color: #666;
}

.btn {
    display: inline-block;
    background-color: #27ae60;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #229954;
}

/* Product Details */
.product-details {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Product Image Carousel */
.product-image-container {
    margin-bottom: 2rem;
}

.main-image {
    position: relative;
    max-width: 600px;
    margin: 0 auto 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 1);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.thumbnail-gallery {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    justify-content: center;
    align-items: center;
}

.thumbnail-gallery::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.thumbnail-item {
    flex: 0 0 100px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-item:hover {
    opacity: 0.8;
}

.thumbnail-item.active {
    border-color: #27ae60;
    opacity: 1;
}

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

/* Legacy product gallery (backward compatibility) */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.product-description {
    max-width: 800px;
    margin: 0 auto;
}

.product-description h2 {
    margin-bottom: 1rem;
}

.product-description p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #2ecc71;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section ul li a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    opacity: 1;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    /* Base Layout */
    .container {
        width: 95%;
        padding: 0 10px;
    }
    
    /* Navigation */
    header nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 0;
        gap: 0;
    }
    
    /* Hamburger Menu */
    .hamburger-menu {
        display: flex;
    }
    
    /* Navigation Links - Mobile */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        padding: 1.5rem 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
        width: 100%;
        max-width: 100%;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    /* Logo and Slogan */
    .logo-container {
        flex-direction: row;
        text-align: left;
        gap: 0.8rem;
        align-items: center;
        flex: 1;
    }
    
    .logo img {
        height: 60px;
    }
    
    .slogan {
        font-size: 0.7rem;
        max-width: 180px;
        margin: 0;
        line-height: 1.2;
    }
    
    /* Hamburger Menu */
    .hamburger-menu {
        align-self: center;
    }
    
    /* Hero Section */
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Sections */
    .section {
        padding: 2rem 0;
    }
    
    /* Services */
    .services {
        grid-template-columns: 1fr;
    }
    
    /* Factory Demo */
    .factory-gallery {
        grid-template-columns: 1fr;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact Form */
    .contact-section {
        grid-template-columns: 1fr;
    }
    
    /* Product Details */
    .product-details {
        padding: 1rem;
    }
    
    .main-image {
        max-width: 100%;
        height: auto;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}