/* =========================================================
   Destination Tour Packages listing (template-tour-listing.php)
   Builds on the shared .ttk system (tt-trek-detail.css) and the
   .ttc product card (tt-trip-ui.css). Only listing blocks here.
   ========================================================= */

/* ---------------------------------------------------------------- hero */
.tpl-hero { position: relative; padding: 26px 0 42px; background: linear-gradient(180deg, #f6f8fb 0%, #fff 100%); }
.tpl-hero + .ttk-nav { margin-top: 0; }
.tpl-hero__in { display: grid; gap: 40px; align-items: center; }
.tpl-hero__in.has-img { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.tpl-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.tpl-crumbs a { color: var(--muted); text-decoration: none; }
.tpl-crumbs a:hover { color: var(--o); }
.tpl-crumbs [aria-current] { font-weight: 600; color: var(--o); }
.tpl-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; color: var(--o); background: var(--o-wash, #fff3eb); border-radius: 999px; }
.tpl-h1 { margin: 18px 0 0; font-size: clamp(30px, 3.4vw, 46px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; color: var(--navy); }
.tpl-intro { margin-top: 14px; max-width: 640px; }
.tpl-intro p { font-size: 16px; line-height: 1.7; color: var(--body); }

.tpl-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.tpl-stats li { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 14px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.tpl-stats li .ttk-ic { color: var(--o); }
.tpl-stats strong { color: var(--navy); }

.tpl-hero__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tpl-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tpl-trust li { display: inline-flex; align-items: center; gap: 6px; }
.tpl-trust .ttk-ic { color: #157347; }

.tpl-hero__media { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mist); border-radius: 24px; box-shadow: 0 18px 44px rgb(18 41 74 / .14); }
.tpl-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.tpl-hero__badge { position: absolute; left: 16px; bottom: 16px; display: flex; flex-direction: column; padding: 10px 16px; line-height: 1.15; background: #fff; border-radius: 14px; box-shadow: 0 8px 24px rgb(18 41 74 / .16); }
.tpl-hero__badge small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tpl-hero__badge strong { font-size: 22px; font-weight: 800; color: var(--o); }

/* ------------------------------------------------------------- listing */
.tpl-list { margin-top: 44px; }
.tpl-list__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.tpl-sub { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.tpl-list__top > div:first-child { flex: 1 1 100%; }
.tpl-tools { display: flex; flex: 1 1 100%; flex-wrap: nowrap; align-items: center; gap: 10px; min-width: 0; }
.tpl-chips { display: flex; flex: 1 1 auto; flex-wrap: nowrap; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px 0; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.tpl-sort { flex: none; margin-left: auto; }
.tpl-chips::-webkit-scrollbar { display: none; }
.tpl .tpl-chips button { flex: none; padding: 8px 14px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.tpl .tpl-chips button:hover { border-color: var(--o); color: var(--o); }
.tpl .tpl-chips button.is-on { color: #fff; background: var(--o); border-color: var(--o); }
.tpl-sort { position: relative; display: inline-flex; align-items: center; }
.tpl-sort .ttk-ic { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.tpl .tpl-sort select { height: 40px; padding: 0 34px 0 34px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--navy); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px; border: 1px solid var(--line); border-radius: 999px; -webkit-appearance: none; appearance: none; cursor: pointer; }
.tpl-grid [hidden] { display: none !important; }
.tpl-empty { margin-top: 14px; font-size: 14.5px; color: var(--muted); }
.tpl-more { display: flex; justify-content: center; margin-top: 24px; }
.tpl-more[hidden] { display: none; }

/* --------------------------------------------------------------- body */
.tpl-layout { margin-top: 56px; }
.tpl-sec__img { margin: 0 0 16px; overflow: hidden; border-radius: 18px; }
.tpl-sec__img img { display: block; width: 100%; height: auto; }

.tpl-table { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.tpl-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tpl-table th { padding: 13px 16px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: left; color: var(--muted); background: var(--mist); }
.tpl-table td { padding: 13px 16px; color: var(--ink); border-top: 1px solid var(--line); }
.tpl-table td strong { color: var(--o); }
.tpl-table tbody tr:hover td { background: #fffaf6; }

/* Highlights + check lists (tour detail look) */
.tpl-hl { margin-bottom: 34px; padding: 22px 24px; background: #f5f8fc; border-radius: 20px; }
.tpl-hl__title { margin: 0 0 14px; font-size: 19px; font-weight: 800; color: var(--navy); }
.tpl-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin: 0; padding: 0; list-style: none; }
.tpl-checks li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.55; color: var(--ink); }
.tpl-ok,
.tpl-no { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 19px; height: 19px; margin-top: 2px; color: var(--o); border: 1.6px solid currentColor; border-radius: 50%; }
.tpl-no { color: #c62828; }
.tpl-checks--box { margin-bottom: 22px; }
.tpl-checks--box:last-child { margin-bottom: 0; }

.tpl-book__lead { margin: -4px 0 0; font-size: 14px; line-height: 1.5; color: var(--body); }

/* =========================================================
   Camping & Stays Guide (template-stay-guide.php)
   Editorial numbered rows instead of a card grid.
   ========================================================= */
.tsg-camps .tpl-list__top { margin-bottom: 16px; }

/* Quick list index */
.tsg-index { margin: 0 0 18px; background: #f5f8fc; border-radius: 18px; }
.tsg-index summary { display: flex; align-items: center; gap: 10px; padding: 15px 18px; font-size: 15px; font-weight: 700; color: var(--navy); list-style: none; cursor: pointer; }
.tsg-index summary::-webkit-details-marker { display: none; }
.tsg-index summary .ttk-ic { color: var(--o); }
.tsg-index__chev { width: 9px; height: 9px; margin-left: auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.tsg-index[open] .tsg-index__chev { transform: rotate(-135deg); }
.tsg-index__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 18px; max-height: 340px; margin: 0; padding: 0 12px 14px; overflow-y: auto; list-style: none; scrollbar-width: thin; }
.tsg-index__list a { display: flex; align-items: center; gap: 10px; padding: 8px 8px; text-decoration: none; border-radius: 10px; transition: background .15s; }
.tsg-index__list a:hover { background: #fff; }
.tsg-index__n { flex: none; width: 26px; font-size: 12.5px; font-weight: 800; color: var(--o); font-variant-numeric: tabular-nums; }
.tsg-index__t { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; line-height: 1.3; }
.tsg-index__t strong { overflow: hidden; font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; text-overflow: ellipsis; }
.tsg-index__t small { font-size: 12px; color: var(--muted); }
.tsg-index__p { flex: none; font-size: 13px; font-weight: 700; color: var(--ink); }

.tsg-filter { margin-bottom: 22px; }
.tsg .tsg-filter button { display: inline-flex; align-items: center; gap: 5px; }
.tsg .tsg-filter button .ttk-ic { opacity: .7; }

/* Camp rows */
.tsg-list { display: flex; flex-direction: column; }
.tsg-camp { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 26px; padding: 26px 0; border-top: 1px solid var(--line); scroll-margin-top: 130px; }
.tsg-camp:first-child { border-top: 0; padding-top: 4px; }
.tsg-camp[hidden] { display: none; }
.tsg-camp__media { position: relative; display: block; align-self: start; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mist); border-radius: 18px; }
.tsg-camp__media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .5s ease; }
a.tsg-camp__media:hover img { transform: scale(1.04); }
.tsg-camp__num { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 8px; font-size: 15px; font-weight: 800; color: var(--navy); background: #fff; border-radius: 12px; box-shadow: 0 6px 18px rgb(18 41 74 / .16); }
.tsg-camp__badge { position: absolute; right: 12px; bottom: 12px; padding: 5px 10px; font-size: 12px; font-weight: 700; color: #fff; background: var(--o); border-radius: 999px; }
.tsg-camp__body { display: flex; flex-direction: column; min-width: 0; }
.tsg-camp__title { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.25; color: var(--navy); }
.tsg-camp__title a { color: inherit; text-decoration: none; }
.tsg-camp__title a:hover { color: var(--o); }
.tsg-camp__loc { display: inline-flex; align-items: center; gap: 5px; margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.tsg-camp__loc .ttk-ic { color: var(--o); }
.tsg-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.tsg-facts li { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink); background: #f5f8fc; border-radius: 8px; }
.tsg-facts .ttk-ic { color: var(--navy); opacity: .7; }
.tsg-camp__desc { margin-top: 12px; }
.tsg-camp__desc p { font-size: 15px; line-height: 1.65; }
.tsg-camp__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; }
.tsg-camp__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; line-height: 1.2; }
.tsg-camp__price small { flex: 1 1 100%; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tsg-camp__price strong { font-size: 21px; font-weight: 800; color: var(--o); }
.tsg-camp__price strong.is-quote { font-size: 15px; color: var(--navy); }
.tsg-camp__price span { font-size: 13px; color: var(--muted); }
.tsg-camp__btns { display: flex; gap: 8px; }

/* Explore more tiles */
.tsg-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tsg-tile { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy); border-radius: 18px; text-decoration: none; }
.tsg-tile img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .5s ease; }
.tsg-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgb(10 26 48 / .78)); }
.tsg-tile:hover img { transform: scale(1.04); }
.tsg-tile__t { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 16.5px; font-weight: 700; color: #fff; }

@media (max-width: 1024px) {
	.tsg-camp { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
	.tsg-index__list { grid-template-columns: 1fr; max-height: 300px; }
	.tsg-camp { grid-template-columns: 1fr; gap: 14px; padding: 22px 0; }
	.tsg-camp__media { aspect-ratio: 16 / 10; }
	.tsg-camp__title { font-size: 19px; }
	.tsg-camp__foot { padding-top: 14px; }
	.tsg-camp__btns { flex: 1 1 100%; }
	.tsg-camp__btns .ttk-btn { flex: 1 1 0; justify-content: center; }
	.tsg-tiles { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------
   Stays guide: comparison cards (items without a description)
   Layout: photo / title + start point / specs strip / features / price + buttons
   --------------------------------------------------------------------- */
.tsg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tsg-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 20px; scroll-margin-top: 130px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.tsg-card:hover { border-color: #d7dfea; box-shadow: 0 16px 36px rgb(18 41 74 / .09); }
.tsg-card[hidden] { display: none; }
.tsg-card .tsg-camp__media { align-self: stretch; flex: none; width: 100%; aspect-ratio: 16 / 10; border-radius: 0; }
.tsg-card__body { display: flex; flex: 1 1 auto; flex-direction: column; padding: 18px 20px 20px; }
.tsg-card .tsg-camp__title { font-size: 18px; line-height: 1.3; }
.tsg-card .tsg-camp__loc { margin-top: 6px; font-size: 13.5px; }

/* Specs strip */
.tsg-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0; margin: 16px 0 0; overflow: hidden; background: #f7f9fc; border: 1px solid var(--line); border-radius: 14px; }
.tsg-specs > div { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; padding: 11px 12px; }
.tsg-specs > div + div { border-left: 1px solid var(--line); }
.tsg-specs .ttk-ic { grid-row: span 2; color: var(--o); }
.tsg-specs dt { margin: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tsg-specs dd { margin: 2px 0 0; font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--navy); }

/* Features: light inline list instead of chips */
.tsg-card .tsg-facts { gap: 8px 16px; margin: 16px 0 18px; }
.tsg-card .tsg-facts li { gap: 6px; padding: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); background: none; border-radius: 0; }
.tsg-card .tsg-facts .ttk-ic { color: var(--o); opacity: 1; }

/* Price + buttons */
.tsg-card .tsg-camp__foot { flex-wrap: nowrap; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.tsg-card .tsg-camp__btns { flex: none; gap: 8px; }
.tsg-camps--cards .tsg-camp__btns .ttk-btn { padding: 0 16px; }
@media (max-width: 640px) {
	.tsg-grid { grid-template-columns: 1fr; gap: 16px; }
	.tsg-card__body { padding: 16px 16px 18px; }
	.tsg-specs > div { padding: 10px; column-gap: 6px; }
	.tsg-card .tsg-camp__foot { flex-wrap: wrap; }
	.tsg-card .tsg-camp__btns { flex: 1 1 100%; }
	.tsg-card .tsg-camp__btns .ttk-btn { flex: 1 1 0; justify-content: center; }
}

/* --------------------------------------------------------- responsive */
@media (max-width: 1024px) {
	.tpl-hero__in.has-img { grid-template-columns: 1fr; gap: 26px; }
	.tpl-hero__media { order: -1; aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
	.tpl-hero { padding: 16px 0 30px; }
	.tpl-hero__media { border-radius: 18px; }
	.tpl-hero__badge strong { font-size: 19px; }
	.tpl-stats li { padding: 8px 12px; font-size: 13px; }
	.tpl-hero__btns .ttk-btn { flex: 1 1 auto; justify-content: center; }
	.tpl-list { margin-top: 32px; }
	.tpl-tools { width: 100%; }
	.tpl-chips { flex: 1 1 100%; }
	.tpl-layout { margin-top: 36px; }
	.tpl-checks { grid-template-columns: 1fr; gap: 10px; }
	.tpl-hl { padding: 18px 16px; }
	.tpl-table thead { display: none; }
	.tpl-table tr { display: block; padding: 10px 14px; border-top: 1px solid var(--line); }
	.tpl-table tr:first-child { border-top: 0; }
	.tpl-table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
	.tpl-table td::before { content: attr(data-th); font-size: 12px; font-weight: 700; color: var(--muted); }
}
