/*
Theme Name:   Cambodia Destination OTA
Theme URI:    https://cambodiadestination.com
Author:       Cambodia Destination
Author URI:   https://cambodiadestination.com
Description:  OTA-style tour marketplace theme for cambodiadestination.com. Native Tour Engine (destination/experience/duration/travel_style taxonomies on a single `tour` post type), optional WooCommerce checkout, request-to-book CRM fallback. Replaces the knowledge-graph model of v1.x with Destination -> Experience -> Product -> Departure -> Availability -> Booking -> Traveler -> Supplier -> Review.
Version:      2.9.7
Requires at least: 6.5
Requires PHP: 8.0
WC requires at least: 8.0
WC tested up to: 11.0
Text Domain:  cambodia-destination-ota
Domain Path:  /languages
Tags:         travel, tourism, e-commerce, booking, custom-menu, custom-logo, featured-images

Cambodia Destination OTA Theme, (C) 2026 Cambodia Destination
Distributed under the terms of the GNU GPL v2 or later.

2.1.0 — header.php / footer.php redesigned to match the
cambodia-destination-1_17_1 theme's structure: sticky/hero-transparent
header with phone + cart CTAs and a mobile nav drawer, and a richer
footer (brand column, model-driven Explore/Company links, newsletter
signup). Self-hosted Fraunces/Public Sans/IBM Plex Mono added so the
existing --font-display/--font-body/--font-mono tokens actually resolve.

2.5.0 — Header "Destinations" dropdown now nests a third level: every
province flies out into its own Tours / Activities / Experiences /
Things To Do / Places / Plan My Trip★ / Travel Intelligence / Community
/ Partners, matching the Cambodia Destination site map one-to-one
(cdota_destination_hub_children() in inc/nav-model.php). Replaces the
old flat "Things To Do" group that used to sit under Destinations as
site-wide siblings instead of per-province links. Fallback menu render
(cdota_fallback_primary_menu() in inc/setup.php) now recurses via
cdota_render_nav_children() to draw the extra level; style.css adds the
.sub-menu-flyout desktop flyout and mobile accordion styling for it.

2.8.0 — New homepage "Trusted Network" layer (front-page.php §6, between
Featured Experiences and the Plan My Trip band): a 4-card grid naming the
real operators behind this site's bookable tours — AAA Trails (booking &
operations), Adventure Ancient Angkor (temple & adventure touring),
Angkor Asia Adventures (regional adventure travel) and KPT Tours (tours &
transfers) — each linking out to the partner's own site. Data lives in
cdota_trusted_network() (inc/nav-model.php), filterable via the
`cdota_trusted_network` hook so a site owner can edit/reorder partners
without touching the theme. New .network-grid/.network-card/
.network-card-tags styles, reusing the existing --laterite/--stone-dim
tokens and .info-card shadow/radius language so the section reads as
part of the same design system as the rest of the homepage.

2.9.0 — Header and footer "Main" nav restructured to exactly the four IA
pillars — Tours / Activities / Experiences / Destinations, no Home item
(the logo already links home) and no flat Contact item (the phone CTA in
.header-actions covers that). Concretely:
  - template-parts/header-nav.php now always calls cdota_nav('primary'),
    which falls back to cdota_fallback_primary_menu() (inc/setup.php) —
    the full mega-dropdown model that was previously wired up but unused.
    "Destinations" expands into all 11 provinces
    (cdota_destination_nav_children()), each of which flies out its own
    Tours/Activities/Experiences/Things To Do/Places/Plan My Trip★/Travel
    Intelligence/Community/Partners third level
    (cdota_destination_hub_children()) — matching the site map exactly.
    No CSS changes needed: the .sub-menu/.sub-menu-flyout dropdown and
    mobile-accordion styles already existed for this, just weren't being
    rendered.
  - cdota_primary_nav_model() (inc/nav-model.php) drops the old "Home"
    entry so the fallback menu renders exactly the four pillars.
    cdota_header_nav_model() (the old flat 5-item bar) is no longer
    called by header.php — left in place, filterable, for anyone who
    hooked it directly.
  - cdota_footer_explore_model() trimmed from 8 items to the same 4
    pillars as the header, so header and footer read as one IA. Things To
    Do / Places / Travel Intelligence / Community — now nested per
    destination — stay reachable site-wide via the existing secondary
    "intelligence" subnav (cdota_secondary_nav_model(), .site-subnav)
    rather than duplicated in the footer.
  - `destination` taxonomy: renamed "Sihanoukville & Islands" to "Coast &
    Islands" in cdota_seed_taxonomy_terms() (inc/cpt-tour.php), with a
    one-time wp_update_term() rename-in-place for existing installs
    (keeps the term's slug and any tagged tours; no-ops once renamed).
    Fixed front-page.php's Popular Destinations chips, which were
    pointing at the old pre-split combined term names ("Siem Reap &
    Angkor", "Kampot & Kep") and silently falling back to the /tours/ hub
    — they now resolve to the real per-province terms (Siem Reap, Angkor,
    Phnom Penh, Battambang, Kampot, Kep, Coast & Islands). Also updated
    page-places.php's "Coast & Islands" region label to match.
*/

/* ==========================================================================
   DESIGN TOKENS — kept from v1.x palette (laterite stone / jungle / river),
   simplified for a commerce-first UI: fewer trust-badge tones, more room
   given to price/CTA contrast.
   ========================================================================== */
:root{
  --ink:            #221a10;
  --ink-soft:       #4a3c2c;
  --stone:          #fdf3e2;
  --stone-dim:      #f7e6c4;
  --paper:          #fffaf0;
  --laterite:       #c14a26;
  --laterite-dark:  #8f3418;
  --coral:          #ef7d4c;
  --jungle:         #1f6b4a;
  --jungle-light:   #3a9166;
  --river:          #1f8f8a;
  --border:         #e6d5ae;
  --success:        #1f6b4a;
  --white:          #ffffff;

  /* AAAtrails-brand gold — the "Plan my trip" / "Find tours" / "Subscribe"
     pill-button color, distinct from the terracotta --laterite used for
     badges/prices/accents elsewhere. */
  --gold:           #eeae05;
  --gold-dark:      #c99204;
  --nav-bg:         #fbeecb;
  --header-topline: #4f3439;

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-card: 0 1px 2px rgba(34,26,16,.06), 0 8px 24px rgba(34,26,16,.08);
  --shadow-panel: 0 4px 12px rgba(34,26,16,.10), 0 16px 40px rgba(34,26,16,.10);

  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Safety net: nothing in this stylesheet should need to scroll the page
   sideways on any device, so if a future addition slips past the
   min-width/truncation fixes above and below, it clips instead of
   opening a horizontal scrollbar on the whole site. Set on <html> only,
   not <body> — forcing overflow-x on body also forces overflow-y:auto on
   it per the CSS overflow spec, which would make body (not the viewport)
   the scrolling ancestor and can misalign .site-header's position:sticky. */
html { overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--stone);
  line-height: 1.5;
}
h1,h2,h3,h4 { font-family: var(--font-display); margin: 0 0 .5em; line-height: 1.15; }
a { color: var(--laterite); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4em; font-weight: 600; font-size: .95rem;
  padding: .75em 1.4em; border-radius: var(--radius-md);
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--laterite); color: var(--white); }
.btn-primary:hover { background: var(--laterite-dark); }
.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--laterite); }
.btn-whatsapp { background: #25D366; color: var(--white); }
.btn-block { width: 100%; }

/* ---- Header / Nav ---- */
.skip-link { position: absolute; top: -60px; left: 0; z-index: 100; background: var(--ink); color: var(--white); padding: 10px 16px; }
.skip-link:focus { top: 0; }
.site-header { background: var(--nav-bg); position: sticky; top: 0; z-index: 50; transition: background-color .25s ease, border-color .25s ease; border-top: 4px solid var(--header-topline); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; gap: 24px; }
.site-branding { min-width: 0; flex-shrink: 1; }
.site-branding a { display: flex; align-items: center; gap: 10px; min-width: 0; font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); font-weight: 600; }
.site-branding img, .site-branding svg { height: 40px; width: auto; flex-shrink: 0; display: block; }
.site-branding .custom-logo-link { display: flex; min-width: 0; }
/* A long site title must truncate rather than force .header-inner (a flex
   row with no wrap) wider than the viewport — flex children only shrink
   past their text's intrinsic width once it can ellipsis like this. */
.site-title { transition: color .25s ease; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.header-actions { flex-shrink: 0; }

/* ---- Header + hero, layered as one — ported from the
   cambodia-destination-1_17_1 "traveler-safety" theme's header.php.
   On the front page only, the header starts transparent and absolutely
   positioned so the hero fills the full viewport behind it with no seam.
   assets/js/main.js adds .is-scrolled once the visitor scrolls past the
   hero, at which point it becomes a normal fixed, solid header — the same
   visual the sticky header always had, just deferred. No layout shift: it
   simply falls back to the transparent state, which still reads fine
   against the hero's own dark scrim (.hero-search-scrim). ---- */
.site-header.header-on-hero {
  position: absolute; top: 0; left: 0; right: 0; z-index: 100;
  background: transparent; border-top-color: transparent;
}
.site-header.header-on-hero:not(.is-scrolled) .site-title { color: var(--white); }
.site-header.header-on-hero:not(.is-scrolled) .header-phone > span:first-child,
.site-header.header-on-hero:not(.is-scrolled) .header-phone-number { color: var(--white); }
body:not(.nav-open) .site-header.header-on-hero:not(.is-scrolled) .primary-nav a { color: var(--white); }
body:not(.nav-open) .site-header.header-on-hero:not(.is-scrolled) .primary-nav a:hover,
body:not(.nav-open) .site-header.header-on-hero:not(.is-scrolled) .primary-nav a:focus-visible { color: var(--gold); }
.site-header.header-on-hero:not(.is-scrolled) .menu-toggle span { background: var(--white); }
.site-header.header-on-hero.is-scrolled {
  position: fixed;
  background: var(--nav-bg); border-top-color: var(--header-topline);
  box-shadow: var(--shadow-card);
}

.primary-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.primary-nav li { position: relative; }
.primary-nav a {
  display: block; color: var(--ink-soft); font-weight: 600; font-size: .93rem;
  padding: .55em 1em; border-radius: 999px; transition: background-color .15s ease, color .15s ease;
}
.primary-nav a:hover { text-decoration: none; color: var(--ink); }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav .menu-item.current > a { background: var(--paper); color: var(--ink); }

/* Dropdown caret + hover submenu for items with children */
.primary-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.primary-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 200px; max-height: 70vh; overflow-y: auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-panel); padding: 8px; margin: 6px 0 0; z-index: 60; }
.primary-nav .sub-menu a { color: var(--ink-soft); border-radius: var(--radius-sm); padding: .6em .8em; }
.primary-nav .sub-menu a:hover { background: var(--stone); color: var(--ink); }
.primary-nav .sub-menu .subnav-star > a { color: var(--laterite); font-weight: 700; }
.primary-nav .sub-menu .menu-divider { display: flex; align-items: center; gap: 8px; margin: 10px 4px 4px; padding-top: 10px; border-top: 1px solid var(--border); }
.primary-nav .sub-menu li:first-child.menu-divider { margin-top: 4px; padding-top: 0; border-top: none; }
.primary-nav .sub-menu .menu-divider span { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.primary-nav .menu-item-has-children:hover > .sub-menu,
.primary-nav .menu-item-has-children:focus-within > .sub-menu { display: block; }

/* Third level — Destinations > each province > Tours/Activities/…/Partners.
   Flyout to the right of the second-level dropdown so eleven provinces
   don't have to fit in one tall list. */
.primary-nav .sub-menu .menu-item-has-children > a::after { transform: translateY(-3px) rotate(-45deg); }
.primary-nav .sub-menu-flyout { display: none; position: absolute; top: -9px; left: 100%; margin: 0 0 0 4px; min-width: 210px; max-height: 70vh; overflow-y: auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-panel); padding: 8px; z-index: 61; }
.primary-nav .sub-menu li.menu-item-has-children:hover > .sub-menu-flyout,
.primary-nav .sub-menu li.menu-item-has-children:focus-within > .sub-menu-flyout { display: block; }
.primary-nav .sub-menu-flyout .subnav-star > a { color: var(--laterite); font-weight: 700; }

.header-actions { display: flex; gap: 18px; align-items: center; }

/* Header phone CTA — "TALK TO US" label stacked over the number */
.header-phone { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.header-phone > span:first-child { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.header-phone-number { font-weight: 700; color: var(--ink); font-size: .92rem; }

/* Header cart */
.header-cart { position: relative; font-weight: 600; color: var(--ink-soft); }
.cart-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; margin-left: 4px; background: var(--laterite); color: var(--white); border-radius: 999px; font-size: .72rem; font-weight: 700; }

/* Gold pill CTA — "Plan my trip" */
.btn-gold { background: var(--gold); color: var(--ink); border-radius: 999px; font-weight: 700; }
.btn-gold:hover { background: var(--gold-dark); }

/* Mobile menu toggle */
.menu-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); }

@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .primary-nav { position: fixed; inset: 0 0 0 30%; z-index: 70; background: var(--paper); padding: 90px 24px 24px; transform: translateX(100%); transition: transform .2s ease; overflow-x: hidden; overflow-y: auto; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .primary-nav a { padding: .8em .2em; }
  /* min-width from the desktop hover-dropdown rules must not carry over
     here — the drawer itself can be narrower than 200/210px on small
     phones (inset: 0 0 0 30% leaves ~224px total on a 320px-wide screen,
     minus this rule's own 24px side padding), so without this override
     the second/third-level lists overflow the drawer horizontally. */
  .primary-nav .sub-menu,
  .primary-nav .sub-menu-flyout { min-width: 0; max-width: 100%; }
  .primary-nav .sub-menu { position: static; box-shadow: none; border: none; padding-left: 12px; margin: 0; display: block; }
  .primary-nav .sub-menu-flyout { position: static; box-shadow: none; border: none; border-left: 2px solid var(--border); padding: 0 0 0 10px; margin: 2px 0 6px 8px; display: block; max-height: none; }
  .primary-nav .sub-menu .menu-item-has-children > a::after { transform: translateY(-3px) rotate(45deg); }
  body.nav-open .primary-nav { transform: translateX(0); }
  /* Lock background scroll behind the open drawer so the page underneath
     doesn't scroll along with it on touch devices. */
  body.nav-open { overflow: hidden; }
  .header-phone { display: none; }
}
/* Very narrow phones (~360px and under): drawer's 70% width still leaves
   enough room once min-width is cleared above, but pull side padding in a
   touch so third-level flyout text has more room to breathe. */
@media (max-width: 360px) {
  .primary-nav { inset: 0 0 0 22%; padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 420px) {
  /* Logo + long site name + cart + gold CTA + toggle is a lot for a
     narrow phone row — tighten the row and shrink the CTA rather than
     let any one piece win the fight for space and push the rest off. */
  .header-inner { gap: 10px; padding: 10px 14px; }
  .header-actions { gap: 10px; }
  .site-title { max-width: 38vw; }
  .btn-gold { padding: .6em 1em; font-size: .85rem; }
}
@media (max-width: 340px) {
  /* Below this, even the shrunk CTA + logo + toggle is tight — drop the
     site name entirely and let the logo mark alone carry the brand. */
  .site-title { display: none; }
}

/* ---- Hero / search ---- */
.hero-search {
  position: relative; background: var(--ink) center/cover no-repeat;
  min-height: 460px; display: flex; align-items: center;
}
.hero-search-scrim {
  width: 100%; background: linear-gradient(180deg, rgba(20,14,7,.15) 0%, rgba(20,14,7,.55) 75%, rgba(20,14,7,.7) 100%);
  padding: 110px 0 90px;
}
.hero-search-content { max-width: 640px; }
.hero-eyebrow { color: var(--gold); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .6em; padding-left: 22px; position: relative; }
.hero-eyebrow::before { content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 2px; background: var(--gold); transform: translateY(-50%); }
.hero-search h1 { color: var(--white); font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 .4em; }
.hero-subtext { color: rgba(255,255,255,.88); font-size: 1.05rem; max-width: 46ch; margin: 0; }

/* Cream band below the photo — the search card is pulled up with a
   negative margin so it straddles the photo/band boundary, matching the
   reference's half-on-image, half-on-cream search card. */
.hero-search-band { background: var(--stone-dim); padding: 0 0 36px; }
.hero-search-form {
  position: relative; margin-top: -46px; display: flex; flex-wrap: wrap; align-items: end; gap: 10px;
  background: var(--white); padding: 18px 20px; border-radius: var(--radius-lg); box-shadow: var(--shadow-panel); z-index: 2;
}
.hero-search-field { flex: 1 1 160px; display: flex; flex-direction: column; gap: 4px; }
.hero-search-field-keyword { flex: 1 1 220px; }
.hero-search-field label { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.hero-search-field select, .hero-search-field input {
  border: none; padding: .35em 0; font-family: var(--font-body); font-size: 1rem; color: var(--ink); background: transparent;
}
.hero-search-field select:focus, .hero-search-field input:focus { outline: none; }
.hero-search-form .btn { align-self: center; padding: .9em 1.8em; }

.hero-trust-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 32px; margin: 24px 0 0; padding: 0; }
.hero-trust-badges li { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 200px; }
.hero-trust-icon { color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.hero-trust-badges strong { display: block; font-size: .92rem; color: var(--ink); }
.hero-trust-badges small { display: block; font-size: .82rem; color: var(--ink-soft); }

@media (max-width: 780px) {
  .hero-search { min-height: 0; }
  .hero-search-scrim { padding: 60px 0 70px; }
  .hero-search-form { flex-direction: column; align-items: stretch; margin-top: -30px; }
  .hero-search-form .btn { width: 100%; }
}

/* ---- Interest chips ---- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.chip { background: var(--white); border: 1px solid var(--border); border-radius: 999px; padding: .5em 1em; font-weight: 600; font-size: .88rem; color: var(--ink-soft); }
.chip:hover { border-color: var(--laterite); color: var(--laterite); }

/* ---- Tour grid & cards ---- */
.tour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; margin: 24px 0 48px; }
.tour-card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-card); display: flex; flex-direction: column; transition: transform .15s ease;
}
.tour-card:hover { transform: translateY(-3px); }
.tour-card-media { position: relative; aspect-ratio: 4/3; background: var(--stone-dim); overflow: hidden; }
.tour-card-media img { width: 100%; height: 100%; object-fit: cover; }
.tour-card-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; }
.badge { background: rgba(255,255,255,.94); border-radius: 999px; padding: .3em .7em; font-size: .78rem; font-weight: 700; display:flex; align-items:center; gap:.3em; }
.badge-verified { color: var(--jungle); }
.tour-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tour-card-title { font-size: 1.05rem; margin: 0; }
.tour-card-title a { color: var(--ink); }
.tour-card-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: var(--ink-soft); }
.tour-card-checks { list-style: none; margin: 0; padding: 0; font-size: .85rem; color: var(--ink-soft); }
.tour-card-checks li::before { content: "✓ "; color: var(--jungle); font-weight: 700; }
.tour-card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; border-top: 1px dashed var(--border); }
.tour-card-price { font-weight: 700; }
.tour-card-price small { font-weight: 400; color: var(--ink-soft); }
.tour-card-actions { display: flex; gap: 8px; }
.tour-card-actions .btn { padding: .5em 1em; font-size: .85rem; }

/* ---- Filter bar ---- */
.filter-bar { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.filter-bar select, .filter-bar input { padding: .6em .8em; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; }

/* ---- Single tour layout ---- */
.tour-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 36px; align-items: start; padding: 32px 0 64px; }
@media (max-width: 900px) { .tour-layout { grid-template-columns: 1fr; } }
.tour-fact-strip { display: flex; flex-wrap: wrap; gap: 18px; color: var(--ink-soft); font-size: .95rem; margin: 10px 0 24px; }
.tour-fact-strip strong { color: var(--ink); }
.tour-highlights { list-style: none; margin: 0 0 28px; padding: 0; }
.tour-highlights li { padding: .4em 0 .4em 1.6em; position: relative; }
.tour-highlights li::before { content: "◆"; color: var(--laterite); position: absolute; left: 0; font-size: .8em; top: .6em; }

/* ---- Booking panel ---- */
.booking-panel {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-panel); position: sticky; top: 90px;
}
.booking-panel .price-lead { font-size: 1.5rem; font-weight: 700; }
.booking-panel .price-lead small { font-size: .9rem; font-weight: 400; color: var(--ink-soft); }
.booking-field { margin-bottom: 14px; }
.booking-field label { display: block; font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 6px; }
.booking-field select, .booking-field input[type=date] { width: 100%; padding: .7em .8em; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .95rem; }
.stepper { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .4em .6em; justify-content: space-between; }
.stepper button { border: 1px solid var(--border); background: var(--stone); width: 30px; height: 30px; border-radius: 50%; font-size: 1rem; cursor: pointer; }
.radio-row { display: flex; gap: 14px; }
.radio-row label { display: flex; gap: 6px; align-items: center; font-size: .92rem; font-weight: 500; }
.booking-channels { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.availability-msg { font-size: .85rem; margin-top: 8px; color: var(--ink-soft); }
.availability-msg.ok { color: var(--jungle); }
.availability-msg.err { color: var(--laterite-dark); }

/* ---- Supplier / trust block ---- */
.supplier-block { display: flex; gap: 14px; align-items: center; padding: 18px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); margin: 24px 0; }
.supplier-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--stone-dim); flex-shrink: 0; }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: var(--stone); margin-top: 60px; padding: 56px 0 24px; }
.site-footer a { color: var(--stone-dim); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 32px; }
.footer-grid h4 { color: var(--white); font-size: .95rem; font-weight: 700; margin: 0 0 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; color: #cbb98f; }

.footer-brand a { font-family: var(--font-display); font-size: 1.3rem; color: var(--white); font-weight: 700; }
.footer-brand p { margin: 12px 0 16px; color: var(--stone-dim); font-size: .92rem; line-height: 1.6; max-width: 32ch; }
.footer-contact { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.footer-contact li { margin-bottom: 6px; }
.footer-newsletter-lede { font-size: .88rem; color: var(--stone-dim); margin: 0 0 14px; line-height: 1.5; }
.footer-subscribe { display: flex; flex-direction: column; gap: 10px; }
.footer-subscribe input[type=email] { padding: .8em 1em; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: var(--white); font-size: .9rem; }
.footer-subscribe input[type=email]::placeholder { color: #a89678; }
.footer-subscribe .btn { padding: .8em 1.4em; }

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- Collections / shelves ---- */
.section { padding: 24px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.section-head a { font-size: .9rem; font-weight: 600; }

/* ============================================================
   Header secondary nav ("intelligence layer") — v2.3
   ============================================================ */
.site-subnav { background: var(--stone); border-top: 1px solid var(--border); }
.site-subnav .container { padding-top: 0; padding-bottom: 0; }
.site-subnav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-subnav li { position: relative; }
.site-subnav a {
  display: inline-block; padding: .7em .9em; font-size: .82rem; font-weight: 600;
  letter-spacing: .01em; color: var(--ink-soft); border-radius: var(--radius-sm);
}
.site-subnav a:hover { text-decoration: none; color: var(--laterite); background: var(--white); }
.site-subnav .current-menu-item > a { color: var(--ink); background: var(--white); }
.site-subnav .subnav-star > a { color: var(--laterite-dark); font-weight: 700; }
.site-subnav .subnav-star > a::before { content: "★ "; color: var(--gold-dark); }

/* ============================================================
   Hero CTA buttons
   ============================================================ */
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-cta .btn { padding: .85em 1.6em; }
.btn-hero-ghost { background: rgba(255,255,255,.12); color: var(--white); border: 1.5px solid rgba(255,255,255,.7); border-radius: 999px; font-weight: 700; }
.btn-hero-ghost:hover { background: var(--white); color: var(--ink); }
.btn-lg { padding: 1em 2em; font-size: 1.02rem; }

/* ============================================================
   Homepage — Explore Cambodia cards
   ============================================================ */
.section-sub { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .02em; color: var(--ink-soft); }
.explore-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 16px; }
.explore-card {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 20px 18px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); transition: transform .15s ease, border-color .15s ease; min-height: 128px;
}
.explore-card:hover { transform: translateY(-3px); border-color: var(--laterite); text-decoration: none; }
.explore-card-label { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); }
.explore-card-tagline { font-size: .9rem; color: var(--ink-soft); flex: 1; }
.explore-card-arrow { color: var(--laterite); font-weight: 700; font-size: 1.1rem; }

/* ============================================================
   Homepage — Popular Destinations row
   ============================================================ */
.dest-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.dest-chip {
  background: var(--stone-dim); border: 1px solid var(--border); border-radius: 999px;
  padding: .6em 1.1em; font-weight: 700; font-size: .9rem; color: var(--ink);
}
.dest-chip:hover { background: var(--laterite); color: var(--white); border-color: var(--laterite); text-decoration: none; }

/* ============================================================
   Homepage — Trusted Network (cdota_trusted_network(), front-page.php)
   ============================================================ */
.section-lede { color: var(--ink-soft); font-size: .96rem; max-width: 62ch; margin: 6px 0 0; }
.network-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 20px; }
.network-card {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-card);
  transition: transform .15s ease, border-color .15s ease;
}
.network-card:hover { transform: translateY(-3px); border-color: var(--laterite); }
.network-card-eyebrow { display: block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--laterite); margin-bottom: .5em; }
.network-card h3 { margin: 0 0 .4em; font-size: 1.1rem; }
.network-card h3 a { color: var(--ink); }
.network-card h3 a:hover { color: var(--laterite); text-decoration: none; }
.network-card p { margin: 0; color: var(--ink-soft); font-size: .9rem; flex: 1; }
.network-card-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; }
.network-card-tags li {
  background: var(--stone-dim); border: 1px solid var(--border); border-radius: 999px;
  padding: .35em .8em; font-size: .74rem; font-weight: 600; color: var(--ink-soft);
}

/* ============================================================
   Homepage — Plan My Trip band
   ============================================================ */
.home-plan { background: var(--ink); color: var(--stone); margin-top: 24px; }
.home-plan-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-top: 40px; padding-bottom: 40px; }
.home-plan-copy h2 { color: var(--white); margin: 0 0 .3em; }
.home-plan-copy p { color: var(--stone-dim); margin: 0; max-width: 640px; }

/* ============================================================
   Responsive — subnav + homepage sections
   ============================================================ */
@media (max-width: 900px) {
  .explore-grid { grid-template-columns: repeat(2, 1fr); }
  /* Subnav becomes a single horizontal scroll strip so all entries stay
     reachable without touching the off-canvas primary menu. */
  .site-subnav ul { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .site-subnav a { white-space: nowrap; }
  .home-plan-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .explore-grid { grid-template-columns: 1fr; }
  .network-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Traveler Reviews — v2.4
   ============================================================ */
.tour-reviews { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 24px; }
.cdota-stars { color: var(--gold); letter-spacing: 1px; }
.reviews-aggregate { display: inline-flex; align-items: baseline; gap: 8px; font-size: .95rem; }
.reviews-aggregate strong { font-size: 1.1rem; color: var(--ink); }
.reviews-count { color: var(--ink-soft); font-size: .88rem; }
.reviews-notice { border-radius: var(--radius-md); padding: .8em 1em; font-size: .92rem; margin: 12px 0; }
.reviews-notice-ok { background: #eef6f0; color: var(--jungle); border: 1px solid #bfe0cc; }
.reviews-notice-err { background: #fdecea; color: var(--laterite-dark); border: 1px solid #f2c4b8; }
.reviews-empty { color: var(--ink-soft); }
.reviews-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.review-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; }
.review-item-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.review-author { font-weight: 700; color: var(--ink); }
.review-date { color: var(--ink-soft); font-size: .82rem; }
.review-title { margin: 2px 0 6px; }
.review-body { color: var(--ink-soft); }
.review-body p { margin: 0 0 .5em; }

.review-form-wrap { margin-top: 20px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--stone); }
.review-form-wrap > summary { cursor: pointer; padding: 12px 16px; font-weight: 700; color: var(--ink); list-style: none; }
.review-form-wrap > summary::-webkit-details-marker { display: none; }
.review-form-wrap > summary::before { content: "＋ "; color: var(--laterite); font-weight: 700; }
.review-form-wrap[open] > summary::before { content: "－ "; }
.review-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 4px 16px 18px; }
.review-field { display: flex; flex-direction: column; gap: 4px; }
.review-field-full { grid-column: 1 / -1; }
.review-field label { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.review-field input, .review-field select, .review-field textarea {
  padding: .6em .7em; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--white); font: inherit; color: var(--ink);
}
.review-field input:focus, .review-field select:focus, .review-field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.review-form .btn { grid-column: 1 / -1; justify-self: start; }
.review-form-note { grid-column: 1 / -1; margin: 0; font-size: .8rem; color: var(--ink-soft); }
@media (max-width: 780px) { .review-form { grid-template-columns: 1fr; } }

/* ==========================================================================
   PAGE LAYER — interior/front pages (page-destinations.php, page-things-
   to-do.php, page-places.php, page-plan-my-trip.php, page-travel-
   intelligence.php, page-community.php, page-partners.php). Shared visual
   vocabulary so seven otherwise-unrelated landing pages read as one site:
   a compact dark hero, breadcrumb, stat row, info/place card grids, and a
   two-column lead-capture form panel.
   ========================================================================== */

.breadcrumb ol { flex-wrap: wrap; }

.page-hero { background: var(--ink); padding: 44px 0 40px; }
.page-hero .container { max-width: 760px; }
.page-hero .hero-eyebrow { color: var(--gold); }
.page-hero h1 { color: var(--white); font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 0 0 .35em; }
.page-hero p { color: rgba(255,255,255,.86); font-size: 1.02rem; max-width: 58ch; margin: 0; }

.stat-row { display: flex; flex-wrap: wrap; gap: 32px; margin: 4px 0 8px; }
.stat-item strong { display: block; font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--laterite); }
.stat-item span { font-size: .85rem; color: var(--ink-soft); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin: 20px 0 40px; }
.info-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-card); }
.info-card-eyebrow { display: block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--laterite); margin-bottom: .5em; }
.info-card h3 { margin: 0 0 .4em; font-size: 1.05rem; }
.info-card p { margin: 0; color: var(--ink-soft); font-size: .92rem; }

.place-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin: 20px 0 40px; }
.place-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-card); }
.place-card-region { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--jungle); background: #eef6f0; border-radius: 999px; padding: .25em .8em; margin-bottom: .6em; }
.place-card h3 { margin: 0 0 .35em; font-size: 1.05rem; }
.place-card p { margin: 0; color: var(--ink-soft); font-size: .9rem; }

.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; margin: 20px 0 40px; }
.testimonial-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 8px; }
.testimonial-card .cdota-stars { color: var(--gold-dark); }
.testimonial-body { color: var(--ink-soft); font-size: .92rem; margin: 0; flex: 1; }
.testimonial-author { font-weight: 700; color: var(--ink); }
.testimonial-tour { font-size: .8rem; color: var(--ink-soft); }

/* ==========================================================================
   Destination hub page (taxonomy-destination.php) — a page-hero with an
   optional per-term photo, a horizontal tab strip of anchor links onto the
   nine IA sections below it, and a rounded variant of .home-plan for the
   in-page "Plan My Trip★" CTA.
   ========================================================================== */

.dest-hero { background-size: cover; background-position: center; }

.dest-hub-tabs { position: sticky; top: 73px; z-index: 40; background: var(--white); border-bottom: 1px solid var(--border); }
.dest-hub-tabs-inner { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.dest-hub-tabs-inner::-webkit-scrollbar { display: none; }
.dest-hub-tab { flex: 0 0 auto; padding: 14px 16px; font-size: .86rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; border-bottom: 2px solid transparent; }
.dest-hub-tab:hover { color: var(--laterite); text-decoration: none; }
.dest-hub-tab-star { color: var(--laterite); }

.dest-hub-section { scroll-margin-top: 108px; }

.dest-hub-plan { border-radius: var(--radius-lg); margin-top: 0; }
.testimonial-tour a { color: inherit; text-decoration: underline; }

.form-panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-panel); margin: 20px 0 40px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field-full { grid-column: 1 / -1; }
.form-field label { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.form-field input, .form-field select, .form-field textarea {
  padding: .7em .8em; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--white); font: inherit; color: var(--ink); width: 100%;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.form-field-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.form-field-checks label { display: flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink); }
.form-grid .btn { grid-column: 1 / -1; justify-self: start; }
.form-note { grid-column: 1 / -1; margin: 0; font-size: .8rem; color: var(--ink-soft); }

@media (max-width: 780px) {
  .form-grid { grid-template-columns: 1fr; }
  .stat-row { gap: 22px; }
}
