/* Additive rules on top of the shared style.css design system — Lanta Travels specific */

/* Contact-form honeypot: hidden via layout, not display:none, which many
   spam scripts specifically check for and skip. */
.lt-contact-form .hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; overflow: hidden; opacity: 0; pointer-events: none; box-sizing: border-box; }

/* Logo: no frame, matches villa's plain treatment — logo hidden over the video
   hero and only fading in once the nav goes solid on scroll (or on any inner
   page), same behaviour as siamlannavillas.com. Nav and footer logos share the
   same height. */
.nav-logo-img, .footer-logo-img { height: 36px; width: auto; }

/* Language-flag row in the top nav: home page only (Bo's call 2026-09-22 —
   it was showing on every page's hero before the nav goes solid on scroll;
   now scoped so inner pages never show it, only the homepage does). */
body:not(.home) .nav-lang-bar { display: none !important; }

@media (max-width: 900px) {
  .nav-logo-img { height: 28px; }
}

/* villa's style.css never actually styles the <img> inside .shop-card-img.has-photo
   (only .shop-box-media / .shop-breakfast-media do) — without this the photo renders
   at its native size and blows out the card layout. */
.shop-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Homepage category cards use transparent watercolour icons, not photography —
   no box/tile/shadow tight behind the icon itself, just the illustration sitting
   on the page — but a simple frame around the whole card (icon + name + price)
   ties each one together as a single unit instead of looking like loose,
   disconnected pieces stacked in the grid. */
body.home .shop-card-img { height: auto; padding: 1.5rem 1.5rem 0; background: none; display: flex; justify-content: center; }
body.home .shop-card-img img { width: 100%; max-width: 500px; height: auto; object-fit: contain; }
body.home .shop-card { box-shadow: none; background: none; border: 1px solid rgba(0,0,0,0.1); border-radius: 10px; }
body.home .shop-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08); transform: translateY(-3px); border-color: rgba(0,0,0,0.15); }
body.home .shop-card-body { text-align: center; align-items: center; padding: 1rem 1.6rem 1.6rem; }

/* Homepage has exactly 4 category cards — villa's 3-column grid leaves an
   orphaned single card on its own row at desktop widths. Force a balanced
   2x2 instead (already 2-per-row below 960px via villa's own breakpoint). */
@media (min-width: 961px) {
  body.home .shop-grid { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin: 0 auto; gap: 2rem; }
}

/* The blur workaround from the old portrait/pixelated placeholder clip is gone
   now that hero-reel.mp4 is a genuine 1280x720 multi-clip source — no filter needed. */

/* Rentals dropdown: villa's version slides the menu in on translateY plus
   centers it with translateX(-50%) — combined with the underline pseudo-element
   on nav-links a, hovering a sub-item (e.g. "Scooter Rental") could visibly
   shift. Drop the transform entirely and just fade the dropdown in/out, and
   make doubly sure no underline sneaks onto dropdown items. */
/* Scoped to desktop widths only — unscoped, the !important transform overrode
   the mobile media query's own reset (position:static/transform:none), pushing
   the Rentals submenu ~95px left of the mobile menu's true center. */
@media (min-width: 961px) {
  .nav-dropdown-menu { transform: translateX(-50%) !important; transition: opacity 0.15s ease, visibility 0.15s !important; }
}
.nav-dropdown-menu a::after { display: none !important; content: none !important; }

/* Tighten the gap between the intro paragraph and "Where to start" below it —
   villa's base `section { padding: 7rem 0 }` + shop-section's own 5rem top
   padding left a big empty gap between the two on the homepage. */
body.home .intro { padding-bottom: 1.5rem; }

.breadcrumb { font-family: var(--font-label); font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255,255,255,0.55); text-align: center; margin-bottom: 1.2rem; }
.breadcrumb a { color: rgba(255,255,255,0.75); }
.breadcrumb a:hover { color: var(--white); }
body:not(.home) .breadcrumb { color: rgba(255,255,255,0.55); }

/* ---- TOUR / TRANSFER / RENTAL DETAIL PAGES ---- */
.tour-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 3.5rem; align-items: start; }
.tour-media { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; background: var(--sand); margin-bottom: 2rem; }
.tour-body h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-top: 2.5rem; }
.tour-body ul { padding-left: 1.3rem; color: var(--mid); line-height: 1.9; }
.tour-body ul.excluded li { color: var(--mid); }
.tour-sidebar { background: var(--white); box-shadow: 0 4px 30px rgba(0,0,0,0.06); padding: 2.2rem; position: sticky; top: 6rem; }
.tour-sidebar.tour-sidebar-bottom { position: static; }
.tour-sidebar .shop-price { margin-bottom: 0.3rem; }
.tour-price-row { display: flex; justify-content: space-between; align-items: baseline; padding: 0.8rem 0; border-bottom: 1px solid rgba(0,0,0,0.07); }
.tour-price-row:last-of-type { border-bottom: none; }
.tour-price-row .label { font-size: 0.85rem; color: var(--mid); }
.tour-price-row .price { font-family: var(--font-display); font-size: 1.3rem; color: var(--dark); }
.tour-cta-row { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.2rem; }
/* an empty error line and the "Added" message take no room until they show, so every button has the same gap */
.tour-cta-row .field-error-msg:empty, .tour-cta-row .cart-added-msg:not(.show) { display: none; }
/* the tour date and the notes box: no empty error line between them, so the gap matches the other fields */
.tour-date-field { margin-top: 14px; }
.tour-date-field .field-error-msg:empty { display: none; }
.item-note-field textarea { resize: none; overflow: hidden; line-height: 1.45; }
.btn-whatsapp { display: block; text-align: center; padding: 0.85rem 1.5rem; background: #25D366; color: #fff; font-family: var(--font-body); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.btn-whatsapp:hover { filter: brightness(0.95); }

.info-note { display: block; color: var(--mid); font-size: 0.85rem; font-style: italic; margin: 0.6rem 0; line-height: 1.7; }

.related-tours { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 1rem; }
.related-tour-card { background: var(--white); box-shadow: 0 4px 24px rgba(0,0,0,0.06); padding: 1.4rem; transition: transform 0.25s ease; }
.related-tour-card:hover { transform: translateY(-3px); }
.related-tour-card h4 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 0.4rem; }
.related-tour-card span { font-size: 0.78rem; color: var(--gold); }

/* ---- PRICE TABLE (transfers / private longtail) ---- */
.price-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 1.5rem 0; }
.price-table th, .price-table td { padding: 0.7rem 0.9rem; text-align: center; border-bottom: 1px solid rgba(0,0,0,0.08); }
.price-table th { font-family: var(--font-label); font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid); }
.price-table td:first-child, .price-table th:first-child { text-align: left; }
.price-table td.na { color: rgba(0,0,0,0.25); }

/* ---- ROUTE HERO (transfers / rentals — no video) ---- */
.simple-hero { background: var(--sage); padding: 9rem 0 4rem; }

/* ---- TOURS HUB: taller 4:3 card photos so more of each photo shows ---- */
body.tours-hub .shop-card-img { height: auto; aspect-ratio: 4 / 3; }
.tours-hub-heading { text-align: left; margin: 2.5rem 0 0.5rem; font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
.tours-hub-sub { text-align: left; margin: 0 0 1.8rem; color: var(--mid); font-size: 0.9rem; max-width: 640px; }

/* ---- NO-PHOTO CARDS (transfers hub, scooter/car rental, massage): drop the
   image slot entirely rather than leaving an empty gap. ---- */
.shop-card.no-photo { display: block; }
.shop-card.no-photo .shop-card-body { height: 100%; }

/* ---- PRIVATE TOURS GRID (tours hub): same has-photo card as Group Tours —
   flat, always visible, so both sections read as equally complete — with a
   gold top border and a small label to keep it visually distinct at a glance. ---- */
.pl-grid .shop-card { border-top: 3px solid var(--gold); }
.pl-card-label { display: block; font-family: var(--font-label); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.pl-grid-note { margin: 1.2rem 0 0; font-size: 0.78rem; color: var(--mid); font-style: italic; }

@media (max-width: 900px) {
  .tour-layout { grid-template-columns: 1fr; }
  .tour-sidebar { position: static; }
  .related-tours { grid-template-columns: 1fr; }
}

/* ---- GROUP TOURS (tours hub): collapsed into one expandable banner card —
   Bo's call 2026-09-22: private tours are the priority and lead the page now,
   group tours are still all there but tucked behind a "+" so they don't
   compete for the same visual weight. Native <details>/<summary> — expanded
   state, keyboard toggle (Enter/Space) and screen-reader announcement all
   come free, no JS needed. */
.group-tours-summary {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: 150px; padding: 1.7rem 2.2rem; cursor: pointer; list-style: none;
  background: var(--sage) url('/assets/img/tours/phi-phi.jpg') center/cover no-repeat;
  box-shadow: 0 4px 30px rgba(0,0,0,0.12); transition: box-shadow 0.25s ease;
}
.group-tours-summary::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, rgba(64,80,67,0.92) 0%, rgba(64,80,67,0.68) 55%, rgba(64,80,67,0.4) 100%);
}
.group-tours-summary::-webkit-details-marker { display: none; }
.group-tours-summary::marker { content: ""; }
.group-tours-summary:hover,
.group-tours-collapsible[open] .group-tours-summary { box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.gt-summary-title { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--white); }
.gt-summary-sub { display: block; font-family: var(--font-label); font-size: 0.85rem; color: rgba(255,255,255,0.8); margin-top: 0.4rem; }
.gt-summary-toggle {
  flex: none; width: 2.8rem; height: 2.8rem; border-radius: 50%;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.55); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; line-height: 1;
  transition: transform 0.25s ease, background 0.25s ease;
}
.group-tours-summary:hover .gt-summary-toggle { background: rgba(255,255,255,0.28); }
.group-tours-collapsible[open] .gt-summary-toggle { transform: rotate(45deg); background: var(--gold); border-color: var(--gold); }
.group-tours-collapsible .tours-hub-sub { margin-top: 1.8rem; }
.group-tours-collapsible .shop-grid { animation: gtFadeIn 0.3s ease; }
@keyframes gtFadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
  .group-tours-summary { min-height: 120px; padding: 1.3rem 1.5rem; }
  .gt-summary-title { font-size: 1.2rem; }
}

/* ---- TRANSFER MAP (transfers hub) ----
   Illustrated, not literal cartography: the SVG background is a stylised
   impression of the coast (Phuket / Krabi & Khao Sok / Koh Lanta), just
   accurate enough in relative position to be intuitive. Pins are plain
   HTML buttons, absolutely positioned by percentage over the fixed-aspect
   wrapper -- so a pin's data-x/data-y percentage lines up with the art
   underneath, and the popover can anchor off that same percentage without
   any SVG-to-screen coordinate math. */
.transfer-map-legend { max-width: 560px; margin: 0 auto 1.2rem; text-align: center; }
.transfer-map-clear {
  display: inline-block; margin-top: 0.5rem; border: none; background: none; cursor: pointer;
  font-family: var(--font-label); font-size: 0.7rem; letter-spacing: 0.04em; color: var(--sage);
  text-decoration: underline; padding: 0.2rem; opacity: 0; visibility: hidden; transition: opacity 0.2s ease;
}
.transfer-map-clear.visible { opacity: 1; visibility: visible; }

.transfer-map-wrap {
  position: relative; width: 100%; max-width: none; margin: 0 0 1rem; /* same width as the boat-transfer box below */
  aspect-ratio: 1 / 1;
}
/* The rounded-corner clip applies only to the map art itself -- pins and the
   popover live outside this element so a popover anchored low on the map can
   still extend past the map's own bottom edge without being cut off. */
.transfer-map-bg {
  position: absolute; inset: 0; border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08); background: #E7EFE9;
}
.transfer-map-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Departure -> arrival route line: drawn by animating stroke-dashoffset from
   the path's own length down to 0, so it visibly "travels" from one pin to
   the other rather than just appearing. */
.transfer-route-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.map-route-line { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 0.7s cubic-bezier(0.4,0,0.2,1); }

.map-pin {
  /* Anchored on the DOT alone -- translate(-100%) moves this box so its own
     bottom-center (the dot's tip) sits exactly at the target x%/y%. The
     label is positioned absolutely below (see .map-pin-label) so its size
     never shifts this anchor -- previously the label was a flex sibling
     that added its own height to the box, pushing the visible dot upward
     from the actual clicked/target point by however tall the label was. */
  position: absolute; transform: translate(-50%, -100%);
  display: block; background: none; border: none; cursor: pointer; padding: 0; font: inherit;
}
.map-pin-dot {
  display: block; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--sage); box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  border: 2px solid var(--white); transition: background 0.2s ease, transform 0.2s ease;
}
.map-pin-dot::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--white); left: 7px; top: 7px; }
.map-pin:hover .map-pin-dot, .map-pin:focus-visible .map-pin-dot { background: var(--gold); transform: rotate(-45deg) scale(1.12); }
.map-pin-label {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 5px;
  font-family: var(--font-label); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.03em;
  color: var(--dark); background: rgba(255,255,255,0.88); padding: 0.15rem 0.5rem; border-radius: 20px;
  white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.map-pin-label-left { left: auto; right: 100%; top: 50%; transform: translateY(-50%); margin: 0; }
.map-pin-label-right { left: 100%; top: 50%; transform: translateY(-50%); margin: 0; }
.map-pin-label-right-low { left: calc(50% + 9px); top: calc(50% + 9px); transform: none; margin: 0; }
.map-pin-home .map-pin-dot { background: var(--gold); }
.map-pin-home .map-pin-label { background: var(--gold); color: var(--white); font-weight: 600; }

/* Selected departure/arrival: a visible ring plus a small role badge so it's
   obvious at a glance which pin is which while picking the second point. */
.map-pin.map-pin-departure .map-pin-dot, .map-pin.map-pin-arrival .map-pin-dot {
  background: var(--gold); transform: rotate(-45deg) scale(1.15);
  box-shadow: 0 0 0 4px rgba(170,153,88,0.3), 0 3px 10px rgba(0,0,0,0.25);
}
.map-pin-role-badge {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%) rotate(45deg);
  font-family: var(--font-label); font-size: 0.55rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--white); background: var(--sage); padding: 0.1rem 0.4rem; border-radius: 8px; white-space: nowrap;
}
/* After the first click: pins that connect to it stay (gold ring), the rest disappear. */
.map-pin { transition: opacity 0.2s ease, visibility 0.2s; }
.map-pin.map-pin-dim { opacity: 0; visibility: hidden; pointer-events: none; }
.map-pin.map-pin-reach .map-pin-dot { box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.75), 0 2px 6px rgba(0, 0, 0, 0.3); }
.map-pin.map-pin-invalid .map-pin-dot { animation: mapPinShake 0.4s ease; background: #b3492f; }
@keyframes mapPinShake { 0%,100% { transform: rotate(-45deg) translateX(0); } 25% { transform: rotate(-45deg) translateX(-4px); } 75% { transform: rotate(-45deg) translateX(4px); } }

.map-popover {
  position: absolute; z-index: 5; width: 250px; max-width: calc(100% - 24px);
  background: var(--white); box-shadow: 0 14px 44px rgba(0,0,0,0.22); border-radius: 10px;
  padding: 1.2rem; transform: translate(-50%, 0); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.map-popover.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, -6px); }
.map-popover-close {
  position: absolute; top: 0.5rem; right: 0.6rem; border: none; background: none; cursor: pointer;
  font-size: 1.1rem; line-height: 1; color: var(--mid); padding: 0.2rem;
}
.map-popover h4 { font-size: 1.05rem; margin-bottom: 0.6rem; padding-right: 1rem; }
.map-popover .shop-select, .map-popover .shop-input { font-size: 0.78rem; padding: 0.55rem 0.7rem; }
.map-popover .shop-field-label { font-size: 0.58rem; margin: 0.6rem 0 0.25rem; }
.map-popover .shop-price { font-size: 1.05rem; margin-top: 0.7rem; }
.map-popover .tour-cta-row { margin-top: 0.7rem; gap: 0.4rem; }
.map-popover .btn-sage { padding: 0.65rem 1rem; font-size: 0.68rem; }
.map-popover .field-error-msg { font-size: 0.65rem; }
.map-popover-viewlink { display: block; text-align: center; font-size: 0.68rem; color: var(--sage); text-decoration: underline; margin-top: 0.6rem; }

.transfer-map-hint { text-align: center; color: var(--mid); font-size: 0.8rem; font-style: italic; margin: 0 0 2.5rem; }

@media (max-width: 700px) {
  .map-pin-dot { width: 22px; height: 22px; }
  .map-pin-label:not([class*="map-pin-label-"]) { margin-top: 4px; }
  .map-pin-label-right-low { left: calc(50% + 8px); top: calc(50% + 8px); }
  .map-pin-label { font-size: 0.62rem; }
  .map-popover { width: 220px; }
}


/* ---- Private boat transfers (islands south of Koh Lanta) ----
   Sea-blue instead of the gold/sage van pins, so boat crossings read as a
   different kind of transfer on the map and in the transfers section. */
:root { --sea: #2f6f8f; }
.map-pin-boat .map-pin-dot { background: var(--sea); }
.map-pin-boat:hover .map-pin-dot, .map-pin-boat:focus-visible .map-pin-dot { background: #24586f; }
.map-pin-boat .map-pin-label { background: var(--sea); color: var(--white); font-weight: 600; }
.map-popover-boat-tag { display: inline-block; font-family: var(--font-label); font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--white); background: var(--sea); padding: 3px 8px; margin-bottom: 0.4rem; }
.map-popover-boat-note { font-size: 0.78rem; color: var(--mid); margin: -0.2rem 0 0.6rem; }
.boat-transfer-section { border-top: 3px solid var(--sea); background: rgba(47,111,143,0.06); padding: 2.2rem 1.6rem; margin-top: 1rem; }
.boat-transfer-section .eyebrow-boat { display: block; font-family: var(--font-label); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sea); margin-bottom: 0.4rem; }
.boat-routes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin: 1.2rem 0 1.6rem; }
.boat-route { background: var(--white); border-left: 3px solid var(--sea); padding: 0.9rem 1rem; }
.boat-route strong { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--dark); font-weight: 500; }
.boat-route span { font-size: 0.8rem; color: var(--mid); }
.boat-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1rem; max-width: 640px; }
.boat-form .full { grid-column: 1 / -1; }
.boat-form .btn-sage { background: var(--sea); }
@media (max-width: 700px) {
  .boat-routes { grid-template-columns: 1fr; }
  .boat-form { grid-template-columns: 1fr; }
  .boat-transfer-section { padding: 1.6rem 1rem; }
}


/* Two-line villa label on the transfer map (see pinLabel in transfer-map.js). */
.map-pin-home .map-pin-label { white-space: nowrap; text-align: left; line-height: 1.3; border-radius: 8px; padding: 0.2rem 0.55rem; }
@media (max-width: 700px) {
  /* Smaller two-line villa label on phones so it fits inside the map and
     clears Koh Mook's label below. */
  .map-pin-home .map-pin-label { font-size: 0.5rem; padding: 0.12rem 0.4rem; }
}

/* Labels placed by layoutLabels() in transfer-map.js: plain left/top from the
   pin box, no CSS centring or margins (the script measures and positions). */
.map-pin-label.map-pin-label-auto { left: 0; top: 0; right: auto; bottom: auto; transform: none; margin: 0; }

/* Pins and labels scale with the map itself (container query units), so on
   a narrow phone they shrink along with the map and layoutLabels() still has
   room to keep every label clear of the others. Full size from ~640px up. */
.transfer-map-wrap { container-type: inline-size; }
@supports (width: 1cqw) {
  .map-pin-dot { width: clamp(15px, 3.8cqw, 30px); height: clamp(15px, 3.8cqw, 30px); }
  .map-pin-dot::after { width: clamp(5px, 1.15cqw, 9px); height: clamp(5px, 1.15cqw, 9px); left: 50%; top: 50%; transform: translate(-50%, -50%); }
  /* --label-scale is lowered by layoutLabels() when labels would collide. */
  .map-pin-label, .map-pin-home .map-pin-label { font-size: calc(clamp(0.5rem, 1.55cqw, 0.8rem) * var(--label-scale, 1)); padding: 0.1em 0.55em; }
  .map-pin-home .map-pin-label { padding: 0.2em 0.6em; }
}

/* Boat booking box on the map: sea-blue to match the island pins. */
.map-popover.map-popover-boat { border-top: 4px solid var(--sea); background: #f2f8fb; }
.map-popover.map-popover-boat h4 { color: var(--sea); }
.map-popover.map-popover-boat .shop-input:focus { border-color: var(--sea); outline-color: var(--sea); }
.map-popover.map-popover-boat .shop-price { color: var(--sea); }
.map-popover.map-popover-boat .btn-sage { background: var(--sea); border-color: var(--sea); }
.map-popover.map-popover-boat .btn-sage:hover { background: #24586f; border-color: #24586f; }
.boat-book-hint { color: var(--sea); font-size: 0.92rem; margin: 0.4rem 0 0; }

/* The label is part of the pin's button: clicking the text selects the
   location too. Make that obvious on hover. */
.map-pin-label { cursor: pointer; transition: box-shadow 0.15s ease, filter 0.15s ease; }
.map-pin:hover .map-pin-label, .map-pin:focus-visible .map-pin-label { box-shadow: 0 2px 8px rgba(0,0,0,0.22); filter: brightness(1.05); }
.map-pin.map-pin-departure .map-pin-label, .map-pin.map-pin-arrival .map-pin-label { outline: 2px solid var(--gold); outline-offset: 1px; }

/* "Every private tour includes..." line under the Private Tours heading. */
.pl-included { max-width: 760px; margin: -0.6rem 0 1.8rem; text-align: left; color: var(--mid); font-size: 0.9rem; line-height: 1.75; }

/* ---- VILLA MANAGEMENT LINK: gold shimmer, as on siamlannavillas.com ---- */
.footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-owner-link, .nav-owner-link {
  background: linear-gradient(100deg, #C9A646 0%, #F6E7B4 30%, #AA9958 55%, #F6E7B4 78%, #C9A646 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: goldShimmer 6s ease-in-out infinite;
}
.footer-links a.footer-owner-link { display: inline-block; font-family: var(--font-label); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.03em; transition: opacity 0.2s ease, filter 0.2s ease; }
.footer-owner-link:hover, .nav-owner-link:hover { opacity: 0.82; filter: brightness(1.15); }
.footer-owner-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.nav-links a.nav-owner-link { opacity: 1 !important; }
.nav-links a.nav-owner-link::after { display: none !important; }
@keyframes goldShimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .footer-owner-link, .nav-owner-link { animation: none; } }
/* the top menu is light: a deeper gold there so "Villa Management" stays readable while it shimmers */
/* top menu: plain gold text, no shimmer (owner: the moving effect made it hard to read) */
.nav-links a.nav-owner-link { background: none !important; -webkit-background-clip: border-box; background-clip: border-box; animation: none !important; color: #F1DC9C !important; }
/* on the light menu bar (other pages, or once the home page is scrolled) and in the open phone menu: a deep gold */
body:not(.home) .nav-links a.nav-owner-link, #nav.solid .nav-links a.nav-owner-link, .nav-links.open a.nav-owner-link { color: #8A6B1E !important; }

/* Cookie consent bar (js/consent.js) */
.consent { position: fixed; z-index: 1000; left: 12px; right: 12px; bottom: 12px; max-width: 880px; margin: 0 auto; padding: 1rem 1.2rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1.2rem; background: var(--white); color: var(--dark); border: 1px solid rgba(64,80,67,0.18); box-shadow: 0 12px 40px rgba(30,30,20,0.18); font-size: 0.88rem; line-height: 1.55; }
.consent[hidden] { display: none; }
.consent__msg { margin: 0; flex: 1 1 320px; }
.consent__msg a { color: var(--sage); text-decoration: underline; }
.consent__btns { display: flex; gap: 0.6rem; flex: 0 0 auto; }
.consent__btns .btn { padding: 0.7rem 1.4rem; }
.footer-cookies a { color: inherit; opacity: 0.7; font-size: 0.75rem; }
@media (max-width: 480px) { .consent__btns { flex: 1 1 100%; } .consent__btns .btn { flex: 1 1 0; padding: 0.7rem 0.5rem; } }

/* Van forms: car seat tick and the reverse arrow in the map pop-up */
.van-seat-note { margin: 0.8rem 0 0.4rem; font-size: 0.8rem; }
.van-seat-tick { display: flex; align-items: center; gap: 0.5rem; margin: 0.3rem 0 0.6rem; font-size: 0.85rem; color: var(--mid); cursor: pointer; }
.van-seat-tick input { width: 1.05rem; height: 1.05rem; accent-color: var(--sage); flex: none; }
.map-popover-route { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.map-popover-swap { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0; border: 1px solid var(--gold); border-radius: 50%; background: transparent; color: var(--sage); font-size: 1.05rem; line-height: 1; cursor: pointer; }
.map-popover-swap:hover, .map-popover-swap:focus-visible { background: var(--gold); color: var(--white); }

/* ---------- Phones and iPads: the site as an app (partials/nav.html, main.js initAppBar) ----------
   The logo on the left and the cart on the right at the top; once the page is scrolled the top bar slides away and
   the tab bar at the bottom stays. Desktops keep the top menu and never see these parts. */
.app-tabs, .app-sheet { display: none; }
/* home page video: the phone's own line under the title */
.reel-rating--phone { display: none; }
.phone-br { display: none; }
@media (max-width: 768px) {
  .reel-rating--wide { display: none; }
  .phone-br { display: inline; }
  .reel-rating--phone { display: block; line-height: 1.55; }
  /* the same sentence is now on the video: no need to repeat it just below */
  .intro h2[data-i18n="home.introH2"] { display: none; }
}
.row-book, .hub-jump { display: none; }
/* Tour grid cards (tours/index.html): a card's booking form (people, date, notes) stays folded behind "Book" until
   tapped, on every screen size -- the card itself shows only the title, the fuller description and the price. */
.card-book-btn { display: flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%; min-height: 42px; padding: 0.5rem 1rem; border: 0; background: var(--sage); color: var(--white); font-family: var(--font-label); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.card-book-btn::after { content: '›'; font-size: 1rem; line-height: 1; transition: transform 0.2s ease; }
.card-book-btn[aria-expanded="true"]::after { transform: rotate(90deg); }
.shop-card .card-book-btn[aria-expanded="true"] { background: none; color: var(--sage); box-shadow: inset 0 0 0 1px rgba(64,80,67,0.35); }
.shop-card:not(.is-open) .pax-select, .shop-card:not(.is-open) .tour-date-field, .shop-card:not(.is-open) .item-note-field, .shop-card:not(.is-open) .tour-cta-row, .shop-card:not(.is-open) .tour-hub-add-row { display: none; }
@media (max-width: 1024px), (hover: none) and (pointer: coarse) and (max-width: 1400px) {
  #nav, body:not(.home) #nav, #nav.solid { flex-wrap: nowrap; justify-content: space-between; min-height: 60px; padding: calc(0.6rem + env(safe-area-inset-top)) 1.1rem 0.6rem; gap: 0; transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease; }
  #nav .nav-toggle, #nav .nav-links, #nav .nav-lang-bar { display: none !important; }
  #nav .nav-logo-img { display: block; height: 32px; }
  #nav .nav-logo picture { display: block; }
  /* over the home page video: no logo, just the cart */
  body.home #nav:not(.nav-peek) .nav-logo { display: none; }
  #nav .cart-link { margin-left: auto; }
  #nav .cart-link { padding: 0.55rem; margin-right: -0.55rem; }
  #nav .cart-link svg { width: 23px; height: 23px; }
  #nav .cart-link .cart-badge { top: 0; right: 0; }
  #nav.nav-tucked:not(.nav-peek) { transform: translateY(-110%); box-shadow: none; pointer-events: none; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .consent { bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* the same page heading on every page: one height, one size, close under the top bar */
  .simple-hero, .page-hero { display: flex; align-items: center; box-sizing: border-box; min-height: 256px; padding: calc(68px + env(safe-area-inset-top)) 0 1.3rem; }
  .simple-hero > .container, .page-hero > .container { width: 100%; }
  .simple-hero .breadcrumb, .page-hero .breadcrumb { margin-bottom: 0.5rem; font-size: 0.66rem; }
  .simple-hero .eyebrow, .page-hero .eyebrow { display: none !important; }
  .simple-hero h1, .page-hero h1 { font-size: clamp(1.85rem, 8vw, 2.7rem); line-height: 1.15; }
  .simple-hero em, .page-hero em { color: var(--gold); }
  .simple-hero h1 + p, .page-hero h1 + p { margin-top: 0.55rem !important; font-size: 0.9rem !important; line-height: 1.5; }
  main > section:first-child { padding-top: 2rem !important; }
  .price-table th { white-space: nowrap; }
  /* spacing: sections sit close together, nothing floats in big empty gaps */
  section { padding: 1.8rem 0; }
  .shop-section { padding: 1.6rem 0; }
  main > section:not(:first-child) { padding-top: 1.6rem !important; padding-bottom: 1.6rem !important; }
  main > section:first-child { padding-bottom: 1.6rem !important; }
  main .tours-hub-heading { font-size: 1.5rem; scroll-margin-top: 0.8rem; }
  .tours-hub-sub { margin-bottom: 0.9rem; }
  .pl-included { margin-bottom: 1rem; font-size: 0.85rem; line-height: 1.6; }
  .tour-layout { gap: 1.4rem; }
  .tour-sidebar { padding: 1.3rem; scroll-margin-top: 0.8rem; transition: box-shadow 0.4s ease; }
  .tour-sidebar.is-picked { box-shadow: 0 0 0 2px var(--gold), 0 8px 26px rgba(0,0,0,0.1); }
  .price-table { margin: 0.7rem 0; }
  .info-note { margin-top: 0.5rem; margin-bottom: 0.5rem; }
  .review-grid, .review-grid-2 { gap: 0.8rem; margin-bottom: 0.6rem; }
  .review-card { padding: 1.2rem; }
  .review-card p { font-size: 0.92rem; line-height: 1.6; margin-bottom: 0.5rem; }
  .faq-category { margin-bottom: 0.5rem; }
  footer { margin-top: 0; }

  /* one rhythm for every title in the page: same size, same gap above, same gap below */
  main :is(h2, h3):not(:where(.shop-card *, .review-card *, .related-tour-card *)) { font-size: 1.5rem; line-height: 1.2; margin-top: 1.8rem !important; margin-bottom: 0.6rem !important; }
  main h2:first-child, main h3:first-child { margin-top: 0 !important; }
  .trip-page-link { margin-top: 0 !important; }
  main h2 + p:not(.trip-page-link), main h3 + p, main h2 + ul, main h3 + ul, main h2 + table, main h3 + table, main h2 + div, main h3 + div { margin-top: 0 !important; }

  /* transfers: the map right under its instruction, across the whole screen */
  .transfer-map-legend { margin-bottom: 0.7rem; }
  .transfer-map-hint { margin: 0; }
  .transfer-map-clear:not(.visible) { display: none; }
  .transfer-map-wrap { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); margin-bottom: 0; }
  .transfer-map-bg { border-radius: 0; box-shadow: none; }

  /* tap a car, scooter or treatment to book it */
  .row-book { display: table-cell !important; padding-left: 0 !important; color: var(--sage); font-family: var(--font-label); font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; text-align: right !important; }
  .price-table tr:has(.row-book) { cursor: pointer; }
  .price-table tr:has(.row-book):active { background: rgba(170,153,88,0.14); }
  .price-table thead th:last-child { text-align: right; }
  .price-table th, .price-table td { padding-left: 0.5rem; padding-right: 0.5rem; }

  /* tours: shortcuts at the top, and each card's form folded until "Book" is tapped */
  .hub-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.8rem; }
  .hub-jump button { padding: 0.5rem 1.05rem; border: 1px solid rgba(255,255,255,0.55); border-radius: 999px; background: transparent; color: var(--white); font-family: var(--font-body); font-size: 0.82rem; cursor: pointer; }
  .hub-jump button:active { background: rgba(255,255,255,0.15); }
  .pl-card-label { display: none; }
  .shop-card-body { padding: 1rem; gap: 0.5rem; }
  body:not(.home) .shop-grid { gap: 0.9rem; }

  .app-tabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 190; left: 0; right: 0; bottom: 0; padding: 5px 4px calc(5px + env(safe-area-inset-bottom)); background: rgba(250,247,240,0.97); border-top: 1px solid rgba(170,153,88,0.3); box-shadow: 0 -8px 26px rgba(51,55,39,0.12); }
  .app-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 4px 2px 2px; border: 0; background: none; color: var(--mid); font-family: var(--font-body); font-size: 0.7rem; font-weight: 500; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color 0.2s; }
  .app-tab svg, .app-sheet__cart svg { flex: none; display: block; width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .app-tab span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-tab img { flex: none; display: block; width: 68px; max-width: 100%; height: 32px; object-fit: contain; transition: transform 0.2s ease; }
  .app-tab--menu svg { height: 32px; }
  .app-tab:active svg, .app-tab:active img { transform: scale(0.88); }
  .app-tab.is-on img { transform: scale(1.08); }
  .app-tab.is-on, .app-tab--menu[aria-expanded="true"] { color: var(--sage); font-weight: 600; }
  .app-tab.is-on::before { content: ''; position: absolute; top: -5px; left: 50%; width: 26px; height: 3px; margin-left: -13px; border-radius: 0 0 3px 3px; background: var(--gold); }
  .app-tab--menu .cart-badge { top: 2px; right: calc(50% - 22px); font-style: normal; }

  .app-sheet { display: block; position: fixed; inset: 0; z-index: 300; }
  .app-sheet[hidden] { display: none; }
  .app-sheet__shade { position: absolute; inset: 0; background: rgba(30,32,24,0.5); opacity: 0; transition: opacity 0.3s ease; }
  .app-sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; padding: 6px 18px calc(24px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--ivory); box-shadow: 0 -18px 46px rgba(30,32,24,0.3); transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.25, 1); }
  .app-sheet.is-open .app-sheet__shade { opacity: 1; }
  .app-sheet.is-open .app-sheet__panel { transform: none; }
  .sheet-open, .sheet-open body { overflow: hidden; }
  .app-sheet__grip { width: 44px; height: 5px; margin: 6px auto 10px; border-radius: 3px; background: rgba(51,55,39,0.2); cursor: pointer; }
  .app-sheet__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
  .app-sheet__logo img { display: block; height: 34px; width: auto; }
  .app-sheet__x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(51,55,39,0.18); background: none; color: var(--dark); font-size: 1.4rem; line-height: 1; cursor: pointer; }
  .app-sheet__links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .app-sheet__links a { position: relative; display: flex; align-items: center; gap: 0.55rem; min-height: 50px; padding: 8px 14px; border-radius: 12px; background: var(--white); box-shadow: inset 0 0 0 1px rgba(51,55,39,0.1); color: var(--dark); font-family: var(--font-body); font-size: 0.92rem; text-decoration: none; }
  .app-sheet__links a:active { background: rgba(170,153,88,0.15); }
  .app-sheet__cart { grid-column: 1 / -1; font-weight: 500; }
  .app-sheet__links a.app-sheet__owner { background: var(--sage); color: var(--white); font-weight: 500; box-shadow: inset 0 0 0 1px var(--gold); }
  .app-sheet__links a.app-sheet__owner:active { background: var(--dark); }
  .app-sheet__cart .cart-badge { position: static; margin-left: auto; font-style: normal; }
  .app-sheet__lang { display: flex; justify-content: center; margin-top: 1.1rem; }
  .app-sheet__lang .lang-switch button svg { width: 30px; height: 19px; }
}
/* Phones: tour cards with a low landscape photo on top, so more than one fits on a screen */
@media (max-width: 699px) {
  /* a slimmer green heading on phones, for more room for the content */
  .simple-hero, .page-hero { min-height: 204px; padding-top: calc(72px + env(safe-area-inset-top)); padding-bottom: 1.2rem; }
  .simple-hero .breadcrumb, .page-hero .breadcrumb { display: none; }
  .simple-hero h1, .page-hero h1 { font-size: clamp(1.6rem, 7vw, 2rem); }
  .simple-hero h1 + p, .page-hero h1 + p { margin-top: 0.35rem !important; font-size: 0.82rem !important; line-height: 1.4; }
  .hub-jump { margin-top: 0.55rem; }
  .hub-jump button { padding: 0.35rem 0.9rem; font-size: 0.78rem; }
  body:not(.home) .shop-grid { grid-template-columns: minmax(0, 1fr); }
  body:not(.home) .shop-grid .shop-card { display: flex; flex-direction: column; min-width: 0; }
  body:not(.home) .shop-grid .shop-card-img { position: relative; flex: none; aspect-ratio: auto; height: 195px; overflow: hidden; }
  body:not(.home) .shop-grid .shop-card-img picture, body:not(.home) .shop-grid .shop-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  /* Koh Ngai: keep the rocks on the horizon, which sit high in the photo */
  body:not(.home) .shop-grid .shop-card-img img[src*="koh-ngai."] { object-position: center 18%; }
  body:not(.home) .shop-grid .shop-card-img img[src*="koh-kradan-water"] { object-position: center 72%; }
  body:not(.home) .shop-grid .shop-card-img img[src*="koh-ngai-water"] { object-position: center 42%; }
  body:not(.home) .shop-grid .shop-card-body { padding: 0.75rem 0.8rem 0.8rem; gap: 0.35rem; }
  body:not(.home) .shop-grid .shop-card-body h3 { font-size: 1.12rem; line-height: 1.2; }
  body:not(.home) .shop-grid .shop-card-body p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; flex: none; font-size: 0.8rem; line-height: 1.4; }
  body:not(.home) .shop-grid .shop-price { font-size: 1.15rem; }
  body:not(.home) .shop-grid .shop-select, body:not(.home) .shop-grid .shop-input { padding-left: 0.6rem; padding-right: 0.6rem; font-size: 0.85rem; }
  body:not(.home) .shop-grid .more-info-link { font-size: 0.72rem; }
}
/* iPad size: a floating tab bar, and the menu as a centred card */
@media (min-width: 600px) and (max-width: 1024px), (min-width: 600px) and (hover: none) and (pointer: coarse) and (max-width: 1400px) {
  body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .consent { bottom: calc(100px + env(safe-area-inset-bottom)); }
  .app-tabs { left: 50%; right: auto; bottom: calc(14px + env(safe-area-inset-bottom)); width: min(560px, calc(100% - 40px)); transform: translateX(-50%); padding: 6px 10px; border: 1px solid rgba(170,153,88,0.35); border-radius: 22px; box-shadow: 0 14px 38px rgba(51,55,39,0.22); }
  .app-tab { font-size: 0.76rem; }
  .app-tab.is-on::before { top: -6px; }
  .app-sheet__panel { left: 50%; right: auto; width: min(640px, 100%); margin-left: max(-320px, -50%); }
  .app-sheet__links { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .app-sheet__panel, .app-sheet__shade, #nav { transition: none !important; } }

/* Home "Get in touch": sage panel the width of the form */
.touch-panel { background: var(--sage); border-radius: 18px; padding: 2.5rem; }
.touch-panel h2 { color: var(--white); }
.touch-panel h2 em { color: var(--gold); }
.touch-panel .btn-submit { background: var(--gold); color: var(--white); }
.touch-panel .btn-submit:hover { background: var(--white); color: var(--sage); }
@media (max-width: 699px) { .touch-panel { padding: 1.6rem 1.25rem; } }
/* the smallest phones: keep the home title on one line */
@media (max-width: 359px) { .reel-headline { font-size: 10.6vw; } }

/* Phones and tablets: no slow zoom on the home film, resizing a playing video by a hair each frame makes it tremble */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) and (max-width: 1400px) {
  .reel-video { animation: none; transform: none; will-change: auto; }
}

/* Phones and tablets: the home film fills exactly what is visible on opening, so the title sits in the middle of the screen.
   100vh alone is taller than the screen on iPhones while Safari's bars are showing (svh needs iOS 15.4+, older ones keep vh) */
@media (max-width: 1024px), (hover: none) and (pointer: coarse) and (max-width: 1400px) {
  .reel-sticky { height: 100vh; height: 100svh; min-height: 0; }
}

/* Phones and small tablets: the map zoomed in by cropping the empty left 18% (there are no pins there). The wrap is made
   wider and pulled left past the screen edge, so every pin, line and pop-up keeps its percentage; the picture fills the screen. */
@media (max-width: 768px) {
  .transfer-map-wrap { width: 121.95vw; margin-left: calc(50% - 50vw - 21.95vw); margin-right: 0; }
  .transfer-map-bg { left: 18%; }
  .transfer-map-img { left: -21.95%; width: 121.95%; }
}

/* Stays page: the "Add your villa" box, in the style of the All-Inclusive card on the villa management page */
.stay-owner { background: var(--sage) !important; border-top: 3px solid var(--gold); }
.stay-owner .shop-card-body { justify-content: center; }
.stay-owner-label { display: block; font-family: var(--font-label); font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.6rem; }
.stay-owner h3 { color: var(--white); }
.stay-owner p { color: rgba(255,255,255,0.8); }
.stay-owner .btn-sage { background: var(--gold); color: var(--white); }

/* Mangrove and elephant pages: the photo on top, then each tour as its own separate card (owner, 10 Nov 2026) */
.shop-box { background: transparent; box-shadow: none; overflow: visible; }
.shop-box-media { box-shadow: 0 8px 40px rgba(0,0,0,0.09); margin-bottom: 2rem; }
.shop-box-cells { background: transparent; gap: 1.5rem; }
.shop-cell { box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
