/* ===================================================================
   Nhà Đẹp BT — Layout: header, menu, chuyển ngôn ngữ, footer, CTA nổi
   Thiết kế gốc: nhadepbt/Homepage-UI.png (1366px). Xem skill nhadepbt-site.
   =================================================================== */

/* ================================================== HEADER =========
   Desktop (>=1200px): chiều cao cố định --header-h (126px), nền trắng + bg-header.svg
   (thanh xanh phía trên, khối logo xanh bên trái, hàng menu trắng cắt bo cong).
   Logo nằm ở khối xanh trái; .header-main chia 2 hàng: 54px xanh (tên công ty / hotline /
   nút liên hệ) và 72px trắng (menu).
   SVG rộng 1320px: màn rộng hơn thì căn giữa theo container, phần trái kéo dài bằng ::before. */
.site-header {
    position: relative;
    z-index: 1030;
    background-color: var(--c-white);
}

.header-inner { display: flex; align-items: stretch; }
.header-brand { flex: 0 0 auto; display: flex; align-items: center; }
.navbar-brand { display: block; line-height: 0; }
.navbar-brand img { height: 56px; width: auto; }

.header-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* ---- Hàng trên: tên công ty + hotline + nút liên hệ ---- */
.header-top {
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 54px;
}
.header-tagline {
    padding-left: 60px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .01em;
    text-transform: uppercase;
    color: var(--c-accent);
    white-space: nowrap;
}
.header-top-right { display: flex; align-items: center; gap: 28px; padding-right: 40px; }

.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--c-white);
    font-size: .875rem;
    font-weight: 400;
    white-space: nowrap;
}
.header-phone i {font-size: 1.375rem;color: var(--c-accent);}
.header-phone strong { color: var(--c-accent); font-size: 1rem; font-weight: 700; letter-spacing: .01em; }
.header-phone:hover { color: var(--c-white); }
.header-phone:hover strong { color: var(--c-white); }

.header-cart { position: relative; color: var(--c-white); font-size: 1.125rem; }
.header-cart-count {
    position: absolute; top: -8px; right: -10px; min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 9px; background: var(--c-accent); color: var(--c-primary-dark);
    font-size: .6875rem; font-weight: 700; line-height: 18px; text-align: center;
}
.header-cart-count:empty { display: none; }

/* Nút "Liên hệ tư vấn": viên thuốc vàng + chấm tròn trắng chứa icon người */
.btn-book {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px 0 0;
    height: 30px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--c-accent);
    color: var(--c-primary);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background var(--t-fast), color var(--t-fast);
}
.btn-book-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; margin: -2px 0 -2px -2px;
    border-radius: 50%;
    background: var(--c-white);
    color: var(--c-primary);
    font-size: .9375rem;
    box-shadow: 0 0 0 2px var(--c-primary);
}
.btn-book:hover { background: var(--c-white); color: var(--c-primary); }

/* ---- Chuyển ngôn ngữ (chỉ hiện khi site bật >= 2 ngôn ngữ) ---- */
.lang-switch {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.lang-switch-item {
    padding: 3px 11px;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .85);
    transition: background var(--t-fast), color var(--t-fast);
}
.lang-switch-item + .lang-switch-item { border-left: 1px solid rgba(255, 255, 255, .4); }
.lang-switch-item:hover { background: rgba(255, 255, 255, .15); color: var(--c-white); }
.lang-switch-item.is-active { background: var(--c-accent); color: var(--c-primary-dark); }

/* ---- Hàng dưới: menu chính ---- */
.header-nav-row { flex: 1 1 auto; display: flex; align-items: center; min-width: 0; }
.header-nav { width: 100%; }

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(14px, 2.4vw, 38px);
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-nav .menu-item > a {
    display: block;
    padding: 6px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--c-body);
    text-transform: uppercase;
    letter-spacing: .01em;
    white-space: nowrap;
    transition: color var(--t-fast);
}
.main-nav .menu-item > a:hover,
.main-nav .menu-item.is-active > a,
.main-nav .menu-item > a.active { color: var(--c-primary); }
.main-nav .menu-item.is-active > a,
.main-nav .menu-item > a.active { font-weight: 600; }

/* Mục đầu tiên = Trang chủ: chỉ hiện icon ngôi nhà (chữ vẫn có cho trình đọc màn hình) */
.main-nav .menu-item.level-1:first-child > a {
    font-size: 0;
    padding: 4px 2px;
    color: var(--c-primary);
}
.main-nav .menu-item.level-1:first-child > a::before {
    content: "\f015";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.375rem;
    line-height: 1;
}

.mobile-menu-btn {
    margin-left: auto;
    align-self: center;
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: var(--radius);
    color: var(--c-white);
    font-size: 1.125rem;
    cursor: pointer;
}

/* Desktop: nền SVG cố định chiều cao, và đẩy khối menu xuống hàng trắng */
@media (min-width: 1200px) {
    .site-header {
        height: var(--header-h);
        background-image: url(../images/bg-header.svg?v=2);
        background-repeat: no-repeat;
        background-position: left top;
        background-size: 100% var(--header-h);
    }
    .site-header .container { height: 100%; }
    .header-brand { width: 290px; padding-left: 0; }
    .navbar-brand img { height: 76px; }
    .header-nav-row { height: 72px; flex: 0 0 72px; }
    .nav-actions { display: none; }
}
@media (min-width: 1321px) {
    .site-header {
        background-size: 1320px var(--header-h);
        background-position: center top;
    }
    /* Kéo dài khối xanh bên trái cho màn rộng hơn 1320px */
    .site-header::before {
        content: "";
        position: absolute;
        left: 0; top: 0;
        width: calc(50% - 659px);
        height: var(--header-h);
        background: var(--c-primary);
    }
    .site-header .container { position: relative; }
}

/* Mobile / tablet (<1200px): thanh xanh dính trên cùng + menu offcanvas */
@media (max-width: 1199.98px) {
    .site-header {
        position: sticky;
        top: 0;
        background: var(--c-primary);
        box-shadow: var(--shadow-sm);
    }
    .header-inner { align-items: center; min-height: var(--header-h-sm); gap: 12px; }
    .header-main { flex: 0 0 0; }
    .header-nav-row { display: block; }
    .navbar-brand img { height: 46px; }

    /* Offcanvas — chỉ áp dụng dưới 1200px. Trên desktop Bootstrap biến .offcanvas-xl thành
       khối tĩnh; nếu không giới hạn media query thì menu xếp DỌC ngay trên desktop. */
    .site-nav-shell { width: min(320px, 86vw); background: var(--c-primary-dark); color: var(--c-white); }
    .site-nav-shell .offcanvas-header { border-bottom: 1px solid rgba(255, 255, 255, .14); }
    .site-nav-shell .btn-close { filter: invert(1) grayscale(1); opacity: .8; }
    .mobile-menu-logo img { height: 46px; width: auto; }
    .site-nav-shell .main-nav { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }
    .site-nav-shell .main-nav .menu-item > a {
        padding: 14px 4px;
        color: rgba(255, 255, 255, .9);
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }
    .site-nav-shell .main-nav .menu-item > a:hover,
    .site-nav-shell .main-nav .menu-item.is-active > a { color: var(--c-accent); }
    /* Trang chủ trong menu mobile: hiện chữ bình thường, không chỉ icon */
    .site-nav-shell .main-nav .menu-item.level-1:first-child > a { font-size: .875rem; padding: 14px 4px; }
    .site-nav-shell .main-nav .menu-item.level-1:first-child > a::before { display: none; }
    .nav-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
    .nav-actions .btn-book { height: 38px; justify-content: flex-start; padding-right: 22px; align-self: flex-start; }
    .nav-actions .btn-pill.btn-primary-pill { color: var(--c-white); border-color: rgba(255, 255, 255, .5); }
}

/* ================================================== FOOTER =========
   Nền xanh có hoa văn (bg-footer.png), 4 cột, dải bản quyền vàng. */
.site-footer {
    background: var(--c-primary) url(../images/bg-footer.png) center / cover no-repeat;
    color: var(--c-white);
}

.footer-main {padding: clamp(44px, 5vw, 50px) 0 clamp(36px, 4vw, 30px);}

.footer-title {
    position: relative;
    font-family: var(--font-base);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .01em;
    text-transform: uppercase;
    color: var(--c-white);
    margin: 4px 0 24px;
    padding-bottom: 14px;
}
.footer-title::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 50px; height: 2px;
    background: var(--c-white);
}

.footer-brand { margin-bottom: 22px; }
.footer-logo { display: inline-block; line-height: 0; }
.footer-logo img { height: 64px; width: auto; }
.footer-desc { margin-bottom: 18px; }
.footer-desc p {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, .95);
    max-width: 36ch;
}

.footer-contact p {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    font-size: .875rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, .95);
}
.footer-contact i { width: 14px; margin-top: 6px; flex: 0 0 14px; font-size: .75rem; color: var(--c-white); }
.footer-contact a { color: inherit; }
.footer-contact a:hover { color: var(--c-accent); }

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    color: rgba(255, 255, 255, .95);
    font-size: .9375rem;
}
.footer-links a::before { content: "\203A"; font-weight: 700; line-height: 1.35; }
.footer-links a:hover { color: var(--c-accent); }

/* Khung trắng bo góc chứa bản đồ / fanpage (theo thiết kế) */
.footer-fanpage {
    padding: 8px;
    background: var(--c-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 236px;
}
.footer-fanpage iframe { display: block; width: 100%; border-radius: calc(var(--radius-lg) - 4px); }

.footer-bottom {
    background: var(--c-accent);
    padding: 9px 0;
    font-size: .875rem;
    font-weight: 500;
    color: var(--c-primary);
}
.copyright { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.copyright a { color: var(--c-primary); text-decoration: underline; }
.copyright a:hover { color: var(--c-primary-dark); }

/* ================================================== CTA NỔI ======== */
.float-cta {
    position: fixed;
    right: 18px; bottom: 18px;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.float-cta-btn {
    position: relative;
    width: 48px; height: 48px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--c-primary);
    color: var(--c-white);
    box-shadow: var(--shadow);
    transition: transform var(--t-fast), background var(--t-fast);
}
.float-cta-btn:hover { transform: translateY(-2px); color: var(--c-white); }
.float-cta-quote { background: var(--c-accent); color: var(--c-primary); }
.float-cta-quote:hover { background: var(--c-accent-dark); color: var(--c-primary-dark); }
.float-cta-phone { background: var(--c-success); }
/* Zalo: nền trắng để biểu tượng xanh (icon-zalo.png) nổi rõ; ảnh là hình bong bóng chat Zalo */
.float-cta-zalo { background: var(--c-white); color: var(--c-primary); }
.float-cta-zalo img { width: 30px; height: 30px; display: block; }
.float-cta-zalo:hover { background: var(--c-primary-mist); color: var(--c-primary); }
/* WhatsApp dung mau thuong hieu #25D366 — day la mau nhan dien, khong lay tu token */
.float-cta-whatsapp { background: #25d366; color: var(--c-white); }
.float-cta-whatsapp:hover { background: #1da851; color: var(--c-white); }
.float-cta-whatsapp i { font-size: 1.375rem; }
.float-cta-text { display: none; }

/* Vòng sóng nhấp nháy quanh nút chính */
.float-cta-ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: .55;
    animation: ctaRing 2.2s ease-out infinite;
}
@keyframes ctaRing {
    0%   { transform: scale(1);    opacity: .55; }
    100% { transform: scale(1.55); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .float-cta-ring { animation: none; }
    html { scroll-behavior: auto; }
}

/* ============================================ THANH CTA DÍNH MOBILE */
/* Trên điện thoại phần lớn khách sẽ bấm gọi chứ không điền form.
   Ẩn hoàn toàn từ 768px trở lên; cụm .float-cta nổi vẫn giữ cho desktop. */
.mobile-cta { display: none; }

@media (max-width: 767.98px) {
    .mobile-cta {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        display: flex;
        background: var(--c-primary);
        border-top: 1px solid rgba(255, 255, 255, .14);
        box-shadow: 0 -6px 20px rgba(6, 18, 41, .28);
        padding-bottom: 0;
    }
    .mobile-cta-btn {
        flex: 1 1 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 10px 5px;
        font-size: 13px;
        font-weight: 400;
        color: var(--c-white);
        border-left: 1px solid rgba(255, 255, 255, .14);
    }
    .mobile-cta-btn:first-child { border-left: 0; }
    .mobile-cta-btn img { width: 18px; height: 18px; }
    .mobile-cta-btn i { font-size: 1.0625rem; }
    .mobile-cta-call { background: var(--c-success); }
    .mobile-cta-book { background: var(--c-accent); color: var(--c-primary-dark); }
    .mobile-cta-whatsapp { background: #25d366; }
    /* #0068ff = màu nhận diện của Zalo (bên thứ ba, không thuộc bảng màu thương hiệu). Icon xanh nằm trong ô trắng để không chìm vào nền. */
    .mobile-cta-zalo { background: #0068ff; }
    .mobile-cta-zalo img {width: 22px;height: 22px;padding: 1px;/* background: var(--c-white); */border-radius: 6px;}

    /* Chừa chỗ cho thanh dính, tránh che chân trang */
    body { padding-bottom: 58px; }

    /* Thanh CTA dính đã có Gọi / Đặt lịch / WhatsApp -> cụm nút nổi lặp lại
       y hệt và che mất nội dung. Ẩn hết, CHỈ giữ nút "lên đầu trang". */
    .float-cta-btn { display: none; }
    .float-cta-top {display: inline-flex;bottom: 50px;}

    /* Còn đúng 1 nút nên nhấc vừa đủ khỏi thanh CTA */
    .float-cta { bottom: 70px; }
}
