/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0.5
*/

/*************** ADD CUSTOM CSS HERE.   ***************/


@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/


}

/* =========================================================
   VM HEADER V2 — Cypry style (BEM, prefix vm-)
   Bật/tắt qua Customizer > Header V2 > Bật Header V2.
   ========================================================= */

/* Design tokens — đặt ở body để cả .vm-header-v2 (bên trong) và
   .vm-mobile-panel / .vm-search-panel (sibling khác) đều nhận được. */
body.vm-header-v2-active {
    --vm-bg:        #D9D7DC;        /* nền header chính (purple) */
    --vm-bg-alt:    #e8e2d6;        /* top bar cream */
    --vm-text:      #ffffff;
    --vm-text-dark: #1a1a1a;
    --vm-muted:     #c9c9c9;
    --vm-accent:    #FF0F1F;
    --vm-accent-2:  #ff3a47;
    --vm-divider-d: rgba(255,255,255,.10);
    --vm-line:      #FF0F1F;
    --vm-shadow-md: 0 12px 30px rgba(0,0,0,.18);
}

.vm-header-v2 {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--vm-bg);
    color: var(--vm-text);
    font-family: inherit;
    overflow: visible;
    border-bottom-left-radius: var(--vm-radius, 0);
    border-bottom-right-radius: var(--vm-radius, 0);
    transition: box-shadow .2s ease;
}
/* Đổ bóng khi đã cuộn */
body.vm-header-v2-active.is-vm-stuck .vm-header-v2 { box-shadow: 0 6px 18px rgba(0,0,0,.18); }

/* Khi search panel mở: bỏ bo góc dưới header để nối liền với panel */
body.vm-search-open .vm-header-v2,
body.vm-search-open .vm-body {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Collapse animation: topbar + contact (dùng max-height + opacity cho mượt) */
.vm-header-v2 .vm-topbar,
.vm-header-v2 .vm-contact {
    overflow: hidden;
    max-height: 120px;
    opacity: 1;
    transition:
        max-height .35s cubic-bezier(.4,0,.2,1),
        opacity   .25s ease,
        padding   .35s cubic-bezier(.4,0,.2,1),
        margin    .35s cubic-bezier(.4,0,.2,1),
        border-color .25s ease;
}
.vm-header-v2 .vm-body__container {
    transition: padding .35s cubic-bezier(.4,0,.2,1);
}
.vm-header-v2 .vm-body__logo img {
    transition: max-height .35s cubic-bezier(.4,0,.2,1), max-width .35s cubic-bezier(.4,0,.2,1);
}

/* Khi đã cuộn: chỉ giữ logo + menu bottom; collapse topbar + contact mượt */
body.is-vm-stuck .vm-header-v2 .vm-topbar,
body.is-vm-stuck .vm-header-v2 .vm-contact {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-color: transparent;
}
body.is-vm-stuck .vm-header-v2 .vm-body__container {
    padding-top: 6px;
    padding-bottom: 6px;
}
/* Admin bar offset (nếu user đang đăng nhập) */
.admin-bar .vm-header-v2 { top: 32px; }
@media (max-width: 782px) {
    .admin-bar .vm-header-v2 { top: 46px; }
}
.vm-header-v2 .vm-body,
.vm-header-v2 .vm-body__container,
.vm-header-v2 .vm-body__right,
.vm-header-v2 .vm-bottom { overflow: visible; }
.vm-header-v2 *,
.vm-header-v2 *::before,
.vm-header-v2 *::after,
.vm-mobile-panel *,
.vm-mobile-panel *::before,
.vm-mobile-panel *::after,
.vm-search-panel *,
.vm-search-panel *::before,
.vm-search-panel *::after { box-sizing: border-box; }

.vm-header-v2 a,
.vm-mobile-panel a,
.vm-search-panel a { color: inherit; text-decoration: none; }

.vm-header-v2 ul,
.vm-mobile-panel ul,
.vm-search-panel ul { list-style: none; padding: 0; margin: 0; }

.vm-header-v2 li,
.vm-mobile-panel li,
.vm-search-panel li { list-style: none; }
.vm-mobile-panel li::before,
.vm-mobile-panel li::marker { content: none; display: none; }

.vm-header-v2 button,
.vm-mobile-panel button,
.vm-search-panel button { background: transparent; border: 0; padding: 0; color: inherit; cursor: pointer; font: inherit; }

/* Reset margin của theme đè lên menu/icon (Flatsome thường áp margin top cho li/a trong nav) */
.vm-header-v2 .vm-menu,
.vm-header-v2 .vm-menu > li,
.vm-header-v2 .vm-menu .menu-item,
.vm-header-v2 .vm-menu__item,
.vm-header-v2 .vm-menu__link,
.vm-header-v2 .vm-menu__link--root,
.vm-header-v2 .vm-bottom__icons,
.vm-header-v2 .vm-bottom__icon,
.vm-mobile-panel .vm-mobile__list,
.vm-mobile-panel .vm-mobile__list > li,
.vm-mobile-panel .vm-mobile__list .menu-item,
.vm-mobile-panel .vm-mobile__item,
.vm-mobile-panel .vm-mobile__row,
.vm-mobile-panel .vm-mobile__link,
.vm-mobile-panel .vm-mobile__toggle,
.vm-mobile-panel .vm-mobile__submenu,
.vm-mobile-panel .vm-mobile-panel__brand,
.vm-mobile-panel .vm-mobile-panel__close,
.vm-mobile-panel .vm-mobile-panel__head { margin: 0 !important; }

/* ---------- TOP BAR (cream) ---------- */
.vm-topbar {
    background: var(--vm-bg-alt);
    color: var(--vm-text-dark);
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.vm-topbar__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    gap: 16px;
}
.vm-topbar__nav { display: flex; }
.vm-topbar__list { display: flex; gap: 32px; }
.vm-topbar__link {
    display: inline-block;
    padding: 10px 0;
    color: var(--vm-text-dark);
    font-weight: 600;
    transition: color .15s ease;
}
.vm-topbar__link:hover { color: var(--vm-accent); }
.vm-topbar__item--active .vm-topbar__link {
    color: var(--vm-text-dark);
    box-shadow: inset 0 -2px 0 var(--vm-accent);
}

/* ---------- BODY (logo bên trái spans 2 rows) ---------- */
.vm-body {
    background: var(--vm-bg);
    border-bottom-left-radius: var(--vm-radius, 0);
    border-bottom-right-radius: var(--vm-radius, 0);
}
.vm-body__container {
    padding-top: 16px;
    padding-bottom: 16px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 32px;
}
.vm-body__logo {
    display: inline-flex;
    align-items: center;
    align-self: center;
}
.vm-body__logo-img,
.vm-body__logo img { display: block; height: auto; width: auto; max-height: 72px; max-width: var(--vm-logo-w, 100px); }
.vm-body__brand { font-size: 22px; font-weight: 700; letter-spacing: .04em; }

.vm-body__right {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ---------- CONTACT (row trên trong vm-body__right) ---------- */
.vm-contact {
    display: flex;
    align-items: center;
    gap: 28px;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding: 8px 0 12px;
    border-bottom: 1px solid var(--vm-divider-d);
}
.vm-contact__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--vm-text);
    font-size: 13px;
    line-height: 1.3;
    transition: color .15s ease;
}
.vm-contact__item:hover { color: var(--vm-accent-2); }
.vm-contact__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--vm-accent);
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
}
.vm-contact__icon svg { width: 16px; height: 16px; }
.vm-contact__text { white-space: nowrap; }
.vm-contact__item--address { cursor: default; }

/* ---------- BOTTOM (menu + icons, row dưới trong vm-body__right) ---------- */
.vm-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 52px;
}
.vm-bottom__menu {
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible; /* để dropdown thoát ra khỏi header */
}

/* Menu chính */
.vm-menu {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
}
.vm-menu__item--root { position: relative; }
.vm-menu__link--root {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 44px;
    padding: 0 10px;
    color: var(--vm-text);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    line-height: 1;
    letter-spacing: .03em;
    white-space: nowrap;
    transition: color .15s ease;
}
.vm-menu__link--root:hover,
.vm-menu__item--active > .vm-menu__link--root { color: var(--vm-accent); }
.vm-menu__caret {
    font-size: 14px;
    line-height: 1;
    margin-left: 4px;
    color: var(--vm-text);
}

/* Dropdown / megamenu */
.vm-menu__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: #fff;
    color: #222;
    padding: 28px 32px;
    border-top: 3px solid var(--vm-accent);
    border-radius: 0 0 6px 6px;
    box-shadow: var(--vm-shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: 10;
}
.vm-menu__item--root.vm-menu__item--has-children.is-open > .vm-menu__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.vm-menu__dropdown--flip {
    left: auto;
    right: 0;
}
.vm-menu__dropdown:has(.vm-menu__item--has-children) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    min-width: 760px;
    max-width: 1100px;
    padding: 32px 36px;
}

.vm-menu__dropdown > .vm-menu__item { padding: 0; }
.vm-menu__dropdown > .vm-menu__item > .vm-menu__link {
    display: block;
    padding: 4px 0 10px;
    color: #111;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px dashed #d8d8d8;
    margin-bottom: 12px;
}
.vm-menu__subdropdown {
    display: block !important;
    position: static;
    background: transparent;
    box-shadow: none;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
}
.vm-menu__subdropdown .vm-menu__item { padding: 2px 0; }
.vm-menu__subdropdown .vm-menu__link {
    display: block;
    padding: 8px 4px;
    color: #444;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 500;
    border-radius: 3px;
    transition: color .15s ease, background .15s ease;
}
.vm-menu__subdropdown .vm-menu__link:hover {
    color: var(--vm-accent);
    background: rgba(255,15,31,.06);
}

/* Icons (search / account) */
.vm-bottom__icons {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    flex: 0 0 auto;
}
.vm-bottom__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    line-height: 1;
    border-radius: 50%;
    color: var(--vm-text);
    transition: color .15s ease;
}
.vm-bottom__icon svg { display: block; }
.vm-bottom__icon:hover { color: var(--vm-accent); }

/* Mobile burger (ẩn desktop) */
.vm-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    margin: 0 0 0 auto !important; /* khử margin-top/bottom theme đè */
    align-self: center;
}
.vm-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--vm-text);
    transition: transform .2s ease, opacity .2s ease;
}

/* ---------- SEARCH PANEL ---------- */
.vm-search-panel {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--vm-bg);
    border-bottom: 2px solid var(--vm-line);
    box-shadow: 0 12px 24px rgba(0,0,0,.25);
    z-index: 20;
}
.vm-search-panel[hidden] { display: none; }
.vm-search-panel__inner {
    padding-top: 18px;
    padding-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.vm-search-panel__inner form { flex: 1 1 auto; }
.vm-search-panel__inner input[type="search"],
.vm-search-panel__inner input[name="s"] {
    width: 100%;
    padding: 12px 14px;
    background: #fff;
    color: #111;
    border: 1px solid var(--vm-accent);
    border-radius: 4px;
    font-size: 15px;
}
.vm-search-panel__close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--vm-text);
    font-size: 22px;
    line-height: 1;
}
.vm-search-panel__close:hover { color: var(--vm-accent); }

/* ---------- MOBILE PANEL ---------- */
.vm-mobile-panel {
    position: fixed;
    inset: 0;
    z-index: 9999;
}
.vm-mobile-panel[hidden] { display: none; }
.vm-mobile-panel__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    opacity: 0;
    transition: opacity .25s ease;
}
.vm-mobile-panel__sheet {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(86vw, 360px);
    background: var(--vm-bg);
    color: var(--vm-text);
    padding: 20px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .28s ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.vm-mobile-panel.is-open .vm-mobile-panel__overlay { opacity: 1; }
.vm-mobile-panel.is-open .vm-mobile-panel__sheet { transform: translateX(0); }

.vm-mobile-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.vm-mobile-panel__brand img { max-height: 40px; }
.vm-mobile-panel__title {
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: 16px;
    color: var(--vm-text);
}
.vm-mobile-panel__close {
    width: 36px; height: 36px;
    font-size: 28px; line-height: 1;
    color: var(--vm-text);
}
.vm-mobile-panel__search input[type="search"],
.vm-mobile-panel__search input[name="s"] {
    width: 100%;
    padding: 10px 12px;
    background: #fff;
    color: #111;
    border: 1px solid var(--vm-accent);
    border-radius: 4px;
}

.vm-mobile__list { display: block; }
.vm-mobile__list,
.vm-mobile__list > li,
.vm-mobile__submenu,
.vm-mobile__submenu > li { border: 0 !important; }
.vm-mobile__list > .vm-mobile__item { border-bottom: 1px solid var(--vm-divider-d) !important; }
.vm-mobile__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.vm-mobile__link {
    flex: 1 1 auto;
    display: block;
    padding: 14px 0;
    color: var(--vm-text);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .03em;
    font-size: 14px;
}
.vm-mobile__item--sub .vm-mobile__link {
    text-transform: none;
    font-weight: 500;
    font-size: 13px;
    color: var(--vm-muted);
    padding: 10px 0;
}
.vm-mobile__toggle {
    flex: 0 0 32px;
    width: 32px; height: 32px;
    position: relative;
    color: var(--vm-text);
}
.vm-mobile__toggle span {
    position: absolute;
    left: 50%; top: 50%;
    width: 14px; height: 2px;
    background: currentColor;
    transform: translate(-50%, -50%);
    transition: transform .2s ease;
}
.vm-mobile__toggle span:nth-child(2) { transform: translate(-50%, -50%) rotate(90deg); }
.vm-mobile__item.is-open > .vm-mobile__row .vm-mobile__toggle span:nth-child(2) { transform: translate(-50%, -50%) rotate(0); }
.vm-mobile__submenu {
    margin: 0 0 6px 0;
    padding-left: 16px;
    border-left: 0 !important;
    /* Animation mở/đóng */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
}
/* Khi đang mở (hidden=false nhưng cần JS set max-height) */
.vm-mobile__item.is-open > .vm-mobile__submenu {
    max-height: 2000px;
    opacity: 1;
}
/* Tăng indent theo từng tầng lồng */
.vm-mobile__submenu .vm-mobile__submenu { padding-left: 16px; }

/* MỘT border duy nhất sát viền trái panel khi root item đang mở.
   Dùng negative margin thay vì pseudo absolute vì sheet có overflow-y:auto
   sẽ clip phần left âm trên Chrome/Safari. */
.vm-mobile__list > .vm-mobile__item.is-open {
    margin-left: -20px !important;
    padding-left: 18px;
    border-left: 2px solid var(--vm-accent) !important;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1023px) {
    .vm-topbar { display: none; }
    .vm-body__container { grid-template-columns: 1fr auto; padding: 12px 16px; }
    .vm-body__right { display: none; }
    .vm-body__logo img { max-height: 44px; }
    .vm-burger { display: inline-flex; }

    /* Mobile: bỏ bo góc */
    .vm-header-v2,
    .vm-body {
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }
}

@media (min-width: 1024px) {
    .vm-burger { display: none; }
}
