/* =====================================================================
   tdw-homepage 1.6.0 — nền tảng: bảng màu thương hiệu (khôi phục tinh thần 1.0–1.4)
   Navy #091e4f · xanh y tế #0b5fa5 · nhấn hồng tím #b43494 · nền xanh rất nhạt, chuyển sắc nhẹ.
   Header Astra được tô màu thương hiệu bằng CSS khi <body> có .tdw-store (không sửa theme).
   ===================================================================== */

.tdwh-home, body.tdw-store {
	--hp-navy: #091e4f;
	--hp-blue: #0b5fa5;
	--hp-primary: #0b5fa5;
	--hp-primary-dark: #091e4f;
	--hp-accent: #b43494;
	--hp-accent-dark: #8e2a78;
	--hp-accent-soft: #f8e9f4;
	--hp-ink: #0f1b33;
	--hp-muted: #56627a;
	--hp-bg: #ffffff;
	--hp-surface: #f5f8fc;
	--hp-surface-2: #e9eff7;
	--hp-tint: #e6f0fa;
	--hp-line: #dde5ef;
	--hp-grad: linear-gradient(135deg, #0b5fa5 0%, #091e4f 100%);
	--hp-grad-accent: linear-gradient(135deg, #c2409f 0%, #8e2a78 100%);
	--hp-grad-soft: radial-gradient(900px 420px at 85% -10%, #dcebfa 0%, transparent 62%), radial-gradient(700px 380px at -5% 110%, #f6e3f1 0%, transparent 60%), #f7f9fd;
	--hp-shadow: 0 1px 2px rgba(9, 30, 79, .06), 0 10px 28px rgba(9, 30, 79, .09);
	--hp-radius: 18px;
	--hp-font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--hp-gutter: 16px;
}

.tdwh-home { font-family: var(--hp-font); color: var(--hp-ink); background: var(--hp-bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.tdwh-home *, .tdwh-home *::before, .tdwh-home *::after { box-sizing: border-box; }
.tdwh-home a { color: inherit; text-decoration: none; }
.tdwh-home img { display: block; max-width: 100%; height: auto; }
.tdwh-home h1, .tdwh-home h2, .tdwh-home h3 { font-family: var(--hp-font); color: var(--hp-navy); margin: 0; letter-spacing: -.01em; }
.tdwh-home p { margin: 0; }
.tdwh-home ul, .tdwh-home ol { list-style: none; margin: 0; padding: 0; }
.tdwh-home :focus-visible { outline: 3px solid var(--hp-accent); outline-offset: 3px; border-radius: 6px; }
.tdwh-ico { width: 18px; height: 18px; flex: none; }
.tdwh-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--hp-gutter); }

/* Nhãn nhấn + tiêu đề (phong cách bản 1.0) */
.tdwh-home .tdwh-eyebrow {
	display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px;
	font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--hp-accent);
}
.tdwh-home .tdwh-eyebrow::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.tdwh-home .tdwh-title { font-size: clamp(1.5rem, 4.6vw, 2.25rem); font-weight: 700; line-height: 1.22; }
.tdwh-home .tdwh-lead { margin-top: 10px; color: var(--hp-muted); max-width: 640px; }
.tdwh-head { margin-bottom: 26px; }
.tdwh-head--center { text-align: center; }
.tdwh-head--center .tdwh-eyebrow { justify-content: center; }
.tdwh-head--center .tdwh-lead { margin-left: auto; margin-right: auto; }

/* Nút */
.tdwh-home .tdwh-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 22px;
	border-radius: 999px; border: 2px solid transparent; font-family: var(--hp-font); font-size: .98rem; font-weight: 600; line-height: 1.2;
	cursor: pointer; text-transform: none; letter-spacing: 0; box-shadow: none; transition: transform .15s, box-shadow .2s, background .2s, color .2s;
}
.tdwh-home .tdwh-btn:hover { transform: translateY(-1px); }
.tdwh-home .tdwh-btn--primary { background: var(--hp-grad); color: #fff !important; box-shadow: 0 6px 18px rgba(11, 95, 165, .28); }
.tdwh-home .tdwh-btn--accent { background: var(--hp-grad-accent); color: #fff !important; box-shadow: 0 8px 22px rgba(180, 52, 148, .32); }
.tdwh-home .tdwh-btn--line { background: #fff; color: var(--hp-blue) !important; border-color: var(--hp-line); }
.tdwh-home .tdwh-btn--line:hover { border-color: var(--hp-blue); }
.tdwh-home .tdwh-btn--ghost-light { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, .7); }
.tdwh-home .tdwh-btn--xl { min-height: 56px; padding: 14px 30px; font-size: 1.05rem; }
.tdwh-home .tdwh-btn.tdwh-link-plain, .tdwh-home .tdwh-link-btn {
	all: unset; cursor: pointer; color: var(--hp-blue); font-size: .92rem; font-weight: 500; text-decoration: underline; text-underline-offset: 4px;
}
.tdwh-home .tdwh-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--hp-blue); }
.tdwh-home .tdwh-more .tdwh-ico { transition: transform .2s; }
.tdwh-home .tdwh-more:hover .tdwh-ico { transform: translateX(3px); }

/* Thông điệp mùa */
.tdwh-home .tdwh-ribbon { text-align: center; font-size: .86rem; font-weight: 600; color: #fff; background: var(--hp-ribbon, var(--hp-grad)); padding: 8px var(--hp-gutter); }

/* Popup chung */
html.tdwh-lock, html.tdwh-lock body { overflow: hidden; }
.tdwh-modal { position: fixed; inset: 0; z-index: 99990; display: flex; align-items: flex-end; justify-content: center; background: rgba(9, 30, 79, .55); backdrop-filter: blur(3px); padding: 0; }
.tdwh-modal[hidden] { display: none; }
.tdwh-modal__box { position: relative; width: 100%; max-height: 92vh; overflow: auto; overscroll-behavior: contain; background: #fff; border-radius: 22px 22px 0 0; padding: 22px 16px 28px; box-shadow: 0 -10px 40px rgba(9, 30, 79, .25); animation: tdwh-up .28s ease-out; }
@keyframes tdwh-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.tdwh-home .tdwh-modal__close { position: sticky; top: 0; float: right; z-index: 3; width: 42px; height: 42px; margin: -6px -4px 0 8px; border: 0; border-radius: 50%; background: var(--hp-surface); color: var(--hp-navy); font-size: 26px; line-height: 1; cursor: pointer; }
@media (min-width: 760px) {
	.tdwh-modal { align-items: center; padding: 24px; }
	.tdwh-modal__box { border-radius: 22px; padding: 28px 32px 32px; max-width: 980px; }
}

/* ---------- Header: màu nền, logo, cỡ/màu chữ menu do Astra quản lý ----------
   Giao diện → Tùy biến → Header Builder (hàng Primary: logo + menu; Menu 1: cỡ chữ, màu, khoảng cách)
   và Nhận diện trang (logo). Plugin chỉ thêm khung trắng quanh logo để logo màu đỏ đô/đen đọc rõ trên nền navy,
   và tô trắng các biểu tượng tìm kiếm / giỏ / tài khoản. Không dùng !important để cài đặt trong quản trị có hiệu lực. */
body.tdw-store #masthead .site-branding .custom-logo-link { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 10px; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); line-height: 0; }
body.tdw-store #masthead .site-header-primary-section-left { display: flex; align-items: center; }
body.tdw-store #masthead .ast-header-search .astra-search-icon, body.tdw-store #masthead .ast-header-search .ast-icon,
body.tdw-store #masthead .ast-header-account svg, body.tdw-store #masthead .ast-header-account .ast-header-account-link,
body.tdw-store #masthead .ast-site-header-cart .ast-icon, body.tdw-store #masthead .ast-site-header-cart svg,
body.tdw-store #masthead .ast-woo-header-cart-info-wrap, body.tdw-store #masthead .ast-cart-menu-wrap { color: #fff; fill: #fff; }
body.tdw-store #masthead .menu-toggle, body.tdw-store #masthead .menu-toggle:hover, body.tdw-store #masthead .menu-toggle:focus { background: rgba(255, 255, 255, .14); color: #fff; border: 0; border-radius: 10px; }
body.tdw-store #masthead .menu-toggle svg, body.tdw-store #masthead .menu-toggle .ast-mobile-svg { fill: #fff; }
/* Menu con (xổ xuống): Astra bản miễn phí không có ô màu riêng cho menu con, nên menu con thừa hưởng chữ trắng của
   menu chính → chữ trắng trên nền trắng. Đặt chữ navy trên nền trắng, rê chuột đổi màu nhấn. */
body.tdw-store #ast-desktop-header .main-header-menu .sub-menu { background: #fff; }
body.tdw-store #ast-desktop-header .main-header-menu .sub-menu .menu-link { color: #091e4f; font-size: 15px; font-weight: 500; text-transform: none; }
body.tdw-store #ast-desktop-header .main-header-menu .sub-menu .menu-item:hover > .menu-link,
body.tdw-store #ast-desktop-header .main-header-menu .sub-menu .current-menu-item > .menu-link { color: #b43494; background: #f5f8fc; }
body.tdw-store #ast-desktop-header .main-header-menu .sub-menu .menu-item > .menu-link .dropdown-menu-toggle,
body.tdw-store #ast-desktop-header .main-header-menu .sub-menu .ast-menu-toggle { color: #091e4f; }
/* Logo chèn dự phòng (chỉ khi Header Builder không có logo) */
body.tdw-store .tdwh-logo { display: inline-flex; align-items: center; margin-right: 24px; padding: 5px 12px; border-radius: 10px; background: #fff; }
body.tdw-store .tdwh-logo img { max-height: 46px; width: auto; display: block; }

/* Trang chủ mới chiếm toàn bộ bề ngang (vùng .ast-container của Astra mặc định là flex nên khối con chỉ rộng theo nội dung). */
body.tdw-hp #content > .ast-container { max-width: 100%; width: 100%; padding: 0; margin: 0; display: block; }

/* Footer: tiêu đề cột đậm, rõ (Astra chỉ xuất độ đậm khi chọn font riêng; chỉ áp cho tiêu đề cột footer) */
body.tdw-store .site-footer .footer-widget-area .widget-title { font-weight: 700; letter-spacing: 0; }

/* Màn hình 1200–1439px: menu 6 mục — chữ 15px, khoảng cách nhỏ hơn để nằm trên một dòng.
   Từ 1440px dùng đúng cỡ chữ/khoảng cách đặt trong Astra; dưới 1200px header chuyển sang nút ☰ (astra_header_break_point). */
@media (min-width: 1200px) and (max-width: 1439px) {
	body.tdw-store #ast-desktop-header .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link { font-size: 15px; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
	body.tdw-store #ast-desktop-header .site-branding .custom-logo-link img { max-height: 42px; width: auto; }
}


/* 922–1199px: Astra đã chuyển sang header kiểu điện thoại (astra_header_break_point = 1199) nhưng CSS tĩnh của theme
   vẫn hiện header máy tính ở khoảng này → ẩn header máy tính, chỉ dùng header điện thoại (logo + nút ☰). */
@media (min-width: 922px) and (max-width: 1199px) {
	body.tdw-store.ast-header-break-point #ast-desktop-header { display: none !important; }
	body.tdw-store.ast-header-break-point #ast-mobile-header { display: block !important; }
}
