/* --- Slide nền giữ tỷ lệ 16:7 --- */
.slider_banner_top .swiper-slide {
    position: relative;
    aspect-ratio: 16 / 7;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Fix xung đột Swiper */
.slider_banner_top .swiper-hero,
.slider_banner_top .swiper-hero .swiper-slide {
    height: auto !important;
}

/* Overlay tối nhẹ */
.slider_banner_top .bg-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

/* --- Hộp nội dung sự kiện nhỏ --- */
.slider_banner_top .event-box {
    position: absolute !important;
    bottom: 20px;
    left: 10px;
    z-index: 2;
    background: #fff;
    color: #222;
    padding: 10px 16px;
    border-radius: 16px;
    max-width: 420px;
    /* Border nhạt, không quá chói */
    border: 1px solid rgba(0, 128, 0, 0.25);
    /* Shadow nhẹ, nổi khối tinh tế */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.6);
    /* Optional: gradient để nổi hơn */
    background: linear-gradient(145deg, #ffffff, #f0f9f2);
}


/* Tiêu đề */
.slider_banner_top .event-box h2 {
    font-size: clamp(20px, 2vw, 32px);
    font-weight: 700;
    margin-bottom: 8px;
    color: #000;
}

/* Mô tả */
.slider_banner_top .event-box p {
    font-size: clamp(14px, 1.2vw, 18px);
    margin-bottom: 12px;
    color: #333;
}

/* Nút */
.slider_banner_top .event-box .btn {
    font-size: 14px;
    padding: 6px 18px;
    border-radius: 30px;
    border: 1px solid #000;
    color: #000;
    background: #fff;
    transition: all 0.3s ease;
}

.slider_banner_top .event-box .btn:hover {
    background: #000;
    color: #fff;
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .slider_banner_top .event-box {
        bottom: 10px;
        left: 1px;
        transform: translateX(-50%);
        max-width: 90%;
        padding: 5px;
        text-align: center;
    }
}


@keyframes emoji-flame-flicker {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 2px rgba(255, 140, 0, 0.4));
        transform: scale(1) rotate(0deg);
    }

    50% {
        filter: brightness(1.4) drop-shadow(0 0 8px rgba(255, 80, 0, 0.8));
        transform: scale(1.15) rotate(-4deg);
    }
}

.icon_fire {
    display: inline-block;
    animation: emoji-flame-flicker 1.2s infinite ease-in-out;
    margin-right: 6px;
    font-size: 1em;
    vertical-align: middle;
}

/* --- Card chính --- */
.div_product_hot .card {
    position: relative;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(0, 128, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 128, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover nổi khối */
.div_product_hot .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 128, 0, 0.15), 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* --- Figure / ảnh --- */
.div_product_hot figure.card-img-top {
    margin: 0;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.div_product_hot figure.card-img-top img.image_product {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    display: block;
}

/* Icon lửa trên góc card */
.div_product_hot .card .icon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 24px;
    color: #ff6600;
    pointer-events: none;
    z-index: 5;
}

/* Overlay Xem */
.div_product_hot figure.card-img-top figcaption {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.div_product_hot figure.card-img-top:hover figcaption {
    opacity: 1;
}

/* --- Card-body --- */
.div_product_hot .card-body {
    height: 146px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Tiêu đề xanh */
.div_product_hot .card-body .post-title a {
    color: #008000;
    font-weight: 600;
    text-decoration: none;
}

/* Nội dung mô tả */
.div_product_hot .card-body .post-content p {
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}


/* === Card === */
#section_member .member-card {
    border-radius: 12px;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

#section_member .member-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* === Card body nội dung === */
#section_member .card-body {
    min-height: 130px; /* giữ đều các thẻ */
    height: 145px;
}

#section_member .card-title,
#section_member .card-desc,
#section_member .card-address {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2; /* 2 dòng ... */
    line-height: 1.4;
}

/* === Card footer icon === */
#section_member .card-footer i {
    font-size: 16px;
    transition: all 0.2s ease;
}

#section_member .card-footer a:hover i {
    opacity: 0.85;
    transform: scale(1.2);
}

.div_product_new {
    position: relative;
    background: url('/images/portal/bg-market.jpg') center/cover no-repeat fixed;
    overflow: hidden;
}

/* overlay mờ nhẹ */
.div_product_new::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(100 114 123 / 39%);
    z-index: 0;
}

.div_product_new h2,
.div_product_new h3 {
    color: #1e293b; /* hoặc màu nổi hơn nền */
    text-shadow: 1px 1px 3px rgb(255 244 123);
}

/* overlay lá nhẹ (nằm trên lớp mờ) */
.div_product_new::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url('/images/bg_leaf_pattern.png') repeat;
    opacity: 0.04;
    z-index: 1;
}

/* nội dung nằm trên cùng */
.div_product_new .container {
    position: relative;
    z-index: 2;
}


.div_product_new .swiper-slide {
    display: flex;
    align-items: stretch;
}

.div_product_new .card-horizontal {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 164px;
    border: none;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.35s ease;
    overflow: hidden;
}

.div_product_new .card-horizontal:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.div_product_new .card-horizontal .col-md-5 {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6fbf8;
    overflow: hidden;
    position: relative;
}

.div_product_new .image_product {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.div_product_new .image_product.lazyloaded {
    opacity: 1;
    transform: scale(1.02);
}

.div_product_new .card-horizontal:hover .image_product {
    transform: scale(1.08);
}

.div_product_new .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #f9fcfa 100%);
}

.div_product_new .post-title a {
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    color: #1e293b;
    transition: color 0.3s ease;
}

.div_product_new .post-title a:hover {
    color: #0284c7;
}

.div_product_new .post-content p {
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.div_product_new .card-horizontal::after {
    content: "NEW";
    position: absolute;
    top: 14px;
    left: -40px;
    background: #22c55e;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 60px;
    text-align: center;
    transform: rotate(-45deg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    letter-spacing: 1px;
    opacity: 0.95;
}

.div_product_new .swiper-button-prev,
.div_product_new .swiper-button-next {
    color: #0f172a;
    transition: all 0.2s ease;
}

.div_product_new .swiper-button-prev:hover,
.div_product_new .swiper-button-next:hover {
    color: #0284c7;
    transform: scale(1.15);
}

.div_product_new .card-horizontal:hover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-100%);
    animation: shimmer-move 1s forwards;
}

@keyframes shimmer-move {
    to {
        transform: translateX(100%);
    }
}

@media (max-width: 768px) {
    .section_product_category h3 {
        font-size:12px;
    }

    .div_product_new .card-horizontal h5 a{
        font-size:15px !important;
        margin-bottom:2px !important;
    }
    .div_product_new .card-horizontal .post-header {
        margin-bottom: 2px !important;
    }

    .div_product_new .card-horizontal {
        height: 287px;
    }

    .div_product_new .card-body {
        padding: 5px !important;
    }
}

.div_category {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    justify-items: center;
    margin-top: 1rem;
}

.div_category .category-card-small {
    position: relative;
    width: 110px;
    height: 122px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f7fa, #fff3e0);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    cursor: pointer;
}

.div_category .category-card-small img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 6px; /* giảm chút để vừa với 2 dòng tên */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.div_category .category-card-small:hover img {
    transform: scale(1.2) rotate(2deg);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

.div_category .category-card-small .category-name {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.3);
    padding: 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.div_category .category-card-small:hover {
    transform: translateY(-6px) scale(1.06);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15), 0 0 12px rgba(59,130,246,0.2);
}

/* ===== Certificate section ===== */
.certificate-badges {
    justify-content: flex-start;
}

.certificate-item {
    width: 120px;                /* mỗi logo khung nhỏ gọn */
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    background: #fff;
}

.certificate-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.certificate-logo {
    width: 100%;
    max-width: 90px;            /* giới hạn chiều ngang */
    height: 70px;               /* cố định chiều cao */
    object-fit: contain;        /* giữ tỉ lệ gốc */
    border-radius: 8px;
    background-color: #fff;
    padding: 6px;
}
.rating-stars i {
    font-size: 1rem;
    color: #f1c40f; /* vàng tươi */
}
.rating-stars i.bi-star {
    color: #ccc; /* sao rỗng xám nhạt */
}

#ratingStars i {
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}
#ratingStars i:hover {
    transform: scale(1.2);
    color: #f1c40f;
}
#ratingStars i.active {
    color: #f1c40f;
}

