﻿
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.hidden {
    display:none !important;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

.container {
/*    max-width: 1200px;*/
    margin: 0 auto;
    padding: 0 20px;
    z-index: 1 !important;
    position: relative;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2c5530 0%, #4a7c59 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.contact-info {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
}

.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border-radius: 30px;
    padding: 0.5rem;
}

    .nav a {
        color: white;
        text-decoration: none;
        padding: 0.5rem 1.5rem;
        margin: 0 0.5rem;
        border-radius: 20px;
        transition: all 0.3s ease;
    }

        .nav a:hover, .nav a.active {
            background: rgba(255,255,255,0.2);
            transform: translateY(-2px);
        }
.title-image {
    color: white;
    /*    padding: 1rem 0;*/
    text-align: center;
    background-size: cover;
    background-position: center;
    z-index: 1 !important;
    position: relative;
/*    bổ sung*/
    width: 100vw; /* Chiếm full chiều rộng viewport */
    /*left: 66%;*/ /* Dịch điểm bắt đầu về giữa container */
    /*transform: translateX(-50%);*/ /* Dịch ngược lại 50% chiều rộng của chính nó */
    box-sizing: border-box; /* Đảm bảo padding không làm tăng kích thước */
    /* Thiết lập bắt buộc để xử lý tràn viewport */
    /*margin-left: calc(-50vw + 50%);*/ /* Công thức magic */
    /*margin-right: calc(-50vw + 50%);*/ /* Cân bằng 2 bên */
}
.background_div_category {
    background-image: url('../images/bg5.jpg');
    background-size: cover; /* Hình nền phủ toàn bộ div */
    background-position: top; 
    background-repeat: round; 
    width: 100%; /* Chiều rộng div */
    height: auto; /* Chiều cao div */
}

.background_div_spnb {
    background-image: url('../images/bg4.jpg') !important;
    background-size: cover !important; /* Hình nền phủ toàn bộ div */
    background-position: top !important; /* Căn giữa hình nền */
    background-repeat: round !important; /* Không lặp lại hình nền */
    width: 100%; /* Chiều rộng div */
    height: auto; /* Chiều cao div */
}

.background_div_gpdn {
    background-image: url('../images/bg6.jpg') !important;
    background-size: cover !important; /* Hình nền phủ toàn bộ div */
    background-position: top !important; /* Căn giữa hình nền */
    background-repeat: round !important; /* Không lặp lại hình nền */
    width: 100%; /* Chiều rộng div */
    height: auto; /* Chiều cao div */
    padding: 4rem 0;
}


/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%234a7c59" width="1200" height="600"/><path fill="%23fff" fill-opacity="0.1" d="M0,300L100,280C200,260,400,220,600,200C800,180,1000,180,1100,180L1200,180V0H1100C1000,0,800,0,600,0C400,0,200,0,100,0H0Z"/></svg>');
    color: white;
    padding: 4rem 0;
    text-align: center;
    background-size: cover;
    background-position: center;
    z-index: 2 !important;
    position: relative;
}

    .hero h1 {
        font-size: 3rem;
        margin-bottom: 1rem;
        animation: fadeInUp 1s ease-out;
    }

    .hero p {
        font-size: 1.2rem;
        margin-bottom: 2rem;
        animation: fadeInUp 1s ease-out 0.2s both;
    }

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, #ff6b35, #ff8e3c);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out 0.4s both;
}

    .cta-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(255,107,53,0.4);
    }

/* Search Bar */
.search-section {
    background: white;
    padding: 2rem 0;
    margin-top: 1rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .search-bar:focus-within {
        border-color: #4a7c59;
        box-shadow: 0 0 0 3px rgba(74,124,89,0.1);
    }

    .search-bar input {
        flex: 1;
        padding: 1rem 1.5rem;
        border: none;
        outline: none;
        font-size: 1rem;
    }

    .search-bar button {
        background: linear-gradient(45deg, #4a7c59, #2c5530);
        color: white;
        border: none;
        padding: 1rem 2rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }

        .search-bar button:hover {
            transform: scale(1.05);
        }

/* Categories */
.categories {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
/*    font-size: 2.5rem;*/
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #2c5530;
    position: relative;
    font-weight: bold;
}

    .section-title::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 3px;
        background: linear-gradient(45deg, #ff6b35, #ff8e3c);
        border-radius: 2px;
    }

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

    .category-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    }

.category-image {
    height: 200px;
    background: linear-gradient(45deg, #4a7c59, #2c5530);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

    .category-image::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
        animation: float 6s ease-in-out infinite;
    }

.category-info {
    padding: 1.5rem;
}

    .category-info h3 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        color: #2c5530;
    }

    .category-info p {
        color: #666;
        margin-bottom: 1rem;
    }

.category-link {
    color: #ff6b35;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

    .category-link:hover {
        color: #ff8e3c;
    }

/* Featured Products */
.featured-products {
    padding: 4rem 0;
    background: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }

.gpdn-image {
    height: 205px;
    background: whitesmoke;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    position: relative;
}

.product-image {
    height: 350px;
    background: linear-gradient(135deg, #ff6b35, #ff8e3c);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    position: relative;
}
    .product-image img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }

    .product-image .discount {
        position: absolute;
        top: 10px;
        right: 10px;
        background: #dc3545;
        color: white;
        padding: 0.3rem 0.7rem;
        border-radius: 15px;
        font-size: 0.8rem;
        font-weight: bold;
    }

.product-info {
    padding: 1.5rem;
}

    .product-info h4 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        color: #2c5530;
    }


.container-info {
    padding: 1.5rem;
    color: white;
}

    .container-info h4 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
/*        color: #2c5530;*/
        text-align: center;
    }

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ff6b35;
}

.old-price {
    text-decoration: line-through;
    color: #999;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 1rem;
}

.stars {
    color: #ffc107;
}

/*.add-to-cart {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(45deg, #4a7c59, #2c5530);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}*/

    /*.add-to-cart:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(74,124,89,0.3);
    }*/

/* Footer */
.footer {
    background: #2c5530;
    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: #ff6b35;
}

.footer-section ul {
    list-style: none;
    padding-left: 1rem !important;
}

    .footer-section ul li {
        margin-bottom: 0.5rem;
    }

        .footer-section ul li a {
            color: #ccc;
            text-decoration: none;
            transition: color 0.3s ease;
        }

            .footer-section ul li a:hover {
                color: #ff6b35;
            }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4a7c59;
    color: #ccc;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(180deg);
    }
}

.carousel {
    /*    width: 1200px;
    overflow: hidden;
    position: relative;*/
    overflow-x: auto; /* cho phép scroll ngang */
    scroll-behavior: smooth; /* cuộn mượt */
    -webkit-overflow-scrolling: touch; /* mượt trên iOS */
    width: 100%; /* hoặc giới hạn 900px */
    border-radius: 15px;
    border: 1px solid #ccc;
    cursor: grab; /* hiển thị bàn tay */
}

.carousel:active {
    cursor: grabbing; /* khi giữ chuột */
}
.carousel-track {
    display: flex;
    flex-wrap: nowrap; /* không xuống dòng */
    transition: transform 1.5s ease;
    gap: 1rem;
}

.product-item {
    flex: 0 0 400px;
    margin-right: 1rem; /* khoảng cách */
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

    .product-item img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .header_div {
        width: 100%;
        display: flex;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        flex-direction: column !important;
    }

    .nav {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .search-bar {
        flex-direction: column;
        border-radius: 15px;
    }

        .search-bar input {
            border-bottom: 1px solid #e9ecef;
        }

        .search-bar button {
            border-radius: 0 0 15px 15px;
        }

    .section-title {
        font-size: 2rem;
    }

    .category-grid,
    .product-grid {
        grid-template-columns: 1fr;
    }
}