/*
 * AGTEK — header, mega menu, drawer, footer (toàn site).
 * Bố cục/khoảng cách/cỡ chữ tham chiếu store.dji.com (đo getComputedStyle 25/09/2026), mã viết mới, nhận diện AGTEK.
 */
:root {
	--dj-font: "Open Sans", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--dj-text: #3b3e40;
	--dj-head: rgba(0, 0, 0, .85);
	--dj-muted: rgba(0, 0, 0, .65);
	--dj-sub: #6c7073;
	--dj-line: rgba(0, 0, 0, .06);
	--dj-line-2: #e6e8eb;
	--dj-bg: #f0f1f2;
	--dj-soft: #f7f9fa;
	--dj-card: #f5f5f5;
	--dj-blue: #0060ef;
	--dj-blue-soft: #eef3fe;
	--dj-black: #222;
	--dj-red: #e02020;
	--dj-orange: #c2570c;
	--dj-wrap: 1200px;
	--dj-gutter: 32px;
}
@media (max-width: 767px) { :root { --dj-gutter: 16px; } }

/* Font toàn site (thay Quicksand của Flatsome). Nội dung sản phẩm cũ giữ font riêng trong template cũ. */
body.ag-site, body.ag-site h1, body.ag-site h2, body.ag-site h3, body.ag-site h4, body.ag-site h5, body.ag-site h6,
body.ag-site .heading-font, body.ag-site button, body.ag-site input, body.ag-site select, body.ag-site textarea { font-family: var(--dj-font); }
body.ag-site { color: var(--dj-text); }

.ag-hwrap, .ag-fwrap { max-width: calc(var(--dj-wrap) + 2 * var(--dj-gutter)); margin: 0 auto; padding: 0 var(--dj-gutter); }
.ag-i { display: inline-block; vertical-align: middle; flex: 0 0 auto; }

/* ---------- Header ---------- */
.ag-header { position: relative; z-index: 200; background: #fff; font-family: var(--dj-font); }
.ag-header a { text-decoration: none; }
.ag-utility { background: var(--dj-soft); font-size: 12px; line-height: 18px; color: var(--dj-muted); }
.ag-utility__inner { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.ag-utility__links, .ag-utility__contact { display: flex; align-items: center; gap: 0; }
.ag-utility a, .ag-utility button { color: var(--dj-muted); font-size: 12px; padding: 0 12px; background: none; border: 0; margin: 0; line-height: 18px; min-height: 0; text-transform: none; letter-spacing: 0; font-weight: 400; cursor: pointer; }
.ag-utility__links > a:first-child { padding-left: 0; }
.ag-utility__links > a + a, .ag-utility__links > a + .ag-utility__more { border-left: 1px solid var(--dj-line-2); }
.ag-utility__contact a { display: inline-flex; align-items: center; gap: 6px; padding-right: 0; }
.ag-utility__contact .ag-i { width: 14px; height: 14px; }
.ag-utility a:hover, .ag-utility button:hover { color: #000; }
.ag-utility__more { position: relative; }
.ag-utility__more .ag-i { width: 12px; height: 12px; margin-left: 2px; }
.ag-utility__more ul { position: absolute; top: 28px; left: 0; z-index: 10; min-width: 160px; margin: 0; padding: 8px 0; list-style: none; background: #fff; border-radius: 4px; box-shadow: 0 4px 16px rgba(0, 0, 0, .12); }
.ag-utility__more li { margin: 0; }
.ag-utility__more ul a { display: block; padding: 8px 16px; }

.ag-bar { position: relative; background: #fff; border-bottom: 1px solid var(--dj-line); }
.ag-bar__inner { display: flex; align-items: center; height: 64px; }
.ag-logo { display: flex; align-items: center; flex: 0 0 auto; margin-right: 48px; }
.ag-logo__img { height: 32px; width: auto; max-width: 150px; object-fit: contain; }
.ag-nav { flex: 1 1 auto; min-width: 0; height: 100%; }
.ag-nav__list { display: flex; height: 100%; margin: 0; padding: 0; list-style: none; }
.ag-nav__item { margin: 0 32px 0 0; height: 100%; display: flex; }
.ag-nav__link {
	display: flex; align-items: center; height: 64px; padding: 0; margin: 0; background: none; border: 0; border-bottom: 2px solid transparent;
	font-size: 14px; line-height: 20px; font-weight: 400; color: var(--dj-head); white-space: nowrap; cursor: pointer; text-transform: none; letter-spacing: 0; min-height: 0;
}
.ag-nav__link:hover, .ag-nav__item.is-open > .ag-nav__link, .ag-nav__item.is-current > .ag-nav__link { color: #000; border-bottom-color: #000; }
.ag-bar__tools { display: flex; align-items: center; gap: 20px; margin-left: 24px; }
.ag-bar__icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; margin: 0; background: none; border: 0; color: var(--dj-head); cursor: pointer; min-height: 0; }
.ag-bar__icon .ag-i { width: 22px; height: 22px; }
.ag-bar__badge { position: absolute; top: -4px; right: -6px; min-width: 8px; height: 8px; border-radius: 4px; background: var(--dj-blue); }
.ag-bar__burger { display: none; margin-right: 12px; }

/* Mega menu */
.ag-mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--dj-line); max-height: calc(100vh - 110px); overflow-y: auto; box-shadow: 0 16px 24px rgba(0, 0, 0, .06); }
.ag-mega__inner { position: relative; display: flex; gap: 40px; padding-top: 32px; padding-bottom: 40px; }
.ag-mega__close { position: absolute; top: 24px; right: var(--dj-gutter); width: 32px; height: 32px; padding: 0; margin: 0; background: none; border: 0; color: #000; cursor: pointer; min-height: 0; }
.ag-mega__close .ag-i { width: 24px; height: 24px; }
.ag-mega__rail { flex: 0 0 260px; }
.ag-mega__rail ul { list-style: none; margin: 0 0 16px; padding: 0; }
.ag-mega__rail li { margin: 0; }
.ag-mega__group { margin: 0 0 8px; font-size: 12px; line-height: 18px; color: var(--dj-sub); }
.ag-mega__series { display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin: 0 -12px; border-radius: 4px; color: var(--dj-head); font-size: 14px; }
.ag-mega__series img { width: 48px; height: 36px; object-fit: contain; }
.ag-mega__series.is-active, .ag-mega__series:hover { background: var(--dj-soft); color: #000; }
.ag-mega__extra a { display: block; padding: 6px 0; font-size: 14px; color: var(--dj-head); }
.ag-mega__all { display: inline-flex; align-items: center; gap: 2px; margin-top: 8px; font-size: 14px; color: var(--dj-blue); }
.ag-mega__all .ag-i { width: 14px; height: 14px; }
.ag-mega__panels { flex: 1 1 auto; min-width: 0; padding-right: 48px; }
.ag-mega__head { display: flex; align-items: baseline; gap: 16px; margin: 0 0 16px; }
.ag-mega__head span { font-size: 16px; font-weight: 600; color: var(--dj-head); }
.ag-mega__head a { display: inline-flex; align-items: center; font-size: 14px; color: var(--dj-text); }
.ag-mega__head .ag-i { width: 14px; height: 14px; }
.ag-mega__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ag-mega__hero, .ag-mega__tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; padding: 16px; background: var(--dj-card); color: var(--dj-head); text-align: center; }
.ag-mega__hero { grid-row: span 2; padding: 24px; }
.ag-mega__hero img { width: 100%; max-height: 260px; object-fit: contain; margin: auto 0 16px; }
.ag-mega__hero strong { font-size: 18px; font-weight: 400; }
.ag-mega__hero small { font-size: 12px; color: var(--dj-sub); }
.ag-mega__tile img { width: 100%; height: 120px; object-fit: contain; margin: auto 0 8px; }
.ag-mega__tile span { font-size: 12px; line-height: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ag-mega__tile--all { justify-content: center; }
.ag-mega__arrow { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; background: #333; color: #fff; align-items: center; justify-content: center; margin-bottom: 4px; }
.ag-mega__arrow .ag-i { width: 18px; height: 18px; }
.ag-mega__hero:hover strong, .ag-mega__tile:hover span { color: var(--dj-blue); }
.ag-mega__cols { display: flex; flex-wrap: wrap; gap: 24px 64px; padding-right: 48px; }
.ag-mega__col ul { list-style: none; margin: 0; padding: 0; }
.ag-mega__col li { margin: 0; }
.ag-mega__col a, .ag-mega__link { display: block; padding: 6px 0; font-size: 14px; color: var(--dj-head); }
.ag-mega__col a:hover { color: var(--dj-blue); }
.ag-mega-backdrop { position: fixed; inset: 0; top: auto; z-index: -1; background: rgba(0, 0, 0, .35); }

/* Search */
.ag-search { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--dj-line); box-shadow: 0 16px 24px rgba(0, 0, 0, .06); padding: 24px 0 32px; }
.ag-search__form { display: flex; align-items: center; gap: 12px; max-width: 720px; margin: 0 auto; border-bottom: 1px solid #000; padding: 4px 0; }
.ag-search__form input { flex: 1 1 auto; border: 0; box-shadow: none; margin: 0; padding: 8px 0; font-size: 18px; background: transparent; height: auto; }
.ag-search__form input:focus { outline: none; box-shadow: none; }
.ag-search__close { background: none; border: 0; padding: 4px; margin: 0; cursor: pointer; min-height: 0; color: #000; }
.ag-search__results { list-style: none; max-width: 720px; margin: 12px auto 0; padding: 0; }
.ag-search__results li { margin: 0; }
.ag-search__results a { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 4px; color: var(--dj-head); font-size: 14px; }
.ag-search__results a:hover, .ag-search__results a:focus { background: var(--dj-soft); outline: none; }
.ag-search__results img { width: 44px; height: 44px; object-fit: contain; background: var(--dj-card); }
.ag-search__results .ag-search__price { margin-left: auto; font-size: 13px; color: var(--dj-sub); white-space: nowrap; }
.ag-search__results .ag-search__type { font-size: 11px; color: var(--dj-sub); text-transform: uppercase; letter-spacing: .04em; }

/* Drawer (mobile) */
.ag-drawer { position: fixed; inset: 0; z-index: 2147483000; /* trên nút Zalo/gọi nổi của plugin */ background: #fff; overflow-y: auto; font-family: var(--dj-font); }
.ag-drawer__head { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 var(--dj-gutter); border-bottom: 1px solid var(--dj-line); }
.ag-drawer__nav ul { list-style: none; margin: 0; padding: 0; }
.ag-drawer__nav li { margin: 0; }
.ag-drawer__nav > ul > li { border-bottom: 1px solid var(--dj-line); }
.ag-drawer__nav summary, .ag-drawer__link { display: flex; align-items: center; justify-content: space-between; padding: 16px var(--dj-gutter); font-size: 16px; color: var(--dj-head); list-style: none; cursor: pointer; text-decoration: none; }
.ag-drawer__nav summary::-webkit-details-marker { display: none; }
.ag-drawer__nav details[open] summary .ag-i { transform: rotate(180deg); }
.ag-drawer__nav details ul { padding: 0 var(--dj-gutter) 12px; }
.ag-drawer__nav details a { display: block; padding: 10px 16px; font-size: 14px; color: var(--dj-text); text-decoration: none; }
.ag-drawer__all { color: var(--dj-blue) !important; }
.ag-drawer__utility { padding: 16px 0 32px !important; background: var(--dj-soft); }
.ag-drawer__utility a { display: flex; justify-content: space-between; align-items: center; padding: 12px var(--dj-gutter); font-size: 14px; color: var(--dj-text); text-decoration: none; }
body.ag-drawer-open { overflow: hidden; }

@media (max-width: 1199px) {
	.ag-nav__item { margin-right: 20px; }
	.ag-logo { margin-right: 28px; }
}
@media (max-width: 1023px) {
	.ag-utility, .ag-nav { display: none; }
	.ag-header { position: sticky; top: 0; }
	body.admin-bar .ag-header { top: 46px; }
	.ag-bar__inner { height: 56px; }
	.ag-bar__burger { display: inline-flex; }
	.ag-logo { margin: 0 auto 0 0; }
	.ag-logo__img { height: 28px; }
	.ag-bar__tools { gap: 16px; }
	.ag-bar__account { display: none; }
	.ag-search { position: fixed; top: 56px; bottom: 0; overflow-y: auto; }
}

/* ---------- Footer ---------- */
.ag-footer { background: #fff; color: var(--dj-text); font-family: var(--dj-font); font-size: 12px; line-height: 18px; border-top: 1px solid var(--dj-line); }
.ag-footer a { color: var(--dj-sub); text-decoration: none; }
.ag-footer a:hover { color: #000; }
.ag-footer__usps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 48px 0 40px; border-bottom: 1px solid var(--dj-line-2); text-align: center; font-size: 14px; line-height: 24px; }
.ag-footer__usps li { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ag-footer__usps .ag-i { width: 40px; height: 40px; stroke-width: 1.2; color: #333; }
.ag-footer__usps a, .ag-footer__usps span { color: var(--dj-text); }
.ag-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; padding: 72px 0 48px; }
.ag-footer__col { margin: 0; }
.ag-footer__col summary, .ag-footer__title { display: flex; justify-content: space-between; align-items: center; margin: 0 0 16px; font-size: 12px; font-weight: 600; color: var(--dj-text); list-style: none; cursor: default; }
.ag-footer__col summary::-webkit-details-marker { display: none; }
.ag-footer__col summary .ag-i { display: none; }
.ag-footer__col ul { list-style: none; margin: 0; padding: 0; }
.ag-footer__col li { margin: 0 0 8px; line-height: 24px; }
.ag-footer__contact { grid-column: span 2; max-width: 360px; }
.ag-footer__contact p { margin: 0 0 8px; color: var(--dj-sub); line-height: 20px; }
.ag-footer__brand { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 16px 0; border-bottom: 1px solid var(--dj-line-2); }
.ag-footer__logo img { height: 24px; width: auto; filter: grayscale(1); opacity: .8; }
.ag-footer__company, .ag-footer__social, .ag-footer__legal ul { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.ag-footer__company li, .ag-footer__social li, .ag-footer__legal li { margin: 0; }
.ag-footer__company a { font-size: 12px; }
.ag-footer__social { margin-left: auto; gap: 16px; }
.ag-footer__social .ag-i { width: 18px; height: 18px; }
.ag-footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; padding: 20px 0 40px; color: var(--dj-sub); }
.ag-footer__legal p { margin: 0; }
.ag-footer__legal li + li::before { content: "·"; margin-right: 8px; color: var(--dj-sub); }
.ag-footer__legal ul { gap: 8px; }

@media (max-width: 767px) {
	.ag-footer__usps { grid-template-columns: 1fr; padding: 32px 0; }
	.ag-footer__cols { display: block; padding: 16px 0; }
	.ag-footer__col { border-bottom: 1px solid var(--dj-line-2); }
	.ag-footer__col summary { padding: 16px 0; margin: 0; cursor: pointer; font-size: 14px; }
	.ag-footer__col summary .ag-i { display: inline-block; }
	.ag-footer__col[open] summary .ag-i { transform: rotate(180deg); }
	.ag-footer__col ul { padding-bottom: 12px; }
	.ag-footer__contact { padding: 16px 0; border: 0; }
	.ag-footer__title { font-size: 14px; }
	.ag-footer__social { margin-left: 0; }
}

/* Ẩn phần tử header/footer Flatsome còn sót (nếu plugin nào đó in ra) */
body.ag-site #header.header, body.ag-site .footer-wrapper:not(.ag-footer) { display: none; }
