
/* Đăng nhập */
body { background: #f8f9fa; }
        .auth-card {
            max-width: 400px;
            margin: 80px auto;
            border: none;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        .auth-header {
            background: var(--brand-red, #e33d26);
            color: white;
            padding: 30px;
            text-align: center;
        }
        /* đăng ký */
        body { background: #f8f9fa; }
        .auth-card {
            max-width: 500px;
            margin: 50px auto;
            border: none;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        }
        .auth-header {
            background: #2d2d2d; /* Màu tối cho đăng ký để khác biệt xíu */
            color: white;
            padding: 30px;
            text-align: center;
            border-radius: 15px 15px 0 0;
        }


/* --- Cấu hình chung --- */
:root {
    --brand-red: #e33d26;
    --brand-dark: #2d2d2d;
    --brand-gray: #f7f7f7;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: #fff;
    color: #333;
    padding-bottom: 80px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--brand-red); border-radius: 4px; }

/* --- Utility Classes --- */
.text-brand { color: var(--brand-red) !important; }
.bg-brand { background-color: var(--brand-red) !important; }
.border-brand { border-color: var(--brand-red) !important; }

/* Nút bấm chung */
.btn-brand {
    background-color: var(--brand-red);
    color: white;
    border: none;
    transition: all 0.3s;
}
.btn-brand:hover {
    background-color: #c02e1a; /* Màu đỏ đậm hơn khi hover */
    color: white;
    transform: translateY(-1px);
}

/* --- Navigation Bar (Giống hình) --- */
.navbar-brand {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}
.nav-link {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #555 !important;
    padding: 0.5rem 1rem !important;
}
.nav-link:hover {
    color: var(--brand-red) !important;
}

/* --- Category Filters (Quan trọng: Đổi từ nút sang text gạch chân) --- */
.filter-btn {
    background: transparent;
    border: none;
    color: #888;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 0.5rem 0;
    margin: 0 1rem;
    position: relative;
    transition: color 0.3s;
}

.filter-btn:hover {
    color: var(--brand-dark);
}

/* Hiệu ứng gạch chân cho nút đang active */
.filter-btn.active {
    color: var(--brand-dark);
}
.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--brand-red);
}

/* --- Product Card --- */
.product-card-img-container {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* Tỉ lệ 4:3 */
    border-radius: 8px;
}
.product-card-img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.group:hover .product-card-img-container img {
    transform: scale(1.05); /* Zoom nhẹ khi hover */
}

/* Overlay Actions (Nút chức năng trên hình) */
.overlay-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}
.group:hover .overlay-actions { opacity: 1; }

.act-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #555;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s;
}
.act-btn:hover { background: var(--brand-red); color: white; }

/* Nút thêm vào giỏ (Nổi lên góc dưới) */
.add-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: var(--brand-red);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s;
}
.group:hover .add-btn {
    transform: translateY(0);
    opacity: 1;
}
.add-btn:hover {
    background: var(--brand-red);
    color: white;
}

/* --- Chat Widget (Nút tròn đỏ góc phải dưới) --- */
.chat-widget {
            position: fixed !important;
            bottom: 20px !important;
            right: 20px !important;
            z-index: 9999 !important;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
        }
        
        .chat-toggle {
            width: 50px !important;  /* Nhỏ hơn (cũ là 60px) */
            height: 50px !important; /* Nhỏ hơn */
            border-radius: 50%;
            background-color: #e33d26;
            color: white;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0,0,0,0.2);
            font-size: 22px !important;
            transition: transform 0.3s;
        }
        
        .chat-toggle:hover {
            transform: scale(1.1);
        }

        .chat-window {
            width: 300px !important; /* Nhỏ hơn (cũ là 350px) */
            height: 400px !important; /* Thấp hơn (cũ là 500px) */
            background: white;
            border-radius: 12px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.2);
            margin-bottom: 15px;
            display: none;
            flex-direction: column;
            overflow: hidden;
            border: 1px solid #eee;
        }
        
        /* Khi có class open thì hiện ra dạng flex */
        .chat-window.open {
            display: flex !important;
            animation: slideUp 0.3s ease-out;
        }

        @keyframes slideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

/* --- Animations & Utilities --- */
.animate-fade-in { animation: fadeIn 0.5s ease-out forwards; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.ai-btn-pulse { animation: pulse-red 2s infinite; }
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(227, 61, 38, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(227, 61, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(227, 61, 38, 0); }
}

/* --- Sidebar Cart --- */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: white;
    z-index: 1060;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
}
.cart-sidebar.show { transform: translateX(0); }
.cart-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1055;
    display: none;
}
.cart-backdrop.show { display: block; }

/* --- Modals --- */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1070;
    display: none;
    align-items: center;
    justify-content: center;
}
.custom-modal-dialog {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease-out;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* Toast */
.custom-toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 1080;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}
.custom-toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}