/* =====================================================================
   IG China Travel — Tour-detail page styles
   Loaded ONLY on /tours/*.html (in addition to style.css)
   ===================================================================== */

/* Breadcrumb */
.breadcrumb{
  max-width:1280px;margin:0 auto;padding:18px 24px 0;
  font-size:13px;color:var(--gray-500);
}
.breadcrumb a{color:var(--gray-500);transition:color .15s}
.breadcrumb a:hover{color:var(--black)}
.breadcrumb .sep{margin:0 6px;color:var(--gray-300)}

/* Tour hero — image + title + price card */
.tour-hero{
  max-width:1280px;margin:0 auto;padding:24px 24px 0;
}
.tour-hero-img{
  width:100%;height:460px;border-radius:var(--r-lg);
  background-size:cover;background-position:center;
  position:relative;overflow:hidden;
  box-shadow:var(--shadow-md);
}
@media (max-width:700px){.tour-hero-img{height:280px}}
.tour-hero-img::after{
  content:'';position:absolute;inset:0;
  background:linear-gradient(180deg, transparent 50%, rgba(0,0,0,.55));
}
.tour-hero-tag{
  position:absolute;top:18px;left:18px;z-index:2;
  background:var(--red);color:#fff;
  padding:8px 14px;border-radius:8px;
  font-weight:700;font-size:13px;letter-spacing:.4px;
}
.tour-hero-tag.tag-premium{background:var(--black);color:var(--yellow)}
.tour-hero-tag.tag-new{background:var(--green)}
.tour-hero-caption{
  position:absolute;bottom:24px;left:24px;right:24px;z-index:2;color:#fff;
}
.tour-hero-caption .code{
  display:inline-block;background:rgba(255,255,255,.18);
  backdrop-filter:blur(4px);
  padding:4px 12px;border-radius:6px;
  font-size:12px;font-weight:600;letter-spacing:.4px;margin-bottom:10px;
}
.tour-hero-caption h1{
  font-family:'Mitr',sans-serif;
  font-size:clamp(26px,3.5vw,42px);
  font-weight:700;line-height:1.15;letter-spacing:-.5px;
  text-shadow:0 2px 12px rgba(0,0,0,.4);
  max-width:840px;
}

/* Tour body — main + sidebar layout */
.tour-body{
  max-width:1280px;margin:0 auto;padding:32px 24px 48px;
  display:grid;grid-template-columns:1fr 360px;gap:32px;align-items:flex-start;
}
@media (max-width:1000px){.tour-body{grid-template-columns:1fr}}

.tour-main > section{margin-bottom:40px}
.tour-main h2{
  font-family:'Mitr',sans-serif;
  font-size:24px;font-weight:700;color:var(--black);
  margin-bottom:14px;letter-spacing:-.3px;
}
.tour-main h2 .zh{font-family:'Noto Serif SC',serif;font-size:.7em;color:var(--red);margin-left:10px;font-weight:500}

/* Tour quick info bar */
.tour-quickinfo{
  display:grid;grid-template-columns:repeat(4,1fr);gap:14px;
  background:var(--yellow-bg);border:1px solid var(--yellow-deep);
  border-radius:var(--r-md);padding:18px 20px;margin-bottom:32px;
}
@media (max-width:700px){.tour-quickinfo{grid-template-columns:repeat(2,1fr);gap:12px}}
.qi-item{display:flex;flex-direction:column;gap:2px}
.qi-item .lbl{font-size:11px;color:var(--gray-500);text-transform:uppercase;letter-spacing:.4px;font-weight:600}
.qi-item .val{font-family:'Mitr',sans-serif;font-size:15px;font-weight:600;color:var(--black)}

/* Day-by-day itinerary — vertical timeline */
.itinerary{position:relative;padding-left:36px}
.itinerary::before{
  content:'';position:absolute;left:14px;top:6px;bottom:6px;
  width:2px;background:var(--gray-300);border-radius:2px;
}
.day{position:relative;margin-bottom:22px}
.day::before{
  content:attr(data-day);
  position:absolute;left:-36px;top:0;
  width:30px;height:30px;border-radius:50%;
  background:var(--yellow);color:var(--black);
  display:flex;align-items:center;justify-content:center;
  font-family:'Mitr',sans-serif;font-weight:700;font-size:13px;
  border:2px solid var(--black);
}
.day h3{
  font-family:'Mitr',sans-serif;font-size:17px;font-weight:600;color:var(--black);
  margin-bottom:6px;line-height:1.3;
}
.day p{font-size:14px;color:var(--gray-700);line-height:1.65;margin-bottom:8px}
.day .meal{
  display:inline-block;background:var(--gray-100);color:var(--gray-700);
  padding:3px 10px;border-radius:99px;font-size:12px;font-weight:600;
  margin-right:6px;margin-top:4px;
}
.day .meal.hotel{background:#fff;border:1px solid var(--gray-300)}

/* Included / not included */
.includes-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
@media (max-width:700px){.includes-grid{grid-template-columns:1fr}}
.includes-card{
  background:#fff;border:1px solid var(--gray-100);border-radius:var(--r-md);
  padding:24px 22px;
}
.includes-card h3{
  font-family:'Mitr',sans-serif;font-size:16px;font-weight:600;
  margin-bottom:12px;display:flex;align-items:center;gap:8px;
}
.includes-card.ok h3{color:var(--green)}
.includes-card.no h3{color:var(--red)}
.includes-card ul{list-style:none;padding:0}
.includes-card li{
  font-size:14px;color:var(--gray-700);line-height:1.55;
  padding:6px 0 6px 24px;position:relative;
}
.includes-card.ok li::before{content:'✓';position:absolute;left:0;color:var(--green);font-weight:700}
.includes-card.no li::before{content:'✕';position:absolute;left:0;color:var(--red);font-weight:700}

/* Gallery */
.gallery-grid{
  display:grid;grid-template-columns:repeat(4,1fr);gap:12px;
}
@media (max-width:900px){.gallery-grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:500px){.gallery-grid{grid-template-columns:repeat(2,1fr)}}
.gallery-item{
  aspect-ratio:1/1;border-radius:var(--r-sm);overflow:hidden;
  background-size:cover;background-position:center;
  transition:transform .2s;cursor:zoom-in;
}
.gallery-item:hover{transform:scale(1.03)}
.gallery-item.wide{grid-column:span 2;aspect-ratio:2/1}
.gallery-item img{width:100%;height:100%;object-fit:cover;display:block}

/* Share buttons */
.share-row{display:flex;gap:10px;flex-wrap:wrap}
.share-btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 18px;border-radius:99px;
  font-weight:600;font-size:14px;color:#fff;
  transition:transform .15s, box-shadow .2s;
}
.share-btn:hover{transform:translateY(-1px);box-shadow:var(--shadow-sm)}
.share-fb{background:#1877F2}
.share-line{background:#06C755}
.share-copy{background:var(--gray-700)}

/* Sticky sidebar (price + book + PDF + LINE) */
.tour-sidebar{position:sticky;top:96px}
@media (max-width:1000px){.tour-sidebar{position:static}}
.book-card{
  background:#fff;border:2px solid var(--black);border-radius:var(--r-lg);
  padding:24px;box-shadow:var(--shadow-md);
}
.book-price{margin-bottom:16px;text-align:center;padding-bottom:16px;border-bottom:1px dashed var(--gray-300)}
.book-price .from{font-size:12px;color:var(--gray-500);font-weight:500;margin-bottom:4px}
.book-price .was{font-size:15px;color:var(--gray-500);text-decoration:line-through;margin-right:6px}
.book-price .now{font-family:'Mitr',sans-serif;font-size:34px;font-weight:700;color:var(--red);line-height:1}
.book-price .unit{font-size:13px;color:var(--gray-700);margin-left:4px}
.book-meta{font-size:13px;color:var(--gray-700);line-height:1.7;margin-bottom:16px}
.book-meta strong{color:var(--black);display:block;margin-top:6px}
.book-actions{display:flex;flex-direction:column;gap:10px}
.book-btn{
  display:flex;align-items:center;justify-content:center;gap:8px;
  padding:13px 16px;border-radius:10px;
  font-weight:700;font-family:'Mitr',sans-serif;font-size:15px;
  transition:transform .15s, box-shadow .2s;
}
.book-btn.line{background:#06C755;color:#fff}
.book-btn.line:hover{transform:translateY(-1px);box-shadow:0 6px 14px rgba(6,199,85,.35)}
.book-btn.pdf{background:var(--yellow);color:var(--black);border:2px solid var(--black)}
.book-btn.pdf:hover{transform:translateY(-1px);background:var(--yellow-deep)}
.book-btn.inquire{background:var(--black);color:var(--yellow)}
.book-btn.inquire:hover{transform:translateY(-1px)}

/* Trust pills under booking card */
.trust-pills{
  margin-top:16px;display:flex;flex-wrap:wrap;gap:6px;justify-content:center;
}
.trust-pill{
  font-size:11px;font-weight:600;color:var(--gray-700);
  background:var(--gray-100);padding:5px 10px;border-radius:99px;
}

/* Departures / price table (data-driven tour page) */
.dep-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--gray-100);border-radius:var(--r-md)}
.dep-table{width:100%;border-collapse:collapse;font-size:14px;min-width:520px}
.dep-table th,.dep-table td{padding:11px 14px;text-align:center;border-bottom:1px solid var(--gray-100)}
.dep-table th{background:var(--black);color:#fff;font-family:'Mitr',sans-serif;font-weight:500;font-size:13px}
.dep-table th small{font-weight:400;color:var(--gray-300);font-size:11px}
.dep-table td:first-child,.dep-table th:first-child{text-align:left;white-space:nowrap}
.dep-table tbody tr:nth-child(even){background:var(--gray-100)}
.dep-table tbody tr.hot{background:var(--yellow-bg)}
.dep-table tbody tr:last-child td{border-bottom:none}
.dep-table td strong{color:var(--red);font-family:'Mitr',sans-serif}
.dep-tag{display:inline-block;background:var(--red);color:#fff;font-size:10px;font-weight:700;padding:2px 7px;border-radius:99px;margin-left:6px;vertical-align:middle}
.dep-note{font-size:12.5px;color:var(--gray-500);line-height:1.6;margin-top:12px}

/* =====================================================================
   PRIVATE / PREMIUM CONTENT LAYER — added 2026-07-31
   Additive only. No existing rule above was deleted or repurposed.
   The shared :focus-visible ring, the .sr-only helper and the svg.ico
   sprite sizing all live in css/style.css, which every tour page also
   loads — they are not repeated here.
   ===================================================================== */

/* ---------------------------------------------------------------------
   GALLERY THUMBNAILS — <div> becomes <a href>  (bug #5)
   80 thumbnails across the 8 tour pages opened the lightbox on mouse
   click only. They now ship as real anchors —
   `<a class="gallery-item" href="{image}" aria-label="ขยายภาพ…">` in all
   eight static pages and in js/tour-detail.js — so they are focusable,
   have an accessible name, and fire on Enter, which js/lightbox.js
   intercepts with preventDefault.

   This block used to be scoped `button.gallery-item` (findings #31/#36/
   #41): the CSS author wrote for a <button> conversion, the markup
   author shipped <a>, and the selector matched zero elements in the
   repo. Nothing broke visually — .gallery-grid blockifies the anchors so
   aspect-ratio and background-size still apply — but the
   background-color placeholder never painted while a thumbnail loaded.
   Retargeted to a.gallery-item; button.gallery-item is kept alongside so
   the resets survive a future revert to <button>. The UA-reset
   declarations (padding/border/font/appearance) are harmless on an
   anchor. .gallery-item keeps its own background-image (set inline per
   tile), so only background-color is reset here.
   --------------------------------------------------------------------- */
a.gallery-item,
button.gallery-item{
  display:block;
  width:100%;
  padding:0;
  border:none;
  font:inherit;
  color:inherit;
  background-color:var(--gray-100);
  appearance:none;-webkit-appearance:none;
}
/* The tile is a pure image with no text, so the ring must not be the
   only thing distinguishing it — the shared two-tone ring in style.css
   already handles that. This just guarantees the ring is not clipped by
   the tile's own overflow:hidden and clears the 3px offset. */
.gallery-item:focus-visible{
  outline:3px solid var(--black);
  outline-offset:3px;
  box-shadow:0 0 0 3px var(--yellow);
  z-index:2;
}

/* ---------------------------------------------------------------------
   PDF BUTTON — only rendered where a file exists (bug #6)
   js/tour-detail.js gates the button on a data flag. When no brochure
   exists the LINE consultation CTA takes the slot; nothing here needs to
   hide anything, but the rule below keeps a gated-off button from ever
   being revealed by a stale cache of the old markup.
   --------------------------------------------------------------------- */
.book-btn.pdf[hidden]{display:none}
