/* ===================================================
   TRANG CHỦ - HOME PAGE STYLES (css/home.css)
   =================================================== */

/* Hiệu ứng Hover Card Sản phẩm */
.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Link tiêu đề sản phẩm */
.product-title-link {
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}
.product-title-link:hover {
    color: #dc3545;
}

/* Tỉ lệ hình ảnh 1:1 chuẩn vuông */
.product-img-aspect-1-1 {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Tiêu đề hiển thị tối đa 2 dòng */
.product-title-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6em;
    line-height: 1.3em;
}

/* Chia chuẩn 5 cột cho màn hình PC (Desktop) */
@media (min-width: 992px) {
    .col-lg-1-5 {
        flex: 0 0 20% !important;
        max-width: 20% !important;
        width: 20% !important;
    }
}

/* Styling cho Banner Carousel Slider */
.banner-slide-img {
    height: 380px;
    object-fit: cover;
    border-radius: 8px;
}

/* Đổi giao diện màn hình nhỏ mobile & iPad */
@media (max-width: 991px) {
    .banner-slide-img {
        height: 260px;
    }
}
@media (max-width: 576px) {
    .banner-slide-img {
        height: 180px;
    }
}

/* Background Nền Gradient Đỏ Flash Sale */
.bg-gradient-danger {
    background: linear-gradient(135deg, #eb1838 0%, #ff4b2b 100%);
}

.fs-extra-small {
    font-size: 0.7rem;
    line-height: 14px;
}

/* Hiệu ứng nhấp nháy icon sét */
@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.animate-bounce {
    animation: bounceSlow 1.2s infinite;
}

/* ===================================================
   CỘT DANH MỤC TRANG CHỦ PHÂN CẤP (SIDEBAR CATEGORIES)
   =================================================== */
.home-cat-sidebar {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    position: relative;
}
.home-cat-sidebar .cat-header {
    background: #eb1838;
    color: #fff;
    padding: 12px 15px;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
}
.home-cat-sidebar .cat-tree-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.home-cat-sidebar .cat-item {
    position: relative;
    border-bottom: 1px solid #f1f5f9;
}
.home-cat-sidebar .cat-item:last-child {
    border-bottom: none;
}
.home-cat-sidebar .cat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s;
}
.home-cat-sidebar .cat-item:hover > .cat-link {
    background-color: #fff5f6;
    color: #eb1838;
    padding-left: 20px;
}

/* Submenu bay bên phải khi Hover */
.home-cat-sidebar .sub-cat-menu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    width: 230px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    list-style: none;
    padding: 6px 0;
    margin: 0;
    z-index: 1000;
}
.home-cat-sidebar .cat-item:hover > .sub-cat-menu {
    display: block;
    animation: fadeInRight 0.2s ease-in-out;
}
.home-cat-sidebar .sub-cat-menu .sub-cat-link {
    display: block;
    padding: 8px 18px;
    font-size: 0.88rem;
    color: #475569;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.home-cat-sidebar .sub-cat-menu .sub-cat-link:hover {
    background-color: #f8fafc;
    color: #eb1838;
    font-weight: 600;
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(6px); }
    to { opacity: 1; transform: translateX(0); }
}