/* =====================================================
   Site design — เมนูเด็ด.com (หน้าบ้าน)
   ส่วนประกอบหน้าตาที่ใช้ทั้งเว็บ: header, footer, หัวข้อ section, การ์ด
   โหลดจาก Views/front/header.tpl.php
   ===================================================== */

[x-cloak] { display: none !important; }

/* ---------- Header ---------- */
.md-header {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
            backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
    transition: box-shadow 0.25s ease, background-color 0.25s ease;
}
.md-header.is-scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 10px 30px -18px rgba(17, 24, 39, 0.35);
}

/* ช่องค้นหาแบบแคปซูล */
.md-search {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 4px 0 16px;
    border-radius: 9999px;
    background: #f3f5f0;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.md-search:hover {
    background: #eef1ea;
}
.md-search:focus-within {
    background: #fff;
    border-color: #80BB01;
    box-shadow: 0 0 0 4px rgba(128, 187, 1, 0.16);
}

/* ปุ่มไอคอนกลม */
.md-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.md-icon-btn:hover {
    background: #f1f5ea;
    color: #276e00;
}

/* ปุ่มแคปซูลเล็ก (เลือกภาษา) */
.md-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 10px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.md-pill:hover {
    border-color: #80BB01;
    background: #f7fbef;
}

/* ตัวเลขบนไอคอน */
.md-badge {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.md-badge-green { background: #276e00; }
.md-badge[hidden] { display: none; }

/* ลิงก์เมนูแถวล่าง */
.md-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 48px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.md-nav-link::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #80BB01, #276e00);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}
.md-nav-link:hover {
    color: #276e00;
}
.md-nav-link:hover::after {
    transform: scaleX(0.5);
}
.md-nav-link.is-active {
    color: #276e00;
    font-weight: 600;
}
.md-nav-link.is-active::after {
    transform: scaleX(1);
}
.md-nav-sub {
    font-size: 13px;
    color: #6b7280;
}

/* ---------- Footer ---------- */
.md-footer {
    background:
        radial-gradient(1200px 400px at 85% -10%, rgba(128, 187, 1, 0.12), transparent 60%),
        linear-gradient(180deg, #13220d 0%, #0d1709 100%);
}
.md-footer-cta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px 24px;
    border-radius: 20px;
    background: linear-gradient(120deg, rgba(128, 187, 1, 0.22), rgba(39, 110, 0, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.08);
}
@media (min-width: 768px) {
    .md-footer-cta { flex-direction: row; align-items: center; }
}
.md-footer-title {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}
.md-footer-link {
    color: #9ca3af;
    transition: color 0.2s ease;
}
.md-footer-link:hover {
    color: #c5e36b;
}
.md-footer-contact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #d1d5db;
    transition: color 0.2s ease;
}
.md-footer-contact:hover {
    color: #fff;
}
.md-footer-ico {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: #a3d33a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.md-social {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.07);
    color: #e5e7eb;
    transition: background-color 0.2s ease, color 0.2s ease, translate 0.2s ease;
}
.md-social:hover {
    background: #80BB01;
    color: #fff;
    translate: 0 -2px;
}

/* ---------- Section (หน้าแรก) ---------- */
.md-sec {
    padding-top: 64px !important;      /* ชนะ section{padding:2rem} เดิมใน footer */
    padding-bottom: 64px !important;
}
@media (max-width: 767px) {
    .md-sec { padding-top: 44px !important; padding-bottom: 44px !important; }
}
.md-sec-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 28px;
}
.md-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #3f8f00;
    background: #eef6e0;
    padding: 5px 12px;
    border-radius: 9999px;
    margin-bottom: 10px;
}
.md-h2 {
    font-size: 28px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #111827;
}
@media (max-width: 767px) {
    .md-h2 { font-size: 23px; }
}
.md-sub {
    margin-top: 6px;
    font-size: 15px;
    color: #6b7280;
}
.md-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #276e00;
    white-space: nowrap;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.md-more i { transition: transform 0.2s ease; }
.md-more:hover { border-color: #80BB01; background: #f7fbef; }
.md-more:hover i { transform: translateX(3px); }

/* การ์ดมาตรฐาน */
.md-card {
    display: block;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 0 0 1px rgba(17, 24, 39, 0.05);
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease;
}
.md-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px -18px rgba(17, 24, 39, 0.28), 0 0 0 1px rgba(128, 187, 1, 0.25);
}
.md-card-media {
    position: relative;
    overflow: hidden;
}
.md-card-media img {
    transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.md-card:hover .md-card-media img {
    transform: scale(1.06);
}
.md-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    backdrop-filter: blur(6px);
}

/* ไทล์หมวดหมู่: ภาพเต็มกรอบ + ชื่อบนแถบไล่เงา */
.md-cat-tile {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    background: #dfe7d8;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease;
}
.md-cat-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.md-cat-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.72) 100%);
}
.md-cat-tile span {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 1;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.md-cat-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px -14px rgba(17, 24, 39, 0.4);
}
.md-cat-tile:hover img {
    transform: scale(1.08);
}

.md-sec.md-sec-tight-top { padding-top: 28px !important; }

/* สถานะยังไม่มีข้อมูล */
.md-empty {
    text-align: center;
    padding: 48px 16px;
    border-radius: 20px;
    background: #fff;
    border: 1px dashed #d1d5db;
    color: #6b7280;
}
.md-empty i {
    font-size: 28px;
    color: #a3c86b;
    margin-bottom: 10px;
    display: block;
}

/* พื้นที่ยอดนิยม: แคปซูล */
.md-loc {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 8px;
    border-radius: 9999px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.md-loc:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -14px rgba(17, 24, 39, 0.35), 0 0 0 1px rgba(128, 187, 1, 0.4);
}
.md-loc-ico {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    background: #eef6e0;
    color: #3f8f00;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

/* สำหรับร้านอาหาร: การ์ดใหญ่ */
.md-biz-hero {
    position: relative;
    overflow: hidden;
    padding: 32px;
    border-radius: 24px;
    color: #fff;
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(253, 224, 71, 0.18), transparent 60%),
        linear-gradient(135deg, #3f8f00 0%, #276e00 55%, #1d5200 100%);
}
.md-biz-hero-ico {
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-size: 180px;
    color: rgba(255, 255, 255, 0.06);
    transform: rotate(-12deg);
    pointer-events: none;
}
.md-feature {
    padding: 20px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.md-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px -18px rgba(17, 24, 39, 0.35), 0 0 0 1px rgba(128, 187, 1, 0.3);
}
.md-feature-ico {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.md-promo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 20px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.md-promo:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px -18px rgba(17, 24, 39, 0.35);
}
.md-promo-ico {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px -6px rgba(17, 24, 39, 0.3);
}
.md-promo-arrow { transition: transform 0.2s ease; }
.md-promo:hover .md-promo-arrow { transform: translateX(4px); }
.md-promo-lime  { background: #eef6e0; }
.md-promo-lime  .md-promo-ico { color: #3f8f00; }
.md-promo-amber { background: #fff4dc; }
.md-promo-amber .md-promo-ico { color: #c27a00; }
.md-promo-sky   { background: #e3f2fd; }
.md-promo-sky   .md-promo-ico { color: #0b72b9; }

/* คำรับรอง / รีวิว */
.md-quote {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.06);
}
.md-quote-mark {
    font-size: 28px;
    color: #c5e36b;
    margin-bottom: 12px;
}
.md-quote-hl {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: #eef6e0;
    color: #276e00;
    font-size: 13px;
    font-weight: 700;
}

/* แบนเนอร์ LINE */
.md-line-cta {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 36px;
    border-radius: 28px;
    background:
        radial-gradient(500px 260px at 0% 100%, rgba(255, 255, 255, 0.14), transparent 60%),
        linear-gradient(120deg, #06c755 0%, #05a648 50%, #2f7d00 100%);
}
.md-line-cta::after {
    content: '\f3c0';
    font-family: 'Font Awesome 6 Brands';
    position: absolute;
    right: 24px;
    top: -30px;
    font-size: 200px;
    color: rgba(255, 255, 255, 0.07);
    pointer-events: none;
}
@media (min-width: 1024px) {
    .md-line-cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 44px 48px; }
}

/* ---------- หน้า /menu และหน้ารายการอื่นๆ ---------- */
.md-hero-search {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 6px 0 22px;
    border-radius: 9999px;
    background: #fff;
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.45);
    max-width: 640px;
    margin: 0 auto;
}
.md-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border-radius: 9999px;
    background: #f3f5f0;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.md-filter-chip:hover { background: #e9efe0; }
.md-filter-chip.is-active {
    background: linear-gradient(135deg, #80BB01, #3f8f00);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 14px -8px rgba(39, 110, 0, 0.7);
}
.md-filter-card {
    padding: 22px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.06);
}
.md-radio-pill { cursor: pointer; }
.md-radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.md-radio-pill span {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 13px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    color: #4b5563;
    transition: all 0.2s ease;
}
.md-radio-pill:hover span { border-color: #80BB01; }
.md-radio-pill input:checked + span {
    background: #eef6e0;
    border-color: #80BB01;
    color: #276e00;
    font-weight: 600;
}
.md-radio-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(128, 187, 1, 0.3); }
/* ปุ่ม "สั่งเลย" ในการ์ด (เป็น span ในลิงก์การ์ด) */
.md-order-btn {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 16px;
    border-radius: 9999px;
    background-image: linear-gradient(135deg, #80BB01 0%, #4f9a00 55%, #2f7d00 100%);
    background-size: 170% 100%;
    background-position: 0% 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
    transition: background-position 0.35s ease, box-shadow 0.25s ease;
}
.md-card:hover .md-order-btn {
    background-position: 100% 50%;
    box-shadow: 0 6px 14px -6px rgba(39, 110, 0, 0.6);
}
.md-page {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.08);
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    transition: box-shadow 0.2s ease, color 0.2s ease;
}
.md-page:hover { box-shadow: 0 0 0 1px #80BB01; color: #276e00; }
.md-page.is-active {
    background: linear-gradient(135deg, #80BB01, #3f8f00);
    color: #fff;
    box-shadow: none;
}

/* =====================================================================
   ชุมชน (/community)
   ===================================================================== */
.cm-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 13px; border-radius: 9999px;
    background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
}
.cm-hero-btn {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    height: 44px; padding: 0 18px; border-radius: 9999px;
    background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.32);
    color: #fff; font-size: 14px; font-weight: 600;
    transition: background-color 0.2s ease, translate 0.2s ease;
}
.cm-hero-btn:hover { background: rgba(255, 255, 255, 0.24); translate: 0 -1px; }
.cm-hero-btn-solid { background: #fff; color: #276e00; border-color: #fff; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.45); }
.cm-hero-btn-solid:hover { background: #f7fbef; }
.cm-hero-icon { width: 44px; padding: 0; justify-content: center; }
.cm-hero-dot {
    position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px;
    border-radius: 9999px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #4f9a00;
}
.cm-hero-card {
    background: rgba(255, 255, 255, 0.96); border-radius: 24px; padding: 18px;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
}
.cm-hero-stat {
    display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: #f6f9f0;
}
.cm-hero-stat > i {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: #4f9a00; box-shadow: 0 0 0 1px rgba(79, 154, 0, 0.12);
}
.cm-stack { display: inline-flex; border-radius: 9999px; box-shadow: 0 0 0 2px #fff; transition: translate 0.2s ease; }
.cm-stack:hover { translate: 0 -2px; z-index: 1; }

.cm-topics {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #edf0e8;
}
.cm-topics > div { scrollbar-width: none; }
.cm-topics > div::-webkit-scrollbar { display: none; }

.cm-avatar { display: inline-block; border-radius: 9999px; object-fit: cover; flex-shrink: 0; background: #eef2e8; }
.cm-avatar-fb { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #3f4b36; font-size: 0.95em; }

.cm-composer {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 12px;
    background: #fff; border-radius: 20px; box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.06);
    transition: box-shadow 0.2s ease;
}
.cm-composer:hover { box-shadow: 0 0 0 1px #80BB01, 0 10px 24px -16px rgba(39, 110, 0, 0.45); }
.cm-composer-ico {
    width: 42px; height: 42px; border-radius: 9999px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #80BB01, #3f8f00); color: #fff;
}
.cm-composer-input {
    flex: 1; min-width: 0; height: 42px; padding: 0 16px; border-radius: 9999px; background: #f3f5f0;
    display: flex; align-items: center; color: #9ca3af; font-size: 14px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cm-composer-mini { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #f6f7f4; }

.cm-post {
    background: #fff; border-radius: 22px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 0 0 1px rgba(17, 24, 39, 0.055);
    transition: box-shadow 0.25s ease;
}
.cm-post:hover { box-shadow: 0 16px 36px -22px rgba(17, 24, 39, 0.3), 0 0 0 1px rgba(128, 187, 1, 0.22); }
.cm-post-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 12px; }
.cm-post-title { font-size: 17px; line-height: 1.45; font-weight: 800; color: #111827; }
.cm-post-title a:hover { color: #3f8f00; }
.cm-post-body { margin-top: 6px; font-size: 14.5px; line-height: 1.7; color: #374151; overflow-wrap: anywhere; }
.cm-more { font-weight: 700; color: #3f8f00; white-space: nowrap; }
.cm-more:hover { text-decoration: underline; }

.cm-type {
    display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
    border-radius: 9999px; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.cm-type i { font-size: 10px; }
.cm-type-promo  { background: #fff1f2; color: #e11d48; }
.cm-type-recipe { background: #ecfdf3; color: #15803d; }
.cm-type-news   { background: #fffbeb; color: #b45309; }
.cm-type-menu   { background: #f0f9ff; color: #0369a1; }
.cm-type-video  { background: #f5f3ff; color: #7c3aed; }
.cm-type-text   { background: #f3f4f6; color: #4b5563; }

.cm-follow {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; flex-shrink: 0;
    border-radius: 9999px; font-size: 12.5px; font-weight: 700;
    background: #eef6e0; color: #2f7d00; transition: all 0.2s ease;
}
.cm-follow:hover { background: #80BB01; color: #fff; }
.cm-follow.is-on { background: #f3f4f6; color: #6b7280; }
.cm-follow.is-on:hover { background: #e5e7eb; color: #374151; }
.cm-follow i { font-size: 10px; }
.cm-follow-sm { height: 30px; padding: 0 11px; font-size: 12px; }

.cm-hashtag {
    display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 11px; border-radius: 9999px;
    background: #f4f7ef; color: #3f6212; font-size: 12.5px; font-weight: 600; transition: all 0.2s ease;
}
.cm-hashtag:hover, .cm-hashtag.is-active { background: #80BB01; color: #fff; }

.cm-media { position: relative; display: block; margin: 14px 20px 0; border-radius: 16px; overflow: hidden; background: #eef2e8; }
.cm-media-cell { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.cm-media-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.cm-media:hover .cm-media-cell img { transform: scale(1.03); }
.cm-media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.cm-media-grid .cm-media-cell { aspect-ratio: 1 / 1; }
.cm-media-more {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 24px; font-weight: 800;
}
.cm-promo-flag {
    position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px;
    height: 28px; padding: 0 12px; border-radius: 9999px;
    background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; font-size: 12px; font-weight: 800;
    box-shadow: 0 8px 18px -8px rgba(225, 29, 72, 0.7);
}

.cm-menus { margin: 14px 20px 0; padding: 12px; border-radius: 16px; background: #f8faf5; border: 1px dashed #d9e5c6; }
.cm-menu { display: flex; align-items: center; gap: 10px; padding: 7px; border-radius: 13px; background: #fff; box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.05); }
.cm-menu-thumb {
    width: 52px; height: 52px; border-radius: 11px; overflow: hidden; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: 26px;
}
.cm-menu-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cm-cart {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; color: #fff;
    background-image: linear-gradient(135deg, #80BB01, #3f8f00);
    display: inline-flex; align-items: center; justify-content: center;
    transition: translate 0.2s ease, box-shadow 0.2s ease;
}
.cm-cart:hover { translate: 0 -1px; box-shadow: 0 8px 16px -8px rgba(39, 110, 0, 0.7); }
.cm-cart.is-done { background-image: linear-gradient(135deg, #10b981, #059669); }

.cm-actions { display: flex; align-items: center; gap: 4px; margin: 14px 12px 0; padding: 8px 0 10px; border-top: 1px solid #f0f2ed; }
.cm-act {
    display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 12px;
    color: #4b5563; font-size: 13.5px; font-weight: 600; transition: background-color 0.2s ease, color 0.2s ease;
}
.cm-act:hover { background: #f4f6f1; color: #111827; }
.cm-act i { font-size: 16px; }
.cm-like.is-on { color: #e11d48; }
.cm-like.is-on i { animation: cmPop 0.35s ease; }
@keyframes cmPop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }

.cm-empty { background: #fff; border-radius: 22px; padding: 48px 20px; text-align: center; box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.06); }

.cm-owner-cta {
    position: relative; overflow: hidden; padding: 22px; border-radius: 22px; color: #fff;
    background: radial-gradient(120% 90% at 100% 0%, #9bd21a 0%, rgba(155, 210, 26, 0) 55%), linear-gradient(140deg, #3f8f00, #1f5f00);
    box-shadow: 0 20px 40px -24px rgba(31, 95, 0, 0.8);
}
.cm-owner-cta::after {
    content: "\1F35C"; position: absolute; right: -6px; bottom: -14px; font-size: 92px; opacity: 0.16; transform: rotate(-12deg);
}
.cm-owner-ico { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.18); font-size: 18px; }
.cm-owner-btn {
    position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
    height: 42px; padding: 0 18px; border-radius: 9999px; background: #fff; color: #276e00; font-size: 14px; font-weight: 700;
    transition: translate 0.2s ease;
}
.cm-owner-btn:hover { translate: 0 -2px; }

.cm-side { display: block; background: #fff; border-radius: 22px; padding: 18px; box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.06); }
.cm-side-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: #111827; margin-bottom: 12px; }
.cm-trend { display: flex; align-items: center; gap: 11px; padding: 8px; margin: 0 -8px; border-radius: 14px; transition: background-color 0.2s ease; }
.cm-trend:hover { background: #f6f8f3; }
.cm-trend-no {
    width: 26px; height: 26px; border-radius: 9px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    background: #fff7ed; color: #ea580c; font-size: 13px; font-weight: 800;
}
.cm-trend:first-child .cm-trend-no { background: linear-gradient(135deg, #fb923c, #ea580c); color: #fff; }
.cm-trend-img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.cm-shop-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; margin: 0 -8px; border-radius: 14px; }
.cm-shop-row:hover { background: #f6f8f3; }
.cm-leader { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #fffbeb, #fff); box-shadow: 0 0 0 1px #fde68a; transition: translate 0.2s ease; }
.cm-leader:hover { translate: 0 -2px; }

.cm-fade-in { animation: cmFade 0.45s ease both; }
@keyframes cmFade { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

/* คอมเมนต์ในหน้าโพสต์ */
.cm-reply { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: #f6f9f0; border-left: 3px solid #80BB01; }
.cm-owner-badge {
    display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 9999px;
    background: #eef6e0; color: #2f7d00; font-size: 10.5px; font-weight: 700;
}

@media (max-width: 639px) {
    .cm-post-head { padding: 16px 16px 10px; }
    .cm-post .px-5 { padding-left: 16px; padding-right: 16px; }
    .cm-media, .cm-menus { margin-left: 16px; margin-right: 16px; }
    .cm-post-head .cm-follow span { display: none; }
    .cm-post-head .cm-follow { width: 34px; padding: 0; justify-content: center; }
}

/* =====================================================================
   หน้าร้าน (/@slug)
   ===================================================================== */
.sp-logo { flex-shrink: 0; }
.sp-logo .cm-avatar { border-radius: 26px; box-shadow: 0 0 0 4px #fff, 0 18px 36px -18px rgba(0, 0, 0, 0.55); font-size: 40px; background-color: #fff; }
.sp-chip {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 9999px;
    background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 12.5px; font-weight: 600; color: #fff;
}
.sp-chip i { font-size: 11px; opacity: 0.9; }
.sp-dot { width: 7px; height: 7px; border-radius: 9999px; background: #d1d5db; }
.sp-chip-open { background: #fff; color: #276e00; border-color: #fff; }
.sp-chip-open .sp-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.sp-follow.is-on { background: rgba(255, 255, 255, 0.14); color: #fff; }

.sp-menu {
    display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; background: #fff;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.06); transition: box-shadow 0.2s ease, translate 0.2s ease;
}
.sp-menu:hover { box-shadow: 0 0 0 1px rgba(128, 187, 1, 0.45), 0 12px 26px -18px rgba(39, 110, 0, 0.5); translate: 0 -2px; }
.sp-menu.is-out { opacity: 0.6; }
.sp-menu-thumb {
    width: 76px; height: 76px; border-radius: 14px; overflow: hidden; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: 34px;
}
.sp-menu-thumb img { width: 100%; height: 100%; object-fit: cover; }

.sp-info { display: flex; align-items: flex-start; gap: 12px; }
.sp-info-ico { width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }

/* ตัวเลือกเมนู (ขนาด ฯลฯ) ในหน้าเมนู */
.md-opt { cursor: pointer; }
.md-opt input { position: absolute; opacity: 0; pointer-events: none; }
.md-opt span {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 9999px;
    border: 1.5px solid #e5e7eb; background: #fff; font-size: 14px; color: #374151; transition: all 0.15s ease;
}
.md-opt span b { font-weight: 700; color: #ea580c; }
.md-opt:hover span { border-color: #80BB01; }
.md-opt input:checked + span { border-color: #80BB01; background: #eef6e0; color: #276e00; font-weight: 700; box-shadow: 0 0 0 3px rgba(128, 187, 1, 0.15); }
.md-opt input:disabled + span { opacity: 0.45; cursor: not-allowed; }
.md-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(128, 187, 1, 0.35); }

/* ภาพอาหารจากโพสต์ล่าสุด (หัวหน้าชุมชน) */
.cm-shots { position: relative; height: 380px; }
.cm-shot {
    position: absolute; display: block; overflow: hidden; border-radius: 26px; background: #eef2e8;
    box-shadow: 0 28px 50px -24px rgba(0, 0, 0, 0.55), 0 0 0 5px rgba(255, 255, 255, 0.9);
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}
.cm-shot img { width: 100%; height: 100%; object-fit: cover; }
.cm-shot:hover { transform: translateY(-6px) rotate(0deg) scale(1.02); z-index: 5; }
.cm-shot-1 { width: 62%; aspect-ratio: 4 / 5; left: 19%; top: 0; z-index: 3; transform: rotate(-2deg); }
.cm-shot-2 { width: 42%; aspect-ratio: 1 / 1; left: 0; top: 46%; z-index: 4; transform: rotate(-7deg); }
.cm-shot-3 { width: 40%; aspect-ratio: 1 / 1; right: 0; top: 12%; z-index: 2; transform: rotate(6deg); }
.cm-shot-cap {
    position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px;
    padding: 28px 12px 11px; color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}
.cm-shot-cap .cm-avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
.cm-shot-2 .cm-shot-cap span span:first-child, .cm-shot-3 .cm-shot-cap span span:first-child { display: none; }
@media (prefers-reduced-motion: no-preference) {
    .cm-shot-1 { animation: cmShotFloat 7s ease-in-out infinite; }
    .cm-shot-2 { animation: cmShotFloat 8s ease-in-out -2s infinite; }
    .cm-shot-3 { animation: cmShotFloat 9s ease-in-out -4s infinite; }
    .cm-shot:hover { animation-play-state: paused; }
}
@keyframes cmShotFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
