/* สำรอง IBM Plex Sans Thai จากไฟล์ในปลั๊กอิน: เบราว์เซอร์จะดาวน์โหลดเฉพาะเมื่อธีมไม่ได้โหลด "IBM Plex Sans Thai" ไว้ (ถ้าธีมมีแล้วใช้ของธีม ไม่โหลดซ้ำ) */
@font-face { font-family: "TD Plex Thai"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-thai-thai-600-normal.woff2) format("woff2"); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "TD Plex Thai"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-thai-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "TD Plex Thai"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-thai-thai-700-normal.woff2) format("woff2"); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "TD Plex Thai"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-thai-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
.td-search, .td-single { --td-accent: #f26a1b; --td-bg: #fff; --td-soft: #f3f3f3; --td-line: #e3e3e3; --td-text: #1c2b4a; font-size: 14px; font-weight: 400; line-height: 1.6; }
/* ขนาดตัวอักษรอื่นในหน้าทัวร์/ตัวกรองใช้ em = สัดส่วนจากฐาน 14px นี้ */
.td-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; margin: 0 0 24px; padding: 16px; background: var(--td-soft); border-radius: 12px; }
.td-form label { display: grid; gap: 4px; font-size: 1em; color: #555; }
.td-form select, .td-form input { padding: 8px 10px; border: 1px solid var(--td-line); border-radius: 8px; font: inherit; }
.td-picker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.td-picker select { padding: 8px 10px; border: 1px solid var(--td-line, #e3e3e3); border-radius: 8px; font: inherit; min-width: 160px; }
.td-search > .td-picker { margin: 0 0 16px; }
.td-field { display: grid; gap: 4px; font-size: 1em; color: #555; }
.td-btn { display: inline-block; padding: 10px 22px; background: var(--td-accent); color: #fff !important; border: 0; border-radius: 999px; font-weight: 600; text-decoration: none; cursor: pointer; }
.td-count, .td-empty { color: #666; }
.td-list { display: grid; gap: 24px; }
.td-card { background: var(--td-bg); border: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 2px 12px rgba(0, 0, 0, .06); }
.td-card__top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px; }
@media (min-width: 720px) { .td-card__top { grid-template-columns: 280px minmax(0, 1fr); } }
.td-card__img img { display: block; width: 100%; height: auto; border-radius: 6px; }
.td-card__title { margin: 0 0 10px; font-size: 1.35em; line-height: 1.35; color: var(--td-text); }
.td-card__title a { color: inherit; text-decoration: none; }
.td-card__meta { list-style: none; margin: 0 0 14px; padding: 0; color: #666; line-height: 1.8; }
.td-card__stats { display: flex; gap: 0; background: var(--td-soft); border-radius: 12px; }
.td-card__stats > div { flex: 1; padding: 12px 14px; text-align: center; border-left: 1px solid var(--td-line); }
.td-card__stats > div:first-child { border-left: 0; }
.td-card__stats span { display: block; font-size: .9em; color: #777; }
.td-card__stats b { color: var(--td-text); overflow-wrap: anywhere; }
.td-months { width: calc(100% - 40px); margin: 0 20px 16px; border-collapse: collapse; }
.td-single .td-months, .td-card__info .td-months { width: 100%; margin: 0 0 16px; }
.td-card__info .td-months { margin: 14px 0 0; }
/* ตารางวันเดินทาง: เส้นแนวนอนอย่างเดียว (ล้างกรอบ/เส้นแนวตั้งที่ธีมใส่ให้ตาราง) */
.td-months, .td-months tr, .td-months th, .td-months td { border: 0; background: none; }
.td-months th, .td-months td { padding: 6px 10px; text-align: left; border-top: 1px solid var(--td-line); vertical-align: middle; }
.td-months thead th { color: #666; font-weight: 600; }
.td-months tbody th { color: #666; font-weight: 600; }
/* คอลัมน์เดือน: กว้างพอดีคำ "เดือน" และจัดกึ่งกลาง */
.td-months tr > :first-child { width: 1%; white-space: nowrap; text-align: center; padding-left: 12px; padding-right: 12px; }
.td-chip { display: inline-block; margin: 2px 6px 2px 0; padding: 1px 8px; background: #efefef; border-radius: 4px; color: #666; font-size: 12px; line-height: 1.6; }
.td-more { text-align: center; }
.td-card__foot { display: flex; justify-content: flex-end; gap: 16px; align-items: center; padding: 14px 20px; background: #fff0e4; }
.td-card__foot b { color: var(--td-accent); font-size: 1.6em; }
.td-pages { display: flex; justify-content: center; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.td-pages a, .td-pages span { padding: 6px 12px; border: 1px solid var(--td-line); border-radius: 8px; text-decoration: none; }
.td-pages .current { background: var(--td-accent); color: #fff; border-color: var(--td-accent); }

/* ---- ตัวกรองด้านข้าง ---- */
.td-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 900px) { .td-layout { grid-template-columns: 280px minmax(0, 1fr); } }
/* กล่องตัวกรอง: การ์ดสีขาว ขอบมนแบบเดียวกับการ์ดโปรแกรม */
.td-side { padding: 20px; background: #fff; border: 0; border-radius: 20px; box-shadow: 0 2px 12px rgba(0, 0, 0, .06); }
.td-filters { display: grid; gap: 22px; }
.td-group { margin: 0; padding: 0; border: 0; min-width: 0; }
/* เส้นคั่นระหว่างกลุ่มตัวกรอง อยู่กึ่งกลางช่องว่าง 22px
   ใช้เส้นล่าง เพราะเส้นบนของ fieldset จะถูกวาดทับหัวข้อ (legend) */
.td-filters > .td-group { border-bottom: 1px solid #e3e3e3; padding-bottom: 22px; }
.td-group legend, .td-legend { padding: 0; margin: 0 0 8px; /* ธีมดึง legend ไปทางซ้าย -15px */ font-size: 1.25em; font-weight: 600; color: #333; }
.td-group ul { list-style: none; margin: 0; padding: 0; }
.td-opt label { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 1em; font-weight: 400; color: #555; }
.td-opt input { width: 18px; height: 18px; flex: none; accent-color: var(--td-accent, #f26a1b); }
.td-opt__label { flex: 1; min-width: 0; }
.td-opt__n { color: #666; font-weight: 400; }
.td-opt--extra { display: none; }
.td-expanded .td-opt--extra { display: list-item; }
.td-more-toggle { display: block; margin: 8px auto 0; background: none; border: 0; color: var(--td-accent, #f26a1b); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.td-stars { color: #666; letter-spacing: 3px; }
.td-date { display: grid; gap: 4px; margin-bottom: 8px; font-size: 1em; color: #555; }
.td-date input { padding: 8px 10px; border: 1px solid var(--td-line, #e3e3e3); border-radius: 8px; font: inherit; }
.td-actions { display: flex; gap: 14px; align-items: center; }
.td-reset, a.td-back { color: var(--td-accent, #f26a1b); text-decoration: underline; text-underline-offset: 3px; }
.td-back { margin: 0; }
.td-range__labels { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 1.05em; color: #333; }
.td-range__track { position: relative; height: 34px; }
.td-range__track::before { content: ""; position: absolute; left: 10px; right: 10px; top: 14px; height: 6px; border-radius: 3px;
	/* ช่วงที่เลือก (ระหว่าง 2 หัว) สีส้ม นอกช่วงเทาอ่อน; --lo/--hi = 0..1 ตั้งจาก td-filters.js (หัวกว้าง 26px จึงชดเชย 3px) */
	--a: calc(3px + (100% - 6px) * var(--lo, 0)); --b: calc(3px + (100% - 6px) * var(--hi, 1));
	background: linear-gradient(to right, #e3e3e3 var(--a), var(--td-accent, #f26a1b) var(--a), var(--td-accent, #f26a1b) var(--b), #e3e3e3 var(--b)); }
.td-range__track input { position: absolute; left: 0; top: 0; width: 100%; height: 34px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.td-range__track input::-webkit-slider-runnable-track { background: none; height: 34px; }
.td-range__track input::-moz-range-track { background: none; height: 34px; }
.td-range__track input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 26px; height: 26px; margin-top: 4px; border-radius: 50%; border: 1px solid #ccc; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); cursor: pointer; }
.td-range__track input::-moz-range-thumb { pointer-events: auto; width: 24px; height: 24px; border-radius: 50%; border: 1px solid #ccc; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); cursor: pointer; }

/* ขยายพื้นที่ค้นหาให้กว้างกว่าคอลัมน์เนื้อหาของธีม (ธีมแบบบล็อกจำกัดความกว้างไว้แคบ) */
.td-search { position: relative; width: min(1200px, calc(100vw - 32px)); max-width: none; margin-left: calc(50% - min(600px, 50vw - 16px)); /* ไม่ใช้ transform เพราะจะทำให้ป๊อปอัปตัวกรอง (position: fixed) ไม่เต็มจอ */ }

/* ---- กล่องค้นหาหน้าแรก [tour_home_search] ---- */
.td-home { --td-line: #e3e3e3; display: grid; gap: 12px; max-width: 720px; margin: 0 auto; color: #1c2b4a; }
.td-home__dest { position: relative; display: flex; align-items: center; gap: 14px; padding: 0 18px; background: #fff; border-radius: 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.td-home__ico { flex: none; color: #111; }
.td-home__input { flex: 1; min-width: 0; padding: 20px 0; border: 0; outline: 0; background: none; font: inherit; font-size: 1.15rem; color: #222; }
.td-home__input::placeholder, .td-home__date input::placeholder { color: #999; opacity: 1; }
.td-home__list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px 0; list-style: none; background: #fff; border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); max-height: 320px; overflow: auto; }
.td-home__list[hidden] { display: none; }
.td-home__list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 18px; cursor: pointer; color: #222; }
.td-home__list li small { color: #888; }
.td-home__list li.is-active, .td-home__list li[role="option"]:hover { background: #fff0e4; }
.td-home__list b { color: var(--td-accent, #f26a1b); }
.td-home__none { color: #888; cursor: default !important; }
.td-home__label { font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.td-home__dates { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); overflow: hidden; }
.td-home__date { display: flex; align-items: center; gap: 12px; padding: 0 14px; cursor: pointer; }
.td-home__date + .td-home__date { border-left: 1px solid var(--td-line); }
.td-home__tag { flex: none; font-weight: 600; }
.td-home__date input { flex: 1; min-width: 0; padding: 20px 0; border: 0; outline: 0; background: none; font: inherit; font-size: 1.05rem; color: #222; }
.td-home__go { justify-self: center; min-width: 200px; text-align: center; }
@media (max-width: 480px) { .td-home__dates { grid-template-columns: 1fr; } .td-home__date + .td-home__date { border-left: 0; border-top: 1px solid var(--td-line); } }
.td-logo { height: 18px; width: auto; vertical-align: middle; margin-right: 6px; }
.td-opt__label .td-logo { margin-right: 8px; }

/* ตัวแสดง PDF ในหน้าโปรแกรมเดี่ยว */
.td-pdf { margin: 0 0 16px; border: 1px solid var(--td-line, #e3e3e3); border-radius: 12px; overflow: hidden; background: #f3f3f3; }
.td-pdf iframe { display: block; width: 100%; height: 85vh; min-height: 480px; border: 0; }

/* ปฏิทินเลือกช่วงวัน (หน้าแรก) */
.td-home__range { position: relative; }
.td-home__show { cursor: pointer; }
.td-home__cal { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); padding: 20px 22px 14px; background: #fff; border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, .25); }
.td-home__cal[hidden] { display: none; }
.td-cal__months { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.td-cal__title { text-align: center; font-weight: 700; font-size: 1.1rem; line-height: 32px; margin-bottom: 8px; }
.td-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; text-align: center; }
.td-cal__dow { font-size: .85rem; color: #6b7280; padding-bottom: 6px; }
.td-cal__nav { position: absolute; top: 18px; width: 36px; height: 36px; padding: 0; border: 0; background: none; font-size: 1.5rem; line-height: 1; color: #1c2b4a; cursor: pointer; }
.td-cal__nav:disabled { color: #c3c8cf; cursor: default; }
.td-cal__prev { left: 18px; }
.td-cal__next { right: 18px; }
.td-cal__day { height: 42px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; font: inherit; color: #1c2b4a; cursor: pointer; }
.td-cal__day:hover:not(:disabled) { background: #eef0f4; }
.td-cal__day.is-off { color: #b8bec7; text-decoration: line-through; cursor: default; }
.td-cal__day.is-today { border-color: #7b8190; }
.td-cal__day.is-in { background: #e8ebf0; border-radius: 0; }
.td-cal__day.is-start, .td-cal__day.is-end { background: #1c2b4a; color: #fff; }
.td-cal__day.is-start.has-range { border-radius: 8px 0 0 8px; }
.td-cal__day.is-end { border-radius: 0 8px 8px 0; }
.td-cal__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid #eceff3; font-size: .9rem; color: #6b7280; }
.td-cal__clear { border: 0; background: none; font: inherit; color: var(--td-accent, #f26a1b); cursor: pointer; text-decoration: underline; }
.td-cal__clear[hidden] { display: none; }
@media (max-width: 640px) {
	.td-cal__months { grid-template-columns: 1fr; }
	.td-cal__month + .td-cal__month { display: none; }
	.td-home__cal { padding: 16px 12px 12px; }
	.td-cal__nav { top: 14px; }
}
/* ตัวกรองที่ใช้ (เหนือรายการทัวร์) */
.td-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 16px; padding: 0; background: none; }
.td-active__label { font-weight: 700; color: var(--td-text, #1c2b4a); margin-right: 2px; }
.td-active__chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: #fff; border-radius: 8px; color: var(--td-text, #1c2b4a); font-weight: 600; text-decoration: none; line-height: 1.4; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.td-active__chip svg { flex: none; color: #555; }
.td-active__chip:hover { color: var(--td-text, #1c2b4a); box-shadow: 0 0 0 1px var(--td-line, #e3e3e3); }
.td-active__chip:hover svg { color: #d63638; }
.td-active__clear { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; color: var(--td-text, #1c2b4a); font-weight: 600; }
.td-active__clear span { text-decoration: underline; text-underline-offset: 3px; }
.td-active__clear:hover { color: #d63638; }
/* ปุ่มค้นหา: เดสก์ท็อป/แท็บเล็ตกรองทันทีที่เลือก จึงไม่ต้องมีปุ่ม (มีเฉพาะในป๊อปอัปมือถือ) */
.td-side__head, .td-ftoggle { display: none; }
@media (min-width: 768px) { .td-actions .td-btn { display: none; } }
/* มือถือ: ตัวกรองเป็นป๊อปอัปเต็มจอ เปิดด้วยปุ่มที่ติดด้านบน */
@media (max-width: 767px) {
	.td-ftoggle { position: sticky; top: 8px; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 0 0 14px; padding: 10px 16px; background: var(--td-accent, #f26a1b); border: 0; border-radius: 999px; box-shadow: 0 4px 14px rgba(242, 106, 27, .35); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
	.td-ftoggle__n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--td-accent, #f26a1b); font-size: 12px; font-weight: 700; }
	.td-side { display: none; position: fixed; inset: 0; z-index: 100000; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; overflow-y: auto; overscroll-behavior: contain; }
	.td-side.is-open { display: block; }
	.td-side__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--td-line, #e3e3e3); font-size: 1.15em; font-weight: 700; color: var(--td-text, #1c2b4a); }
	.td-side__close { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--td-soft, #f3f3f3); color: var(--td-text, #1c2b4a); font-size: 24px; line-height: 1; cursor: pointer; }
	.td-side .td-filters { padding: 16px 16px 0; }
	.td-side .td-actions { position: sticky; bottom: 0; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--td-line, #e3e3e3); }
	.td-side .td-actions .td-btn { flex: 1; text-align: center; }
	.td-noscroll, .td-noscroll body { overflow: hidden; }
}
@media (min-width: 601px) and (max-width: 767px) { .admin-bar .td-ftoggle { top: 54px; } }
.td-card__title, .td-group legend, .td-legend, .td-side__head, .td-btn { font-family: "IBM Plex Sans Thai", "TD Plex Thai", sans-serif; }
/* แถวบนของตัวกรอง: ซ้าย "ตัวกรอง" หรือ "‹ ดูทุกเมืองใน…", ขวา "ล้างตัวกรอง" (ยาวเกินจะขึ้นบรรทัดใหม่ ไม่ซ้อนกัน) */
.td-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.td-top__title { font-family: "IBM Plex Sans Thai", "TD Plex Thai", sans-serif; font-size: 1.25em; font-weight: 600; color: #333; }
.td-top .td-reset { margin-left: auto; white-space: nowrap; }
@media (min-width: 768px) { .td-actions { display: none; } }
/* มือถือ: ป๊อปอัปมีหัว "ตัวกรอง" และปุ่มล้างด้านล่างอยู่แล้ว แถวบนเหลือแค่ลิงก์ดูทุกเมือง */
@media (max-width: 767px) { .td-top__title, .td-top .td-reset { display: none; } .td-top:not(:has(.td-back)) { display: none; } }
/* เส้นคั่น: ใต้แถวบน (ตัวกรอง / ล้างตัวกรอง) แทนเส้นใต้กลุ่มสุดท้าย */
.td-top { border-bottom: 1px solid #e3e3e3; padding-bottom: 16px; }
.td-filters > .td-group:has(+ .td-actions) { border-bottom: 0; padding-bottom: 0; }

/* ---------- หน้ารายละเอียด: ส่วนหัว ---------- */
.single-td_tour .hero-section { display: none; } /* ใช้ชื่อในส่วนหัวของเราแทนหัวเรื่องของธีม */
.td-hero { display: grid; gap: 24px 40px; margin: 0 0 32px; padding: 20px; background: #fff; border-radius: 20px; box-shadow: 0 4px 24px rgba(0, 0, 0, .06); color: #1c2b4a; font-size: 15px; }
@media (min-width: 900px) { .td-hero { grid-template-columns: minmax(0, 46%) minmax(0, 1fr); padding: 40px; } }
.td-hero__img img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
.td-hero__info { display: flex; flex-direction: column; min-width: 0; }
.td-hero__title { margin: 0 0 12px; font-family: "IBM Plex Sans Thai", "TD Plex Thai", sans-serif; font-size: clamp(1.35rem, 1rem + 1vw, 1.7rem); font-weight: 700; line-height: 1.4; color: #1c2b4a; }
.td-hero__sub { margin: 0; color: #444; line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.td-hero__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin: 18px 0 20px; padding-top: 18px; border-top: 1px solid #e3e3e3; }
.td-hero__code { display: inline-flex; align-items: center; gap: 8px; font-size: 1.05em; }
.td-hero__price { margin-left: auto; white-space: nowrap; }
.td-hero__price b { font-size: 2.1em; font-weight: 700; line-height: 1; color: var(--td-accent, #f26a1b); vertical-align: -.08em; margin-left: 4px; }
.td-hero__stats { display: flex; margin: 0 0 24px; padding: 22px 8px; background: #f3f6fb; border-radius: 18px; }
.td-hero__stats > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 8px; text-align: center; min-width: 0; }
.td-hero__stats > div + div { border-left: 1px solid #dde3ec; }
.td-hero__stats span { color: #888; font-family: "IBM Plex Sans Thai", "TD Plex Thai", sans-serif; font-weight: 600; }
.td-hero__stats b { font-weight: 700; overflow-wrap: anywhere; }
.td-hero__stats .td-logo { height: 26px; width: auto; vertical-align: middle; }
.td-hero__stars { color: #f5b301; font-size: 1.4em; letter-spacing: 2px; line-height: 1; }
.td-hero__btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 10px 16px; border-radius: 12px; color: #fff !important; text-decoration: none !important; font-family: "IBM Plex Sans Thai", "TD Plex Thai", sans-serif; font-size: 1.1em; font-weight: 700; transition: filter .15s; }
.td-hero__btn:hover { filter: brightness(1.08); }
.td-hero__btn--pdf { background: #c50000; margin-bottom: 14px; }
.td-hero__contact { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.td-hero__btn--line { background: #06c755; }
.td-hero__btn--tel { background: #ff7f0a; }
@media (max-width: 480px) {
	.td-hero__contact { grid-template-columns: 1fr; gap: 10px; }
	.td-hero__stats { padding: 16px 4px; }
	.td-hero__stats > div { padding: 0 4px; font-size: .92em; }
}
/* หน้ารายละเอียด: เนื้อหากว้างไม่เกิน 1000px (ส่วนหัว, ตารางวันเดินทาง, PDF, เนื้อหาที่กรอกเอง) */
.single-td_tour .entry-content > * { max-width: 1000px; margin-left: auto; margin-right: auto; }
/* หน้ารายละเอียด: ตารางรอบเดินทางเต็ม */
.td-periods { width: 100%; margin: 0 0 24px; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 24px rgba(0, 0, 0, .06); font-size: 15px; color: #1c2b4a; }
.td-periods th, .td-periods td { padding: 14px 20px; text-align: center; border: 0; border-bottom: 1px solid #e3e3e3; }
.td-periods th:first-child, .td-periods td:first-child { text-align: left; }
.td-periods thead th { background: #fff0e4; font-family: "IBM Plex Sans Thai", "TD Plex Thai", sans-serif; font-weight: 600; color: #333; }
.td-periods tbody tr:last-child td { border-bottom: 0; }
.td-periods__price { font-weight: 700; color: var(--td-accent, #f26a1b); }
.td-periods__ask { color: #888; font-weight: 400; }
@media (max-width: 480px) {
	.td-periods { font-size: 13.5px; }
	.td-periods th, .td-periods td { padding: 12px 10px; }
}
/* ตารางรอบเดินทางอยู่ในการ์ดส่วนหัว: เต็มความกว้างใต้รูป + ข้อมูล */
.td-hero > .td-periods { grid-column: 1 / -1; margin: 8px 0 0; box-shadow: none; border: 1px solid #e3e3e3; }
.td-periods th, .td-periods td:not(:first-child) { white-space: nowrap; }
@media (max-width: 480px) { .td-hero > .td-periods th, .td-hero > .td-periods td { padding: 12px 8px; } }
/* PDF ต่อจากตารางในการ์ดเดียวกัน */
.td-hero > .td-pdf { grid-column: 1 / -1; margin: 8px 0 0; }
/* ตาราง 4 คอลัมน์: มือถือย่อระยะ */
@media (max-width: 600px) {
	.td-hero > .td-periods { font-size: 13px; }
	.td-hero > .td-periods th, .td-hero > .td-periods td { padding: 10px 6px; }
	.td-hero > .td-periods th { white-space: normal; }
}

/* ---------- หน้าปลายทาง: บทความท้ายหน้า (ใต้ pagination) ---------- */
.td-dest-article { width: min(1200px, calc(100vw - 32px)); max-width: none; margin: 48px 0 0 calc(50% - min(600px, 50vw - 16px)); padding: 32px 40px; background: #fff; border-radius: 20px; box-shadow: 0 4px 24px rgba(0, 0, 0, .06); line-height: 1.8; }
.td-dest-article > :first-child { margin-top: 0; }
.td-dest-article > :last-child { margin-bottom: 0; }
.td-dest-article h2, .td-dest-article h3 { font-family: "IBM Plex Sans Thai", "TD Plex Thai", sans-serif; font-weight: 700; line-height: 1.5; margin: 1.6em 0 .6em; }
.td-dest-article img { max-width: 100%; height: auto; border-radius: 12px; }
@media (max-width: 767px) { .td-dest-article { padding: 24px 18px; margin-top: 32px; } }
/* หน้าปลายทาง (template ของปลั๊กอิน): หัวข้อ + ข้อความด้านบน ให้ตรงแนวเดียวกับรายการโปรแกรม */
.td-archive > .page-header { width: min(1200px, calc(100vw - 32px)); margin: 32px 0 24px calc(50% - min(600px, 50vw - 16px)); }
.td-archive > .page-header .page-title { margin: 0 0 12px; font-family: "IBM Plex Sans Thai", "TD Plex Thai", sans-serif; font-weight: 700; }
.td-archive .archive-description { color: #444; line-height: 1.8; }
.td-archive .archive-description > :last-child { margin-bottom: 0; }

/* ที่ว่าง + เวลาอัปเดต ในตารางวันเดินทาง */
.td-seat { font-weight: 600; white-space: nowrap; }
.td-seat--ok { color: #1a8a4a; }
.td-seat--full { color: #c50000; }
.td-seat--wait { color: #b26a00; }
.td-periods__updated { grid-column: 1 / -1; margin: -2px 0 8px; font-size: 12.5px; color: #888; text-align: right; }
.td-hero > .td-periods { margin-bottom: 4px; }

/* มือถือ: ตารางวันเดินทางเหลือ วันเดินทาง | ราคา | ที่ว่าง (ซ่อนพักเดี่ยว/ขนาดกรุ๊ป) */
@media (max-width: 600px) {
	.td-periods th:nth-child(3), .td-periods td:nth-child(3),
	.td-periods th:nth-child(4), .td-periods td:nth-child(4) { display: none; }
	.td-hero > .td-periods { font-size: 14px; }
	.td-hero > .td-periods th, .td-hero > .td-periods td { padding: 12px 10px; }
	.td-hero > .td-periods th { white-space: nowrap; }
}

/* Breadcrumb */
.td-crumbs { display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; margin: 0 0 14px; font-size: 16px; font-weight: 500; color: #687279; line-height: 1.5; }
.td-crumbs__item { display: inline-flex; align-items: center; }
.td-crumbs a { color: #ff7700; text-decoration: none; display: inline-flex; align-items: center; }
.td-crumbs a:hover { text-decoration: underline; }
.td-crumbs__sep { margin: 0 10px; color: #687279; flex: none; }
.td-crumbs__home { display: block; }
.td-crumbs .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 600px) { .td-crumbs { font-size: 14px; } .td-crumbs__sep { margin: 0 7px; } }
