/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Khmer:wght@100..900&display=swap');

:root {
    --primary-color: #e10020;
    --secondary-color: #002aa2;
    --terziary-color: #e8bb42;
    --text-color: #333;
    --light-color: #fff;
    --dark-color: #222;
    --background-color: #f9f5e9;
    --accent-color: #d4af37;
    --font-family: 'Noto Sans Khmer', sans-serif;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

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

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

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.8s ease;
    border: 2px solid var(--primary-color);
}

.cta-button:hover {
    background-color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    color: var(--terziary-color);
    transition: all 0.8s ease;
}

.learn-more {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
}

.learn-more::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.learn-more:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.terms {
    font-size: 0.8rem;
    margin-top: 20px;
}

/* Header */
header {
    background-color: var(--light-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    box-shadow: 4px 12px 20px 5px rgba(0,0,0,0.17);
}

.logo img {
    height: 80px;
}

nav {
    margin-left: auto;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

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

nav ul li a {
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1.2rem;
    position: relative;
}

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

nav ul li a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
}

/* Hero Section */
.home {
    position: relative;
    color: var(--light-color);
    text-align: center;
    padding: 0;
    height: 88vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.home:before, .home:after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    z-index: -1;
}

.home:before {
    left: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/images/p1.webp');
    background-size: cover;
    background-position: center;
}

.home:after {
    right: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/images/img1.webp');
    background-size: cover;
    background-position: center;
}

.home-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.home h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--light-color);
}

.home p {
    font-size: 1.4rem;
    margin-bottom: 30px;
}

/* Scroll Down Animation */
.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--light-color);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

/* Featured Product Section */
.featured-product {
    display: flex;
    align-items: center;
    padding: 80px 5%;
    background-color: var(--light-color);
}

.product-image, .product-info {
    flex: 1;
    padding: 0 30px;
}

.product-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.product-info p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Our Story Section */
.our-story {
    display: flex;
    align-items: center;
    padding: 80px 5%;
    background-color: var(--background-color);
}

.story-content {
    flex: 1;
    padding: 0 30px;
    max-width: 800px;
}

.story-content h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--secondary-color);
    text-align: center;
}

.story-text {
    background-color: var(--light-color);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.story-text h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.story-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

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

.story-image {
    flex: 1;
    padding: 0 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 60%;
}

.story-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Product Showcase Section */
.product-showcase {
    padding: 80px 5%;
    text-align: center;
    background-color: var(--light-color);
}

.product-showcase h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.product-card {
    background-color: var(--background-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}


.product-card img {
    width: 100% !important;
    height: auto !important;
    max-height: 450px !important;
    object-fit: contain !important;
    transition: transform 0.5s ease !important;
    padding: 20px !important;
}


.product-card h3 {
    padding: 20px 20px 10px;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.product-card p {
    padding: 0 20px 20px;
    flex-grow: 1;
}


/* Call to Action Section */
.cta-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../assets/images/classic.webp');
    background-size: cover;
    background-position: center;
    color: var(--light-color);
    text-align: center;
    padding: 100px 20px;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--light-color);
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 60px 5% 20px;
}

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

.footer-logo img {
    max-width: 120px;
    margin-bottom: 20px;
}

.footer-links h3, .footer-contact h3, .footer-social h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

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

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

.footer-links ul li a {
    color: var(--light-color);
    transition: color 0.3s ease;
}

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

.footer-contact p {
    margin-bottom: 10px;
}

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

.social-icons a {
    color: var(--light-color);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
}

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

/* Language Switcher */
.language-switcher-container {
    margin-left: 20px;
}

.language-switcher {
    display: flex;
    align-items: center;
}

.language-switcher button {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--secondary-color);
    padding: 5px;
    margin: 0 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-switcher button img {
    width: 24px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.language-switcher button.active {
    opacity: 1;
}

.language-switcher button.active img {
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.language-switcher button:hover:not(.active) {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 992px) {
    .featured-product, .our-story {
        flex-direction: column;
    }
    
    .product-image, .product-info, .story-content, .story-image {
        width: 100%;
        padding: 30px;
    }
    
    .story-text {
        padding: 30px;
    }
    
    .home h1 {
        font-size: 3rem;
    }
    
    .product-info h2, .story-content h2, .product-showcase h2, .cta-section h2 {
        font-size: 2rem;
    }
    
    .story-content h2 {
        font-size: 2rem;
    }
    
    .story-text h3 {
        font-size: 1.5rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .product-card img {
        max-height: 380px;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
        position: absolute;
        top: 90px;
        left: 0;
        width: 100%;
        background-color: var(--light-color);
        flex-direction: column;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        margin: 0;
        padding: 15px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .language-switcher-container {
        margin: 0;
        padding: 15px 0;
    }
    
    .language-switcher {
        justify-content: center;
    }
    
    .home h1 {
        font-size: 2.5rem;
    }
    
    .home p {
        font-size: 1.2rem;
    }
    
    .product-info h2, .story-content h2, .product-showcase h2, .cta-section h2 {
        font-size: 1.8rem;
    }
    
    .product-showcase h2 {
        font-size: 2rem;
    }
    
    .product-card img {
        max-height: 320px;
    }
    
    .home:before, .home:after {
        width: 100%;
        height: 50%;
    }
    
    .home:before {
        top: 0;
        background-position: center top;
    }
    
    .home:after {
        top: 50%;
        background-position: center bottom;
    }
}

@media (max-width: 576px) {
    .button-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .home {
        padding: 0 15px;
    }
    
    .home h1 {
        font-size: 2rem;
    }
    
    .home p {
        font-size: 1rem;
    }
    
    .product-info h2, .story-content h2, .product-showcase h2, .cta-section h2 {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .story-text {
        padding: 20px;
    }
    
    .story-content h2 {
        font-size: 1.8rem;
    }
    
    .story-text h3 {
        font-size: 1.3rem;
    }
    
    .story-text p {
        font-size: 1rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .product-card img {
        max-height: 280px;
    }
    
    .product-showcase h2 {
        font-size: 1.8rem;
    }
}

/* Image Carousel Styles */
.image-carousel {
    padding: 4rem 2rem;
    background-color: #f9f9f9;
    text-align: center;
}

.image-carousel h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--secondary-color);
}

.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 2rem auto;
    overflow: hidden;
    padding: 0 40px;
}

.carousel {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    padding: 0 20px;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    background-color: var(--background-color);
    transition: transform 0.3s ease;
}

.carousel-slide:hover img {
    transform: scale(1.03);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.1);
    color: var(--secondary-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.2);
}

.carousel-button.prev {
    left: 0;
}

.carousel-button.next {
    right: 0;
}

@media (max-width: 992px) {
    .carousel-slide img {
        max-height: 400px;
    }
    
    .image-carousel h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .carousel-slide img {
        max-height: 350px;
    }
}

@media (max-width: 576px) {
    .carousel-container {
        padding: 0 20px;
    }
    
    .carousel-slide {
        padding: 0 10px;
    }
    
    .carousel-slide img {
        max-height: 280px;
        padding: 10px;
    }
    
    .image-carousel h2 {
        font-size: 1.8rem;
    }
    
    .carousel-button {
        width: 30px;
        height: 30px;
    }
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}
