﻿/* 
    HORIZON - MODERN CLEAN LIGHT THEME 
    Professional E-commerce Design 2025
*/

:root {
    /* --- BẢNG MÀU HIỆN ĐẠI --- */
    --primary-color: #2563eb; /* Xanh chuyên nghiệp (giống Azure/Facebook) */
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --bg-body: #f8fafc; /* Nền hơi xám nhạt để làm nổi bật Card trắng */
    --bg-card: #ffffff;
    --text-main: #1e293b; /* Xanh đen đậm cho chữ */
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --accent-orange: #f59e0b; /* Màu nhấn cho Sale/Khuyến mãi */

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --radius: 8px; /* Bo góc mềm mại */
}

/* --- TỔNG THỂ --- */
body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    line-height: 1.5;
}

/* --- HEADER & NAVBAR --- */
.main-header {
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.top-bar {
    background-color: #f1f5f9;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    background-color: #ffffff !important;
    padding: 1rem 0;
}

.navbar-brand {
    color: var(--primary-color) !important;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--text-main) !important;
    font-weight: 500;
    transition: color 0.2s;
}

    .nav-link:hover {
        color: var(--primary-color) !important;
    }

/* --- SEARCH BAR --- */
.search-group .form-control {
    border-radius: var(--radius) 0 0 var(--radius);
    border: 1px solid var(--border-color);
    background-color: #f1f5f9;
}

.search-group .btn {
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* --- CARD SẢN PHẨM  --- */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary-color);
    }

    .product-card .img-container {
        aspect-ratio: 1/1;
        overflow: hidden;
        background-color: #f8fafc;
    }

    .product-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }

    .product-card:hover img {
        transform: scale(1.05);
    }

    .product-card .card-body {
        padding: 1.25rem;
    }

    .product-card .card-title {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 3rem;
    }

/* --- GIÁ CẢ --- */
.price-tag {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
}

.old-price {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

/* --- NÚT BẤM --- */
.btn-primary {
    background-color: var(--primary-color);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    padding: 0.6rem 1.2rem;
}

    .btn-primary:hover {
        background-color: var(--primary-hover);
    }

/* --- FOOTER --- */
.main-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    color: var(--text-main);
}

.footer-title {
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

    .footer-link:hover {
        color: var(--primary-color);
    }

/* --- SIDEBAR SHOP --- */
.filter-sidebar {
    background: #ffffff;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
}

.filter-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px; /* Đảm bảo các card có độ cao phần thân bằng nhau */
}

.product-card img {
    width: 100%;
    aspect-ratio: 1/1; /* Ảnh luôn vuông cho đẹp */
    object-fit: contain; /* Hoặc cover tùy cậu, contain sẽ không bị mất hình */
    background: #fff;
}

/* --- CẢI TIẾN SÂN KHẤU CHIBI (SLIDESHOW TRƯỢT NGANG) --- */
#chibi-stage {
    position: relative;
    height: 150px; /* Giới hạn chiều cao tổng thể */
    background: #ffffff;
    border: 1px solid var(--border-color);
    overflow: hidden; /* Cực kỳ quan trọng để ẩn phần thừa */
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* Container chứa các nhân vật để chạy slideshow */
.chibi-track {
    display: flex;
    width: calc(250px * 16); /* Độ rộng ảo để lặp lại nhân vật */
    animation: scroll-slideshow 40s linear infinite;
}

.chibi-character {
    flex: 0 0 auto;
    width: 200px; /* Khoảng cách giữa mỗi nhân vật */
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

    /* LÀM NHỎ GIF LẠI */
    .chibi-character img {
        height: 100px; /* Cố định chiều cao nhân vật nhỏ lại */
        width: auto; /* Tự động giữ tỉ lệ */
        filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.1));
    }

    .chibi-character:hover {
        transform: scale(1.1) translateY(-10px);
    }

/* Dừng slideshow khi di chuột vào */
#chibi-stage:hover .chibi-track {
    animation-play-state: paused;
}

/* Logic Animation trượt vô tận */
@keyframes scroll-slideshow {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-200px * 8));
    }
    /* Trượt hết 8 nhân vật rồi lặp lại */
}

/* Hộp thoại nhỏ gọn hơn */
#dialogue-box {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.price-tag.text-danger {
    color: #dc3545 !important;
    font-size: 1.15rem;
}