:root {
    --main: #1F354C;
    --gold: #E1CD99;
    --red: #F00;
    --light-bg: #f8f9fa;
    --text-dark: #222;
    --text-light: #666;
    --border: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    color: var(--gold);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 92%;
    max-width: 1400px;
    margin: auto;
}

/* ==================== HEADER – GIỮ NGUYÊN 100% CỦA BẠN ==================== */
header {
    background: #1F354C;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    z-index: 1030;
    /* Bootstrap sticky-top level */
}

/* Logo */
.logo-elib img {
    height: 70px !important;
    width: auto !important;
    object-fit: contain;
    transition: height 0.3s;
}

@media (max-width: 991.98px) {
    header {
        padding: 5px 0;
    }

    .logo-elib img {
        height: 50px !important;
    }
}

/* Main Menu */
.navbar-nav.main-menu .nav-link {
    font-weight: 600;
    font-size: 15.5px;
    color: #fff !important;
    padding: 10px 15px !important;
    transition: 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar-nav.main-menu .nav-link:hover,
.navbar-nav.main-menu .nav-link.active {
    color: var(--gold) !important;
}

@media (min-width: 992px) {
    .navbar-nav.main-menu .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: 0px;
        left: 15px;
        right: 15px;
        height: 4px;
        /*background: var(--gold);*/
        border-radius: 2px;
    }
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #1F354C;
        padding: 20px;
        border-radius: 0 0 15px 15px;
        margin-top: 10px;
    }
}

/* Account & Notify Popups */
.nav-account-pop,
.nav-notify-pop {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 1000;
}

.header-account.active .nav-account-pop,
.header-notify.active .nav-notify-pop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-user .nav-account-pop {
    width: 220px;
}

.search-form {
    position: relative;
}

.search-form .form-control {
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 12px 20px;
}

.search-form .btn-warning {
    border-radius: 0 8px 8px 0;
    background: var(--gold);
    border: none;
}

/* Mobile Specific Tweaks */
@media (max-width: 991.98px) {
    .nav-account-pop {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -40%) !important;
        width: 90vw !important;
        max-width: 350px !important;
        right: auto !important;
        bottom: auto !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .header-account.active .nav-account-pop {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) !important;
        z-index: 10001;
    }

    .nav-account-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 10000;
        display: none;
    }

    .header-account.active .nav-account-overlay {
        display: block;
    }

    .nav-notify-pop {
        width: calc(100vw - 40px);
        max-width: 380px;
        right: -10px;
        top: 100%;
    }

    /* Hero Slider Mobile Refinements */
    .hero-slider {
        height: 250px !important;
        margin-bottom: 30px !important;
    }

    .hero-swiper .swiper-button-next,
    .hero-swiper .swiper-button-prev {
        display: none !important;
    }

    .hero-swiper img {
        width: 100%;
        height: 100% !important;
        object-fit: cover !important;
        /* Ensure image covers the 350px height */
    }
}

.notify-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--red);
    color: #FFF;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    line-height: 1 !important;
}

/* ==================== END HEADER ==================== */

/* SLIDER BANNER – GIỐNG HỆT HEADER-SEARCH-APP CỦA TRANG THỰC */
.hero-slider {
    height: 630px;
    margin-bottom: 70px;
    background: #000;
    /* fallback nếu ảnh chưa load */
}

.hero-swiper,
.hero-swiper .swiper-wrapper,
.hero-swiper .swiper-slide {
    height: 100% !important;
}

.hero-swiper img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

/* Placeholder and Loading States */
.hero-slider.loadding .swiper-wrapper {
    display: flex;
}

.placeholder-slide {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
    position: relative;
    overflow: hidden;
}

.placeholder-content {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.hero-slider:not(.loadding) .placeholder-slide {
    display: none;
}

/* Nút prev/next + pagination hiện rõ ràng */
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    width: 50px;
    height: 50px;
    background: rgba(31, 53, 76, .8);
    border-radius: 50%;
    margin-top: -25px;
}

.hero-swiper .swiper-button-next:after,
.hero-swiper .swiper-button-prev:after {
    font-size: 22px;
    color: #fff;
}

.hero-swiper .swiper-pagination {
    bottom: 30px;
}

.hero-swiper .swiper-pagination-bullet {
    width: 13px;
    height: 13px;
    background: #fff;
    opacity: 0.6;
}

.hero-swiper .swiper-pagination-bullet-active {
    background: var(--gold);
    opacity: 1;
}

/* ==================== SECTION ABOUT – 2 CỘT GIỐNG ALPHA BOOKS ==================== */
/* ==================== SECTION ABOUT – 2 CỘT GIỐNG ALPHA BOOKS ==================== */
.section-about {
    padding: 100px 0;
    background: #fff;
}

.about-wrapper {
    display: flex;
    align-items: center;
    gap: 80px;
    flex-wrap: wrap;
}

.about-image {
    flex: 1 1 600px;
    /* cột ảnh */
}

.about-image img {
    width: 100%;
    height: 100%;
    height: 480px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.about-content {
    flex: 1 1 500px;
    /* cột nội dung */
}

.about-content h2 {
    font-size: 36px;
    font-weight: 900;
    color: var(--main);
    margin-bottom: 25px;
    line-height: 1.3;
}

.about-content p {
    font-size: 16.5px;
    color: #555;
    line-height: 1.9;
    margin-bottom: 25px;
}

.about-btn {
    display: inline-block;
    background: var(--main);
    color: #fff;
    padding: 14px 36px;
    font-size: 17px;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s;
}

.about-btn:hover {
    background: #152838;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Responsive – giống hệt Alpha Books */
@media (max-width: 992px) {
    .about-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .about-image {
        order: 1;
    }

    .about-content {
        order: 2;
    }

    .about-content h2 {
        font-size: 32px;
    }

    .about-image {
        /* cột ảnh */
        flex: 1 1 300px;
    }
}

@media (max-width: 576px) {
    .section-about {
        padding: 35px 0;
    }

    .about-content h2 {
        font-size: 28px;
    }

    .about-image img {
        height: 300px;
    }

    .about-image {
        /* cột ảnh */
        flex: 1 1 100px;
    }
}

/* ==================== SECTION FLASH SALE – GIỐNG ALPHA BOOKS ==================== */
.section-flashsale {
    padding: 80px 0;
    background: linear-gradient(135deg, #fff 50%, #f0f0f0 50%);
}

.flashsale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.flashsale-header h2 {
    font-size: 38px;
    font-weight: 900;
    color: var(--main);
}

.flashsale-header h2 span {
    color: #e74c3c;
    font-size: 32px;
}

.view-all {
    font-size: 17px;
    font-weight: 600;
    color: var(--main);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.view-all:hover {
    color: var(--gold);
    gap: 12px;
}

.flashsale-swiper {
    overflow: hidden;
    padding: 20px 0;
}

.flash-book {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s;
    text-align: center;
}

.flash-book:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.flash-cover {
    height: 320px;
    overflow: hidden;
}

.flash-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.flash-book:hover .flash-cover img {
    transform: scale(1.08);
}

.flash-info {
    padding: 20px;
}

.flash-title {
    font-size: 17px;
    font-weight: bold;
    color: #222;
    margin-bottom: 8px;
    height: 52px;
    line-height: 26px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis
}

.flash-author {
    font-size: 15px;
    color: #777;
}

/* Nút điều hướng flash sale */
.flashsale-swiper .swiper-button-next,
.flashsale-swiper .swiper-button-prev {
    width: 50px;
    height: 50px;
    background: rgba(31, 53, 76, .9);
    border-radius: 50%;
    margin-top: -25px;
}

.flashsale-swiper .swiper-button-next:after,
.flashsale-swiper .swiper-button-prev:after {
    font-size: 20px;
    color: #fff;
}

/* Responsive */
@media (max-width: 992px) {
    .flashsale-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .flashsale-header h2 {
        font-size: 32px;
    }

    .flashsale-header h2 span {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .section-flashsale {
        padding: 20px 0;
    }

    .flash-cover {
        height: 280px;
    }
}

/* ==================== SECTION BANNER QUẢNG CÁO – 3 ẢNH CÙNG LÚC, THẤP HƠN ==================== */
.section-banner-adv {
    padding: 40px 0 70px;
    background: #f8f9fa;
}

.adv-swiper {
    height: 120px;
    /* Thấp hơn, thanh lịch */
    overflow: hidden;
    border-radius: 12px;
}

.adv-swiper .swiper-slide {
    padding: 0 5px;
}

.adv-swiper .swiper-slide a {
    display: block;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s;
}

.adv-swiper .swiper-slide a:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.adv-swiper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Nút prev/next nhỏ gọn */
.adv-swiper .swiper-button-next,
.adv-swiper .swiper-button-prev {
    width: 36px;
    height: 36px;
    background: rgba(31, 53, 76, .9);
    border-radius: 50%;
    margin-top: -18px;
}

.adv-swiper .swiper-button-next:after,
.adv-swiper .swiper-button-prev:after {
    font-size: 16px;
    color: #fff;
}

/* Responsive – luôn hiện 6 ảnh trên desktop */
@media (max-width: 1200px) {
    .adv-swiper {
        height: 140px;
    }
}

@media (max-width: 992px) {
    .adv-swiper {
        height: 130px;
    }
}

@media (max-width: 768px) {
    .adv-swiper {
        height: 120px;
    }

    .adv-swiper .swiper-slide a:hover {
        transform: none;
    }
}

@media (max-width: 576px) {
    .adv-swiper {
        height: 100px;
    }

    .section-banner-adv {
        padding: 20px 0 20px;
        background: #f8f9fa;
    }
}

/* ==================== SECTION NEW – SÁCH MỚI (SLIDE GIỐNG FLASH SALE) ==================== */
.section-new {
    padding: 80px 0;
    background: #fff;
}

.new-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.new-header h2 {
    font-size: 38px;
    font-weight: 900;
    color: var(--main);
}

.new-header h2 span {
    color: #e74c3c;
    font-size: 32px;
}

.view-all {
    font-size: 17px;
    font-weight: 600;
    color: var(--main);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.view-all:hover {
    color: var(--gold);
    gap: 12px;
}

.new-swiper {
    overflow: hidden;
    padding: 20px 0;
}

.new-group {
    display: flex;
    gap: 30px;
    align-items: stretch;
    /* Thay đổi từ center sang stretch để 2 cột bằng nhau */
    padding: 0 20px;
}

.new-featured {
    flex: 2;
    /* Chiếm 2/3 chiều rộng */
    display: flex;
    gap: 25px;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    /* Chiều cao tự động theo cha (stretch) */
}

.new-cover {
    flex: 0 0 50%;
    max-width: 100%;
    /* Đảm bảo không vượt quá 50% */
    /* Yêu cầu 4: Chiều rộng img bằng 50% thẻ new-featured */
    /* Chiều cao ăn theo cha .new-featured */
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
}

.new-cover img {
    width: 100%;
    /* Yêu cầu 4: Kích thước img cố định không phụ thuộc ảnh gốc (object-fit) */
    height: 100%;
    object-fit: cover;
}

.new-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* justify-content: center; <--- REMOVED CENTERING */
    justify-content: flex-start;
    /* Căn lên trên */
    /* Căn giữa nội dung dọc */
}

.new-title {
    font-size: 26px;
    font-weight: bold;
    color: #222;
    margin-bottom: 10px;
}

.new-author {
    font-size: 18px;
    color: #777;
    margin-bottom: 15px;
}

.new-desc {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.7;
}

.new-specs {
    list-style: none;
    margin-bottom: 25px;
}

.new-specs li {
    font-size: 15px;
    margin-bottom: 8px;
}

.new-specs li strong {
    color: #333;
}

.new-btn {
    display: inline-block;
    background: var(--main);
    color: #fff;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    transition: 0.3s;
    width: fit-content;
}

.new-btn:hover {
    background: #152838;
    transform: translateY(-3px);
}

.new-small-list {
    flex: 1;
    /* Chiếm 1/3 chiều rộng (so với flex: 2 của featured) */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* grid-template-rows: repeat(2, 1fr);  <-- CAUSE OF COLLAPSE REMOVED */
    gap: 15px;
    /* Giảm gap chút để gọn hơn */
}

.new-small {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: 0.3s;

    /* Yêu cầu 2: Kích thước cố định (dựa vào grid cha và height 100%) */
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    /* Xếp dọc: ảnh -> tên -> tác giả */
    align-items: center;
    /* Căn giữa ngang */
    justify-content: flex-start;
    /* Nội dung từ trên xuống */
    padding-bottom: 10px;
    /* Thêm padding dưới */
}

.new-small:hover {
    transform: translateY(-5px);
}

.new-small img {
    /* Yêu cầu 1: Kích thước img cố định */
    width: 70%;
    /* Full width của thẻ cha */
    height: 120px;
    /* GIẢM HEIGHT để list thấp xuống tương xứng featured */
    /* Chiều cao cố định (giảm xuống để vừa khung nhỏ) - có thể chỉnh lại nếu muốn to hơn */
    object-fit: cover;
    /* Không méo ảnh */
    margin-bottom: 10px;
    /* Giảm margin bottom */
}

.new-small h4 {
    font-size: 15px;
    /* Giảm size font chút */
    font-weight: bold;
    color: #222;
    margin: 0 8px 4px;
    /* Giảm margin */

    /* Giới hạn text */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.new-small p {
    font-size: 13px;
    color: #777;
    margin: 0 8px 5px;
}

/* Nút prev/next cho section new */
.new-swiper .swiper-button-next,
.new-swiper .swiper-button-prev {
    width: 50px;
    height: 50px;
    background: rgba(31, 53, 76, .9);
    border-radius: 50%;
    margin-top: -25px;
}

.new-swiper .swiper-button-next:after,
.new-swiper .swiper-button-prev:after {
    font-size: 20px;
    color: #fff;
}

/* Responsive */
@media (max-width: 1200px) {
    .new-group {
        flex-direction: column;
        gap: 40px;
    }

    .new-featured {
        flex-direction: column;
        text-align: center;
    }

    .new-cover {
        flex: none;
        margin-bottom: 20px;
    }

    .new-small-list {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .section-new {
        padding: 60px 0;
    }

    .new-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .new-header h2 {
        font-size: 32px;
    }

    .new-header h2 span {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .section-new {
        padding: 0px 0;
    }
}

/* ==================== SECTION ĐĂNG KÝ NHẬN THÔNG TIN – GIỐNG HỆT HOCHOC.VN ==================== */
.section-register {
    padding: 100px 0;
    background: #f8f9fa;
}

.register-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    margin: 0 auto;
}

.register-image {
    flex: 1;
    min-height: 420px;
    display: flex;
    /* ← THÊM DÒNG NÀY */
    align-items: center;
    /* ← THÊM DÒNG NÀY */
    justify-content: center;
    /* ← THÊM DÒNG NÀY */
    overflow: hidden;
    /* ← THÊM ĐỂ ẨN PHẦN TRÀN */
}

.register-image img {
    width: 100%;
    height: auto;
    /* ← ĐỔI THÀNH height: auto */
    max-height: 100%;
    /* ← Đảm bảo không vượt khung */
    object-fit: contain;
    /* ← Giữ nguyên tỉ lệ ảnh, không bị méo */
}

.register-content {
    flex: 1;
    padding: 60px 70px;
    text-align: left;
}

.register-content h2 {
    font-size: 42px;
    font-weight: 900;
    color: var(--main);
    margin-bottom: 20px;
    line-height: 1.2;
}

.register-content p {
    font-size: 20px;
    color: #555;
    margin-bottom: 40px;
    line-height: 1.6;
}

.register-btn {
    display: inline-block;
    background: var(--main);
    color: var(--gold);
    padding: 18px 48px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 12px;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(31, 53, 76, 0.3);
}

.register-btn:hover {
    background: #152838;
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(31, 53, 76, 0.4);
}

/* Responsive – giống hệt hochoc.vn */
@media (max-width: 992px) {
    .register-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .register-image {
        min-height: 300px;
    }

    .register-content {
        padding: 50px 40px;
    }

    .register-content h2 {
        font-size: 36px;
    }

    .register-content p {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .section-register {
        padding: 10px 0;
    }

    .register-content {
        padding: 40px 25px;
    }

    .register-content h2 {
        font-size: 30px;
    }

    .register-content p {
        font-size: 16px;
    }

    .register-btn {
        padding: 16px 36px;
        font-size: 18px;
    }

    /* Sách mới mobile refinements */
    .new-featured {
        text-align: left !important;
    }

    .new-cover {
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        flex: none !important;
    }

    .new-small-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    #new-cover-a {
        width: 100% !important;
    }
}

/* ==================== FOOTER – ĐẸP, ĐƠN GIẢN, CHUẨN THƯ VIỆN HỌC ĐỌC ==================== */
.footer_top {
    background: var(--main);
    color: #ccc;
    padding: 80px 0 50px;
    text-align: center;
}

.footer-logo {
    height: 80px !important;
    margin-bottom: 0px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    display: inline-block;
}

.footer-info {
    max-width: 900px;
    margin: 0 auto;
    font-size: 15.5px;
    line-height: 1.9;
}

.footer-info strong {
    color: var(--gold);
}

.text-center-logo {
    text-align: center !important;
    margin-bottom: 1rem !important;
}

/* NÚT TẢI APP */
.app-buttons .btn-app {
    display: inline-block;
    margin: 0 12px;
}

.app-buttons img {
    height: 56px;
    transition: 0.3s;
}

.app-buttons img:hover {
    transform: translateY(-6px);
}

/* MẠNG XÃ HỘI */
.socical {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
}

.socical a {
    width: 50px;
    height: 50px;
    background: rgba(225, 205, 153, 0.15);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 8px;
    transition: 0.4s;
}

.socical a:hover {
    background: var(--gold);
    color: var(--main);
    transform: translateY(-5px);
}

/* NÚT GỌI + ZALO */
.tel_msg_box,
.zalo_msg_box {
    position: fixed;
    right: 20px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    /*background: #fff;*/
    border-radius: 50%;
    /*box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);*/
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.tel_msg_box {
    bottom: 160px;
}

.zalo_msg_box {
    bottom: 90px;
}

.tel_msg_box:hover,
.zalo_msg_box:hover {
    transform: scale(1.15);
}

.footer-bottom-apps {
    /*margin: 20px 0 20px;*/
    /* ← CÁCH PHẦN TRÊN 50px, PHẦN DƯỚI 40px */
    padding: 10px 0;
    border-top: 1px solid rgba(225, 205, 153, 0.15);
    /*border-bottom: 1px solid rgba(225, 205, 153, 0.15);*/
}

.socical-elib {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 0px;
}

.footer-logo-elib {
    filter: drop-shadow(0 0px 0px rgba(0, 0, 0, 0));
}

.footer_top_elib {
    background: var(--main);
    color: #ccc;
    padding: 10px 0 10px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-logo {
        height: 90px;
    }

    .footer-info {
        font-size: 14.5px;
        padding: 0 20px;
    }

    .app-buttons img {
        height: 48px;
    }

    .socical a {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* ==================== TRANG GIỚI THIỆU ==================== */
.about-page {
    background: #fff;
    min-height: 80vh;
    padding: 100px 0 50px;
}

.page-title {
    font-size: 42px;
    font-weight: 900;
    color: var(--main);
    margin-bottom: 40px;
    text-align: center;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.9;
    color: #444;
}

.about-content .lead {
    font-size: 19px;
    font-weight: 500;
    color: #222;
    margin-bottom: 30px;
}

.about-content p {
    text-align: justify;
}

.contact-block {
    background: #f8f9fa;
    border-left: 5px solid var(--gold);
}

.contact-block h4 {
    font-size: 24px;
}

.contact-block p {
    font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 34px;
    }

    .about-content {
        font-size: 16px;
        padding: 0 20px;
    }

    .contact-block h4 {
        font-size: 22px;
    }

    .contact-block p {
        font-size: 17px;
    }
}

/* ==================== PLACEHOLDER KHI ĐANG TẢI ==================== */
.placeholder-glow {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

.placeholder {
    display: inline-block;
    height: 1em;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.placeholder-book-cover {
    width: 100%;
    max-width: 380px;
    height: 520px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
}

.placeholder-book-cover .placeholder {
    width: 100%;
    height: 100%;
}

/* ==================== TRANG CHI TIẾT SÁCH – 2 CỘT, ĐẸP NHƯ ALPHABOOKS ==================== */
/* Breadcrumb Section */
.breadcrumb-section {
    background: linear-gradient(rgba(31, 53, 76, 0.85), rgba(31, 53, 76, 0.85)),
        url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?w=1920&q=80');
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid #e0e0e0;
    padding: 40px 0;
}

.breadcrumb-section .breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-section .breadcrumb-item {
    display: inline;
    color: #fff;
}

.breadcrumb-section .breadcrumb-item+.breadcrumb-item::before {
    content: "/";
    padding: 0 10px;
    color: var(--gold);
}

.breadcrumb-section .breadcrumb-item a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-section .breadcrumb-item a:hover {
    color: var(--gold);
}

.breadcrumb-section .breadcrumb-item.active {
    color: #e0e0e0;
}

/* Book Detail Section */
.book-detail-section {
    min-height: 60vh;
    padding: 60px 0;
}

/* Fix placeholder to prevent excessive height */
.placeholder-book-cover {
    max-height: 520px;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-book-cover .placeholder {
    width: 100%;
    height: 100%;
    max-height: 520px;
}

.book-cover-wrapper {
    max-width: 400px;
    margin: 0 auto;
}

.book-cover-wrapper img {
    max-height: 520px;
    width: 100%;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    transition: 0.4s;
}

.book-cover-wrapper img:hover {
    transform: translateY(-10px);
}

.btn-view-now {
    background: linear-gradient(45deg, var(--main), #2c5282);
    color: #fff;
    font-weight: bold;
    border-radius: 50px;
    font-size: 20px;
    padding: 16px 50px !important;
    box-shadow: 0 10px 30px rgba(31, 53, 76, 0.4);
    transition: all 0.4s;
}

.btn-view-now:hover {
    background: linear-gradient(45deg, #152838, var(--main));
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(31, 53, 76, 0.5);
}

/* Breadcrumb + Typography */
.book-title {
    font-size: 42px;
    line-height: 1.3;
    color: #1a1a1a;
}

.book-author {
    font-size: 22px;
    color: #444;
}

.stars-outer {
    position: relative;
    display: inline-block;
    font-size: 26px;
    color: #ddd;
}

.stars-outer::before {
    content: "★★★★★";
}

.stars-inner {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    color: #f39c12;
}

.stars-inner::before {
    content: "★★★★★";
}

.book-info-table {
    background: #f8f9fa;
    border-radius: 16px;
}

.book-info-table td {
    padding: 12px 0;
    font-size: 17px;
}

.book-info-table .fw-bold {
    min-width: 150px;
    color: #222;
}

.book-description h5,
.customer-reviews h5 {
    font-size: 28px;
    color: var(--main);
}

.description-content {
    font-size: 17.5px;
    line-height: 1.9;
    color: #444;
    text-align: justify;
}

/* Responsive */
@media (max-width: 992px) {
    .book-title {
        font-size: 34px;
    }

    .book-cover-wrapper img {
        max-height: 420px;
    }
}

@media (max-width: 576px) {
    .book-title {
        font-size: 28px;
    }

    .btn-view-now {
        width: 100%;
        font-size: 18px;
    }
}

/* Đảm bảo ảnh bìa luôn đẹp và căn giữa */
.book-cover-wrapper img.book-cover {
    max-height: 560px;
    width: auto;
    object-fit: contain;
}

.hover-gold {
    transition: color 0.3s ease;
}

.hover-gold:hover {
    color: var(--gold) !important;
    text-decoration: underline;
}

/* ĐẢM BẢO HEADER LUÔN Ở TRÊN CÙNG */
header {
    z-index: 998 !important;
    /* Cao hơn sticky-top */
    position: sticky;
    top: 0;
}

/* Khoảng cách an toàn cho ảnh dính khi cuộn */
@media (min-width: 992px) {
    .book-detail-section .col-lg-5 .sticky-top {
        top: 130px !important;
        /* Không bao giờ đè header */
        z-index: 0;
    }
}

/* ==================== CÓ THỂ BẠN QUAN TÂM – PHIÊN BẢN SIÊU ĐẸP, CELL TO ==================== */
#related-section {
    display: none;
    margin-top: 80px;
}

.related-book {
    transition: all 0.35s ease;
    height: 100%;
    background: #fff;
}

.related-book:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

.related-cover {
    height: 280px;
    overflow: hidden;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.related-cover img {
    transition: transform 0.4s ease;
}

.related-book:hover .related-cover img {
    transform: scale(1.07);
}

/* Hiệu ứng nâng card khi hover */
.hover-lift {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Giới hạn dòng chữ */
.line-clamp-1,
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.line-clamp-1 {
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

/* Responsive tinh chỉnh */
@media (max-width: 576px) {
    .related-cover {
        height: 220px;
    }
}

/* Nút điều hướng slider */
.related-slider .swiper-button-next,
.related-slider .swiper-button-prev {
    width: 50px !important;
    height: 50px !important;
    background: rgba(31, 53, 76, 0.8) !important;
    /* màu xanh chủ đạo */
    border-radius: 50% !important;
    /* tròn hoàn hảo */
    margin-top: -25px !important;
    /* căn giữa theo chiều dọc */
    transition: all 0.3s ease !important;
    z-index: 10 !important;
    outline: none !important;
}

/* Khi hover → chuyển vàng giống thương hiệu */
.related-slider .swiper-button-next:hover,
.related-slider .swiper-button-prev:hover {
    background: #E1CD99 !important;
    /* màu --gold */
    transform: scale(1.1);
}

/* Mũi tên trắng, to đẹp */
.related-slider .swiper-button-next:after,
.related-slider .swiper-button-prev:after {
    font-size: 22px !important;
    color: #fff !important;
    font-weight: bold !important;
}

/* Vị trí nút (giữ nguyên như banner) */
.related-slider .swiper-button-next {
    right: 10px;
}

.related-slider .swiper-button-prev {
    left: 10px;
}

/* Mobile nhỏ hơn một chút cho đẹp */
@media (max-width: 768px) {

    .related-slider .swiper-button-next,
    .related-slider .swiper-button-prev {
        width: 44px !important;
        height: 44px !important;
    }

    .related-slider .swiper-button-next:after,
    .related-slider .swiper-button-prev:after {
        font-size: 18px !important;
    }
}

/* ==================== TRANG TÌM KIẾM ==================== */
.search_container {
    display: flex;
    flex-direction: column;
    position: relative;
}

.search_result {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    z-index: 10;
    width: 100%;
}

.search_result .total,
.search_result .sort,
.search_result .show_filter {
    margin: 0;
    width: 105px;
    padding-left: 20px !important;
}

/* Fix bug nut option bi lech sang phai */
.search_result .sort {
    padding-left: 0 !important;
}

.sort {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.sort .dropdown-toggle {
    min-width: 140px;
    text-align: left;
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid #ddd;
}

.sort .dropdown-toggle::after {
    margin-left: auto;
}

.sort .dropdown-menu {
    min-width: 140px;
}

/* ==================== CASCADING MULTI-LEVEL CATEGORY MENU ==================== */

/* Menu Item with Dropdown */
.menu-item-with-dropdown {
    position: relative;
    display: inline-block;
}

.menu-item-with-dropdown .menu-link {
    color: #fff;
    text-decoration: none;
    padding: 10px 0;
    display: inline-block;
    transition: color 0.3s;
    font-weight: 600;
    font-size: 15.5px;
    position: relative;
    white-space: nowrap;
}

.menu-item-with-dropdown .menu-link:hover {
    color: var(--gold);
}

.menu-item-with-dropdown .menu-link i {
    font-size: 12px;
    margin-left: 5px;
    transition: transform 0.3s;
}

.menu-item-with-dropdown:hover .menu-link i {
    transform: rotate(180deg);
}

/* Mega Menu Dropdown Container */
.mega-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
    margin-top: 10px;
    min-width: 250px;
    max-width: 350px;
}

.menu-item-with-dropdown:hover .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
}

.mega-menu-container.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading-spinner {
    font-size: 14px;
    color: #999;
}

/* Category Lists - All Levels */
.category-level-1,
.category-level-2,
.category-level-3 {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-level-1 {
    padding: 10px 0;
}

/* Category Items */
.category-item {
    position: relative;
}

.category-item .category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.category-link {
    max-width: 100% !important;
}

.category-item .category-link:hover {
    background-color: #f5f5f5;
    color: var(--main);
}

.category-item .category-link i {
    font-size: 10px;
    margin-left: 10px;
    color: #999;
    flex-shrink: 0;
}

.category-item .category-link a {
    /* Đảm bảo chế độ hiển thị là block hoặc inline-block */
    display: -webkit-box;

    /* Giới hạn số dòng hiển thị tối đa là 2 */
    -webkit-line-clamp: 2;

    /* Hướng của hộp flexbox là chiều dọc */
    -webkit-box-orient: vertical;

    /* Ẩn phần nội dung vượt quá chiều cao cho phép */
    overflow: hidden;

    /* Tùy chọn: Đặt chiều rộng cố định để text có thể xuống dòng */
    width: 100%;
}

/* Level 2 Submenu */
.category-level-2 {
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    margin-left: 0;
    padding: 10px 0;
}

.category-item.has-submenu:hover>.category-level-2 {
    opacity: 1;
    visibility: visible;
}

/* Level 3 Submenu */
.category-level-3 {
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    margin-left: 0;
    padding: 10px 0;
}

.category-item.has-submenu:hover>.category-level-3 {
    opacity: 1;
    visibility: visible;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .mega-menu-dropdown {
        position: fixed;
        left: 0;
        right: 0;
        top: 60px;
        border-radius: 0;
        max-height: 80vh;
        overflow-y: auto;
        min-width: auto;
    }

    .category-level-2,
    .category-level-3 {
        position: static;
        box-shadow: none;
        margin-left: 0;
        padding-left: 20px;
        opacity: 1;
        visibility: visible;
        display: none;
    }

    .category-item.has-submenu.mobile-open>.category-level-2,
    .category-item.has-submenu.mobile-open>.category-level-3 {
        display: block;
    }

    .menu-item-with-dropdown {
        display: block;
        width: 100%;
    }

    .menu-item-with-dropdown .menu-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mega-menu-dropdown {
        position: static;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    .menu-item-with-dropdown.mobile-open .mega-menu-dropdown {
        opacity: 1;
        visibility: visible;
    }

    .category-item .category-link {
        padding: 12px 15px;
    }
}

/* ==================== SEARCH SUGGESTION ==================== */
#search {
    position: relative;
    /* Remove z-index here to avoid stacking context issues if parent has overflow */
}

.search-suggest {
    position: absolute;
    top: 100%;
    /* Adjust to sit below input height */
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 99999;
    /* Very high z-index */
    display: none;
    overflow: hidden;
}

.search-suggest .suggest-item {
    display: flex;
    /* Flexbox for row layout */
    align-items: start;
    padding: 5px 10px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    text-decoration: none !important;
    /* Force remove underline */
    background: #fff;
    /* Ensure solid background */
}

.search-suggest .suggest-item:hover {
    background-color: #f8f9fa;
}

.search-suggest .suggest-item img {
    flex: 0 0 20px;
    /* Fixed width */
    width: 20px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
    border: 1px solid #eee;
}

.search-suggest .suggest-item .info {
    flex: 1;
    min-width: 0;
    /* Allow text truncation */
    display: flex;
    flex-direction: column;
}

.search-suggest .suggest-item .title {
    font-size: 14px;
    font-weight: 600;
    color: #333 !important;
    /* Force dark color */
    margin-bottom: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
}

.search-suggest .suggest-item .price {
    font-size: 13px;
    color: #E1CD99 !important;
    /* Gold color */
    font-weight: bold;
    text-align: left;
}

.search-suggest .view-all-search {
    display: block;
    text-align: center;
    padding: 12px;
    font-weight: 600;
    color: #333;
    background: #f5f5f5;
    transition: all 0.2s;
    font-size: 14px;
    text-decoration: none;
}

.search-suggest .view-all-search:hover {
    background-color: #1F354C;
    /* Main color */
    color: #fff;
}

/* ==================== LOGIN POPUP ==================== */
.header-account {
    display: inline-block;
    position: relative;
    margin-right: 15px;
}

.nav-account {
    position: relative;
}

.nav-account-pop {
    position: absolute;
    box-shadow: 0 0 5px rgba(0, 0, 0, .1);
    background: #fff;
    z-index: 999;
    width: 250px;
    right: 0px;
    padding: 15px;
    top: calc(100% + 20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in;
    border-radius: 8px;
}

.nav-account.active .nav-account-pop {
    top: 100%;
    opacity: 1;
    visibility: visible;
}

.nav-account .nav-login-text {
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
}

.nav-account .nav-login-text i {
    font-size: 20px;
    color: #fff;
    margin-right: 5px;
}

.nav-account .nav-login-text strong {
    font-weight: 600;
    color: #fff;
    /* Ensure text is visible on dark header */
    margin-left: 5px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .nav-account .nav-login-text strong {
        display: none;
    }
}

.nav-account-pop .title {
    margin-bottom: 15px;
    text-align: center;
    font-size: 16px;
    color: var(--main) !important;
    font-weight: 700;
    text-transform: uppercase;
}

.nav-account-pop .block {
    display: block;
    width: 100%;
}

.nav-account-pop .mb10 {
    margin-bottom: 10px;
}

.nav-account-pop .input-group {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.nav-account-pop .input-group-addon {
    padding: 8px 12px;
    background-color: #eee;
    border-right: 1px solid #ddd;
    color: #555;
}

.nav-account-pop .form-control {
    border: none;
    padding: 8px 10px;
    width: 100%;
    outline: none;
    font-size: 14px;
}

.nav-account-pop .btn-block {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: var(--main);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.nav-account-pop .btn-block:hover {
    background-color: #1F354C;
    /* Darker main */
}

.nav-account-pop a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.nav-account-pop a:hover {
    color: var(--main);
}

.nav-account-pop ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-account-pop ul li {
    border-bottom: 1px solid #f0f0f0;
}

.nav-account-pop ul li:last-child {
    border-bottom: none;
}

.nav-account-pop ul li a {
    display: block;
    padding: 6px 0;
    /* Reduced padding */
    font-size: 14px;
    color: #333;
}

.nav-account-pop ul li a:hover {
    color: var(--main);
    padding-left: 5px;
}

/* Sửa lỗi sai màu background của button */
.btn-success {
    background: var(--main) !important;
    border-color: var(--main) !important;
}

/* ==================== NOTIFICATION POPUP ==================== */
.header-notify {
    display: flex;
    align-items: center;
    position: relative;
    margin-right: 0;
    margin-top: -2px;
}

.header-notify .btn_show_notify_popup {
    text-decoration: none;
}

.header-notify .btn_show_notify_popup i {
    font-size: 20px;
    color: #fff;
}

.nav-notify-pop {
    position: absolute;
    box-shadow: 0 0 10px rgba(0, 0, 0, .15);
    background: #fff;
    z-index: 1000;
    width: 350px;
    right: -10px;
    top: calc(100% + 20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.header-notify.active .nav-notify-pop {
    top: 100%;
    opacity: 1;
    visibility: visible;
}

.notify-header {
    background: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notify-header .title {
    font-weight: 700;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
}

.notify-header .actions {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.notify-header .read-all-notify {
    color: var(--main);
    text-decoration: none;
    font-weight: 600;
}

.notify-header .close-notify {
    cursor: pointer;
    color: #999;
}

.notify-header .close-notify:hover {
    color: #333;
}

.notify-body {
    max-height: 400px;
    overflow-y: auto;
}

.notify-item {
    display: flex;
    padding: 5px 10px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.notify-item:hover {
    background: #f9f9f9;
}

.notify-item.unread {
    background: #F6EDDE;
    /* Light blue bg for unread */
}

.notify-item .notify-icon {
    width: 40px;
    height: 40px;
    background: #eef2ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--main);
    margin-right: 15px;
    flex-shrink: 0;
}

.notify-content {
    flex: 1;
    overflow: hidden;
}

.notify-content p {
    font-size: 13px;
    margin-bottom: 0px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notify-title {
    font-size: 14px;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;

    /* Max 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notify-time {
    font-size: 12px;
    color: #999;
}

.notify-badge {
    position: absolute;
    top: -8px !important;
    right: -8px !important;
    left: 10px !important;
    background: #ff3b30;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: normal;
}

/* Cho màn hình Máy tính (Mặc định hoặc trên 768px) */
@media (min-width: 768px) {
    .header-notify {
        margin-top: -2px;
    }

    .notify-badge {
        top: -8px !important;
    }
}

/* Cho màn hình Điện thoại (Dưới 768px) */
@media (max-width: 767px) {
    .header-notify {
        margin-top: 2px;
    }

    .notify-badge {
        top: -8px !important;
        left: 10px !important;
    }
}

@media (max-width: 480px) {
    .nav-notify-pop {
        width: 300px;
        right: -50px;
    }
}

.notify-footer {
    border-top: 1px solid #f0f0f0;
    padding: 10px;
    background: #fcfcfc;
}

.view-more-notify {
    font-size: 13px;
    color: var(--main);
    font-weight: 600;
    text-decoration: none;
    display: block;
    width: 100%;
}

.view-more-notify:hover {
    text-decoration: underline;
}

/* ==================== IFRAME SIGNUP HOCDOC POPUP ==================== */
/* Overlay nền mờ */
.signup-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

/* Khung trắng chứa iframe */
.signup-modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    height: 90%;
    max-height: 625px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Nút đóng */
.signup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 10001;
}

.signup-close:hover {
    color: #000;
}

/* Iframe full kích thước */
#signupIframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ẨN CÁC PHẦN THỪA TRONG IFRAME (chỉ áp dụng cho iframe này) */
#signupIframe body {
    background: transparent !important;
    margin: 0 !important;
    padding: 20px 0 !important;
}

/* Danh sách các phần thường có trên trang đăng ký - bạn có thể thêm/bớt selector nếu cần */
#signupIframe header,
#signupIframe .header,
#signupIframe nav,
#signupIframe #navbar,
#signupIframe footer,
#signupIframe .footer,
#signupIframe .topbar,
#signupIframe .breadcrumb,
#signupIframe .logo-container,
#signupIframe .site-header,
#signupIframe .main-menu {
    display: none !important;
}

/* Căn giữa form đăng ký (thường có class hoặc id cụ thể) */
#signupIframe .form-signup,
#signupIframe #signup-form,
#signupIframe form {
    max-width: 400px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    box-shadow: none !important;
    background: white !important;
}

/* Hide Swiper navigation buttons on mobile */
@media (max-width: 576px) {

    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
}

/* ==================== Thêm icon con mắt để xem mật khẩu ==================== */
.password-wrapper {
        position: relative;
        flex: 1 1 auto;
        width: 1%;
    }

    .password-toggle {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        color: #666;
        z-index: 10;
    }

    .password-toggle:hover {
        color: #333;
    }

    /* Ensure input has enough right padding for the icon */
    .password-wrapper .form-control {
        padding-right: 35px !important;
    }