/* =========================================================
   FOOD2TL - Giao diện khách hàng
   ========================================================= */

/* Nút bấm bo tròn hiện đại */
.btn-brand {
    background-color: #ce1212;
    color: white;
    border-radius: 50px;
    padding: 10px 28px;
    font-weight: 600;
    border: none;
    transition: all 0.3s;
}

.btn-brand:hover {
    background-color: #ce1212;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(255, 71, 87, 0.3);
}

/* Card món ăn */
.food-card {
    border-radius: 20px;
    border: none;
    background: #ffffff;
    transition: all 0.4s ease;
}

.food-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
}

/* Input form cao cấp */
.form-control {
    border-radius: 15px;
    padding: 14px 20px;
    background-color: #f1f2f6;
    border: 2px solid transparent;
    transition: 0.3s;
}

.form-control:focus {
    background-color: #ffffff;
    border-color: #ce1212;
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1);
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-color: #fff8f8;
}

/* Tiêu đề mục */
.section-title {
    position: relative;
    display: inline-block;
    font-weight: 700;
    color: #2f3542;
}

.section-title::after {
    content: "";
    position: absolute;
    width: 50px;
    height: 4px;
    background-color: #ce1212;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* ---------- Navbar: logo + ô tìm kiếm ---------- */
.brand-logo {
    height: 40px;
    width: auto;
}

.search-box .form-control {
    padding: 8px 16px;
    border-radius: 50rem 0 0 50rem;
    min-width: 0;
    width: 200px;
}

.search-box .btn {
    border-radius: 0 50rem 50rem 0;
    background-color: #f1f2f6;
    border: 2px solid transparent;
    border-left: 0;
    padding-inline: 14px;
}

.search-box .btn:hover {
    background-color: #ce1212;
    color: #fff;
}

@media (max-width: 1199.98px) {
    .search-box .form-control {
        width: 100%;
    }
}

/* ---------- Banner Carousel ---------- */
.hero-section {
    background-color: #f5f6f7;
    padding: 80px 0;
    min-height: 80vh;
}

.hero-carousel .container {
    padding-inline: 3rem;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 5%;
    min-width: 44px;
}

/* Mũi tên trắng mặc định -> đổi sang màu tối cho nền sáng */
.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
    filter: invert(1) grayscale(1);
    opacity: 0.6;
}

.hero-carousel .carousel-indicators {
    margin-bottom: 1.25rem;
}

.hero-carousel .carousel-indicators [data-bs-target] {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 3px;
    background-color: #ce1212;
}

.hero-title {
    font-size: 3rem;
    color: #37373f;
    line-height: 1.3;
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2.1rem;
    }
}

.hero-img-main {
    max-width: 65%;
}

.hero-photo {
    width: 100%;
    max-width: 85%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Hiệu ứng hình ảnh di chuyển lên xuống */
.floating-img {
    animation: floatUpDown 3s ease-in-out infinite;
}

@keyframes floatUpDown {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

.btn-book {
    background-color: #ce1212;
    color: white;
    transition: 0.3s;
}

.btn-book:hover {
    background-color: #e51313;
    color: white;
}

.btn-watch {
    color: #37373f;
    font-weight: 500;
    transition: 0.3s;
    text-decoration: none;
}

.btn-watch:hover {
    color: #ce1212;
}

.btn-watch i {
    color: #ce1212;
}

.menu-filter-item {
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.menu-filter-item.active,
.menu-filter-item:hover {
    color: #ce1212 !important;
    border-bottom-color: #ce1212;
}

/* ---------- Bảng món đặc biệt (XML) ---------- */
#xmlTable thead th {
    white-space: nowrap;
}

#xmlTable tbody tr td:first-child {
    font-weight: 700;
    color: #ce1212;
}

/* ---------- Toast ---------- */
@keyframes slideInRight {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(0);
    }
}

.toast-slide-in {
    animation: slideInRight 0.4s ease-out;
}

/* ---------- Card món ăn (Bootstrap Card) ---------- */
.food-card {
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
}

.food-card-img {
    height: 200px;
    width: 100%;
    background: #fff;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Chỉ báo lọc danh mục: chữ đỏ + gạch chân khi được chọn */
.menu-filter-item.active {
    color: #ce1212 !important;
    border-bottom-color: #ce1212;
}


/* =========================================================
   Nút Giỏ hàng + Đăng nhập (navbar) - tương thích Bootstrap 5.0.2
   - KHÔNG dùng transform trên nút: nút dịch chuyển khi hover/click
     làm con trỏ trượt khỏi nút -> click lúc được lúc không
   ========================================================= */
.btn.btn-cart,
.btn.btn-login {
    color: #fff;
    border: 0;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Icon + chữ bên trong không nhận chuột -> luôn bấm trúng chính nút */
.btn.btn-cart > *,
.btn.btn-login > * {
    pointer-events: none;
}

.btn.btn-cart:hover,
.btn.btn-cart:focus,
.btn.btn-cart:active,
.btn.btn-login:hover,
.btn.btn-login:focus,
.btn.btn-login:active {
    color: #fff;
}

/* ---- Giỏ hàng: đỏ -> đỏ đậm ---- */
.btn.btn-cart {
    background-color: #ce1212;
}

.btn.btn-cart:hover {
    background-color: #a80e0e;
    box-shadow: 0 6px 16px rgba(206, 18, 18, 0.4);
}

.btn.btn-cart:active {
    background-color: #8f0b0b;
    box-shadow: 0 1px 4px rgba(206, 18, 18, 0.5);
}

/* ---- Đăng nhập: đen -> đỏ ---- */
.btn.btn-login {
    background-color: #212529;
}

.btn.btn-login:hover {
    background-color: #ce1212;
    box-shadow: 0 6px 16px rgba(206, 18, 18, 0.35);
}

.btn.btn-login:active {
    background-color: #a80e0e;
    box-shadow: 0 1px 4px rgba(206, 18, 18, 0.5);
}

/* Không để màu "kẹt" sau khi click; viền focus chỉ hiện khi dùng bàn phím */
.btn.btn-cart:focus:not(:hover):not(:active) {
    background-color: #ce1212;
}

.btn.btn-login:focus:not(:hover):not(:active) {
    background-color: #212529;
}

.btn.btn-cart:focus:not(:focus-visible),
.btn.btn-login:focus:not(:focus-visible) {
    box-shadow: none;
}

.btn.btn-cart:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(206, 18, 18, 0.35);
}

.btn.btn-login:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(33, 37, 41, 0.35);
}