@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dosis:wght@200..800&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dosis:wght@200..800&family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');
body {
    font-family: "Sarabun", sans-serif;
    margin: 0;
    color: #5d5c61;
    background-color: #f1e7dc;
    line-height: 1.6;
    /*overflow: hidden;*/
}


body {
    background-image: url('/images/background.png'); /* Đường dẫn đến ảnh nền */
    background-size: cover; /* Đảm bảo ảnh nền bao phủ toàn bộ trang */
    background-repeat: no-repeat; /* Không lặp lại ảnh nền */
    background-attachment: fixed; /* Ảnh nền cố định khi cuộn */
    background-position: center; /* Căn giữa ảnh nền */
    margin: 0; /* Loại bỏ khoảng cách mặc định của body */
    padding: 0;
}

audio {
    display: none;
}

.profile-fade {
    height: 60px;           /* Chiều cao tự động */
    overflow:hidden;
    content: '';
    position: relative;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0; /* Để phủ kín phần tử */
    background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 20%);
    transition: opacity 1s ease; /* Hiệu ứng chuyển tiếp cho opacity */
    
}
.view-more{
    cursor: pointer;
}
.view-more:hover{
    cursor: pointer;
}

.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: white;
    font-size: 1em;
    opacity: 0.8;
    user-select: none;
    animation: fall linear infinite;
    will-change: transform; /* Tăng hiệu suất */
    transition: transform 6s ease, opacity 6s ease; /* Chuyển mượt khi hướng gió thay đổi */
}

@keyframes fall {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        transform: translate(calc(var(--windX, 0)), calc(100vh + var(--windY, 0)));
        opacity: 0.5;
    }
}


.cover-photo img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.section-container {
    padding: 0px 20px;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 40px;
    /*background-color: #ffffff;*/
    border: 3px white solid;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    max-width: 480px;
}
.section-container:hover {
    transform: translateY(-5px);
}

.profile-content {
    text-align: center;
    color: #f08a5d;
}

.profile-content .avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid #fff;
    margin-top: -100px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.personal-details {
    /*margin-top: 60px;*/
}

.personal-details h2 {
    font-family: "Dosis", sans-serif;
    font-size: 1.5em;
    margin: 10px 0 5px;
    color: #333;
}

.personal-details p {
    font-family: "Nunito", sans-serif;
    font-size: 1em;
    color: #000;
}

.description {
    font-family: "Dosis", sans-serif;
    font-size: 1em;
    color: #000;
    margin: 20px 0;
}

.signature {
    font-family: "Dosis", sans-serif;
    font-size: 1.2em;
    color: #ff6f61;
    font-weight: bold;
    margin-top: 10px;
}

.decorative-title {
    font-size: 1.8em; /* Tăng kích thước chữ để nổi bật hơn */
    color: #333; /* Màu chữ */
    position: relative;
    display: inline-block;
    padding-bottom: 5px; /* Khoảng cách dưới tiêu đề */
    margin-bottom: 10px; /* Khoảng cách với các phần tử dưới */

    /* Tạo gradient cho chữ */
    background: linear-gradient(90deg, #ff6f61, #f08a5d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Font style */
    font-weight: bold;
    font-family: "Dosis", sans-serif;
}

.decorative-title:after {
    content: '';
    width: 80%; /* Độ dài đường trang trí */
    height: 4px; /* Độ dày đường trang trí */
    background: linear-gradient(90deg, #ff6f61, #ffcc67); /* Gradient cho đường */
    position: absolute;
    bottom: 0; /* Đặt phía dưới của tiêu đề */
    left: 10%; /* Căn giữa đường */
    border-radius: 5px; /* Bo góc đường */
    transition: width 0.3s ease, background-color 0.3s ease;
}

.decorative-title:hover:after {
    width: 100%; /* Hiệu ứng hover mở rộng */
    background: linear-gradient(90deg, #ffcc67, #ff6f61); /* Đảo màu khi hover */
}

.decorative-title .icon {
    color: #333; /* Màu riêng cho biểu tượng */
    background: none; /* Xóa hiệu ứng gradient */
    -webkit-text-fill-color: initial; /* Duy trì màu gốc */
}
.social-links ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.social-links a {
    text-decoration: none;
    color: white;
    font-size: 1.2em;
    transition: background-color 0.3s;
    padding: 10px 15px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.facebook { background-color: #3b5998; }
.instagram { background-color: #e4405f; }
.twitter { background-color: #1da1f2; }
.tiktok { background-color: #010101; }
.youtube { background-color: #ff0000; }

.facebook:hover { background-color: #2d4373; }
.instagram:hover { background-color: #c92d4d; }
.twitter:hover { background-color: #1a91da; }
.tiktok:hover { background-color: #0c0c0c; }
.youtube:hover { background-color: #cc0000; }


.categories {
    display: flex; /* Sử dụng flexbox để sắp xếp các button trên một hàng */
    overflow-x: auto; /* Cho phép cuộn ngang khi vượt quá chiều dài */
    white-space: nowrap; /* Ngăn không cho các nút xuống dòng */
    padding: 10px; /* Thêm một chút khoảng cách bên trong */
}

/* Thiết lập cho thanh cuộn */
.categories::-webkit-scrollbar {
    width: 2px; /* Chiều rộng của thanh cuộn dọc */
    height: 2px; /* Chiều cao của thanh cuộn ngang */
}

/* Thiết lập cho phần thanh cuộn */
.categories::-webkit-scrollbar-track {
    background: #fff; /* Màu nền cho phần thanh cuộn */
    border-radius: 10px; /* Bo tròn góc cho phần thanh cuộn */
}

/* Thiết lập cho phần thanh cuộn di động (handle) */
.categories::-webkit-scrollbar-thumb {
    background: #ff6f61; /* Màu cho phần thanh cuộn di động */
    border-radius: 10px; /* Bo tròn góc cho phần thanh cuộn di động */
}

/* Hiệu ứng khi hover chuột vào thanh cuộn di động */
.categories::-webkit-scrollbar-thumb:hover {
    background: #ff6f61; /* Màu nền cho phần thanh cuộn khi hover */
}

.filter-btn {
    padding: 10px 20px;
    border: none;
    background-color: #f5f5f5;
    /*background-color: #ff6f61;*/
    color: #000;
    cursor: pointer;
    border-radius: 30px;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.filter-btn:hover {
    background-color: #e88766;
}

.filter-btn.active {
    background-color: #f57061;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.search-box {
    display: block;
    margin: 0 auto;
    padding: 10px;
    width: 93%;
    max-width: 600px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box:focus {
    border-color: #ff6f61;
}

.category-section {
    margin-bottom: 5px;
    display: none;
}

.category-section.active {
    display: block;
}

.product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    /*justify-content: center;*/
}

.product-item {
    width: calc(33.333% - 15px);
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    background-color: #fff;
    text-align: center;
    transition: box-shadow 0.3s, transform 0.3s;
    overflow: hidden; /* Đảm bảo không có phần thừa nào bị cắt */
    display: flex; /* Dùng flexbox để sắp xếp */
    flex-direction: column; /* Sắp xếp các phần tử theo chiều dọc */
    align-items: center;
    justify-content: space-between; /* Giữ khoảng cách đều giữa các phần tử */
    height: auto; /* Để nội dung tự động điều chỉnh chiều cao */
}

.product-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}

.product-item h3 {
    margin: 10px 0;
    font-size: 1em;
    color: #333;
}

.product-item p {
    font-size: 0.9em;
    color: #777;
    margin: 10px 0;
}



.product-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.load-more-btn {
    display: block;
    margin: 30px auto 10px;
    padding: 10px 30px;
    border: none;
    background-color: #ff6f61;
    color: white;
    cursor: pointer;
    border-radius: 30px;
    transition: background-color 0.3s;
}

.load-more-btn:hover {
    background-color: #e3623b;
}

a {
    text-decoration: none;
}


.type1 {
    background: linear-gradient(to bottom, #e8f5e9, #f1f8e9);
}

.type2 {
    background: linear-gradient(to bottom, #e3f2fd, #e0f7fa);
}

.type3 {
    background: linear-gradient(to bottom, #fff8e1, #fffde7);
}

.type4 {
    background: linear-gradient(to bottom, #fbe9e7, #ffebee);
}

@media screen and (max-width: 768px) {
    .product-item {
        width: calc(33% - 15px);
    }
    .product-item h3 {
        margin: 10px 0;
        font-size: 0.8em;
        color: #333;
        font-weight: unset;
    }
    .decorative-title {
        font-size: 1.3em;
    }
    .cover-photo img {
        width: 100%;
        height: 150px;
        object-fit: cover;
    }
}

@media screen and (max-width: 480px) {
    .product-item {
        width: calc(33% - 5px);
        padding: 5px;
    }
    .product-list {
        gap: 5px;
    }
    .avatar {
        width: 80px;
        height: 80px;
        margin-top: -40px;
    }
}