/* =====================================================================
   Thai Spice – หน้าบ้าน
   PC (≥1024px): คงดีไซน์เดิมปี 2010 (กว้าง 1024px, ภาพชุดเดิมใน /images)
   จอเล็ก (<1024px): คอลัมน์เดียว ดูบนมือถือได้
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff url(/images/intro/bgall.gif) repeat;
  font: 11px/1.4 Tahoma, Verdana, Geneva, sans-serif;
  color: #666;
}
a { color: #4F4B2E; text-decoration: none; }
a:hover { color: #998D63; }
img { border: 0; }
h1, h2, h3 { font-size: inherit; }
.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: #4F4B2E; color: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #7A6933; outline-offset: 2px; }
.txt04 { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-size: 12px; color: #996; }
.notice { font-size: 13px; padding: 20px 0; }

/* ---------- ปุ่มเมนูหลัก (ภาพจานกลม) ---------- */
.mainnav { display: flex; }
.mainnav a { display: block; height: 102px; background-repeat: no-repeat; background-size: 100% 100%; }
.mainnav span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nav-1 { width: 102px; background-image: url(/images/intro/mnu01.jpg); }
.nav-2 { width: 101px; background-image: url(/images/intro/mnu02.jpg); }
.nav-3 { width: 104px; background-image: url(/images/intro/mnu03.jpg); }
.nav-4 { width: 103px; background-image: url(/images/intro/mnu04.jpg); }
.nav-1:hover, .nav-1:focus-visible, .nav-1.active { background-image: url(/images/intro/mnu01se.jpg); }
.nav-2:hover, .nav-2:focus-visible, .nav-2.active { background-image: url(/images/intro/mnu02se.jpg); }
.nav-3:hover, .nav-3:focus-visible, .nav-3.active { background-image: url(/images/intro/mnu03se.jpg); }
.nav-4:hover, .nav-4:focus-visible, .nav-4.active { background-image: url(/images/intro/mnu04se.jpg); }
/* โหลดภาพตอน hover ไว้ก่อน (แทน MM_preloadImages เดิม) */
body::after {
  content: url(/images/intro/mnu01se.jpg) url(/images/intro/mnu02se.jpg) url(/images/intro/mnu03se.jpg) url(/images/intro/mnu04se.jpg);
  position: absolute; width: 0; height: 0; overflow: hidden; z-index: -1;
}

/* ---------- เวลาเปิด–ปิด ---------- */
.hours { list-style: none; margin: 0; padding: 0; }
.hours li { line-height: 19px; }
.hours img { margin: 0 5px; vertical-align: middle; }
.hours .slot { white-space: nowrap; }
.hours .closed, .hours .closed b { color: #C00; }
.bul-list { list-style: none; margin: 0; padding: 0; }
.bul-list li { line-height: 19px; }
.bul-list img { margin: 0 5px; vertical-align: middle; }

/* ---------- ปุ่มจองโต๊ะ / แถบล่างมือถือ ---------- */
.book-btn {
  position: fixed; top: 0; right: 0; z-index: 50;
  background: #4F4B2E; color: #F3F1D9 !important; padding: 9px 18px 10px;
  font: bold 13px "Trebuchet MS", Arial, sans-serif; letter-spacing: .3px;
  border-radius: 0 0 0 12px; box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.book-btn:hover { background: #7A6933; }
.mobile-bar { display: none; }

/* ---------- ฟอร์ม ---------- */
.form-ok { background: #EEF5D6; border: 1px solid #BACA2C; color: #4F5E0B; padding: 8px 10px; margin: 0 0 8px; }
.form-errors { background: #FBE9E9; border: 1px solid #D88; color: #A00; padding: 4px 10px; margin: 0 0 8px; }
.form-errors ul { margin: 4px 0; padding-left: 16px; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(20, 18, 10, .88); display: flex; align-items: center; justify-content: center; padding: 48px 56px; }
.lb[hidden] { display: none; }
.lb figure { margin: 0; text-align: center; max-width: 100%; max-height: 100%; }
.lb img { max-width: 100%; max-height: calc(100vh - 130px); border: 6px solid #fff; box-shadow: 0 6px 30px rgba(0, 0, 0, .5); background: #fff; }
.lb figcaption { color: #eee; font: 13px "Trebuchet MS", Arial, sans-serif; margin-top: 8px; min-height: 1.2em; }
.lb button { position: absolute; background: rgba(255, 255, 255, .15); color: #fff; border: 0; cursor: pointer; font: 28px/1 Arial, sans-serif; width: 44px; height: 44px; border-radius: 50%; }
.lb button:hover { background: rgba(255, 255, 255, .3); }
.lb .lb-close { top: 10px; right: 10px; }
.lb .lb-prev { left: 8px; top: 50%; margin-top: -22px; }
.lb .lb-next { right: 8px; top: 50%; margin-top: -22px; }

/* ---------- รูปย่อ (กรอบขาว + เงา แบบเดิม) ---------- */
.thumb { display: inline-block; }
.thumb img { display: block; object-fit: cover; background: #fff; border: 3px solid #fff; outline: 1px solid #C9C9C9; box-shadow: 2px 3px 4px rgba(0, 0, 0, .3); }
.thumb:hover img { outline-color: #998D63; }

/* =====================================================================
   PC ≥ 1024px — ดีไซน์เดิม
   ===================================================================== */
@media (min-width: 1024px) {
  .hdr, .body-row, .contentbot, .ftr-band, .ftr-copy, .offer-strip, .home-info, .booking-widget { width: 1024px; margin-left: auto; margin-right: auto; }
  .hdr { display: flex; }
  .navbox { background: url(/images/intro/topbg2.jpg) no-repeat; height: 147px; padding-top: 45px; }

  /* หน้าแรก */
  .hdr-home .hdr-banner { width: 577px; height: 404px; background: url(/images/intro/topbg.jpg) no-repeat; }
  .hdr-home .hdr-banner img { display: block; }
  .hdr-home .hdr-right { width: 447px; }
  .hdr-home .hdr-pic2 { display: block; }
  .offer-strip { height: 55px; background: url(/images/intro/topoffer.jpg) no-repeat; }
  .home-info { display: flex; min-height: 132px; background: url(/images/intro/bgcontent.jpg) no-repeat; padding-top: 18px; }
  .home-info .m-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .home-lunch { margin-left: 137px; width: 360px; }
  .home-hours { width: 475px; }
  .home-lunch .more { margin: 6px 0 0 21px; }
  .booking-widget { display: flex; justify-content: center; }

  /* หน้าใน */
  .hdr-inner .edge-l { width: 62px; height: 275px; background: url(/images/left.jpg); }
  .hdr-inner .hdr-banner { width: 515px; height: 275px; }
  .hdr-inner .hdr-banner img { display: block; }
  .hdr-inner .hdr-right { width: 410px; }
  .hdr-inner .hdr-pic2 { display: flex; height: 128px; }
  .hdr-inner .hdr-pic2 img { display: block; }
  .edge-p2 { width: 25px; height: 128px; background: url(/images/right2.jpg); }
  .hdr-inner .edge-r { width: 37px; height: 275px; background: url(/images/right1.jpg); }

  .body-row { display: flex; align-items: stretch; }
  .edge-l2 { width: 62px; flex: none; background: url(/images/left2.jpg) no-repeat 0 0, url(/images/leftbg.jpg) repeat-y 0 0; }
  .edge-r2 { width: 62px; flex: none; background: url(/images/right3.jpg) no-repeat 0 0, url(/images/rightbg.jpg) repeat-y 0 0; }
  .content { width: 900px; background: #fff; min-height: 182px; }
  .contentbot { height: 34px; background: url(/images/contentbot.jpg) no-repeat; }

  /* ท้ายเว็บ */
  .ftr-band { height: 96px; background: url(/images/intro/bgbot.jpg) no-repeat; padding: 33px 0 0 105px; }
  .ftr-band p { margin: 0; }
  .ftr-welcome, .ftr-nap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ftr-copy { text-align: right; padding: 0 73px 20px 0; color: #585858; }
  .ftr-copy p { margin: 0; }
  .ftr-copy .c1 { color: #504A30; }
  .ftr-copy .c2 { color: #7A6933; }
  .ftr-copy small, .ftr-copy small a { font-size: 10px; color: #999; }

  /* ---------- หน้าเมนู ---------- */
  .menu-layout { display: flex; }
  .menu-side { width: 235px; flex: none; padding-bottom: 20px; }
  .side-hd { display: block; }
  .mgroup { margin: 14px 16px 0; border: 1px solid #DDD; padding: 12px 0 10px; }
  .mgroup.first { margin-top: 0; border-top: 0; padding-top: 4px; }
  .mgroup-name { display: flex; align-items: center; margin: 0 0 4px; font: 12px Tahoma, Verdana, sans-serif; color: #333; text-transform: uppercase; }
  .mgroup-name .sq { width: 22px; height: 10px; background: var(--gc); margin-right: 4px; }
  .mgroup ul { list-style: none; margin: 0; padding: 0; }
  .mgroup li a { display: flex; align-items: center; padding: 1px 0 1px 9px; font-size: 12px; color: #666; }
  .mgroup li a img { margin-right: 2px; }
  .mgroup li a span { padding: 2px 3px; }
  .mgroup li a:hover span, .mgroup li a.current span { background: var(--gc); color: #fff; }
  .mgroup li.sub a { padding-left: 21px; }
  .mgroup .mheading { padding: 4px 0 1px 25px; font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: .5px; }

  .menu-main { width: 665px; padding-bottom: 30px; }
  .menu-bar { margin: 0; height: 34px; background-repeat: no-repeat; padding-left: 32px; font: 15px/34px "Trebuchet MS", Arial, sans-serif; color: #fff; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-body { width: 600px; margin: 0 auto; padding-top: 30px; }

  .mi { display: grid; grid-template-columns: 360px 140px 100px; grid-template-areas: "name price pic" "desc desc pic" "add add pic"; grid-template-rows: auto auto 1fr; margin: 0 0 20px; }
  .mi-pic { justify-self: center; }
  .mi-pic .thumb img { width: 67px; height: 50px; }
}

/* ---------- ส่วนที่ใช้ร่วมกันทุกขนาดจอ (หน้าเมนู) ---------- */
.mi-name { grid-area: name; display: flex; align-items: center; margin: 0; font: bold 12px Tahoma, Verdana, sans-serif; color: var(--gt); }
.mi-no { flex: none; width: 25px; height: 25px; line-height: 25px; text-align: center; background: var(--gc); color: #fff; margin-right: 6px; }
.mi-no.none { background: none; }
.mi-name .spice { color: #C30; font-weight: normal; letter-spacing: -2px; white-space: nowrap; }
.mi-name .veg { color: #6A8A12; text-decoration: none; border: 0; }
.mi-desc { grid-area: desc; margin: 4px 0 0; }
.mi-addons { grid-area: add; margin: 3px 0 0; font-style: italic; color: #887; }
.mi-price { grid-area: price; align-self: center; padding-left: 8px; color: #555; }
.mi-price b { white-space: nowrap; }
.mi-price ul { list-style: none; margin: 0; padding: 0; }
.mi-pic { grid-area: pic; align-self: end; }

.group-intro, .section-note { text-align: center; font-size: 13px; font-weight: bold; color: #666; margin: 0 0 16px; }
.headline-prices { list-style: none; margin: 0 0 18px; padding: 0; text-align: center; font-size: 17px; font-weight: bold; color: #555; line-height: 1.3; }
.section-prices, .addons { background: #F7F4E6; border: 1px solid #E5DFC4; padding: 7px 10px; margin: 0 0 22px; font-size: 12px; }
.section-prices .sp-label, .addons h2 { font-weight: bold; color: #4F4B2E; margin: 0 6px 0 0; font-size: 12px; display: inline; }
.section-prices ul, .addons ul { display: inline; list-style: none; margin: 0; padding: 0; }
.section-prices li, .addons li { display: inline-block; margin: 0 12px 0 0; white-space: nowrap; }
.addons { margin: 6px 0 14px; }
.denote { background: #EFE9D3; color: #C30; font: bold 12px "Trebuchet MS", Arial, sans-serif; padding: 5px; margin: 14px 0 0; }
.allergy { font-size: 11px; color: #888; font-style: italic; margin: 14px 0 0; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; border-top: 1px dotted #DDD; padding-top: 10px; }
.pager a { font-size: 12px; }
.pager .next { margin-left: auto; }

/* ---------- แกลเลอรี ---------- */
.page-title { font: bold 16px "Trebuchet MS", Arial, sans-serif; color: #3A1C11; margin: 0 0 12px; text-transform: uppercase; }
.gallery-grid { list-style: none; margin: 0; padding: 0; }

/* ---------- ติดต่อ ---------- */
.contact-name { font: bold 18px Georgia, "Times New Roman", serif; color: #996; margin: 0; }
.contact-card address { font-style: normal; margin: 0 0 4px; }
.hours-box { background: #DAD5C2; padding: 5px; margin: 6px 0 10px; }
.hours-box h2 { margin: 0; font: bold 16px "Trebuchet MS", Arial, sans-serif; color: #996; }
.hours-box .hours li > img:first-child { margin-left: 0; }
.form-intro { margin: 0 0 6px; }
.frow { display: grid; grid-template-columns: 67px 1fr; gap: 6px; margin: 0 0 5px; align-items: start; }
.frow label { text-align: right; font-weight: bold; padding-top: 2px; }
.contact-form input, .contact-form textarea { width: 100%; font: 12px Tahoma, Verdana, sans-serif; color: #555; background: #F9E8EC; border: 1px solid #D6A3B0; padding: 2px 3px; }
.contact-form textarea { resize: vertical; }
.contact-form button { font: 13px Tahoma, Verdana, sans-serif; padding: 2px 8px; cursor: pointer; justify-self: start; }
.map-frame iframe { display: block; max-width: 100%; }

@media (min-width: 1024px) {
  .gallery-layout { display: flex; padding-bottom: 20px; }
  .gallery-side { width: 371px; flex: none; }
  .gallery-side img { display: block; }
  .gallery-main { width: 529px; padding: 14px 0 0 13px; }
  .gallery-grid { display: flex; flex-wrap: wrap; width: 500px; }
  .gallery-grid li { width: 100px; height: 78px; }
  .gallery-grid .thumb img { width: 77px; height: 57px; }

  .contact-layout { display: flex; }
  .contact-side { width: 371px; flex: none; background: url(/images/contact/hdtxt.jpg) no-repeat; padding: 71px 43px 24px 58px; }
  .contact-card { width: 270px; }
  .contact-map { width: 529px; padding: 25px 0 20px; }
  .contact-map p { width: 500px; margin: 0 0 10px; }
  .ggmap { display: block; margin-bottom: 4px; }
  .map-link { display: none; }
}

/* =====================================================================
   จอเล็ก < 1024px — คอลัมน์เดียว
   ===================================================================== */
@media (max-width: 1023.98px) {
  body { font-size: 14px; line-height: 1.55; background-size: 4px 1600px; background-repeat: repeat-x; }
  .edge, .edge-p2, .offer-strip, .contentbot, .side-hd, .gallery-side, .book-btn, .ggmap { display: none; }

  .hdr { display: flex; flex-direction: column; align-items: center; }
  .hdr-banner { width: 100%; text-align: center; }
  .hdr-banner img { display: block; width: 100%; max-width: 577px; height: auto; margin: 0 auto; }
  .hdr-right { width: 100%; }
  .hdr-pic2 { display: none; }
  .navbox { padding: 6px 8px 10px; }
  .mainnav { justify-content: center; gap: 2px; }
  .mainnav a { width: min(23vw, 102px); height: auto; aspect-ratio: 1 / 1; }

  .content, .home-main { display: block; background: #fff; padding: 14px 16px 24px; max-width: 760px; margin: 0 auto; box-shadow: 0 0 12px rgba(80, 75, 46, .12); }
  .body-row { display: block; }

  /* หน้าแรก */
  .home-info { display: grid; gap: 18px; }
  .m-title { font: 22px "Trebuchet MS", Arial, sans-serif; color: #4F4B2E; margin: 0 0 6px; border-bottom: 2px solid #E6E2C4; padding-bottom: 4px; }
  .home-lunch .bul-list li, .hours li { line-height: 1.9; }
  .home-hours .hours li:not(.closed) > b:first-child { display: block; }
  .home-hours .hours .slot:first-of-type img { margin-left: 0; }
  .home-lunch .more { margin: 6px 0 0; }
  .booking-widget { margin-top: 18px; overflow-x: auto; }

  /* ท้ายเว็บ */
  .ftr { text-align: center; padding: 18px 16px 84px; }
  .ftr p { margin: 0 0 6px; }
  .ftr-band .txt04 { font-size: 14px; }
  .ftr-welcome { font: italic 16px Georgia, serif; color: #4F4B2E; }
  .ftr-nap { margin-top: 10px !important; }
  .ftr-copy { color: #777; font-size: 12px; }
  .ftr-copy small { font-size: 11px; color: #999; }

  .mobile-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: #4F4B2E; box-shadow: 0 -2px 8px rgba(0, 0, 0, .25);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-bar a { flex: 1; text-align: center; color: #F3F1D9; font: bold 14px/1 "Trebuchet MS", Arial, sans-serif; padding: 16px 4px; border-left: 1px solid rgba(255, 255, 255, .15); }
  .mobile-bar a:first-child { border-left: 0; }

  /* หน้าเมนู: รายการหมวดเป็นแถบเลื่อนแนวนอน */
  .menu-side { margin: 0 -16px 12px; }
  .mgroup { padding: 4px 16px; }
  .mgroup-name { display: flex; align-items: center; margin: 0 0 4px; font: bold 12px Tahoma, Verdana, sans-serif; color: #444; text-transform: uppercase; letter-spacing: .5px; }
  .mgroup-name .sq { width: 16px; height: 10px; background: var(--gc); margin-right: 6px; }
  .mgroup ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 2px 0 8px; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .mgroup li { flex: none; }
  .mgroup li a { display: block; border: 1px solid #D9D5BC; border-radius: 18px; padding: 6px 12px; font-size: 14px; color: #555; background: #fff; white-space: nowrap; }
  .mgroup li a img { display: none; }
  .mgroup li a.current { background: var(--gc); border-color: var(--gc); color: #fff; }
  .mgroup .mheading { align-self: center; font-size: 11px; color: #999; text-transform: uppercase; padding: 0 0 0 4px; }

  .menu-bar { margin: 0 -16px; padding: 9px 16px; background-size: cover; background-color: var(--gc); color: #fff; font: 17px/1.3 "Trebuchet MS", Arial, sans-serif; text-transform: uppercase; }
  .menu-body { padding-top: 16px; }
  .mi { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name price" "desc pic" "add pic"; column-gap: 10px; padding: 12px 0; border-bottom: 1px solid #F0EDE0; }
  .mi-name { font-size: 15px; align-items: flex-start; }
  .mi-no { width: 26px; height: 26px; line-height: 26px; font-size: 13px; }
  .mi-no.none { display: none; }
  .mi-title { padding-top: 2px; }
  .mi-price { align-self: start; padding-top: 3px; text-align: right; font-size: 14px; }
  .mi-desc { font-size: 14px; color: #666; }
  .mi-pic { align-self: start; margin-top: 6px; }
  .mi-pic .thumb img { width: 96px; height: 72px; }
  .headline-prices { font-size: 18px; }
  .section-prices, .addons { font-size: 14px; }
  .section-prices .sp-label, .addons h2 { display: block; font-size: 14px; margin-bottom: 2px; }
  .section-prices li, .addons li { display: flex; justify-content: space-between; margin: 0; padding: 2px 0; border-bottom: 1px dotted #E5DFC4; }
  .section-prices li:last-child, .addons li:last-child { border-bottom: 0; }
  .denote { font-size: 13px; }
  .allergy { font-size: 13px; }
  .pager a { font-size: 14px; padding: 6px 0; }

  /* แกลเลอรี */
  .page-title { font-size: 20px; }
  .gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .gallery-grid .thumb { display: block; }
  .gallery-grid .thumb img { width: 100%; height: auto; aspect-ratio: 4 / 3; }

  /* ติดต่อ */
  .contact-layout { display: grid; gap: 20px; }
  .contact-name { font-size: 22px; }
  .hours-box { padding: 10px 12px; }
  .frow { grid-template-columns: 1fr; gap: 2px; margin-bottom: 10px; }
  .frow label { text-align: left; }
  .frow > span { display: none; }
  .contact-form input, .contact-form textarea { font-size: 16px; padding: 8px; }
  .contact-form button { font-size: 16px; padding: 10px 28px; background: #4F4B2E; color: #fff; border: 0; border-radius: 4px; }
  .map-frame iframe { width: 100%; height: 320px; }
}

/* =====================================================================
   PC: ขยายตัวหนังสือให้อ่านง่าย (ร้านขอ 2026-12-05) — ต้องอยู่ท้ายไฟล์เพื่อทับค่าด้านบน
   ===================================================================== */
@media (min-width: 1024px) {
  body { font-size: 13px; }
  .txt04 { font-size: 14px; }
  .mi-name { font-size: 14px; }
  .mgroup-name, .mgroup li a { font-size: 14px; }
  .mgroup .mheading { font-size: 12px; }
  .group-intro, .section-note { font-size: 15px; }
  .section-prices, .addons, .section-prices .sp-label, .addons h2 { font-size: 14px; }
  .denote { font-size: 14px; }
  .allergy { font-size: 13px; }
  .pager a { font-size: 14px; }
  .contact-form input, .contact-form textarea { font-size: 14px; }
  .frow { grid-template-columns: 82px 1fr; }
  .contact-form .frow label { white-space: nowrap; }
  .hours li, .bul-list li { line-height: 21px; }
  .ftr-copy small, .ftr-copy small a { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
