/* Carousel */
.home-carousel {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 550px;
    overflow: hidden;
    background: #000;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    transform: scale(1.05);
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
    transform: scale(1);
    transition: opacity 1s ease-in-out, transform 6s ease-out;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000; /* Background for empty areas */
}

.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10; /* Increased z-index */
    display: flex;
    gap: 10px;
}

.dot {
    width: 40px;
    height: 4px;
    border-radius: 0;
    border: none;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: #fff;
    width: 60px;
}

.carousel-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.2);
    color: #fff;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 0;
    font-size: 24px;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav button:hover {
    background: var(--primary-color);
    color: #fff;
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

/* Advantages Section */
.advantages-section {
    background: #fff;
    padding: 10px 0; /* Added padding for title */
    border-bottom: 1px solid #eee;
    margin-top: 50px 0;
    position: relative;
    z-index: 10;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: #fff;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    margin: 50px 0;
    border-top: 1px solid #eee; /* Add top border to grid */
}

.advantage-item {
    text-align: center;
    padding: 60px 30px;
    transition: all 0.3s;
    border-right: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

.advantage-item:last-child {
    border-right: none;
}

.advantage-item:hover {
    transform: none;
    background: #fcfcfc;
}

.advantage-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.advantage-item:hover::after {
    transform: scaleX(1);
}

.adv-icon {
    width: 60px;
    height: 60px;
    background: transparent;
    color: var(--secondary-color);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    transition: all 0.3s;
}

.advantage-item:hover .adv-icon {
    background: transparent;
    color: var(--primary-color);
    transform: translateY(-5px);
}

.advantage-item h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-weight: bold;
}

.advantage-item p {
    color: #777;
    font-size: 14px;
    line-height: 1.6;
}

/* Product Showcase */
.product-showcase {
    background: #fff;
    padding-top: 40px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.product-item {
    text-align: center;
    group: product;
}

.product-img {
    margin-bottom: 25px;
    overflow: hidden;
    position: relative;
}

.product-img img {
    width: 100%;
    height: auto;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-item:hover .product-img img {
    transform: scale(1.1);
}

.product-title {
    font-size: 20px;
    margin: 0;
    font-weight: bold;
    color: var(--secondary-color);
}

/* Artistic Pancake Intro */
.pancake-intro {
    position: relative;
    padding: 120px 0;
    background: #1a1a1a;
    color: #fff;
    overflow: hidden;
    margin-top: -60px; /* Overlap carousel */
    z-index: 20; /* Higher than carousel */
}

.pancake-intro-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/pancake-art-bg.jpg') no-repeat center center/cover;
    opacity: 0.3;
    z-index: 0;
}

.pancake-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.pancake-title {
    font-size: 2.9em;
    margin-bottom: 30px;
    font-weight: 300;
    letter-spacing: 5px;
}

.pancake-desc {
    font-size: 1.2em;
    line-height: 2;
    color: rgba(255,255,255,0.8);
    margin-bottom: 50px;
}

.btn-outline {
    display: inline-block;
    padding: 10px 40px;
    border: 1px solid #fff;
    color: #fff;
    font-size: 14px;
    letter-spacing: 2px;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: #fff;
    color: #000;
}

/* Stats Section */
.stats-section {
    background: var(--primary-color);
    color: #fff;
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-label {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Partners Section */
.partners-section {
    background: #fff;
    padding: 80px 0;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
    align-items: center;
}

.partner-item img {
    width: 100%;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
}

.partner-item:hover img {
    filter: grayscale(0);
    opacity: 1;
}

/* News Section */
.home-news {
    background: #ededed;
    padding: 50px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.news-card {
    background: #fff;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.news-thumb {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card:hover .news-thumb img {
    transform: scale(1.1);
}

.news-date {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 15px;
    text-align: center;
}

.news-date .day {
    display: block;
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.news-date .month {
    font-size: 12px;
    text-transform: uppercase;
}

.news-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 18px;
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: bold;
}

.news-title a {
    color: var(--secondary-color);
}

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

.news-excerpt {
    color: #777;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.news-more {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Slogan */
.slogan-section {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.slogan-section h2 {
    font-size: 4em;
    margin: 0;
    font-weight: 300;
    letter-spacing: 10px;
    position: relative;
    z-index: 1;
}

/* Responsive Home */
@media (max-width: 992px) {
    .home-carousel {
        height: 60vh;
        min-height: 400px;
    }
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 0;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pancake-title {
        font-size: 2.5em;
    }
}

@media (max-width: 576px) {
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .slogan-section h2 {
        font-size: 2em;
        letter-spacing: 5px;
    }
}

/* Sustainability Section */
.sustainability-section {
    position: relative;
    height: 600px;
    background-image: url('https://img.foxmoe.top/i/2025/12/30/zpm5eh.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
}

.sustainability-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6); /* Dark overlay */
    z-index: 1;
}

.sustainability-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding-left: 0; /* Container handles padding */
}

.sustainability-title {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 20px;
    position: relative;
    padding-left: 25px;
    border-left: 6px solid var(--primary-color);
    line-height: 1.2;
}

.sustainability-subtitle {
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: 300;
    opacity: 0.9;
    padding-left: 25px;
}

.sustainability-btn {
    display: inline-block;
    padding: 15px 50px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: 2px solid var(--primary-color);
    margin-left: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sustainability-btn:hover {
    background: transparent;
    color: #fff;
}

/* Responsive Grids */
@media (max-width: 992px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Product grid handled by marquee now */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Product grid handled by marquee now */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .advantage-item {
        padding: 30px 15px;
    }
    
    .pancake-title {
        font-size: 20px;
    }
    
    .sustainability-title {
        font-size: 32px;
    }
}

/* Product Marquee (Global) */
.product-showcase .product-grid {
    display: flex;
    gap: 0;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.product-showcase .product-grid::after {
    content: "";
    display: table;
    clear: both;
}

/* We need a wrapper to animate */
.product-marquee-wrapper {
    display: flex;
    width: max-content; /* Allow content to define width */
    animation: marquee 60s linear infinite; /* Slower animation for better UX */
}

.product-marquee-wrapper:hover {
    animation-play-state: paused;
}

.product-item {
    flex: 0 0 20vw; /* 5 items visible on desktop */
    max-width: 20vw;
    padding: 10px;
    box-sizing: border-box;
}

@media (max-width: 1200px) {
    .product-item {
        flex: 0 0 25vw; /* 4 items visible */
        max-width: 25vw;
    }
}

@media (max-width: 992px) {
    .product-item {
        flex: 0 0 33.33vw; /* 3 items visible on tablet */
        max-width: 33.33vw;
    }
}

@media (max-width: 768px) {
    .product-item {
        flex: 0 0 50vw; /* 2 items visible on mobile */
        max-width: 50vw;
    }
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

