﻿html {
    scroll-behavior: smooth; /* Giúp màn hình trượt xuống từ từ, không bị giật cục phóng thẳng xuống */
    font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}
.chat-box {
    max-width: 600px; /* Giới hạn chiều rộng trên desktop */
    width: 100%;
    border: 1px solid #ccc;
    padding: 10px;
    width: 500px;
    height: 300px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.chat-message {
    display: flex;
    margin: 5px 0;
}

    .chat-message.user {
        justify-content: flex-end;
    }

    .chat-message.ai {
        justify-content: flex-start;
    }

.bubble {
    max-width: 70%;
    padding: 10px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.chat-message.user .bubble {
    background-color: #0084ff;
    color: white;
    border-bottom-right-radius: 0;
}

.chat-message.ai .bubble {
    background-color: #e5e5ea;
    color: black;
    border-bottom-left-radius: 0;
}

.chat-form {
    margin-top: 10px;
    display: flex;
}

    .chat-form input {
        flex: 1;
        padding: 8px;
        border: 1px solid #ccc;
        border-radius: 15px;
        margin-right: 5px;
    }

    .chat-form button {
        padding: 8px 15px;
        border: none;
        background-color: #0084ff;
        color: white;
        border-radius: 15px;
        cursor: pointer;
    }
.chat-message.ai.rank1 .bubble {
    background-color: #4CAF50; /* xanh lá cho top 1 */
    color: white;
    border-bottom-left-radius: 0;
}

.chat-message.ai.rank2 .bubble {
    background-color: #FF9800; /* cam cho top 2 */
    color: white;
    border-bottom-left-radius: 0;
}

.chat-message.ai.rank3 .bubble {
    background-color: #9E9E9E; /* xám cho top 3 */
    color: white;
    border-bottom-left-radius: 0;
}
.train-btn {
    margin-top: 10px;
    background-color: #4CAF50;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.spinner {
    margin-top: 10px;
    border: 4px solid #f3f3f3; /* màu nền */
    border-top: 4px solid #4CAF50; /* màu xanh quay */
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
.bubble.typing {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: #e5e5ea;
    border-radius: 15px;
    padding: 8px 12px;
    width: 60px;
}

.dot {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #555;
    border-radius: 50%;
    animation: blink 1.4s infinite both;
}

    .dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes blink {
    0% {
        opacity: 0.2;
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}
.bubble.typing {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: #e5e5ea;
    border-radius: 15px;
    padding: 8px 12px;
    width: 60px;
}

.dot {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #555;
    border-radius: 50%;
    animation: blink 1.4s infinite both;
}

    .dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes blink {
    0% {
        opacity: 0.2;
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}
.bubble.typing {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: #e5e5ea;
    border-radius: 15px;
    padding: 8px 12px;
    width: 60px;
}

.dot {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: #555;
    border-radius: 50%;
    animation: blink 1.4s infinite both;
}

    .dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes blink {
    0% {
        opacity: 0.2;
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.product-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

    .product-card:hover {
        transform: translateY(-4px);
    }

    .product-card img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        display: block;
    }

    .product-card .info {
        padding: 12px;
    }

    .product-card h4 {
        margin: 0 0 8px;
        font-size: 16px;
        color: #333;
    }

    .product-card p {
        margin: 4px 0;
        font-size: 14px;
        color: #555;
    }

    .product-card a {
        display: inline-block;
        margin-top: 8px;
        padding: 6px 12px;
        background-color: #007bff;
        color: #fff;
        text-decoration: none;
        border-radius: 4px;
        font-size: 14px;
        transition: background-color 0.2s ease;
    }

        .product-card a:hover {
            background-color: #0056b3;
        }

/* Mobile: hiển thị dạng danh sách */
@media (max-width: 600px) {
    .product-list {
        grid-template-columns: 1fr;
    }
}
/* --- Khung chứa giới hạn độ rộng giống trang gốc --- */
.sh-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    box-sizing: border-box;
}

/* --- 1. Định kiểu Top Bar --- */
.sh-topbar {
    background-color: #fcfcfc;
    border-bottom: 1px solid #f0f0f0;
    padding: 8px 0;
    font-size: 13px;
    color: #666;
}

    .sh-topbar .sh-container {
        justify-content: space-between; /* Đẩy 2 khối về 2 đầu cực */
    }

.topbar-left b {
    color: #000;
}

.topbar-left a {
    color: #ef4444; /* Màu đỏ hotline */
    text-decoration: none;
    font-weight: bold;
}

/* --- 2. Định kiểu Main Header --- */
.sh-main-header {
    background-color: #ffffff;
    padding: 20px 0;
}

.header-flex {
    justify-content: space-between;
    align-items: center;
}

.header-logo img {
    max-height: 65px;
    display: block;
}

.header-cart {
    text-align: right;
}

.cart-box {
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.cart-title b {
    color: #ef4444; /* Chữ "Giỏ hàng" màu đỏ */
}

.cart-detail {
    display: block;
    font-size: 13px;
    color: #777;
    margin-top: 4px;
}

/* --- 3. Định kiểu Thanh Menu điều hướng (Navigation) --- */
.sh-navbar {
    background-color: #2a2a2a; /* Màu nền đen xám của Sông Hồng */
    border-bottom: 3px solid #ef4444; /* Đường chỉ đỏ mảnh bên dưới menu */
}

.nav-flex {
    justify-content: space-between;
    align-items: center;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

    .nav-menu li a {
        display: block;
        padding: 14px 20px;
        color: #ffffff;
        text-line: none;
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        transition: background 0.2s;
    }
        /* Hiệu ứng di chuột vào menu */
        .nav-menu li a:hover {
            background-color: #3e3e3e;
        }
    /* Mục Trang chủ đang được chọn (Có nền đỏ) */
    .nav-menu li.active a {
        background-color: #b91c1c; /* Màu đỏ sậm nổi bật */
        font-weight: bold;
    }

/* Thanh tìm kiếm trên Menu */
.nav-search {
    display: flex;
    background-color: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ccc;
    height: 32px;
    max-width: 250px;
    width: 100%;
}

    .nav-search input {
        border: none;
        padding: 0 10px;
        font-size: 13px;
        outline: none;
        flex: 1;
    }

    .nav-search button {
        border: none;
        background-color: #eaeaea;
        cursor: pointer;
        padding: 0 10px;
        color: #555;
        transition: background 0.2s;
    }

        .nav-search button:hover {
            background-color: #dcdcdc;
        }

/* Tương thích thiết bị di động (Responsive sơ bộ) */
@media (max-width: 768px) {
    .sh-container, .header-flex, .nav-flex {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .sh-topbar .sh-container {
        flex-direction: column;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
    }

    .nav-search {
        margin: 10px auto;
    }
}