/*
Theme Name: Thực Phẩm Phan Hạnh
Theme URI: https://thucphamphanhanh.vn/
Author: Thực Phẩm Phan Hạnh
Description: Theme cho website Thực Phẩm Phan Hạnh: quản lý sản phẩm theo danh mục, trang truy xuất QR (/qr/ten-san-pham?ngay=YYYY-MM-DD) và nút In tem QR 75×50mm cho máy in nhiệt trong trang quản trị.
Version: 1.0.2
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: phanhanh
License: GPLv2 or later
*/

:root {
	--green: #3f9b1f;
	--green-2: #5cc61e;
	--lime: #63dc0a;
	--green-dark: #1f5d2a;
	--deep: #13301f;
	--orange: #e7842f;
	--orange-2: #d1742a;
	--cream: #fbf3d2;
	--beige: #f6f3ec;
	--ink: #1c2a20;
	--muted: #66705f;
	--line: #e7e3d7;
	--white: #fff;
	--radius: 14px;
	--shadow: 0 10px 30px rgba(39, 55, 30, .08);
	--font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--font-h: "Rubik", "Inter", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-dark); }
h1, h2, h3, h4 { font-family: var(--font-h); line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }
button { font-family: inherit; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 860px; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 9999; background: var(--green); color: #fff; padding: 8px 14px; }
.skip-link:focus { left: 8px; top: 8px; color: #fff; }
.ph-ico { width: 1em; height: 1em; flex: 0 0 auto; }
:focus-visible { outline: 3px solid rgba(63, 155, 31, .45); outline-offset: 2px; }

/* ---------- Nút ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: 15px; border: 2px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, color .2s; line-height: 1.2; }
.btn:hover { transform: translateY(-2px); }
.btn .ph-ico { width: 18px; height: 18px; }
.btn--green { background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(63, 155, 31, .28); }
.btn--green:hover { background: var(--green-dark); color: #fff; }
.btn--light { background: #fff; color: var(--green-dark); border-color: rgba(31, 93, 42, .2); }
.btn--light:hover { color: var(--green-dark); border-color: var(--green); }
.btn--orange { background: linear-gradient(135deg, #e08a3a, #d17a2e); color: #fff; border-radius: 10px; font-size: 18px; padding: 15px 28px; }
.btn--orange:hover { color: #fff; }
.btn--pulse { animation: phPulse 2s ease-in-out infinite; }
.btn--zalo { background: #0068ff; color: #fff; }
.btn--zalo:hover { background: #0052cc; color: #fff; }
.btn__zalo { font-weight: 800; background: #fff; color: #0068ff; border-radius: 6px; padding: 1px 6px; font-size: 13px; }
@keyframes phPulse {
	0%, 100% { box-shadow: 0 0 0 3px rgba(224, 138, 58, .3), 0 6px 18px rgba(209, 122, 46, .4); }
	50% { box-shadow: 0 0 0 7px rgba(224, 138, 58, .16), 0 8px 22px rgba(209, 122, 46, .55); }
}
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px; background: #eef6e8; color: var(--green-dark); font-weight: 600; font-size: 14px; border: 1px solid #d8eacc; }
.pill small { font-size: 12px; opacity: .7; }
.pill:hover, .pill.is-active { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- Thanh trên cùng ---------- */
.topbar { position: relative; background: var(--beige); font-size: 13px; color: #4b5548; overflow: hidden; }
.topbar::before, .topbar::after { content: ""; position: absolute; top: 0; bottom: 0; width: 90px; background: var(--lime); }
.topbar::before { left: 0; clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%); }
.topbar::after { right: 0; clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%); }
.topbar__in { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; padding-left: 90px; padding-right: 90px; }
.topbar__info { display: flex; flex-wrap: wrap; gap: 4px 26px; list-style: none; margin: 0; padding: 0; }
.topbar__info li { display: flex; align-items: center; gap: 7px; }
.topbar__info .ph-ico { color: var(--green); width: 14px; height: 14px; }
.topbar__social { display: flex; align-items: center; gap: 14px; }
.topbar__social a { color: var(--ink); display: inline-flex; align-items: center; }
.topbar__social .ph-ico { width: 16px; height: 16px; }
.topbar__zalo { font-weight: 800; font-size: 11px; color: #0068ff !important; border: 1.5px solid #0068ff; border-radius: 5px; padding: 0 5px; line-height: 16px; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: #fff; transition: box-shadow .25s; }
.header.is-stuck { box-shadow: 0 6px 24px rgba(0, 0, 0, .08); }
.header__in { display: flex; align-items: center; gap: 28px; min-height: 86px; }
.header__logo img { height: 70px; width: auto; }
.header__nav { display: flex; align-items: center; gap: 30px; margin-right: auto; margin-left: 24px; }
.ph-menu { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.ph-menu a { color: var(--ink); font-family: var(--font-h); font-weight: 600; font-size: 16px; padding: 8px 0; position: relative; }
.ph-menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--green-2); transform: scaleX(0); transition: transform .25s; }
.ph-menu a:hover, .ph-menu .current-menu-item > a { color: var(--green-2); }
.ph-menu a:hover::after, .ph-menu .current-menu-item > a::after { transform: scaleX(1); }
.ph-menu .sub-menu { display: none; }
.header__login { background: var(--green-2); color: #fff; font-family: var(--font-h); font-weight: 600; padding: 8px 16px; border-radius: 6px; }
.header__login:hover { background: var(--green); color: #fff; }
.header__call { display: flex; align-items: center; gap: 14px; padding-left: 26px; border-left: 1px solid var(--line); }
.header__call-ico { width: 46px; height: 46px; border-radius: 50%; background: var(--lime); color: #fff; display: inline-flex; align-items: center; justify-content: center; animation: phShake 3s infinite; }
.header__call-ico .ph-ico { width: 20px; height: 20px; }
.header__call small { display: block; color: var(--muted); font-size: 13px; }
.header__call div a { color: var(--ink); font-family: var(--font-h); font-weight: 600; font-size: 17px; white-space: nowrap; }
.header__toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 10px; background: #eef6e8; color: var(--green-dark); cursor: pointer; align-items: center; justify-content: center; }
.header__toggle .ph-ico { width: 24px; height: 24px; }
@keyframes phShake { 0%, 86%, 100% { transform: rotate(0); } 88% { transform: rotate(-14deg); } 90% { transform: rotate(14deg); } 92% { transform: rotate(-10deg); } 94% { transform: rotate(10deg); } 96% { transform: rotate(0); } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 560px; display: flex; align-items: center; overflow: hidden; background: var(--beige); }
.hero__slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.04); transition: opacity 1s ease, transform 6s ease; }
.hero__slide.is-active { opacity: 1; transform: scale(1); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(246, 243, 236, .97) 0%, rgba(246, 243, 236, .9) 34%, rgba(246, 243, 236, .35) 62%, rgba(246, 243, 236, 0) 80%); }
.hero__content { position: relative; z-index: 2; padding-top: 70px; padding-bottom: 90px; }
.hero__sub { display: inline-flex; align-items: center; gap: 8px; color: var(--orange); font-family: var(--font-h); font-weight: 600; font-size: 20px; margin-bottom: 14px; }
.hero__sub .ph-ico { color: var(--green-2); width: 22px; height: 22px; }
.hero__title { font-size: clamp(38px, 6vw, 72px); font-weight: 800; color: var(--green-dark); line-height: 1.05; margin-bottom: 22px; }
.hero__title span { display: block; }
.hero__title .is-accent { color: var(--green-2); }
.hero__text { max-width: 520px; color: #3f4a3c; font-size: 17px; margin-bottom: 28px; }
.hero__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 30px; display: flex; gap: 10px; }
.hero__dots button { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 2px solid var(--green-2); background: transparent; cursor: pointer; transition: all .25s; }
.hero__dots button.is-active { background: var(--green-2); width: 30px; border-radius: 8px; }

/* ---------- Tiêu đề mục ---------- */
.sec-title { margin-bottom: 44px; }
.sec-title--center { text-align: center; }
.sec-title--center .sec-title__text { margin-left: auto; margin-right: auto; }
.sec-title__tagline { display: inline-flex; align-items: center; gap: 8px; color: var(--green-2); font-family: var(--font-h); font-weight: 600; font-size: 17px; margin-bottom: 8px; }
.sec-title__tagline .ph-ico { color: var(--orange); width: 18px; height: 18px; }
.sec-title__title { font-size: clamp(28px, 4vw, 42px); font-weight: 700; margin-bottom: 12px; }
.sec-title__text { color: var(--muted); max-width: 720px; margin-bottom: 0; }
.sec-title--light .sec-title__title, .sec-title--light .sec-title__text { color: #fff; }

/* ---------- Dải danh mục ---------- */
.cats { position: relative; padding: 80px 0 90px; background-color: #1e2a1f; background-size: cover; background-position: center; }
.cats::before { content: ""; position: absolute; inset: 0; background: rgba(12, 20, 12, .62); }
.cats .container { position: relative; }
.cats__wrap { position: relative; }
.cats__track { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 14px; scrollbar-width: none; justify-content: safe center; }
.cats__track::-webkit-scrollbar { display: none; }
.cats__item { flex: 0 0 170px; scroll-snap-align: start; background: #fff; border-radius: 16px; padding: 8px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transition: transform .25s; }
.cats__item:hover { transform: translateY(-6px); }
.cats__img { display: block; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: #eef3ea; }
.cats__img img { width: 100%; height: 100%; object-fit: cover; }
.cats__name { display: block; margin-top: 8px; padding: 4px 6px; color: var(--ink); font-family: var(--font-h); font-weight: 600; font-size: 15px; line-height: 1.25; min-height: 2.5em; display: flex; align-items: center; justify-content: center; }
.cats__nav { position: absolute; top: 50%; z-index: 2; width: 42px; height: 42px; margin-top: -28px; border-radius: 50%; border: 0; background: #fff; color: var(--green-dark); cursor: pointer; display: none; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.cats__nav .ph-ico { width: 20px; height: 20px; }
.cats__nav--prev { left: -12px; }
.cats__nav--next { right: -12px; }
.cats.is-scrollable .cats__nav { display: inline-flex; }

/* ---------- Sản phẩm ---------- */
.products-home { background: var(--cream); padding: 30px 0 40px; }
.pcat { padding: 60px 0 30px; }
.grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; }
.grid > .card { flex: 0 0 calc((100% - 3 * 26px) / 4); }
.card { position: relative; background: #fff; border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(39, 55, 30, .14); }
.card__img { position: relative; display: block; aspect-ratio: 1 / .9; overflow: hidden; background: #eef3ea; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__img img { transform: scale(1.06); }
.card__badge { position: absolute; z-index: 1; top: 12px; left: 12px; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: .3px; padding: 6px 10px; border-radius: 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.card__noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: #bcd5b0; }
.card__noimg .ph-ico { width: 60px; height: 60px; }
.card__body { padding: 20px 14px 22px; text-align: center; }
.card__cat { color: var(--muted); font-size: 14px; margin: 0 0 2px; }
.card__title { font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--green); }
.card__price { font-weight: 600; font-size: 14px; color: #4e5a4b; margin: 0 0 6px; }
.card__stars { display: inline-flex; gap: 3px; color: #3c9a5f; }
.card__stars .ph-ico { width: 15px; height: 15px; }

/* ---------- Giới thiệu ---------- */
.about { padding: 100px 0; background: var(--beige); position: relative; overflow: hidden; }
.about::before { content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(99, 220, 10, .18), transparent 70%); right: -120px; top: -120px; }
.about__in { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about__media { position: relative; }
.about__media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50% 50% 24px 24px; box-shadow: var(--shadow); }
.about__badge { position: absolute; right: 6%; bottom: 8%; width: 132px; height: 132px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 6px solid #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); line-height: 1.15; }
.about__badge strong { font-family: var(--font-h); font-size: 32px; }
.about__badge span { font-size: 13px; font-weight: 600; padding: 0 10px; }
.about .sec-title { margin-bottom: 20px; }
.about .sec-title__title { font-size: clamp(24px, 3vw, 34px); }
.about__text { color: #4b5548; }
.about__quote { display: flex; gap: 16px; align-items: flex-start; background: #fff; border-left: 4px solid var(--green-2); padding: 18px 20px; border-radius: 0 12px 12px 0; margin: 22px 0; box-shadow: var(--shadow); }
.about__quote .ph-ico { width: 36px; height: 36px; color: var(--green); }
.about__quote p { margin: 0; font-weight: 600; color: var(--green-dark); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .ph-ico { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--green-2); color: #fff; margin-top: 1px; }
.checklist--box { background: #f4f9f0; border: 1px solid #deedd3; border-radius: var(--radius); padding: 18px 20px; margin-top: 26px; }

/* ---------- Chứng nhận ---------- */
.certs { padding: 90px 0; background: #fff; }
.certs__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; }
.certs__item { flex: 0 1 380px; background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform .25s; display: flex; flex-direction: column; }
.certs__item:hover { transform: translateY(-6px); }
.certs__item img { width: 100%; height: 420px; object-fit: contain; background: #f7f7f4; border-radius: 6px; }
.certs__cap { display: block; text-align: center; color: var(--ink); font-weight: 600; font-size: 14px; padding: 12px 8px 4px; line-height: 1.35; }
.certs__more { text-align: center; margin: 40px 0 0; }

/* ---------- Liên hệ ---------- */
.contact { padding: 90px 0; background: linear-gradient(180deg, #f2f9ec, #fff); }
.contact__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.contact__card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; background: #fff; border-radius: var(--radius); padding: 30px 18px; box-shadow: var(--shadow); color: var(--ink); border: 1px solid #e4efdc; transition: transform .25s; }
a.contact__card:hover { transform: translateY(-6px); color: var(--ink); }
.contact__ico { width: 64px; height: 64px; border-radius: 50%; background: var(--green-2); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.contact__ico .ph-ico { width: 28px; height: 28px; }
.contact__ico--zalo { background: #0068ff; font-weight: 800; font-size: 16px; }
.contact__label { color: var(--muted); font-size: 14px; }
.contact__card strong { font-family: var(--font-h); font-size: 19px; font-weight: 600; line-height: 1.35; }
.contact__card strong.contact__addr { font-size: 15px; }
.contact__map { margin-top: 36px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.contact__map iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ---------- Banner trang con ---------- */
.pbanner { position: relative; padding: 70px 0; background: var(--green-dark) center / cover no-repeat; color: #fff; }
.pbanner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(19, 48, 31, .92), rgba(19, 48, 31, .55)); }
.pbanner__in { position: relative; }
.pbanner__brand { color: #c9f3a7; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.pbanner__title { color: #fff; font-size: clamp(30px, 4.5vw, 48px); margin-bottom: 12px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, .8); }
.crumbs a { color: #fff; }
.crumbs a:hover { color: #c9f3a7; }

/* ---------- Chi tiết sản phẩm ---------- */
.pdetail { padding: 70px 0 40px; }
.pdetail__in { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.gallery__main { display: block; border-radius: var(--radius); overflow: hidden; background: #f3f6f0; aspect-ratio: 1 / 1; cursor: zoom-in; box-shadow: var(--shadow); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__main--empty { display: flex; align-items: center; justify-content: center; color: #bcd5b0; cursor: default; }
.gallery__main--empty .ph-ico { width: 90px; height: 90px; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.gallery__thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #f3f6f0; cursor: pointer; aspect-ratio: 1 / 1; }
.gallery__thumbs button.is-active { border-color: var(--green); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdetail__title { font-size: clamp(30px, 4vw, 42px); margin: 14px 0 10px; }
.pdetail__meta { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.pdetail__price { color: var(--orange); font-family: var(--font-h); font-weight: 700; font-size: 22px; }
.pdetail__h { font-size: 20px; margin: 26px 0 10px; color: var(--green-dark); }
.pdetail__content { color: #3f4a3c; }
.pdetail__content p:last-child { margin-bottom: 0; }
.pdetail__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.related { padding: 50px 0 90px; background: var(--cream); margin-top: 50px; }
.related .sec-title { margin-bottom: 32px; padding-top: 20px; }

/* ---------- Danh sách ---------- */
.plist { padding: 60px 0 90px; background: var(--cream); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.plist__desc { text-align: center; color: var(--muted); margin: -20px 0 34px; }
.plist__empty { text-align: center; color: var(--muted); }
.pagination { margin-top: 40px; text-align: center; }
.pagination .page-numbers { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 8px; background: #fff; margin: 0 3px; color: var(--ink); }
.pagination .current { background: var(--green); color: #fff; }

/* ---------- Trang thường ---------- */
.page-body { padding: 60px 0 90px; }
.entry { font-size: 16.5px; }
.entry--list { padding: 20px 0; border-bottom: 1px solid var(--line); }
.ph-credits { list-style: none; padding: 0; display: grid; gap: 10px; }
.ph-credits li { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.ph-credits img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.notfound { padding: 100px 0; text-align: center; }
.notfound__code { font-family: var(--font-h); font-size: 110px; font-weight: 800; color: var(--green-2); line-height: 1; margin: 0; }

/* ---------- Chân trang ---------- */
.footer { background: var(--deep) radial-gradient(circle at 85% 0%, rgba(99, 220, 10, .14), transparent 45%); color: rgba(255, 255, 255, .82); padding-top: 70px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr; gap: 50px; padding-bottom: 50px; }
.footer h3 { color: #fff; font-size: 20px; margin-bottom: 20px; }
.footer a { color: rgba(255, 255, 255, .9); }
.footer a:hover { color: #b8f08a; }
.footer__logo { display: inline-block; background: #fff; border-radius: 14px; padding: 10px 16px; margin-bottom: 18px; }
.footer__logo img { height: 74px; width: auto; }
.footer__contact, .footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer__contact .ph-ico { width: 18px; height: 18px; color: var(--lime); margin-top: 3px; }
.footer__zalo { flex: 0 0 auto; font-size: 10px; font-weight: 800; color: #fff; background: #0068ff; border-radius: 4px; padding: 0 4px; line-height: 16px; margin-top: 3px; }
.footer__links li::before { content: "›"; color: var(--lime); margin-right: 8px; font-weight: 700; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0; font-size: 14px; }
.footer__bottom-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* ---------- Nút nổi Zalo / gọi ---------- */
.fab { position: fixed; right: 22px; bottom: 26px; z-index: 60; display: flex; flex-direction: column; gap: 12px; }
.fab a { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.fab__zalo { background: #0068ff; font-weight: 800; font-size: 14px; }
.fab__phone { background: var(--green-2); animation: phShake 2.6s infinite; }
.fab__phone .ph-ico { width: 22px; height: 22px; }
.fab a:hover { color: #fff; transform: scale(1.06); }

/* ---------- Xem ảnh phóng to ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .9); display: flex; align-items: center; justify-content: center; padding: 50px 60px; }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lightbox button { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lightbox button:hover { background: rgba(255, 255, 255, .28); }
.lightbox button .ph-ico { width: 22px; height: 22px; }
.lightbox__close { top: 14px; right: 14px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
	.header__call { display: none; }
	.ph-menu { gap: 26px; }
}
@media (max-width: 991px) {
	.topbar__in { padding-left: 16px; padding-right: 16px; }
	.topbar::before, .topbar::after { display: none; }
	.topbar__info li:first-child { display: none; }
	.header__in { min-height: 72px; gap: 12px; }
	.header__logo img { height: 56px; }
	.header__toggle { display: inline-flex; }
	.header__nav { position: absolute; left: 0; right: 0; top: 100%; margin: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; box-shadow: 0 14px 30px rgba(0, 0, 0, .12); padding: 6px 16px 18px; display: none; }
	.header__nav.is-open { display: flex; }
	.ph-menu { flex-direction: column; gap: 0; }
	.ph-menu a { display: block; padding: 13px 4px; border-bottom: 1px solid var(--line); }
	.ph-menu a::after { display: none; }
	.header__login { margin-top: 14px; text-align: center; }
	.grid > .card { flex-basis: calc((100% - 2 * 22px) / 3); }
	.grid { gap: 22px; }
	.about__in, .pdetail__in { grid-template-columns: 1fr; gap: 40px; }
	.about__media { max-width: 520px; margin: 0 auto; width: 100%; }
	.contact__grid { grid-template-columns: repeat(2, 1fr); }
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.footer__about { grid-column: 1 / -1; }
	.hero { min-height: 480px; }
	.hero::after { background: linear-gradient(90deg, rgba(246, 243, 236, .96), rgba(246, 243, 236, .78) 60%, rgba(246, 243, 236, .45)); }
}
@media (max-width: 640px) {
	body { font-size: 15px; }
	.topbar { font-size: 12px; }
	.topbar__in { min-height: 36px; }
	.topbar__info { min-width: 0; }
	.topbar__info li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100vw - 120px); display: block; }
	.header__logo img { height: 48px; }
	.hero { min-height: 0; }
	.hero__content { padding-top: 50px; padding-bottom: 70px; }
	.hero__sub { font-size: 16px; }
	.hero__text { font-size: 15.5px; }
	.sec-title { margin-bottom: 30px; }
	.cats { padding: 60px 0 64px; }
	.cats__track { justify-content: flex-start; gap: 14px; }
	.cats__item { flex-basis: 138px; }
	.cats__name { font-size: 14px; }
	.pcat { padding: 44px 0 20px; }
	.grid { gap: 14px; }
	.grid > .card { flex-basis: calc((100% - 14px) / 2); }
	.card__body { padding: 14px 8px 16px; }
	.card__title { font-size: 16px; }
	.card__cat { font-size: 12.5px; }
	.card__price { font-size: 13px; }
	.grid--scroll { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
	.grid--scroll > .card { flex: 0 0 64%; scroll-snap-align: start; }
	.about, .certs, .contact { padding: 64px 0; }
	.about__badge { width: 104px; height: 104px; }
	.about__badge strong { font-size: 25px; }
	.certs__item img { height: 340px; }
	.contact__grid { grid-template-columns: 1fr; gap: 14px; }
	.contact__card { display: grid; grid-template-columns: 50px 1fr; column-gap: 14px; row-gap: 0; text-align: left; align-items: center; padding: 16px; }
	.contact__ico { width: 50px; height: 50px; margin: 0; grid-row: span 2; }
	.contact__card strong { font-size: 17px; }
	.pbanner { padding: 46px 0; }
	.pdetail { padding: 40px 0 20px; }
	.footer__grid { grid-template-columns: 1fr; gap: 34px; }
	.fab { right: 14px; bottom: 18px; }
	.fab a { width: 48px; height: 48px; }
	.lightbox { padding: 60px 10px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
