/* =====================================================================
   หน้าแรก menuded.com — ส่วนใต้ hero (ดีไซน์ใหม่ 2026-11-23) · มือถือก่อน แล้วขยายที่ 768 / 1024 / 1280
   แถบหัว + hero + คลื่น ใช้ของเดิม (header.tpl.php, motion.css, site.css) ตามที่ผู้ใช้ขอ
   ความกว้างเนื้อหาเท่าเดิม: 1440px (max-w-8xl) ขอบข้าง 12 / 16 / 24 px · ปุ่มสี่เหลี่ยมมุมมน 10–12px (ไม่ใช้แคปซูล)
   โหลดเฉพาะหน้าแรก (Views/front/header.tpl.php)
   ===================================================================== */
:root {
    --hm-green: #276b29;
    --hm-ink: #12400f;        /* หัวข้อเขียวเข้ม */
    --hm-lime: #e9f01d;       /* ปุ่มหลัก/ไฮไลต์ */
    --hm-lime-2: #d6de0a;
    --hm-cream: #fbfaf6;
    --hm-line: #e6ebe0;
    --hm-text: #1f2a1d;
    --hm-muted: #5f6b5c;
}
body:has(.hm) { background: var(--hm-cream); }
.hm { background: var(--hm-cream); color: var(--hm-text); overflow-x: clip; }
.hm a { color: inherit; text-decoration: none; }
.hm p { margin: 0; }
.hm-wrap { max-width: 90rem; margin: 0 auto; padding: 0 12px; }
.hm-hl { background: linear-gradient(transparent 56%, var(--hm-lime) 56%, var(--hm-lime) 90%, transparent 90%); padding: 0 .08em; }

/* ---------- แถบเมนูยอดฮิต (md-ticker ใน motion.css) ---------- */
.hm-ticker { background: var(--hm-cream); padding: 12px 0 2px !important; }
.hm-ticker-in { display: flex; align-items: center; gap: 10px; }
.hm .md-ticker-label { border-radius: 10px; background: var(--hm-ink); padding: 7px 12px; }
.hm .md-ticker-label i { color: var(--hm-lime); }
.hm .md-ticker-item { border-radius: 10px; color: var(--hm-ink); border-color: #dfe9cf; }
.hm .md-ticker-item:hover { background: var(--hm-lime); border-color: var(--hm-lime); color: var(--hm-ink); }

/* ---------- หัวข้อ section ---------- */
.hm-sec { padding: 26px 0 0 !important; }
.hm-sec-last { padding-bottom: 36px !important; }
.hm-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.hm-h2 { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 800; color: var(--hm-ink); }
.hm-h2::after { content: ''; display: inline-block; width: 20px; height: 17px; margin-left: 8px; vertical-align: top; background: linear-gradient(120deg, transparent 0 28%, var(--hm-lime) 28% 42%, transparent 42% 58%, var(--hm-lime) 58% 72%, transparent 72%); }
.hm-sub { margin-top: 3px !important; font-size: 13.5px; line-height: 1.45; color: var(--hm-muted); }
.hm-more { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--hm-green) !important; white-space: nowrap; }
.hm-more:hover { text-decoration: underline; }
.hm-tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 7px; background: rgba(255, 255, 255, .94); color: var(--hm-ink); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.hm-tag.gray { color: #4b5563; }
.hm-tag.amber { background: #fbbf24; color: #1f2937; }
.hm-tag.rc { background: #ffedd5; color: #c2410c; }
.hm-tag.pr { background: #fce7f3; color: #be185d; }
.hm-tag.nw { background: #e0f2fe; color: #0369a1; }

/* ---------- หมวด (วันนี้กินอะไรดี?) ---------- */
.hm-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hm-cat { position: relative; display: block; overflow: hidden; aspect-ratio: 1 / 1; border-radius: 12px; background: #e9ece4; }
.hm-cat img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.hm-cat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .74), rgba(0, 0, 0, .05) 58%, transparent); }
.hm-cat span { position: absolute; left: 4px; right: 4px; bottom: 7px; z-index: 1; text-align: center; color: #fff; font-size: 12.5px; line-height: 1.2; font-weight: 800; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.hm-cat:hover img { transform: scale(1.06); }

/* ---------- แถวการ์ด: มือถือเลื่อนแนวนอน · จอ ≥768 เป็นตาราง ---------- */
.hm-rail { display: flex; gap: 12px; margin: 0 -12px; padding: 2px 12px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hm-rail::-webkit-scrollbar { display: none; }
.hm-rail-3 > *, .hm-rail-posts > * { flex: 0 0 78%; max-width: 330px; scroll-snap-align: start; }

/* ---------- การ์ดเมนู ---------- */
.hm-mcard { position: relative; flex: 0 0 64%; max-width: 260px; display: flex; flex-direction: column; overflow: hidden; scroll-snap-align: start; background: #fff; border: 1px solid var(--hm-line); border-radius: 16px; transition: box-shadow .2s; }
.hm-mcard:hover { box-shadow: 0 16px 32px -20px rgba(0, 0, 0, .4); }
.hm-mcard-img { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; }
.hm-mcard-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.hm-mcard:hover .hm-mcard-img img { transform: scale(1.05); }
.hm-mcard-emoji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 44px; }
.hm-heart { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .95); color: var(--hm-text); display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); transition: transform .15s; }
.hm-heart:hover { transform: scale(1.08); }
.hm-heart.on { color: #e11d48; }
.hm-mcard-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; }
.hm-mcard-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15.5px; line-height: 1.3; font-weight: 800; color: var(--hm-text); }
.hm-mcard-name:hover { color: var(--hm-green) !important; }
.hm-mcard-shop { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 12.5px; color: var(--hm-muted); }
.hm-mcard-shop i { flex-shrink: 0; font-size: 14px; }
.hm-mcard-shop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-mcard-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hm-rate { font-size: 12.5px; font-weight: 700; color: #39453a; white-space: nowrap; }
.hm-rate i { color: #f5b301; }
.hm-rate small { font-weight: 500; color: var(--hm-muted); }
.hm-price { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 9px; background: var(--hm-lime); color: var(--hm-ink); font-size: 15px; font-weight: 800; white-space: nowrap; }

/* ---------- ร้านค้าแนะนำ / เฟรนไชส์ / ชุมชน ---------- */
.hm-scard, .hm-fcard, .hm-pcard { position: relative; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--hm-line); border-radius: 16px; transition: box-shadow .2s; }
.hm-scard:hover, .hm-fcard:hover, .hm-pcard:hover { box-shadow: 0 16px 32px -20px rgba(0, 0, 0, .4); }
.hm-scard-cover, .hm-fcard-cover, .hm-pcard-cover { position: relative; display: block; overflow: hidden; }
.hm-scard-cover { aspect-ratio: 16 / 8; }
.hm-scard-cover img, .hm-fcard-cover img, .hm-pcard-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.hm-scard:hover .hm-scard-cover img, .hm-fcard:hover .hm-fcard-cover img, .hm-pcard:hover .hm-pcard-cover img { transform: scale(1.05); }
.hm-scard-tag { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 8px; background: var(--hm-lime); color: var(--hm-ink); font-size: 12px; font-weight: 800; }
.hm-scard-body { display: flex; align-items: flex-start; gap: 10px; padding: 0 12px 12px; }
.hm-scard-logo { width: 54px; height: 54px; margin-top: -22px; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: #fff; border: 3px solid #fff; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .45); font-size: 26px; }
.hm-scard-logo img { width: 100%; height: 100%; object-fit: cover; }
.hm-scard-x { min-width: 0; padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.hm-scard-x b { font-size: 15.5px; font-weight: 800; color: var(--hm-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-scard-x small { font-size: 12.5px; color: var(--hm-muted); line-height: 1.45; }
.hm-scard-x .st { color: #39453a; font-weight: 700; }
.hm-scard-x .st i { color: #f5b301; }

.hm-fcard-cover { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #e7f5c8, #cdebd6); }
.hm-fcard-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 16px; text-align: center; color: #fff; font-size: 18px; font-weight: 800; background: linear-gradient(135deg, #8cc63f 0%, #5f9e0f 50%, #2f6b10 100%); }
.hm-fcard-tags { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; }
.hm-fcard-tags > span:first-child { display: flex; flex-wrap: wrap; gap: 6px; }
.hm-fcard-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.hm-fcard-body > b { font-size: 16.5px; font-weight: 800; color: var(--hm-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-fcard-body .ds, .hm-pcard-body .ds { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.5; color: var(--hm-muted); min-height: 2.9em; }
.hm-fcard-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.hm-fcard-nums > span { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: #f4f6f0; }
.hm-fcard-nums small { font-size: 11px; color: var(--hm-muted); }
.hm-fcard-nums b { font-size: 14px; font-weight: 800; color: var(--hm-text); }
.hm-fcard-nums b.g { color: var(--hm-green); }
.hm-fcard-go { margin-top: 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 800; color: var(--hm-green); }

.hm-comm { display: grid; gap: 14px; }
.hm-pcard-cover { aspect-ratio: 16 / 9; }
.hm-pcard-cover .hm-tag { position: absolute; top: 10px; left: 10px; }
.hm-pcard-emoji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 48px; }
.hm-pcard-body { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 11px 13px 13px; }
.hm-pcard-body .sh { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--hm-muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hm-pcard-body > b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.35; font-weight: 800; color: var(--hm-text); }
.hm-pcard-stats { margin-top: auto; padding-top: 8px; display: flex; gap: 14px; font-size: 12.5px; color: var(--hm-muted); }
.hm-pcard-stats span { display: inline-flex; align-items: center; gap: 4px; }
.hm-pcard-stats .ph-heart { color: #f43f5e; }
.hm-trend { display: flex; flex-direction: column; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, #f3f9e4, #e6f4ea); border: 1px solid #dceccb; }
.hm-trend-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px !important; font-size: 16px; font-weight: 800; color: var(--hm-text); }
.hm-trend-h span { width: 30px; height: 30px; border-radius: 9px; background: #f43f5e; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.hm-trend-list { display: flex; flex-direction: column; gap: 2px; }
.hm-trend-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px; border-radius: 12px; transition: background-color .15s; }
.hm-trend-row:hover { background: #fff; }
.hm-trend-row .no { width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; background: #fff; color: var(--hm-muted); border: 1px solid #e5e7eb; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.hm-trend-row .no.top { background: var(--hm-ink); border-color: var(--hm-ink); color: #fff; }
.hm-trend-row .x { min-width: 0; display: flex; flex-direction: column; }
.hm-trend-row b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.4; font-weight: 700; color: var(--hm-text); }
.hm-trend-row small { font-size: 12px; color: var(--hm-muted); }
.hm-trend-row small .ph-heart { color: #f43f5e; }
.hm-trend-cta { justify-content: center; width: 100%; }

/* ---------- แบนเนอร์ชวนร้านค้า / ไรเดอร์ ---------- */
.hm-sec-banner { padding-top: 20px !important; }
/* สีพื้นแบนเนอร์ = สีขอบฝั่งที่รูปจางไว้ (วัดจากรูปจริง) รูปจึงกลืนกับพื้น */
.hm-banner { position: relative; overflow: hidden; border-radius: 18px; background: #e3f6dc; }
.hm-banner-media { display: block; }
.hm-banner-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.hm-banner-body { position: relative; z-index: 1; padding: 16px 16px 20px; }
.hm-banner-pos { background: #f7f8f3; }
.hm-banner-rider { background: #e2f1da; }
.hm-rider-title .nw { white-space: nowrap; }
.hm-kicker { font-size: 21px; line-height: 1.25; font-weight: 800; font-style: italic; color: var(--hm-ink); }
.hm-gp-big { margin-top: 4px !important; font-size: 44px; line-height: 1.1; font-weight: 800; font-style: italic; color: var(--hm-ink); }
.hm-gp-ex { margin-top: 6px !important; font-size: 15px; font-weight: 700; color: #2f3a2d; }
.hm-banner-title { margin-top: 8px !important; font-size: 19px; line-height: 1.3; font-weight: 800; color: var(--hm-text); }
.hm-banner-sub { margin-top: 4px !important; font-size: 14.5px; color: #4b5649; }
.hm-rider-title { font-size: 26px; line-height: 1.2; font-weight: 800; font-style: italic; color: var(--hm-ink); }
.hm-cta { display: inline-flex; align-items: center; gap: 8px; height: 46px; margin-top: 14px; padding: 0 18px; border-radius: 10px; font-size: 15px; font-weight: 800; white-space: nowrap; transition: background-color .15s, transform .15s; }
.hm-cta:hover { transform: translateY(-1px); }
.hm-cta-lime { background: var(--hm-lime); color: var(--hm-ink) !important; box-shadow: 0 10px 22px -14px rgba(18, 64, 15, .6); }
.hm-cta-lime:hover { background: var(--hm-lime-2); }
.hm-cta-green { background: var(--hm-ink); color: #fff !important; }
.hm-cta-green:hover { background: #0b2f09; }
.hm-fine { margin-top: 10px !important; font-size: 11.5px; color: var(--hm-muted); }
.hm-banner-deco { display: none; }

/* ---------- ระบบ POS (เนื้อหาเดิมแบบย่อ) ใต้แบนเนอร์ POS ---------- */
.hm-sec-pos { padding-top: 14px !important; }
.hm-posx { display: grid; gap: 12px; }
.hm-posx-why { position: relative; overflow: hidden; padding: 20px 18px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #3d8a0b 0%, #22630f 55%, #164a0c 100%); }
.hm-posx-bg { position: absolute; right: -14px; bottom: -24px; font-size: 150px; color: rgba(255, 255, 255, .07); pointer-events: none; }
.hm-posx-why h3 { position: relative; margin: 0 0 14px; font-size: 21px; line-height: 1.3; font-weight: 800; }
.hm-posx-list { position: relative; display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.hm-posx-list li { display: flex; align-items: flex-start; gap: 10px; }
.hm-posx-list .ck { width: 26px; height: 26px; margin-top: 1px; flex-shrink: 0; border-radius: 50%; background: var(--hm-lime); color: var(--hm-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.hm-posx-list b { display: block; font-size: 15.5px; font-weight: 800; }
.hm-posx-list small { display: block; margin-top: 1px; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .82); }
.hm-posx-plans { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.hm-posx-plans > div { padding: 9px 6px; border-radius: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); text-align: center; }
.hm-posx-plans > div.hot { background: var(--hm-lime); border-color: var(--hm-lime); color: var(--hm-ink); }
.hm-posx-plans small { display: block; font-size: 12px; font-weight: 700; opacity: .9; }
.hm-posx-plans b { display: block; font-size: 22px; line-height: 1.2; font-weight: 800; }
.hm-posx-plans span { font-size: 12px; opacity: .85; }
.hm-posx-note { position: relative; margin-top: 8px !important; font-size: 11.5px; line-height: 1.5; color: rgba(255, 255, 255, .72); }
.hm-posx-btns { position: relative; display: flex; flex-wrap: wrap; gap: 0 10px; }
.hm-cta-ghost { background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .45); color: #fff !important; }
.hm-cta-ghost:hover { background: rgba(255, 255, 255, .18); }
.hm-posx-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hm-posx-feat { padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--hm-line); }
.hm-posx-feat > i { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.hm-posx-feat > i.t1 { background: #ecfccb; color: #4d7c0f; }
.hm-posx-feat > i.t2 { background: #fef3c7; color: #b45309; }
.hm-posx-feat > i.t3 { background: #e0f2fe; color: #0369a1; }
.hm-posx-feat > i.t4 { background: #f5f9b9; color: #3d5a00; }
.hm-posx-feat b { display: block; margin-top: 10px; font-size: 15px; font-weight: 800; color: var(--hm-text); }
.hm-posx-feat small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: var(--hm-muted); }
.hm-keep { display: inline-block; }

/* ---------- ท้ายหน้า ---------- */
.hm-end { display: grid; gap: 12px; }
.hm-story { display: flex; align-items: center; gap: 14px; padding: 12px; background: #fff; border: 1px solid var(--hm-line); border-radius: 16px; }
.hm-story img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.hm-story-t1 { font-size: 17px; line-height: 1.3; font-weight: 800; font-style: italic; color: var(--hm-ink); }
.hm-story-t2 { font-size: 19px; line-height: 1.3; font-weight: 800; font-style: italic; color: var(--hm-green); }
.hm-story-sub { margin-top: 4px !important; font-size: 13.5px; color: var(--hm-muted); }
.hm-links { display: grid; gap: 8px; }
.hm-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--hm-line); border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
.hm-link:hover { border-color: #cfe0b8; box-shadow: 0 10px 24px -18px rgba(39, 107, 41, .6); }
.hm-link-ico { font-size: 28px; color: var(--hm-green); flex-shrink: 0; }
.hm-link-x { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hm-link-x b { font-size: 15.5px; font-weight: 800; color: var(--hm-text); }
.hm-link-x small { font-size: 12.5px; line-height: 1.45; color: var(--hm-muted); }
.hm-link-go { color: #9ca3af; flex-shrink: 0; }

/* =====================================================================
   ≥ 640 / 768
   ===================================================================== */
@media (min-width: 640px) {
    .hm-wrap { padding: 0 16px; }
    .hm-rail { margin: 0 -16px; padding: 2px 16px 12px; scroll-padding-left: 16px; }
}
@media (min-width: 768px) {
    .hm-sec { padding-top: 36px !important; }
    .hm-h2 { font-size: 27px; }
    .hm-sub { font-size: 15px; }
    .hm-cats { gap: 12px; }
    .hm-cat { aspect-ratio: 4 / 3.4; border-radius: 14px; }
    .hm-cat span { font-size: 15px; bottom: 9px; }
    .hm-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; overflow: visible; }
    .hm-mcard { max-width: none; }
    .hm-rail-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hm-rail-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hm-rail-3 > *, .hm-rail-posts > * { max-width: none; }
    .hm-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hm-link { flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; }
    .hm-link-go { display: none; }
    .hm-gp-big { font-size: 52px; }
    .hm-posx-why { padding: 26px 28px; }
    .hm-posx-why h3 { font-size: 24px; margin-bottom: 18px; }
    .hm-posx-list { grid-template-columns: 1fr 1fr; gap: 16px 24px; }
    .hm-posx-plans { max-width: 540px; }
    .hm-posx-feats { gap: 12px; }
    .hm-posx-feat { padding: 18px; }
}

/* =====================================================================
   ≥ 1024: เมนูเด็ด 6 คอลัมน์ (เท่าดีไซน์เดิม) · แบนเนอร์ข้อความทับฝั่งที่รูปจางไว้
   ===================================================================== */
@media (min-width: 1024px) {
    .hm-wrap { padding: 0 24px; }
    .hm-sec { padding-top: 44px !important; }
    .hm-sec-banner { padding-top: 24px !important; }
    .hm-h2 { font-size: 30px; }
    .hm-cats { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }
    .hm-cat { aspect-ratio: 4 / 3.4; }

    .hm-rail-menus { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
    .hm-rail-menus .hm-mcard-body { padding: 10px 12px 12px; }
    .hm-rail-menus .hm-mcard-name { font-size: 15px; }
    .hm-rail-menus .hm-heart { width: 34px; height: 34px; font-size: 17px; }
    .hm-comm.has-trend { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
    .hm-comm:not(.has-trend) .hm-rail-posts { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .hm-banner { display: flex; align-items: center; min-height: 300px; border-radius: 22px; }
    .hm-banner-media { position: absolute; top: 0; bottom: 0; height: 100%; }
    .hm-banner-media img { width: auto; height: 100%; aspect-ratio: 16 / 9; }
    .hm-banner-body { width: 52%; padding: 30px 44px; }
    /* รูปคน/แท็บเล็ตอยู่ซ้าย → ข้อความขวา */
    .hm-banner-gp .hm-banner-media, .hm-banner-pos .hm-banner-media { left: 0; }
    .hm-banner-gp .hm-banner-body, .hm-banner-pos .hm-banner-body { margin-left: auto; }
    .hm-banner-gp .hm-banner-body { padding-right: 150px; }
    /* ไรเดอร์อยู่ขวา → ข้อความซ้าย */
    .hm-banner-rider { min-height: 240px; }
    .hm-banner-rider .hm-banner-media { right: 0; }
    .hm-kicker { font-size: 28px; }
    .hm-gp-big { font-size: 64px; }
    .hm-gp-ex { font-size: 18px; }
    .hm-banner-title { font-size: 24px; }
    .hm-banner-sub { font-size: 16px; }
    .hm-rider-title { font-size: 40px; }
    .hm-banner-deco { display: block; position: absolute; right: 40px; top: 50%; transform: translateY(-50%); z-index: 1; font-size: 118px; color: var(--hm-green); opacity: .9; }
    /* ขอบรูปด้านในไล่สีเข้ากับพื้นแบนเนอร์ (ไม่เห็นรอยต่อ) */
    .hm-banner-media::after { content: ''; position: absolute; top: 0; bottom: 0; width: 140px; pointer-events: none; }
    .hm-banner-gp .hm-banner-media::after { right: 0; background: linear-gradient(to right, rgba(227, 246, 220, 0), #e3f6dc); }
    .hm-banner-pos .hm-banner-media::after { right: 0; background: linear-gradient(to right, rgba(247, 248, 243, 0), #f7f8f3); }
    .hm-banner-rider .hm-banner-media::after { left: 0; background: linear-gradient(to left, rgba(226, 241, 218, 0), #e2f1da); }

    .hm-end { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: stretch; }
    .hm-posx { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
    .hm-posx-why { padding: 32px 36px; border-radius: 22px; }
    .hm-posx-feats { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(4, minmax(0, 1fr)); }
    .hm-posx-feat { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; align-content: center; padding: 14px 20px; }
    .hm-posx-feat > i { grid-column: 1; grid-row: 1 / span 2; align-self: center; width: 48px; height: 48px; font-size: 24px; }
    .hm-posx-feat b, .hm-posx-feat small { grid-column: 2; }
    .hm-posx-feat b { margin-top: 0; }
    .hm-story { padding: 14px; gap: 18px; }
    .hm-story img { width: 140px; height: 120px; }
    .hm-story-t1 { font-size: 21px; }
    .hm-story-t2 { font-size: 25px; }
}

/* 1024–1279: ตัวหนังสือแบนเนอร์เล็กลง (กันตัดคำ) */
@media (min-width: 1024px) and (max-width: 1279px) {
    .hm-kicker { font-size: 23px; }
    .hm-gp-big { font-size: 52px; }
    .hm-rider-title { font-size: 32px; }
}

/* ≥ 1280: ร้านค้าแนะนำ 6 ร้านแถวเดียว (เท่าดีไซน์เดิม) */
@media (min-width: 1280px) {
    .hm-rail-shops { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
    .hm-rail-shops .hm-scard-x b { font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .hm-cat img, .hm-mcard-img img, .hm-cta, .hm-heart { transition: none; }
}
