/*
Theme Name:   Minh Gia – Blocksy Child
Description:  Theme con cho Công ty TNHH Công Nghiệp Minh Gia (vòng bi, băng tải, dầu mỡ bôi trơn). Header/footer kiểu catalog công nghiệp, mega menu danh mục, widget Elementor "Minh Gia", chế độ catalog WooCommerce, bảng thông số, form yêu cầu báo giá.
Author:       Minh Gia
Template:     blocksy
Version:      2.1.0
Requires PHP: 7.4
Text Domain:  minhgia
*/

/* =========================================================
   Màu sắc – đổi ở đây để thay toàn bộ giao diện
   ========================================================= */
:root {
	--mg-blue: #1f78d1;        /* thanh menu, tiêu đề tab */
	--mg-blue-2: #2e7fd6;      /* danh sách danh mục */
	--mg-blue-dark: #0f2c4f;   /* mục danh mục đang chọn */
	--mg-navy: #0b3a75;        /* chữ tiêu đề, cam kết */
	--mg-accent: #ffd200;      /* chữ mục danh mục đang chọn */
	--mg-orange: #f7941d;      /* tiêu đề khối thương hiệu */
	--mg-teal: #5fe3d8;        /* menu đang chọn */
	--mg-bg: #b6e0f5;          /* nền trang chủ */
	--mg-side: #e8f5fd;        /* nền cột trái */
	--mg-topbar: #e3e3e3;
	--mg-red: #e53935;
	--mg-zalo: #0068ff;
	--mg-border: #dfe5eb;
	--mg-text: #222;
	--mg-container: 1270px;
	--mg-side-w: 288px;
}

/* Ẩn header/footer gốc của Blocksy (đã thay bằng header/footer của theme con) */
.mg-skin .ct-header,
.mg-skin .ct-footer { display: none !important; }

.mg-container {
	width: 100%;
	max-width: var(--mg-container);
	margin: 0 auto;
	padding: 0 15px;
	box-sizing: border-box;
}
.mg-ico { width: 1em; height: 1em; fill: currentColor; flex: none; }
.mg-ico--line { fill: none; }
.mg-hint {
	margin: 10px 0;
	padding: 10px 14px;
	background: #fff8e1;
	border: 1px dashed #f0b400;
	color: #6d5200;
	font-size: 13px;
	border-radius: 4px;
}

/* =========================================================
   HEADER
   ========================================================= */
.mg-site-header { position: relative; z-index: 100; font-size: 15px; }
.mg-site-header a { text-decoration: none; }

/* Thanh thông tin trên cùng */
.mg-topbar { background: var(--mg-topbar); color: #333; font-size: 14px; }
.mg-topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; }
.mg-topbar__company { font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--mg-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mg-topbar__info { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-left: auto; }
.mg-topbar__info > :last-child { padding-right: 0; }
.mg-topbar__item { display: inline-flex; align-items: center; gap: 6px; color: #333; padding: 0 12px; }
.mg-topbar__item + .mg-topbar__item { border-left: 1px solid #c4c4c4; }
.mg-topbar__item:hover { color: var(--mg-blue); }
.mg-topbar__social { color: #888; padding: 0 6px; display: inline-flex; }

/* Logo + cam kết */
.mg-brandbar { background: #fff; }
.mg-brandbar__in { display: flex; align-items: center; gap: 24px; min-height: 140px; padding-top: 12px; padding-bottom: 12px; }
.mg-logo { flex: none; display: flex; align-items: center; }
.mg-logo img { max-height: var(--mg-logo-h, 156px); max-width: 360px; width: auto; height: auto; display: block; object-fit: contain; }
.mg-logo__text { display: flex; flex-direction: column; line-height: 1; color: var(--mg-navy); }
.mg-logo__text strong { font-size: 34px; font-weight: 800; letter-spacing: .02em; }
.mg-logo__text small { font-size: 14px; font-weight: 700; letter-spacing: .35em; color: #fff; background: var(--mg-navy); padding: 3px 6px; margin-top: 4px; text-align: center; }
.mg-usps { flex: 1; display: flex; justify-content: space-around; gap: 16px; }
.mg-usp { display: flex; align-items: center; gap: 14px; color: var(--mg-navy); text-transform: uppercase; font-size: 14px; line-height: 1.45; text-align: left; }
.mg-usp .mg-ico { width: 46px; height: 46px; color: var(--mg-navy); flex: none; }
.mg-header-hotline { display: flex; align-items: center; gap: 10px; color: var(--mg-red) !important; flex: none; }
.mg-header-hotline > .mg-ico { width: 40px; height: 40px; padding: 9px; box-sizing: border-box; border-radius: 50%; background: var(--mg-red); fill: #fff; }
.mg-header-hotline span { display: flex; flex-direction: column; line-height: 1.2; }
.mg-header-hotline small { color: #555; font-size: 12px; text-transform: uppercase; }
.mg-header-hotline strong { font-size: 20px; }
.mg-burger { display: none; margin-left: auto; background: var(--mg-blue); color: #fff; border: 0; border-radius: 6px; width: 44px; height: 44px; padding: 0; align-items: center; justify-content: center; cursor: pointer; }
.mg-burger .mg-ico { width: 26px; height: 26px; }

/* Thanh menu xanh */
.mg-navbar { background: var(--mg-blue); }
.mg-navbar__in { display: flex; align-items: stretch; gap: 22px; min-height: 54px; }
.mg-catnav { position: relative; width: var(--mg-side-w); flex: none; }
.mg-catnav__toggle {
	width: 100%; height: 100%; min-height: 54px;
	display: flex; align-items: center; gap: 12px;
	padding: 0 16px; border: 0; border-radius: 0; cursor: pointer;
	background: var(--mg-blue-2); color: #fff;
	font-size: 15px; font-weight: 700; text-transform: uppercase; text-align: left;
	box-shadow: none;
}
.mg-catnav__toggle:hover, .mg-catnav__toggle:focus { background: var(--mg-blue-2); color: #fff; }
.mg-catnav__toggle .mg-ico { width: 22px; height: 22px; }
.mg-catnav__toggle span { flex: 1; }
.mg-catnav__toggle .mg-ico:last-child { width: 18px; height: 18px; }

/* Danh sách danh mục (dùng cho dropdown, cột trái trang chủ, menu điện thoại) */
.mg-catmenu { list-style: none; margin: 0; padding: 0; background: var(--mg-blue-2); position: relative; }
.mg-catmenu__item { margin: 0; position: static; }
.mg-catmenu__item > a {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 13px 16px; color: #fff !important; font-size: 14px; text-transform: uppercase;
	border-bottom: 1px solid rgba(255,255,255,.18); text-decoration: none; line-height: 1.35;
}
.mg-catmenu__item > a .mg-ico { width: 16px; height: 16px; opacity: .8; }
.mg-catmenu__item:hover > a,
.mg-catmenu__item:focus-within > a,
.mg-catmenu__item.is-current > a { background: var(--mg-blue-dark); color: var(--mg-accent) !important; }
.mg-catmenu__expand { display: none; }
.mg-catmenu__panel {
	display: none; position: absolute; z-index: 60;
	left: 100%; top: 0; min-height: 100%;
	width: calc(var(--mg-container) - var(--mg-side-w) - 60px); max-width: 78vw;
	background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.18);
	padding: 18px 24px; box-sizing: border-box;
}
.mg-catmenu__item:hover > .mg-catmenu__panel,
.mg-catmenu__item:focus-within > .mg-catmenu__panel { display: block; }
.mg-catmenu__sub { list-style: none; margin: 0; padding: 0; columns: 4 190px; column-gap: 24px; column-rule: 1px solid #eee; }
.mg-catmenu__sub li { break-inside: avoid; margin: 0; }
.mg-catmenu__sub a { display: block; padding: 9px 0; color: #222 !important; font-size: 14px; text-transform: uppercase; text-decoration: none; }
.mg-catmenu__sub a:hover { color: var(--mg-blue) !important; }

/* Dropdown trên thanh menu (các trang không phải trang chủ) */
.mg-navbar .mg-catnav > .mg-catmenu {
	display: none; position: absolute; top: 100%; left: 0; width: 100%; z-index: 55;
	box-shadow: 0 10px 24px rgba(0,0,0,.2);
}
.mg-navbar .mg-catnav:hover > .mg-catmenu,
.mg-navbar .mg-catnav.is-open > .mg-catmenu { display: block; }
.mg-navbar .mg-catnav.is-home:hover > .mg-catmenu { display: none; }

/* Danh mục dạng cột tĩnh (trang chủ) */
.mg-catnav.is-static { width: 100%; }
.mg-catnav.is-static > .mg-catmenu { display: block; box-shadow: 0 4px 12px rgba(0,0,0,.12); }

/* Menu chính */
.mg-navbar .mg-menu { display: flex; align-items: stretch; list-style: none; margin: 0; padding: 0; }
.mg-navbar .mg-menu > li { position: relative; margin: 0; display: flex; }
.mg-navbar .mg-menu > li > a {
	display: flex; align-items: center; padding: 0 14px;
	color: #fff; font-size: 18px; text-transform: uppercase; border-top: 3px solid transparent;
}
.mg-navbar .mg-menu > li > a:hover,
.mg-navbar .mg-menu > li.current-menu-item > a,
.mg-navbar .mg-menu > li.current-menu-ancestor > a { color: var(--mg-teal); border-top-color: var(--mg-teal); }
.mg-navbar .mg-menu .sub-menu {
	display: none; position: absolute; top: 100%; left: 0; min-width: 230px; z-index: 55;
	list-style: none; margin: 0; padding: 6px 0; background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.mg-navbar .mg-menu li:hover > .sub-menu,
.mg-navbar .mg-menu li:focus-within > .sub-menu { display: block; }
.mg-navbar .mg-menu .sub-menu a { display: block; padding: 9px 16px; color: #222; font-size: 15px; }
.mg-navbar .mg-menu .sub-menu a:hover { color: var(--mg-blue); background: #f3f8fd; }

/* Tìm kiếm */
.mg-search { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 30px; padding: 0 18px; height: 44px; align-self: center; margin-left: auto; width: 270px; box-sizing: border-box; }
.mg-search .mg-ico { width: 20px; height: 20px; color: #333; }
.mg-search input[type="search"] { flex: 1; min-width: 0; border: 0 !important; outline: 0; box-shadow: none !important; background: transparent !important; height: 40px; padding: 0 !important; font-size: 15px; color: #222; }

/* Menu điện thoại */
.mg-mobile-nav {
	position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 88vw); z-index: 10001;
	background: #fff; overflow-y: auto; box-shadow: 4px 0 24px rgba(0,0,0,.25);
}
.mg-mobile-nav[hidden], .mg-mobile-nav__backdrop[hidden] { display: none !important; }
.mg-mobile-nav__backdrop { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.45); }
.mg-mobile-nav__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--mg-blue); color: #fff; }
.mg-mobile-nav__close { background: none; border: 0; color: #fff; padding: 4px; cursor: pointer; }
.mg-mobile-nav__close .mg-ico { width: 26px; height: 26px; }
.mg-mobile-nav .mg-menu { list-style: none; margin: 0; padding: 0; }
.mg-mobile-nav .mg-menu a { display: block; padding: 13px 16px; border-bottom: 1px solid #eee; color: #222; text-transform: uppercase; font-weight: 600; }
.mg-mobile-nav .mg-menu .sub-menu { list-style: none; padding: 0 0 0 16px; margin: 0; }
.mg-mobile-nav__title { padding: 12px 16px; background: var(--mg-blue-dark); color: #fff; font-weight: 700; }
.mg-mobile-nav .mg-catmenu__item { position: relative; }
.mg-mobile-nav .mg-catmenu__item > a { padding-right: 56px; }
.mg-mobile-nav .mg-catmenu__item > a .mg-ico { display: none; }
.mg-mobile-nav .mg-catmenu__expand {
	display: flex; align-items: center; justify-content: center;
	position: absolute; right: 0; top: 0; width: 48px; height: 46px;
	background: rgba(0,0,0,.12); border: 0; color: #fff; cursor: pointer; padding: 0;
}
.mg-mobile-nav .mg-catmenu__expand .mg-ico { width: 20px; height: 20px; transition: transform .2s; }
.mg-mobile-nav .mg-catmenu__item.is-open .mg-catmenu__expand .mg-ico { transform: rotate(180deg); }
.mg-mobile-nav .mg-catmenu__panel,
.mg-mobile-nav .mg-catmenu__item:hover > .mg-catmenu__panel { display: none; position: static; width: auto; max-width: none; min-height: 0; box-shadow: none; padding: 4px 16px; background: #f3f8fd; }
.mg-mobile-nav .mg-catmenu__item.is-open > .mg-catmenu__panel { display: block; }
.mg-mobile-nav .mg-catmenu__sub { columns: 1; }
html.mg-nav-open { overflow: hidden; }

/* =========================================================
   TRANG CHỦ
   ========================================================= */
body.mg-home-page { background: var(--mg-bg); }
.mg-home__top { display: grid; grid-template-columns: var(--mg-side-w) minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: 30px; }
.mg-home__side { background: var(--mg-side); min-height: 100%; }
.mg-home__main { padding-top: 6px; }

/* Cột trái trong Elementor: bỏ khoảng đệm để danh mục dính sát thanh menu */
.elementor-widget-mg-cat-menu .mg-catnav.is-static { margin-top: 0; }

/* Dịch vụ */
.mg-services { padding: 30px 22px; background: var(--mg-side); }
.mg-services__title { margin: 0 0 18px; background: var(--mg-blue); color: #fff; text-align: center; font-size: 20px; font-weight: 400; padding: 6px 10px; }
.mg-services__item { display: block; padding: 14px 0; border-bottom: 1px solid #d6e6f2; text-decoration: none; }
.mg-services__name { display: block; color: var(--mg-blue); font-size: 17px; text-transform: uppercase; margin-bottom: 10px; line-height: 1.3; }
.mg-services__body { display: flex; gap: 12px; color: var(--mg-blue); font-size: 14px; line-height: 1.6; }
.mg-services__body img { width: 64px; height: 48px; object-fit: cover; flex: none; }
.mg-services__plain { margin: 0; padding: 0 0 0 18px; color: var(--mg-navy); line-height: 2; }

/* Dịch vụ dạng thẻ ngang (khối rộng) */
.mg-svc__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.mg-svc__card { display: flex; flex-direction: column; background: #fff; border-top: 3px solid var(--mg-blue); box-shadow: 0 2px 8px rgba(11,58,117,.08); text-decoration: none; transition: box-shadow .2s, transform .2s; }
.mg-svc__card:hover { box-shadow: 0 8px 22px rgba(11,58,117,.18); transform: translateY(-2px); }
.mg-svc__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #eef4fa; }
.mg-svc__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-svc__body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 16px; }
.mg-svc__name { color: var(--mg-navy); font-size: 16px; font-weight: 700; text-transform: uppercase; line-height: 1.35; margin-bottom: 10px; }
.mg-svc__text { color: #4a5868; font-size: 14px; line-height: 1.6; flex: 1; }
.mg-svc__more { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; color: var(--mg-blue); font-size: 14px; font-weight: 600; }
.mg-svc__more .mg-ico { width: 16px; height: 16px; transition: transform .2s; }
.mg-svc__card:hover .mg-svc__more .mg-ico { transform: translateX(3px); }

/* Banner chạy */
.mg-slider { position: relative; aspect-ratio: 3.12; overflow: hidden; background: #0b2340; }
.mg-slider__track, .mg-slide { position: absolute; inset: 0; }
.mg-slide { opacity: 0; transition: opacity .7s ease; display: block; }
.mg-slide.is-active { opacity: 1; z-index: 1; }
.mg-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mg-slider__dots { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 2; display: flex; justify-content: center; gap: 10px; }
.mg-slider__dots button { width: 13px; height: 13px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; }
.mg-slider__dots button.is-active { background: #fff; }
.mg-slider--empty { display: flex; align-items: center; justify-content: center; text-align: center; color: #fff;
	background: radial-gradient(circle at 50% 30%, #2f6db3 0%, #0b2340 75%); }
.mg-slider--empty strong { display: block; font-size: clamp(18px, 2.4vw, 32px); letter-spacing: .03em; }
.mg-slider--empty span { display: block; max-width: 720px; margin: 12px auto 0; padding: 0 16px; font-size: clamp(14px, 1.3vw, 17px); line-height: 1.6; opacity: .9; }

/* Khối thương hiệu */
/* Tiêu đề dùng chung kiểu .mg-sectitle với "Giải pháp / Sản phẩm"; dải logo nằm trên nền trang */
.mg-brands { position: relative; }
/* Dải logo chạy sang trái (chậm, dừng khi rê chuột) */
.mg-brands__viewport { position: relative; overflow: hidden; padding: 4px 0 14px; }
.mg-brands__track { display: flex; width: max-content; animation: mg-marquee var(--mg-marquee-time, 64s) linear infinite; }
.mg-brands__viewport:hover .mg-brands__track { animation-play-state: paused; }
@keyframes mg-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.mg-brands__item { flex: none; width: 205px; margin-right: 30px; box-sizing: border-box; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); aspect-ratio: 1.8; display: flex; align-items: center; justify-content: center; padding: 10px; }
.mg-brands__item img { max-width: 100%; max-height: 100%; object-fit: contain; }

.mg-brandstrip { background: #fff; padding: 24px 0; }
.mg-brandstrip__in { display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; gap: 30px; }
.mg-brandstrip img { max-height: 110px; max-width: 220px; object-fit: contain; }

/* Tiêu đề khối dạng tab */
.mg-sectitle { margin: 30px 0 18px; border-bottom: 2px solid var(--mg-blue); font-size: 22px; font-weight: 400; line-height: 1.3; }
.mg-sectitle a, .mg-sectitle span { display: inline-block; background: var(--mg-blue); color: #fff !important; padding: 7px 22px; text-decoration: none; }

/* Lưới */
.mg-grid { --mg-cols: 4; display: grid; grid-template-columns: repeat(var(--mg-cols), minmax(0, 1fr)); gap: 24px; }

/* Thẻ danh mục */
.mg-catcard { display: flex; flex-direction: column; align-items: center; background: #fff; text-decoration: none; padding-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: box-shadow .2s, transform .2s; text-align: center; }
.mg-catcard:hover { box-shadow: 0 8px 20px rgba(0,0,0,.15); transform: translateY(-2px); }
.mg-catcard__img { display: block; width: 100%; aspect-ratio: 1; padding: 12px; box-sizing: border-box; }
.mg-catcard__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mg-catcard__name { color: var(--mg-navy); font-weight: 700; font-size: 15px; text-transform: uppercase; padding: 0 10px; line-height: 1.35; }
.mg-catcard__count { color: #777; font-size: 13px; margin-top: 4px; }

/* Thẻ sản phẩm */
.mg-pcard { background: #fff; display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: box-shadow .2s; }
.mg-pcard:hover { box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.mg-pcard__img { display: block; aspect-ratio: 1; padding: 12px; }
.mg-pcard__img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mg-pcard__body { padding: 0 14px 16px; display: flex; flex-direction: column; flex: 1; }
.mg-pcard__cat { color: #888; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; }
.mg-pcard__title { font-size: 15px; font-weight: 600; line-height: 1.4; margin: 4px 0 12px; flex: 1;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mg-pcard__title a { color: var(--mg-text); text-decoration: none; }
.mg-pcard__title a:hover { color: var(--mg-blue); }
.mg-pcard__btn { align-self: flex-start; background: var(--mg-blue); color: #fff !important; padding: 7px 20px; border-radius: 4px; font-size: 14px; text-decoration: none; }
.mg-pcard__btn:hover { background: var(--mg-navy); }

/* Giới thiệu */
.mg-intro { background: linear-gradient(180deg, #fff 0%, #fff 55%, #e2f2fb 78%, #b9e2f7 100%); padding: 40px 0 60px; }
.mg-entry { font-size: 17px; line-height: 1.75; color: #222; }
.mg-entry h2, .mg-entry h3 { color: var(--mg-navy); }

/* Banner báo giá */
.mg-cta { background: #0d6bc0; }
.mg-cta__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
	padding: 26px 30px; background: linear-gradient(100deg, #0a4f96 0%, #1576d1 60%, #0d6bc0 100%); }
.mg-cta__text strong { display: block; color: #fff; font-size: clamp(24px, 3vw, 40px); font-style: italic; font-weight: 800; letter-spacing: .02em; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.mg-cta__text span { display: block; color: #d7ecff; margin-top: 4px; }
.mg-cta__btn { border: 2px solid #fff; border-radius: 8px; padding: 14px 24px; color: #fff !important; font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: .02em; }
.mg-cta__btn:hover { background: #fff; color: #0d6bc0 !important; }

/* =========================================================
   FORM BÁO GIÁ
   ========================================================= */
.mg-quote { background: #f2f8fc; padding: 50px 0; border-top: 4px solid var(--mg-blue); }
.mg-quote__in { display: grid; grid-template-columns: 1fr 1.6fr; gap: 40px; align-items: start; }
.mg-quote__intro h2 { color: var(--mg-navy); font-size: 28px; margin: 0 0 12px; }
.mg-quote__intro p { color: #444; line-height: 1.6; }
.mg-quote__intro ul { list-style: none; padding: 0; margin: 18px 0 0; }
.mg-quote__intro li { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: #333; }
.mg-quote__intro li .mg-ico { color: var(--mg-blue); width: 20px; height: 20px; }
.mg-quote__intro a { color: var(--mg-blue); font-weight: 700; }
.mg-quote__form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; background: #fff; padding: 26px; box-shadow: 0 4px 16px rgba(0,0,0,.06); border-radius: 6px; }
.mg-field { display: flex; flex-direction: column; gap: 6px; }
.mg-field--full { grid-column: 1 / -1; }
.mg-field label { font-size: 14px; font-weight: 600; color: #333; }
.mg-field label b { color: var(--mg-red); }
.mg-field input[type="text"], .mg-field input[type="tel"], .mg-field input[type="email"], .mg-field select, .mg-field textarea {
	width: 100%; border: 1px solid #cfd8e1; border-radius: 4px; padding: 10px 12px; font-size: 15px; background: #fff; box-sizing: border-box;
}
.mg-field--radio { flex-direction: row; gap: 26px; }
.mg-field--radio label { font-weight: 400; display: inline-flex; align-items: center; gap: 6px; }
.mg-hp { position: absolute !important; left: -9999px !important; }
.mg-alert { grid-column: 1 / -1; padding: 12px 14px; border-radius: 4px; font-weight: 600; }
.mg-alert--ok { background: #e7f6ec; color: #1d6b37; }
.mg-alert--err { background: #fdecea; color: #a12622; }

/* =========================================================
   NÚT CHUNG
   ========================================================= */
.mg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 6px; font-weight: 700; line-height: 1.2; text-decoration: none !important; color: #fff !important; border: 0; cursor: pointer; transition: opacity .2s, transform .2s; font-size: 15px; }
.mg-btn:hover { opacity: .9; transform: translateY(-1px); }
.mg-btn .mg-ico { width: 18px; height: 18px; }
.mg-btn--primary { background: var(--mg-blue); }
.mg-btn--zalo { background: var(--mg-zalo); }
.mg-btn--call { background: var(--mg-red); }
.mg-btn--pdf { background: #fff; color: var(--mg-blue) !important; border: 2px solid var(--mg-blue); }
.mg-btn--lg { padding: 15px 30px; font-size: 16px; }

/* =========================================================
   TRANG SẢN PHẨM (WooCommerce)
   ========================================================= */
.mg-quote-box { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.mg-commit { list-style: none; margin: 0 0 22px; padding: 16px 18px; background: #f2f8fc; border-left: 4px solid var(--mg-blue); }
.mg-commit li { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 6px; color: var(--mg-navy); }
.mg-commit .mg-ico { color: #1aa34a; width: 18px; height: 18px; margin-top: 3px; }
.mg-summary-specs { margin: 14px 0; }
.mg-loop-btn.button { background: var(--mg-blue) !important; color: #fff !important; }

.mg-spec-table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; font-size: 15px; border: 1px solid var(--mg-border); }
.mg-spec-table th, .mg-spec-table td { padding: 9px 14px; border-bottom: 1px solid var(--mg-border); text-align: left; vertical-align: top; }
.mg-spec-table tbody tr:nth-child(even) td, .mg-spec-table tbody tr:nth-child(even) th { background: #f6f9fc; }
.mg-spec-table th[scope="row"] { width: 50%; font-weight: 600; color: #333; }
.mg-spec-table .mg-spec-group th { background: var(--mg-blue) !important; color: #fff; font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .03em; }

/* =========================================================
   FOOTER
   ========================================================= */
.mg-footer { background: #fff; border-top: 1px solid #e6e6e6; font-size: 16px; color: #333; }
.mg-footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-top: 44px; padding-bottom: 36px; }
.mg-footer h3 { font-size: 17px; font-weight: 700; color: #222; text-transform: uppercase; margin: 0 0 16px; }
.mg-footer ul { list-style: none; margin: 0; padding: 0; }
.mg-footer__contact li { display: flex; gap: 8px; margin-bottom: 9px; line-height: 1.5; }
.mg-footer__contact .mg-ico { margin-top: 4px; color: #333; flex: none; }
.mg-footer a { color: #333; text-decoration: none; }
.mg-footer a:hover { color: var(--mg-blue); }
.mg-footer__links li { margin-bottom: 7px; }
.mg-footer__links li a::before { content: "›"; margin-right: 6px; font-weight: 700; }
.mg-footer__img { max-width: 100%; height: auto; display: block; }
.mg-footer__bottom { background: #c9c9c9; color: #555; text-align: center; padding: 12px 15px; font-size: 15px; }
.mg-footer__bottom strong { color: #444; text-transform: uppercase; }

/* =========================================================
   NÚT LIÊN HỆ NỔI
   ========================================================= */
.mg-float { position: fixed; left: 16px; bottom: 18px; z-index: 9990; display: flex; flex-direction: column; gap: 12px; }
.mg-pill { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 40px; padding: 5px 20px 5px 5px; text-decoration: none !important; box-shadow: 0 3px 10px rgba(0,0,0,.2); border: 2px solid; }
.mg-pill--call { border-color: var(--mg-red); }
.mg-pill--zalo { border-color: var(--mg-zalo); }
.mg-pill__ico { position: relative; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.mg-pill--call .mg-pill__ico { background: var(--mg-red); }
.mg-pill--call .mg-pill__ico::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--mg-red); opacity: .45; z-index: -1; animation: mg-pulse 1.8s ease-out infinite; }
.mg-pill__ico .mg-ico { width: 22px; height: 22px; animation: mg-ring 1.8s ease-in-out infinite; }
.mg-pill__ico--zalo { background: var(--mg-zalo); font-weight: 800; font-size: 13px; }
.mg-pill__txt { display: flex; flex-direction: column; line-height: 1.15; }
.mg-pill__txt small { font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.mg-pill--call small { color: var(--mg-red); }
.mg-pill--zalo small { color: var(--mg-zalo); }
.mg-pill__txt strong { font-size: 17px; color: #111; letter-spacing: .02em; }
@keyframes mg-pulse { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes mg-ring { 0%, 50%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-15deg); } 20%, 40% { transform: rotate(15deg); } }

.mg-totop { position: fixed; right: 22px; bottom: 22px; z-index: 9990; width: 50px; height: 50px; border-radius: 50%; border: 2px solid var(--mg-blue); background: #fff; color: var(--mg-blue); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s; padding: 0; }
.mg-totop.is-visible { opacity: 1; pointer-events: auto; }
.mg-totop .mg-ico { width: 24px; height: 24px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1200px) {
	.mg-usp { font-size: 12px; gap: 8px; }
	.mg-usp .mg-ico { width: 36px; height: 36px; }
	.mg-navbar .mg-menu > li > a { font-size: 15px; padding: 0 10px; }
	.mg-search { width: 210px; }
}
@media (max-width: 1024px) {
	.mg-grid { --mg-cols: 3; }
	.mg-header-hotline { display: none; }
}
@media (max-width: 992px) {
	.mg-hide-sm { display: none !important; }
	.mg-topbar__item { padding: 0 8px; font-size: 13px; }
	.mg-topbar__item + .mg-topbar__item { border-left: 0; }
	.mg-topbar__info { margin: 0 auto; justify-content: center; }
	.mg-brandbar__in { min-height: 0; }
	.mg-logo img { max-height: min(var(--mg-logo-h, 156px), 56px); max-width: 200px; }
	.mg-logo__text strong { font-size: 24px; }
	.mg-usps { display: none; }
	.mg-burger { display: inline-flex; }
	.mg-navbar__in { min-height: 0; padding-top: 8px; padding-bottom: 8px; }
	.mg-navbar .mg-catnav, .mg-navbar .mg-menu { display: none; }
	.mg-search { width: 100%; margin: 0; }
	.mg-home__top { grid-template-columns: 1fr; gap: 0; padding-top: 12px; }
	.mg-home__side { order: 2; margin-top: 20px; }
	.mg-home__side .mg-catnav.is-static, .elementor-widget-mg-cat-menu { display: none; }
	.mg-brands__item { width: 150px; margin-right: 14px; }
	.mg-svc__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
	.mg-quote__in { grid-template-columns: 1fr; gap: 20px; }
	.mg-footer__cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
	.mg-grid { --mg-cols: 2; gap: 12px; }
	.mg-quote__form { grid-template-columns: 1fr; padding: 18px; }
	.mg-footer__cols { grid-template-columns: 1fr; gap: 24px; }
	.mg-sectitle { font-size: 18px; }
	.mg-svc__grid { grid-template-columns: 1fr; }
	/* Trang chủ trên điện thoại: chừa lề 2 bên, chữ banner không chạm mép */
	.mg-home-page .elementor-top-section > .elementor-container { padding-left: 12px; padding-right: 12px; box-sizing: border-box; }
	/* !important: thắng tỉ lệ khung đặt trong widget Elementor, chỉ áp cho banner chữ (chưa có ảnh) */
	.mg-slider.mg-slider--empty { aspect-ratio: auto !important; min-height: 170px; padding: 26px 0; }
	.mg-slider--empty > div { width: 100%; min-width: 0; box-sizing: border-box; padding: 0 16px; }
	.mg-slider--empty strong { font-size: 20px; line-height: 1.35; }
	.mg-slider--empty span { font-size: 14px; }
	/* Điện thoại: chỉ hiện nút tròn để không che nội dung */
	.mg-float { left: 10px; bottom: 12px; gap: 10px; }
	.mg-pill { padding: 3px; border-width: 2px; }
	.mg-pill__txt { display: none; }
	.mg-pill__ico { width: 46px; height: 46px; }
	.mg-totop { right: 12px; bottom: 12px; width: 44px; height: 44px; }
	.mg-cta__in { padding: 20px; }
}
@media print { .mg-float, .mg-totop, .mg-navbar, .mg-topbar { display: none; } }

/* Người dùng bật giảm chuyển động: không chạy, cho vuốt ngang */
@media (prefers-reduced-motion: reduce) {
	.mg-brands__track { animation: none; }
	.mg-brands__viewport { overflow-x: auto; }
	.mg-brands__item[aria-hidden="true"] { display: none; }
}
