﻿/* --- 1. BỘ LỌC CATEGORY --- */
/* Container bọc ngoài cùng */
.category-nav-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Tinh chỉnh lại wrapper cũ của Boss */
.category-wrapper {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
    gap: 9px;
    scrollbar-width: none;
    scroll-behavior: smooth; /* Cuộn mượt khi click nút */
    width: 100%;
}

    .category-wrapper::-webkit-scrollbar {
        display: none;
    }

/* Style cho nút mũi tên */
.nav-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #eee;
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: 0.3s;
    opacity: 0; /* Mặc định ẩn, sẽ hiện bằng JS */
    pointer-events: none;
}

    .nav-scroll-btn.show {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-scroll-btn.left {
        left: -5px;
    }

    .nav-scroll-btn.right {
        right: -5px;
    }

/* Hiệu ứng bóng mờ ở 2 đầu để báo hiệu còn nội dung */
.category-nav-container::before,
.category-nav-container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 5;
    pointer-events: none;
    transition: 0.3s;
    opacity: 0;
}

.category-nav-container.can-scroll-left::before {
    left: 0;
    background: linear-gradient(to right, white, transparent);
    opacity: 1;
}

.category-nav-container.can-scroll-right::after {
    right: 0;
    background: linear-gradient(to left, white, transparent);
    opacity: 1;
}

.cat-item {
    padding: 8px 11px;
    background: #fff;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.03);
}

    .cat-item.active {
        background: var(--primary);
        color: white;
        box-shadow: 0 6px 9px rgba(255, 71, 126, 0.3);
        border-color: var(--primary);
    }


/* --- 2. THẺ SẢN PHẨM (PRODUCT CARD) --- */
.product-card {
    background: var(--surface);
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
    box-shadow: var(--shadow-sm);
}

    .product-card:hover {
        transform: translateY(-12px) scale(1.02);
        box-shadow: var(--shadow-hover);
        border: 1px solid rgba(255, 71, 126, 0.15);
    }

/* --- 3. KHU VỰC ẢNH (IMAGE CONTAINER) --- */
.img-container {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f9f9f9;
}
    .img-container a {
        display: block;
        width: 100%;
        height: 100%;
    }

    .img-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.8s ease;
    }

.product-card:hover .img-container img {
    transform: scale(1.1);
}

/* Nhãn sàn thương mại (Mới: Góc trái trên ảnh) */
.badge-on-img {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 11;
    margin-bottom: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px); /* Hiệu ứng kính mờ */
    pointer-events: none;
    transition: 0.3s;
}

.product-card:hover .badge-on-img {
    transform: translateY(-3px) scale(1.05);
}

/* Nút thao tác nhanh trên ảnh (Góc phải) */
.overlay-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: 0.3s;
    color: #555;
}

    .action-btn:hover {
        background: white;
        transform: scale(1.15);
        color: var(--primary);
    }

/* Icon Play Badge */
.play-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- 4. THÔNG TIN SẢN PHẨM (PRODUCT INFO) --- */
.product-info {
    padding: 15px 20px 20px 20px; /* Tối ưu lại padding khi bỏ badge cũ */
}

.product-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3rem;
    line-height: 1.4;
}

/* Container bao quanh giá */
.price-container {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

/* Chữ "Chỉ từ" nhỏ nhỏ phía trước (nếu cần) */
.price-label {
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
    text-transform: lowercase;
}

/* Con số chính - Làm cho nó thật to và đậm */
.price-value {
    color: var(--primary);
    font-weight: 800; /* Đậm nhất có thể */
    font-size: 1.3rem; /* To hơn một chút */
    letter-spacing: -0.5px;
    line-height: 1;
}

/* Đơn vị tiền tệ - Nhỏ hơn và nằm hơi cao lên hoặc gạch chân */
.currency {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: underline; /* Đặc trưng của chữ đ */
    text-underline-offset: 2px;
}

/* Thêm hiệu ứng phát sáng nhẹ khi hover vào card */
.product-card:hover .price-value {
    text-shadow: 0 0 15px rgba(255, 71, 126, 0.2);
    transition: 0.3s;
}

.btn-redirect {
    background: #f8f9fa;
    color: #333;
    border-radius: 16px;
    padding: 11px;
    width: 100%;
    font-weight: 600;
    text-decoration: none;
    display: block;
    text-align: center;
    margin-top: 15px;
    transition: 0.3s;
    border: 1px solid #eee;
    font-size: 0.9rem;
}

    .btn-redirect:hover {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
        box-shadow: 0 5px 15px rgba(255, 71, 126, 0.3);
    }

/* --- 5. ANIMATIONS --- */
.action-btn.liked i {
    color: var(--primary) !important;
    animation: heartBeatCustom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartBeatCustom {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

/* Nút Xem Thêm "Xịn" */
.load-more-wrapper {
    margin-top: 40px;
    margin-bottom: 60px;
}

.btn-load-more {
    background: white !important;
    color: var(--primary) !important;
    border: 2px solid var(--soft-pink) !important;
    padding: 12px 40px !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 20px rgba(255, 71, 126, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

    .btn-load-more:hover {
        background: var(--primary) !important;
        color: white !important;
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(255, 71, 126, 0.2) !important;
        border-color: var(--primary) !important;
    }

/* Spinner Loading Cưng */
.fa-spin-cute {
    animation: fa-spin 1.5s infinite linear;
    color: var(--primary);
}
/* Nút quay lại chuẩn Style Cưng Xỉu */
.btn-outline-pink {
    border: 2px solid var(--soft-pink) !important;
    color: var(--primary) !important;
    background: white;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

    .btn-outline-pink:hover {
        background: var(--primary) !important;
        color: white !important;
        border-color: var(--primary) !important;
        transform: scale(1.05);
    }