﻿/* ===== 💙 Tổng thể chung ===== */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

.site-wrapper {
    max-width: 1200px; /* Giới hạn ngang */
    width: 100%; /* Co lại khi viewport < 1260px */
    margin: 0 auto; /* Canh giữa */
    padding: 0 15px; /* Khoảng đệm 2 bên */
    box-sizing: border-box;
}

.site-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}



/* ===== 🔎 Thanh tìm kiếm ===== */
.search-bar {
    background-color: #0d6efd;
    color: #fff;
}

    .search-bar input#search-box {
        max-width: 400px;
        border: none;
        border-radius: 0.4rem;
    }

/* ===== 📁 Danh mục sản phẩm ===== */
.category-box {
    transition: all 0.3s ease;
    cursor: pointer;
}

    .category-box:hover {
        box-shadow: 0 0 0 2px #0d6efd inset;
        background-color: #e9f5ff;
    }

/* ===== 🛍️ Card sản phẩm ===== */

/* 1. Chuẩn bị vùng chứa và ẩn tràn */
.card-title {
    position: relative;
    overflow: hidden;
}

    /* 2. Tạo tia sáng (không chạy ngay) */
    .card-title::before {
        content: "";
        position: absolute;
        top: -60%;
        left: -55%; /* bắt đầu ngoài trái */
        width: 60%;/* độ rộng tia sáng */
        height: 220%;
        background: linear-gradient( to right, transparent, rgba(0, 123, 255, 0.6), transparent );
        transform: skewX(-25deg);
        transition: none;
    }

/* 3. Khi hover vào card, trigger animation */
.product-card:hover .card-title::before {
    animation: shine 2.5s cubic-bezier(.4, .0, .2, 1);
}


/* 4. Định nghĩa keyframes di chuyển tia sáng */
@keyframes shine {
    from {
        left: -75%;
    }

    to {
        left: 125%;
    }
}


.product-card {
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


/* Khi hover cả card thì tạo stripe dưới info */


    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }

.product-img {
    height: 160px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.tag-container {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.tag-badge {
    font-size: 0.6rem;
    padding: 0.25em 0.4em;
    border-radius: 0.25rem;
}
    /* Ví dụ class sắc màu cho tag */
    .tag-badge.Hot {
        background-color: #dc3545;
    }
    /* Đỏ */
    .tag-badge.FlashSale {
        background-color: #fd7e14;
    }
    /* Cam */
    .tag-badge.New {
        background-color: #198754;
    }
    /* Xanh */
    .tag-badge.XuatKho {
        background-color: #0d6efd;
    }
/* Xanh dương */

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.price {
    font-size: 1rem;
    font-weight: bold;
    color: #0d6efd;
    margin-bottom: 0;
}





/*a {
    text-decoration: none !important;
}
.card {

    border-radius: 0.5rem;
    transition: transform 0.2s ease-in-out;
}

    .card:hover {
        color: white;
        transform: translateY(-4px);
        background-color: #0043ff;
    }*/

        /* Khi hover .card thì đổi màu .text-primary (giá tiền) thành đỏ */
        /*.card:hover .text-primary {
            color: red !important;
        }
.card-img-top {
    height: 160px;
    object-fit: cover;
    border-radius: 0.5rem 0.5rem 0 0;
}

.card-body {
    font-size: 0.85rem;
}*/

.badge {
    font-size: 0.7rem;
    padding: 0.3em 0.5em;
    border-radius: 0.4rem;
}

    /* Tags (Nhãn sản phẩm) */
    .badge.bg-info {
        background-color: #d0ebff !important;
        color: #0b5394;
    }

/* Responsive tweaks */
@media (max-width: 575px) {
    .search-bar input#search-box {
        width: 100%;
    }
}
.category-box {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #dee2e6;
}

    .category-box:hover {
        box-shadow: 0 0 0 2px #0d6efd inset;
        background-color: #e9f5ff;
    }
.pagination .page-link {
    color: #0d6efd;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}



.category-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.category-item {
    flex: 0 1 calc(20% - 16px); /* khoảng 5 item 1 hàng, tuỳ chỉnh */
    min-width: 100px;
    max-width: 160px;
    text-align: center;
}

@media (max-width: 768px) {
    .category-item {
        flex: 0 1 calc(33.333% - 16px); /* 3 item mỗi hàng */
    }
}

.category-item .border:hover {
    border-color: #0d6efd !important;
}
.page-link {
    cursor: pointer;
}
/* wwwroot/css/site.css */




.intro-wrapper {
    position: relative;
}

/* Phần nội dung clamp 3 dòng */
.intro-text {
    line-height: 1.5em;
    max-height: 40em; /* 3 dòng x 1.5em */
    overflow: hidden;
    transition: max-height .3s ease;
}

/* Gradient fade nằm trên cùng */
.intro-wrapper::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3em; /* chiều cao vùng fade */
    background: linear-gradient( rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100% );
    pointer-events: none;
    transition: opacity .3s ease;
}

.btn-read-more {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    border: none;
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 10;
}

    .btn-read-more:hover {
        background: linear-gradient(135deg, #6610f2 0%, #0d6efd 100%);
        transform: translateX(-50%) translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }

    .btn-read-more:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.5);
    }

/* Khi expanded: show full block, ẩn gradient */
.intro-wrapper.expanded .intro-text {
    max-height: none;
}

.intro-wrapper.expanded::after {
    opacity: 0;
}

/* **MỚI** co ảnh vừa khung, giữ nguyên bố cục */
.intro-text img {
    display: block;
    max-width: 100%;
    max-height: 40em;
    height: auto;
    object-fit: contain;
    margin: 1rem auto;
}

.mobile-navbar {
    z-index: 1000 !important;
}

.modal {
    z-index: 1050 !important;
}

.modal-backdrop {
    z-index: 1040 !important;
}


.section-title {
    border-left: 4px solid #0d6efd;
    padding-left: .5rem;
    font-weight: 600;
}

.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 0.5rem;
    overflow: hidden;
}

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    }

    .product-card img {
        transition: transform 0.3s ease;
    }

    .product-card:hover img {
        transform: scale(1.05);
    }

.overlay-outstock {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    z-index: 3;
}
.hover-bg-white:hover {
    background-color: white !important;
}

.hover-text-primary:hover {
    color: #0d6efd !important;
}