﻿/* ============================
   SEARCH DROPDOWN OVERLAY (dưới header)
   ============================ */

/* Header của mày cao bao nhiêu thì set đúng */
:root {
    --header-height: 96px;
}

.main-header {
    transition: transform .35s ease;
}

    .main-header.hide-header {
        transform: translateY(-100%);
    }

/* Overlay không che header */
.search-dropdown {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(6px);
    z-index: 9998;
    display: none;
}

/* Bên trong là panel kết quả */
.search-dropdown-inner {
    background: #fff;
    border-radius: 16px;
    margin-top: 14px;
    padding: 16px;
    max-height: calc(100vh - var(--header-height) - 28px);
    overflow: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
}

/* hàng input search */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    padding: 10px 12px;
    background: #fff;
    margin-bottom: 10px;
}

    /* input trong bar */
    .search-bar input {
        flex: 1;
        font-size: 20px;
    }

/* giữ list style của mày */
.search-modal-list .list-group-item {
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 0 !important;
    padding: 14px 16px;
}

    .search-modal-list .list-group-item:hover {
        background: rgba(15, 23, 42, 0.04);
    }

.search-modal-list .search-title {
    font-weight: 900;
    font-size: 18px;
    line-height: 1.25;
    color: #0f172a;
}

.search-modal-list .search-sub {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.search-modal-list .search-chap {
    font-size: 13px;
    color: #0f172a;
    font-weight: 700;
}
/* ===== Search result item: ảnh trái - text phải ===== */
.search-modal-list .search-item {
    display: flex !important;
    align-items: center;
    gap: 14px;
}

/* ✅ Thumbnail to hơn ~50% (46x64 -> 70x96) */
.search-modal-list .search-thumb {
    width: 105px !important;
    height: 154px !important;
    object-fit: cover;
    flex: 0 0 auto;
    background: #e5e7eb;
}
.search-modal-list .search-thumb {
    image-rendering: auto;
    -ms-interpolation-mode: bicubic; /* old IE (không quan trọng lắm) */
    transform: translateZ(0); /* hint GPU */
}

/* ✅ text nằm bên phải ảnh */
.search-modal-list .search-item .flex-grow-1 {
    min-width: 0; /* tránh bị tràn */
}

/* Title to hơn chút cho cân */
.search-modal-list .search-title {
    font-size: 20px;
}

/* Sub line gọn lại */
.search-modal-list .search-sub {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================
   HEADER
============================ */

.main-header {
    position: sticky;
    top: 0;
    z-index: 9999;
}

.site-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.header-right {
    gap: 10px;
}

.lang-select {
    width: auto;
}

/* =========================
   HEADER
========================= */

.main-header {
    position: sticky;
    top: 0;
    z-index: 9999;
}

.site-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.lang-select {
    width: auto;
}

.header-right {
    gap: 10px;
}

/* =========================
   MOBILE HEADER
========================= */

.mobile-icons {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mobile-icon {
    font-size: 20px;
    color: #111;
    text-decoration: none;
}

/* Ẩn menu desktop trên mobile */

@media (max-width:991px) {

    .desktop-menu {
        display: none;
    }

    .site-logo {
        width: 46px;
        height: 46px;
    }

    .header-right {
        margin-top: 10px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Desktop */

@media (min-width:992px) {

    .mobile-icons {
        display: none;
    }
}
/* ============================
   SEARCH MOBILE
============================ */

@media (max-width:768px) {

    :root {
        --header-height: 72px;
    }

    .search-dropdown-inner {
        border-radius: 12px;
        margin-top: 10px;
        padding: 12px;
    }

    .search-bar input {
        font-size: 16px;
    }

    .search-modal-list .search-thumb {
        width: 70px !important;
        height: 96px !important;
    }

    .search-modal-list .search-title {
        font-size: 16px;
    }
}

/* ============================
   FOOTER MOBILE
============================ */

@media (max-width:768px) {

    footer {
        text-align: left;
    }

        footer img {
            width: 60px;
        }

        footer h6 {
            font-size: 14px;
        }

        footer p {
            font-size: 13px;
        }

        footer .btn {
            margin-bottom: 6px;
        }
}