/* =========================
   RESET + BASE
========================= */
body {
    background: #f6f8fb;
    color: #1f2937;
    font-family: Arial, Helvetica, sans-serif;
}

a {
    transition: all 0.2s ease;
}

.nav-link {
    color: #374151;
    font-weight: 500;
}

.nav-link:hover {
    color: #0d6efd;
}

.container {
    max-width: 1200px;
}

/* =========================
   HEADER
========================= */
header.sticky-top {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

header .form-control {
    border-radius: 10px;
}

header .btn {
    border-radius: 10px;
}

/* =========================
   BANNER
========================= */
.banner-img {
    height: 300px;
    object-fit: cover;
    object-position: center;
    display: block;
    width: 100%;
    background: #eef2f7;
}

.banner-link {
    position: relative;
    display: block;
    text-decoration: none;
    color: #fff;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 15, 32, 0.68) 0%, rgba(8, 15, 32, 0.28) 40%, rgba(8, 15, 32, 0.05) 100%);
    z-index: 1;
}

.carousel-caption {
    left: 7%;
    right: auto;
    bottom: 50%;
    transform: translateY(50%);
    z-index: 2;
    text-align: left;
    background: transparent;
    padding: 0;
    max-width: 520px;
}

.banner-content {
    color: #fff;
}

.banner-content h2 {
    font-size: 2.1rem;
    line-height: 1.2;
}

.banner-content p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
}

.banner-badge {
    display: inline-block;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    margin-bottom: 14px;
    font-size: 14px;
    backdrop-filter: blur(6px);
}

#homeBanner .carousel-control-prev,
#homeBanner .carousel-control-next {
    width: 7%;
}

#homeBanner .carousel-control-prev-icon,
#homeBanner .carousel-control-next-icon {
    background-size: 60% 60%;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.35);
}

#homeBanner .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    margin: 0 5px;
}

@media (max-width: 991.98px) {
    .banner-img {
        height: 320px;
    }

    .carousel-caption {
        left: 6%;
        right: 6%;
        bottom: 20px;
        transform: none;
        max-width: none;
    }

    .banner-content h2 {
        font-size: 1.5rem;
    }

    .banner-content p {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }
}

@media (max-width: 767.98px) {
    .banner-img {
        height: 220px;
    }

    .carousel-caption {
        left: 5%;
        right: 5%;
        bottom: 16px;
    }

    .banner-badge,
    .banner-content p {
        display: none;
    }

    .banner-content h2 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    #homeBanner .carousel-control-prev,
    #homeBanner .carousel-control-next {
        display: none;
    }
}

/* =========================
   CARD
========================= */
.card {
    border-radius: 16px;
}

.product-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1) !important;
}

.product-thumb {
    height: 220px;
    object-fit: cover;
    background: #fff;
}

/* =========================
   PRICE + BADGE
========================= */
.text-danger.fw-bold {
    font-size: 18px;
}

.badge {
    border-radius: 10px;
    padding: 8px 10px;
}

/* =========================
   TABLE
========================= */
.table {
    background: #fff;
}

.table thead th {
    background: #f3f4f6;
    border-bottom: none;
    font-size: 14px;
    color: #374151;
}

.table td,
.table th {
    vertical-align: middle;
}

/* =========================
   BUTTON
========================= */
.btn {
    border-radius: 10px;
    font-weight: 500;
}

.btn-primary {
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.18);
}

/* =========================
   FORMS
========================= */
.form-control,
.form-select,
textarea {
    border-radius: 10px !important;
    border: 1px solid #dbe1ea !important;
    box-shadow: none !important;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15) !important;
}

/* =========================
   CHECKOUT + PROFILE
========================= */
.card-body h4,
.card-body h5 {
    font-weight: 700;
}

/* =========================
   FOOTER
========================= */
footer {
    margin-top: 60px;
}

footer p {
    color: rgba(255, 255, 255, 0.8);
}

/* =========================
   PAGINATION
========================= */
.pagination {
    gap: 6px;
}

.page-link {
    border-radius: 10px !important;
    border: none;
    color: #374151;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.page-item.active .page-link {
    background: #0d6efd;
}

/* =========================
   ALERT
========================= */
.alert {
    border: none;
    border-radius: 12px;
}

/* =========================
   CART QTY
========================= */
.cart-qty-input {
    min-width: 70px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 991.98px) {
    .banner-img {
        height: 280px;
    }

    .product-thumb {
        height: 180px;
    }

    header .w-50 {
        width: 100% !important;
    }

    /* header .d-flex.align-items-center.justify-content-between.py-3 {
        flex-direction: column;
        gap: 16px;
        align-items: stretch !important;
    } */
}

@media (max-width: 767.98px) {
    .banner-img {
        height: 220px;
    }

    .product-thumb {
        height: 220px;
    }

    .carousel-caption {
        display: none !important;
    }
}
/* Hover mở dropdown */
@media (min-width: 992px) {
    .nav .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

.navbar-nav .dropdown:hover .dropdown-menu{
    display:block;
    margin-top:0;
}

.product-gallery-thumb{
    transition: all .2s ease;
    border: 2px solid transparent;
}

.product-gallery-thumb:hover{
    transform: scale(1.05);
    border-color: #0d6efd !important;
}

.active-thumb{
    border-color: #0d6efd !important;
}

/* BUTTON CHAT */

.chat-toggle{
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #0d6efd;
    color: white;
    border-radius: 50%;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:24px;
    z-index:9999;
    box-shadow:0 4px 12px rgba(0,0,0,0.2);
}

/* CHATBOX */

.chatbox{
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 320px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow:0 5px 20px rgba(0,0,0,0.2);
    z-index:1050;

    display:none;
}

@media (max-width: 576px){

    .chatbox{
        width: calc(100% - 20px);
        right:10px;
        bottom:80px;
    }

    .chat-toggle{
        width:55px;
        height:55px;
    }

}

.chat-header{
    background:#0d6efd;
    color:white;
    padding:12px;
    font-weight:bold;
}

.chat-body{
    height:300px;
    overflow-y:auto;
    padding:10px;
    background:#f8f9fa;
}

.chat-footer{
    display:flex;
    border-top:1px solid #ddd;
}

.chat-footer input{
    flex:1;
    border:none;
    padding:10px;
    outline:none;
}

.chat-footer button{
    border:none;
    background:#0d6efd;
    color:white;
    padding:0 20px;
}

.chat-message{
    white-space: pre-line;
    line-height:1.6;
    display:inline-block;
    max-width:80%;
}

/* USER */

.user-bubble{
    background:#0d6efd;
    color:white;
    padding:10px 14px;
    border-radius:18px 18px 4px 18px;
    max-width:80%;
    line-height:1.6;
    box-shadow:0 2px 8px rgba(0,0,0,0.08);
}

/* AI */

.ai-bubble{
    background:white;
    padding:12px 14px;
    border-radius:18px 18px 18px 4px;
    max-width:80%;
    line-height:1.7;
    box-shadow:0 2px 8px rgba(0,0,0,0.08);
    border:1px solid #e5e7eb;
}

/* AVATAR */

.ai-avatar{
    width:36px;
    height:36px;
    background:#0d6efd;
    color:white;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    font-size:18px;
}

/* MARKDOWN */

.ai-message p{
    margin-bottom:10px;
}

.ai-message ul{
    padding-left:20px;
}

.ai-message li{
    margin-bottom:8px;
}

.ai-message strong{
    color:#0d6efd;
}

.ai-message code{
    background:#eef2ff;
    padding:2px 5px;
    border-radius:5px;
}

.ai-message{
    /* white-space: pre-wrap; */
    line-height: 1.7;
    font-size:14px;
}

.ai-message{
    overflow-wrap: break-word;
}

/* .ai-message ul{
    padding-left:20px;
}

.ai-message p{
    margin-bottom:8px;
}

.ai-message strong{
    color:#0d6efd;
}

.ai-message code{
    background:#eef2ff;
    padding:2px 5px;
    border-radius:5px;
    font-size:13px;
} */

.ai-message pre{
    background:#111827;
    color:white;
    padding:12px;
    border-radius:10px;
    overflow-x:auto;
}

.collapse {
    visibility: visible !important;
}

/* GUEST */
.guest-chat{
    background:#6c757d;
}

/* USER */
.user-chat{
    background:#0d6efd;
}

/* ADMIN */
.admin-chat{
    background:#dc3545;
}

.user-box{
    border:2px solid #0d6efd;
}

.admin-box{
    border:2px solid #dc3545;
}

.typing{
    display:flex;
    gap:5px;
    align-items:center;
    padding:8px 12px;
}

.typing span{
    width:8px;
    height:8px;
    background:#999;
    border-radius:50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing span:nth-child(2){
    animation-delay: .2s;
}

.typing span:nth-child(3){
    animation-delay: .4s;
}

@keyframes bounce{
    0%,80%,100%{
        transform: scale(0);
    }
    40%{
        transform: scale(1);
    }
}

.cart-qty-box{
    display:flex;
    align-items:center;
    gap:10px;
}

.qty-btn{
    width:35px;
    height:35px;
    border:none;
    background:#0d6efd;
    color:white;
    border-radius:8px;
    font-size:18px;
    font-weight:bold;
}

.qty-btn:hover{
    opacity:.9;
}

.qty-input{
    width:60px;
    text-align:center;
    border:1px solid #ddd;
    border-radius:8px;
    height:35px;
}