/* ===================================================================
   Tour detail page — shared styles (AA Inter Tour)
   ใช้ร่วมกับ style.css (ต้องโหลด style.css ก่อน เพื่อใช้ตัวแปรสี/ฟอนต์)
=================================================================== */
:root{ --line: #e6ecf4; }

/* หน้า detail วางบนพื้นขาวสะอาด (ไม่ใช้ backdrop น้ำเงินของหน้าแรก)
   style.css ตั้ง body background:#0F2F63 + overlay เบลอ/เกรเดียนต์ — ปิดบนหน้านี้ */
body { background: #fff; }
body::before, body::after { display: none !important; }

/* ===== HERO ===== */
.tdh { position: relative; min-height: 460px; display: flex; align-items: center; overflow: hidden; }
.tdh-bg { position: absolute; inset: 0; z-index: -2; }
.tdh-bg img { width: 100%; height: 100%; object-fit: cover; }
.tdh::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.2) 50%, rgba(0,0,0,.45) 100%); }
.tdh .container { padding-top: 104px; padding-bottom: 64px; text-align: center; }
.tdh-crumb { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: .82rem; color: rgba(255,255,255,.8); margin-bottom: 16px; }
.tdh-crumb a { color: rgba(255,255,255,.8); text-decoration: none; }
.tdh-crumb a:hover { color: #fff; }
.tdh-crumb .sep { opacity: .5; }
.tdh h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; color: #fff; line-height: 1.12; margin-bottom: 14px; text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.tdh h1 em { font-style: normal; color: var(--amber); }
.tdh-lead { max-width: 580px; color: rgba(255,255,255,.9); font-size: 1rem; line-height: 1.75; margin: 0 auto 22px; }
.tdh-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tdh-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 50px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(8px);
  color: #fff; font-size: .82rem; font-weight: 500; white-space: nowrap; }
.tdh-pill svg { width: 16px; height: 16px; fill: var(--amber); }
@media (max-width: 560px){
  .tdh-pills { flex-wrap: nowrap; gap: 6px; }
  .tdh-pill { padding: 7px 12px; font-size: .72rem; gap: 5px; }
  .tdh-pill svg { width: 14px; height: 14px; }
}
.tdh-wave { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 0; line-height: 0; }
.tdh-wave svg { width: 100%; height: 60px; display: block; }

/* ===== LAYOUT ===== */
.td-sec { padding: 54px 0 70px; }
.td-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
@media (max-width: 960px){ .td-layout { grid-template-columns: 1fr; } }

.td-h { font-size: 1.5rem; font-weight: 700; color: var(--ink); margin-bottom: 20px; position: relative; padding-left: 16px; }
.td-h::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 5px; border-radius: 4px; background: linear-gradient(var(--orange), var(--amber)); }
.td-block { margin-bottom: 44px; }
.td-block:last-child { margin-bottom: 0; }
.td-intro { color: var(--muted); line-height: 1.85; font-size: .98rem; }

/* Places grid */
.td-places { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px){ .td-places { grid-template-columns: 1fr; } }
.td-place { display: flex; align-items: flex-start; gap: 15px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.td-place:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--orange); }
.td-place .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--orange-50); display: grid; place-items: center; flex-shrink: 0; }
.td-place .ico svg { width: 24px; height: 24px; fill: var(--orange); }
.td-place b { display: block; font-size: 1rem; font-weight: 600; color: var(--ink); line-height: 1.3; margin-bottom: 2px; }
.td-place span { font-size: .8rem; color: var(--muted); line-height: 1.55; }

/* Optional add-ons */
.td-opt { display: flex; flex-direction: column; gap: 12px; }
.td-opt-item { display: flex; align-items: flex-start; gap: 14px; background: linear-gradient(135deg, var(--orange-50), #fff); border: 1px dashed rgba(var(--orange-rgb), .45); border-radius: 14px; padding: 16px 18px; }
.td-opt-item .oi { flex: 1; }
.td-opt-item b { font-size: .95rem; font-weight: 600; color: var(--ink); }
.td-opt-item span { display: block; font-size: .8rem; color: var(--muted); line-height: 1.55; margin-top: 3px; }
.td-opt-item .fee { background: var(--orange); color: #fff; font-size: .8rem; font-weight: 600; padding: 6px 13px; border-radius: 50px; white-space: nowrap; flex-shrink: 0; }

/* Timeline */
.td-time { position: relative; padding-left: 38px; }
.td-time::before { content: ""; position: absolute; left: 11px; top: 10px; bottom: 10px; width: 2px; border-left: 2px dashed rgba(var(--orange-rgb), .45); }
.td-step { position: relative; padding-bottom: 28px; }
.td-step:last-child { padding-bottom: 0; }
.td-step .dot { position: absolute; left: -38px; top: 0; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--orange); box-shadow: 0 0 0 4px rgba(var(--orange-rgb), .12); }
.td-when { display: inline-block; background: linear-gradient(135deg, var(--orange), var(--amber)); color: #fff; font-size: .68rem; font-weight: 600; letter-spacing: .04em; padding: 4px 12px; border-radius: 50px; margin-bottom: 8px; }
.td-step h3 { font-size: 1.05rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.td-step p { font-size: .9rem; color: var(--muted); line-height: 1.7; }
.td-step .meal { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--navy); background: var(--sand); padding: 3px 10px; border-radius: 50px; margin-top: 6px; }

/* Day divider (multi-day) */
.td-day { position: relative; margin: 4px 0 20px -38px; display: flex; align-items: center; gap: 12px; }
.td-day:not(:first-child) { margin-top: 14px; }
.td-day .badge { background: var(--navy); color: #fff; font-size: .82rem; font-weight: 700; padding: 7px 18px; border-radius: 50px; box-shadow: 0 8px 18px -8px rgba(26,74,154,.6); }
.td-day .sub { font-size: .82rem; color: var(--muted); }

/* Include / exclude */
.td-inc { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px){ .td-inc { grid-template-columns: 1fr; } }
.td-inc-col { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; }
.td-inc-col h3 { font-size: 1rem; font-weight: 600; margin-bottom: 16px; color: var(--ink); }
.td-inc-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.td-inc-col li { font-size: .9rem; color: var(--ink); line-height: 1.5; display: flex; align-items: flex-start; gap: 10px; }
.td-inc-col li svg { width: 20px; height: 20px; flex-shrink: 0; }
.td-inc-col.yes li svg { fill: #16a34a; }
.td-inc-col.no li svg { fill: #dc2626; }
.td-inc-col.no li { color: var(--muted); }
.td-note { margin-top: 18px; font-size: .82rem; color: var(--muted); line-height: 1.6; }

/* ===== SIDEBAR ===== */
.td-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }
.td-book { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); }
.td-book-code { font-size: .72rem; font-weight: 600; letter-spacing: .08em; color: var(--orange); margin-bottom: 4px; }
.td-book-title { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin-bottom: 16px; }
.td-price-box { background: linear-gradient(135deg, var(--orange-50), #fff6ef); border: 1px solid rgba(var(--orange-rgb), .25); border-radius: 14px; padding: 16px 18px; margin-bottom: 18px; }
.td-price-box .lbl { font-size: .76rem; color: var(--muted); }
.td-price-box .val { font-size: 1.7rem; font-weight: 700; color: var(--orange); line-height: 1.2; }
.td-price-box .sub { font-size: .76rem; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.td-steps { display: flex; flex-direction: column; gap: 12px; margin: 18px 0 20px; }
.td-stp { display: flex; gap: 11px; align-items: flex-start; }
.td-stp .n { width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .74rem; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.td-stp p { font-size: .82rem; color: var(--muted); line-height: 1.55; }
.td-stp p b { color: var(--ink); }
.td-cta { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 15px; border-radius: 14px; font-family: inherit; font-size: .98rem; font-weight: 600; text-decoration: none; transition: all .3s var(--ease); border: none; cursor: pointer; }
.td-cta.line { background: linear-gradient(135deg, var(--orange), var(--amber)); color: #fff; box-shadow: 0 12px 26px -12px rgba(var(--orange-rgb), .9); }
.td-cta.line:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(var(--orange-rgb), 1); }
.td-cta.line svg { width: 22px; height: 22px; fill: #fff; }

/* Help card */
.td-help { background: linear-gradient(145deg, var(--navy), var(--navy-700)); border-radius: 22px; padding: 24px 26px; color: #fff; }
.td-help h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 16px; }
.td-help a { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.92); text-decoration: none; font-size: .9rem; padding: 9px 0; transition: color .2s; }
.td-help a:hover { color: var(--amber); }
.td-help a svg { width: 20px; height: 20px; fill: var(--amber); flex-shrink: 0; }

/* Other tours */
.td-other { background: var(--sand); padding: 60px 0 76px; }
.td-other .head { text-align: center; margin-bottom: 36px; }
.td-other .head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; color: var(--ink); }
.td-other .head h2 em { font-style: normal; color: var(--orange); }
.td-other .head .u { width: 70px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--orange), var(--amber)); margin: 12px auto 0; }
.td-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 960px){ .td-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px){
  .td-grid {
    display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory; gap: 14px;
    padding: 4px 16px 14px; margin: 0 -16px;
    scrollbar-width: none;
  }
  .td-grid::-webkit-scrollbar { display: none; }
  .td-grid .td-ocard { flex: 0 0 80vw; scroll-snap-align: center; height: 210px; }
}
.td-ocard { position: relative; height: 230px; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none; display: block; transition: transform .35s var(--ease), box-shadow .35s; }
.td-ocard:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.td-ocard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.td-ocard:hover img { transform: scale(1.07); }
.td-ocard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8,18,38,.85) 100%); }
.td-ocard .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; color: #fff; z-index: 1; }
.td-ocard .cap .loc { display: flex; align-items: center; gap: 5px; font-size: .72rem; color: rgba(255,255,255,.85); margin-bottom: 4px; }
.td-ocard .cap .loc svg { width: 13px; height: 13px; fill: var(--amber); }
.td-ocard .cap b { font-size: 1rem; font-weight: 600; display: block; line-height: 1.3; }
.td-ocard .cap span { font-size: .78rem; color: rgba(255,255,255,.82); }
.td-ocard .arrow { position: absolute; right: 16px; bottom: 18px; width: 34px; height: 34px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; z-index: 2; transition: transform .3s; }
.td-ocard:hover .arrow { transform: translateX(3px); }
.td-ocard .arrow svg { width: 16px; height: 16px; fill: #fff; }
