/* T Top Thai — หน้าเมนู (menu.html) · ใช้สีเดียวกับเว็บร้าน (site.css) + โทนเมนูพิมพ์ (พื้นเข้ม ตัวทอง) */
.menu-page {
  --panel: #15100d;
  --panel-2: #1e1612;
  --line: rgba(241, 195, 99, .16);
  --muted: #cfc5b4;
  --tabs-h: 54px;
  /* รูปอาหารจาง ๆ ข้างหลัง — ทับดำ 80% ให้ตัวหนังสืออ่านง่าย */
  background: linear-gradient(rgba(0, 0, 0, .8), rgba(0, 0, 0, .8)), #000 url(img/bg-about.webp) center top / 100% auto repeat-y;
  font-family: var(--sans);
  letter-spacing: .3px;
}
.menu-page .border { height: 25px; }

/* ── หัวหน้า ── */
.mtop {
  display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap;
  padding: 10px 20px; background: var(--red) url(img/bg-red.webp) center / cover;
}
.mtop__logo img { display: block; width: 150px; }
.mtop__nav { display: flex; gap: 22px; font: 17px var(--serif); letter-spacing: 1px; }
.mtop__nav a { color: var(--cream); }
.mtop__nav a:hover { color: #fff; }
.mtop__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mbtn {
  display: inline-block; padding: 9px 18px; border: 2px solid var(--gold-light); border-radius: 999px;
  color: var(--gold-light); font: 700 15px/1.2 var(--sans); letter-spacing: .5px; background: rgba(0, 0, 0, .35);
}
.mbtn:hover { background: var(--gold-light); color: #000; }
.mbtn--gold { background: var(--gold-light); color: #000; }
.mbtn--gold:hover { background: #fff; border-color: #fff; }

/* ── หัวเรื่อง ── */
.mhero { max-width: 900px; margin: 0 auto; padding: 34px 15px 10px; text-align: center; }
.mhero h1 { font-size: 34px; }
.mhero p { margin: 0 0 .5em; font-size: 17px; }
.mhero__small { color: var(--muted); font-size: 15px !important; }

/* ── แท็บเมนู (ติดบนจอตอนเลื่อน) ── */
.mtabs {
  position: sticky; top: 0; z-index: 40;
  display: flex; justify-content: center; gap: 6px; overflow-x: auto; scrollbar-width: none;
  height: var(--tabs-h); align-items: center; padding: 0 10px; margin-top: 16px;
  background: #000; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.mtabs::-webkit-scrollbar { display: none; }
.mtabs a {
  flex: 0 0 auto; padding: 8px 18px; border-radius: 999px; color: var(--cream);
  font: 700 15px/1.2 var(--sans); letter-spacing: .5px; text-transform: uppercase; white-space: nowrap;
}
.mtabs a:hover { color: #fff; }
.mtabs a[aria-current="true"] { background: var(--gold-light); color: #000; }

/* ── ค้นหา (เปิดด้วย menu.js) ── */
.msearch { max-width: 560px; margin: 18px auto 0; padding: 0 15px; }
.msearch input {
  width: 100%; padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel-2); color: #fff; font: 16px var(--sans);
}
.msearch input::placeholder { color: #9a8f80; }
.msearch input:focus { outline: 2px solid var(--gold-light); outline-offset: 1px; }
.msearch__none { text-align: center; color: var(--muted); margin: 14px 0 0; }

/* ── เมนูแต่ละเล่ม ── */
.mmenu { max-width: 1170px; margin: 0 auto; padding: 26px 15px 10px; }
.mmenu__head { text-align: center; margin-bottom: 14px; }
.mmenu__title { font: 40px/1.15 var(--serif); color: var(--gold-light); letter-spacing: 2px; }
.mmenu__intro { margin: 6px 0 0; color: var(--cream); }
.moffers {
  display: inline-flex; flex-direction: column; gap: 6px; margin: 16px auto 0; padding: 14px 22px;
  list-style: none; text-align: left; border: 1px dashed var(--gold-light); border-radius: 12px; background: rgba(141, 39, 39, .35);
}
.moffers li::before { content: "★ "; color: var(--gold-light); }

/* แถบหมวด (ติดใต้แท็บ) */
.mchips {
  position: sticky; top: var(--tabs-h); z-index: 30;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -15px 6px; padding: 10px 15px; background: #000;
  /* พื้นดำเต็มความกว้างจอ (แถบเองกว้างเท่าเนื้อหา) */
  box-shadow: 0 0 0 100vmax #000; clip-path: inset(0 -100vmax);
}
.mchips::-webkit-scrollbar { display: none; }
.mchips a {
  flex: 0 0 auto; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--cream); font-size: 14px; white-space: nowrap; background: var(--panel);
}
.mchips a:hover, .mchips a.is-on { border-color: var(--gold-light); color: var(--gold-light); }

/* ── หมวด ── */
.msec { margin: 22px 0 34px; scroll-margin-top: calc(var(--tabs-h) + 60px); }
.msec__head { position: relative; margin-bottom: 14px; text-align: center; }
.msec__title { font: 32px/1.2 var(--serif); color: var(--gold-light); letter-spacing: 1.5px; }
.msec--img .msec__head {
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  height: 190px; padding: 14px; border-radius: 14px; overflow: hidden; background: var(--panel);
}
.msec__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.msec--img .msec__head::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, .82) 100%);
}
.msec--img .msec__title, .msec--img .msec__price, .msec--img .msec__note { position: relative; z-index: 1; text-shadow: 0 2px 10px #000; }
.msec--img .msec__title { font-size: 38px; }
.msec__price {
  display: inline-block; margin: 6px 0 0; padding: 4px 14px; border-radius: 999px;
  background: var(--gold-light); color: #000; font-weight: 700;
}
.msec--img .msec__price { text-shadow: none; }
.msec__note { margin: 4px 0 0; color: var(--cream); font-style: italic; }

/* กล่องเลือกเนื้อ (ราคาตามที่เลือก) */
.mchoice {
  margin: 0 auto 16px; padding: 14px 18px 12px; max-width: 760px;
  border-radius: 12px; background: var(--red) url(img/bg-red.webp) center / cover;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}
.mchoice__title { margin: 0 0 8px; text-align: center; color: var(--gold-light); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; }
.mchoice__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 28px; margin: 0; padding: 0; list-style: none; }
.mchoice__list li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dotted rgba(255, 255, 255, .25); font-weight: 600; }
.mchoice__hint { margin: 8px 0 0; text-align: center; font-size: 13px; color: var(--cream); }

/* รายการอาหาร */
.mlist { display: grid; grid-template-columns: 1fr 1fr; gap: 0 34px; margin: 0; padding: 0; list-style: none; }
.mi {
  display: grid; grid-template-columns: 2.4em 1fr auto; gap: 0 10px; align-items: baseline;
  padding: 12px 4px; border-bottom: 1px solid var(--line);
}
.mi__no { color: var(--gold); font-weight: 700; font-size: 15px; }
.mi__name { margin: 0; font: 700 16px/1.35 var(--sans); color: var(--gold-light); letter-spacing: .4px; }
.mi__desc { margin: 3px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.mi__price { color: #fff; font-weight: 700; font-size: 17px; white-space: nowrap; text-align: right; }
.mi__from { color: var(--muted); font-weight: 400; font-size: 13px; }
.mi__size { color: var(--gold-light); font-size: 12px; font-weight: 700; }
.mi__dot { color: var(--muted); }
.mi__tag { color: #a99d8b; font-weight: 600; font-size: 12px; letter-spacing: 0; }
.mi__badge {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; vertical-align: 2px;
  background: var(--red); color: var(--gold-light); font-size: 11px; letter-spacing: .5px; text-transform: uppercase;
}
.mi__badge::before { content: "👍 "; }
.mlist--compact .mi, .mlist--names .mi { grid-template-columns: 1fr auto; padding: 8px 4px; }
.mlist--compact .mi__name, .mlist--names .mi__name { font-size: 15px; }
.mlist--names { grid-template-columns: repeat(3, 1fr); }

/* การ์ดของหวาน (มีรูป) */
.mcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.mcard { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.mcard__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.mcard__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 12px 14px 14px; }
.mcard__body .mi__no { margin-right: 6px; }
.mcard__body .mi__price { margin-top: auto; text-align: left; }
.mcard--plain { justify-content: center; }

/* ── ข้อควรรู้ + ปุ่มท้ายหน้า ── */
.mnotes {
  max-width: 900px; margin: 10px auto 30px; padding: 22px 26px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
}
.mnotes__title { font: 26px var(--serif); color: var(--gold-light); margin-bottom: 8px; }
.mnotes ul { margin: 0; padding-left: 20px; color: var(--cream); }
.mnotes li { margin: 4px 0; }
.mnotes__updated { margin: 12px 0 0; color: #9a8f80; font-size: 13px; }
.mcta { padding: 10px 15px 40px; text-align: center; }
.mcta p { font-size: 18px; margin: 0 0 14px; }
.mcta .mbtn { margin: 4px; }

/* ── ที่มาอาหารทะเล (A)(I)(M) — กฎหมายบังคับ 1 ก.ค. 2026: ป้ายต้องอ่านง่าย + มีคำอธิบายก่อนสั่ง ── */
abbr.mi__tag { color: var(--cream); font-weight: 700; text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; }
.maim {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px;
  margin: 12px 0 0; color: var(--cream); font-size: 14px;
}
.maim__title { color: var(--muted); }
.maim b { color: var(--gold-light); }
.mnotes .maim { justify-content: flex-start; margin-top: 10px; }

/* ── ปุ่มสั่งอาหารลอยล่างจอ ── */
.menu-page { padding-bottom: 78px; }
.mfab {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 45; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px;
  background: var(--gold-light); color: #000; font: 700 16px/1 var(--sans); letter-spacing: .5px; white-space: nowrap;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .6), 0 0 0 3px rgba(0, 0, 0, .45);
}
.mfab:hover, .mfab:focus-visible { background: #fff; color: #000; }
.mfab svg { width: 19px; height: 19px; }
/* จอคอม: ล่างกลางจะบังราคาจาน 2 คอลัมน์ → ไปอยู่มุมขวาของแถบแท็บ (ที่ว่างอยู่แล้ว) */
@media (min-width: 1100px) {
  .js .menu-page { padding-bottom: 0; }
  .js .mfab {
    top: calc((var(--tabs-h) - 37px) / 2); bottom: auto; left: auto; right: 18px; transform: none;
    padding: 9px 20px; font-size: 15px; box-shadow: none;
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
  }
  .js.is-past-head .mfab { opacity: 1; visibility: visible; }
}

/* ── ตอนมี JS: เห็นทีละเล่ม · ค้นหาแล้วเห็นทุกเล่มเฉพาะที่ตรง ── */
.js .mmenu:not(.is-active) { display: none; }
.js .is-searching .mmenu { display: block; }
.js .is-searching .mchips, .is-searching .mchoice__hint { display: none; }
.is-miss { display: none !important; }

/* ── แท็บเล็ต ── */
@media (max-width: 991px) {
  .mcards { grid-template-columns: repeat(2, 1fr); }
  .mlist--names { grid-template-columns: repeat(2, 1fr); }
}

/* ── มือถือ ── */
@media (max-width: 767px) {
  .menu-page { --tabs-h: 50px; background-size: 230% auto; }
  .menu-page .border { height: 20px; }
  .mtop { justify-content: center; padding: 10px 12px; }
  .mtop__logo img { width: 120px; }
  .mtop__nav { order: 3; width: 100%; justify-content: center; font-size: 15px; }
  .mtop__actions { justify-content: center; }
  .mbtn { padding: 8px 14px; font-size: 14px; }
  .mhero { padding-top: 22px; }
  .mhero h1 { font-size: 24px; }
  .mhero p { font-size: 15px; }
  .mtabs { justify-content: flex-start; }
  .mtabs a { padding: 7px 13px; font-size: 13px; }
  .mmenu__title { font-size: 30px; }
  .mlist { grid-template-columns: 1fr; }
  .mlist--names { grid-template-columns: 1fr 1fr; }
  .msec--img .msec__head { height: 140px; }
  .msec--img .msec__title { font-size: 30px; }
  .msec__title { font-size: 26px; }
  .mchoice { padding: 12px 12px 10px; }
  .mchoice__list { gap: 0 16px; font-size: 14px; }
  .mi { grid-template-columns: 2.1em 1fr auto; padding: 11px 2px; }
  .mi__name { font-size: 15px; }
  .mi__price { font-size: 16px; }
  .mnotes { margin: 10px 12px 26px; padding: 18px 16px; }
}
@media (max-width: 420px) {
  /* ให้ 4 แท็บพอดีจอมือถือ ไม่ต้องปัดข้าง */
  .mtabs { gap: 0; padding: 0 4px; justify-content: space-between; }
  .mtabs a { padding: 7px 9px; font-size: 12px; letter-spacing: 0; }
  .mcards { grid-template-columns: 1fr; }
  .mchoice__list { grid-template-columns: 1fr; }
}
