/**
 * Tour Detail Page — scoped styles.
 *
 * Everything here lives under `.tour-detail` so nothing bleeds into the
 * homepage/archive, which reuse global classes like `.btn-block`/`.checklist`
 * from style.css. This file is only enqueued when is_singular('tour_package').
 *
 * @package Bali_Easy_Tour
 */

.tour-detail {
	--td-green: #2E7D32;
	--td-green-bright: #43A047;
	--td-brown: #BB6E3C;
	--td-cream: #F7F4EE;
	--td-ink: #222222;
	--td-white: #FFFFFF;
	--td-border: #E6DFCE;
	--td-radius-sm: 6px;
	--td-radius-md: 10px;
	--td-radius-lg: 14px;
	--td-shadow: 0 4px 18px rgba(34, 34, 34, 0.07);

	color: var(--td-ink);
	font-family: var(--font-sans);
}

.tour-detail h1,
.tour-detail h2,
.tour-detail h3,
.tour-detail h4 {
	font-family: var(--font-serif);
	color: var(--td-green);
}

.tour-detail .td-section {
	padding: 34px 0;
	border-top: 1px solid var(--td-border);
}
.tour-detail .td-section h2 {
	font-size: clamp(1.4rem, 2.6vw, 1.9rem);
	margin-bottom: 0.6em;
}

/* =========================================================
   1. HERO
   ========================================================= */
.tour-detail .td-hero {
	position: relative;
	padding: 26px 0 40px;
}
.tour-detail .td-hero--plain {
	background: var(--td-cream);
}
.tour-detail .td-hero--photo {
	background-color: var(--td-ink);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	min-height: 420px;
	display: flex;
	align-items: center;
	padding-top: 26px;
	padding-bottom: 40px;
}
@media (max-width: 640px) {
	.tour-detail .td-hero--photo { min-height: 320px; padding-bottom: 28px; }
}
.tour-detail .td-hero--photo .container {
	position: relative;
	z-index: 1;
	width: 100%;
}
/* Invisible full-cover link so the hero photo stays clickable for the lightbox
   without needing a separate <img> layer. */
.tour-detail .td-hero__lightbox-link {
	position: absolute;
	inset: 0;
	z-index: 0;
	cursor: zoom-in;
}

.tour-detail .td-breadcrumb {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--td-brown);
	margin-bottom: 14px;
}
.tour-detail .td-breadcrumb a { color: var(--td-brown); }
.tour-detail .td-breadcrumb a:hover { color: var(--td-green); }
.tour-detail .td-breadcrumb__sep { color: var(--td-border); }
.tour-detail .td-hero--photo .td-breadcrumb,
.tour-detail .td-hero--photo .td-breadcrumb a {
	color: var(--td-white);
}
.tour-detail .td-hero--photo .td-breadcrumb__sep { color: rgba(255,255,255,0.6); }
.tour-detail .td-hero--photo .td-breadcrumb a:hover { opacity: 0.8; }

.tour-detail .td-hero__title {
	margin-bottom: 0.3em;
}
.tour-detail .td-hero--photo .td-hero__title { color: var(--td-white); }
.tour-detail .td-hero__excerpt {
	max-width: 680px;
	font-size: 1.05rem;
	color: var(--td-ink);
	opacity: 0.85;
}
.tour-detail .td-hero--photo .td-hero__excerpt {
	color: var(--td-white);
	opacity: 0.92;
}
.tour-detail .td-hero__actions {
	margin-bottom: 0;
	position: relative;
	z-index: 1;
}

/* =========================================================
   2. GALLERY STRIP
   ========================================================= */
.tour-detail .td-gallery-strip-wrap {
	background: var(--td-cream);
	padding: 20px 0 24px;
}
.tour-detail .td-gallery-strip {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	padding-bottom: 4px;
	-webkit-overflow-scrolling: touch;
}
.tour-detail .td-gallery-strip img {
	width: 120px;
	height: 84px;
	object-fit: cover;
	border-radius: var(--td-radius-sm);
	flex-shrink: 0;
	transition: opacity 0.2s ease;
}
.tour-detail .td-gallery-strip a:hover img { opacity: 0.82; }

/* =========================================================
   3. KEY INFO 4-BOX GRID
   ========================================================= */
.tour-detail .td-body {
	padding-bottom: 40px;
}
.tour-detail .td-key-info {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin: 28px 0;
}
@media (min-width: 640px) {
	/* Column count matches however many boxes actually render (3 or 4), so
	   the grid always fills the full row instead of leaving a gap when a
	   post is missing one field (e.g. no Age Limit). */
	.tour-detail .td-key-info { grid-template-columns: repeat(4, 1fr); }
	.tour-detail .td-key-info--1 { grid-template-columns: repeat(1, 1fr); }
	.tour-detail .td-key-info--2 { grid-template-columns: repeat(2, 1fr); }
	.tour-detail .td-key-info--3 { grid-template-columns: repeat(3, 1fr); }
}
.tour-detail .td-key-info__item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	background: var(--td-cream);
	border: 1px solid var(--td-border);
	border-radius: var(--td-radius-md);
	padding: 16px;
}
.tour-detail .td-key-info__icon {
	width: 28px;
	height: 28px;
	color: var(--td-green);
	flex-shrink: 0;
}
.tour-detail .td-key-info__text strong {
	display: block;
	font-size: 0.66rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--td-brown);
	margin-bottom: 3px;
}
.tour-detail .td-key-info__text span {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--td-ink);
}
.tour-detail .td-difficulty-bars {
	display: inline-flex;
	gap: 3px;
	margin-left: 6px;
	vertical-align: middle;
}
.tour-detail .td-difficulty-bars i {
	display: inline-block;
	width: 6px;
	height: 12px;
	border-radius: 2px;
	background: var(--td-border);
	font-style: normal;
}
.tour-detail .td-difficulty-bars i.is-filled { background: var(--td-green-bright); }

/* =========================================================
   OVERVIEW
   ========================================================= */
.tour-detail .td-overview__content { color: var(--td-ink); }
.tour-detail .td-overview__content p:last-child { margin-bottom: 0; }

/* =========================================================
   4/5/7/11 CHECKLISTS
   ========================================================= */
.tour-detail .td-checklist {
	list-style: none;
	padding: 0;
	margin: 0;
}
.tour-detail .td-checklist li {
	position: relative;
	padding-left: 30px;
	margin-bottom: 12px;
	color: var(--td-ink);
}
.tour-detail .td-checklist li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	top: 0;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--td-green-bright);
	color: var(--td-white);
	font-size: 0.7rem;
	font-weight: 700;
}
.tour-detail .td-checklist--2col {
	columns: 1;
	column-gap: 30px;
}
@media (min-width: 640px) {
	.tour-detail .td-checklist--2col { columns: 2; }
	.tour-detail .td-checklist--2col li { break-inside: avoid; }
}
.tour-detail .td-checklist--exclude li::before {
	content: "\2715";
	background: transparent;
	border: 1px solid var(--td-brown);
	color: var(--td-brown);
}
.tour-detail .td-inclusions__exclude-title {
	margin-top: 1.6em;
	font-size: 1rem;
	color: var(--td-brown);
}

/* =========================================================
   4/5. HIGHLIGHTS + INCLUSIONS — side-by-side cards
   ========================================================= */
.tour-detail .td-highlights-inclusions {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}
@media (min-width: 720px) {
	.tour-detail .td-highlights-inclusions {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}
	.tour-detail .td-highlights-inclusions--single {
		grid-template-columns: 1fr;
	}
}
.tour-detail .td-hi-card {
	background: var(--td-white);
	border: 1px solid var(--td-border);
	border-radius: var(--td-radius-md);
	padding: 24px;
}
.tour-detail .td-hi-card h2 { margin-bottom: 0.7em; }

/* =========================================================
   6. TRACK / EXPERIENCE STEP FLOW
   ========================================================= */
.tour-detail .td-track__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.tour-detail .td-track__step {
	display: flex;
	align-items: center;
	gap: 16px;
	position: relative;
	padding: 0 0 26px;
}
.tour-detail .td-track__step:last-child { padding-bottom: 0; }
.tour-detail .td-track__num {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--td-green);
	color: var(--td-white);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.9rem;
	position: relative;
	z-index: 1;
}
.tour-detail .td-track__step:not(:last-child)::after {
	content: "";
	position: absolute;
	left: 17px;
	top: 34px;
	bottom: 0;
	width: 2px;
	background: var(--td-border);
}
.tour-detail .td-track__label {
	font-size: 0.95rem;
	color: var(--td-ink);
}
@media (min-width: 768px) {
	.tour-detail .td-track__list {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 20px 0;
	}
	.tour-detail .td-track__step {
		flex: 1 1 200px;
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		padding: 0 20px 0 0;
	}
	.tour-detail .td-track__step:not(:last-child)::after {
		left: 34px;
		top: 17px;
		right: -50%;
		bottom: auto;
		width: auto;
		height: 2px;
	}
}

/* =========================================================
   7/8. TIMING & AVAILABILITY + PRICE & PAYMENT — side-by-side cards
   ========================================================= */
.tour-detail .td-timing-price {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}
@media (min-width: 720px) {
	.tour-detail .td-timing-price {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}
	.tour-detail .td-timing-price--single {
		grid-template-columns: 1fr;
	}
}
.tour-detail .td-tp-card {
	background: var(--td-white);
	border: 1px solid var(--td-border);
	border-radius: var(--td-radius-md);
	padding: 24px;
}
.tour-detail .td-tp-card h2 { margin-bottom: 0.7em; }
.tour-detail .td-tp-card.td-price { display: flex; flex-direction: column; }

/* =========================================================
   8. PRICE & PAYMENT
   ========================================================= */
.tour-detail .td-price-table {
	width: 100%;
	border-collapse: collapse;
	margin: 18px 0;
}
.tour-detail .td-price-table td {
	padding: 12px 0;
	border-bottom: 1px solid var(--td-border);
}
.tour-detail .td-price-table td:last-child {
	text-align: right;
	font-weight: 700;
	color: var(--td-brown);
}
.tour-detail .td-price-chat {
	font-family: var(--font-serif);
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--td-brown);
	margin: 18px 0;
}
.tour-detail .td-price__addons-title,
.tour-detail .td-price__payment-title {
	font-size: 1rem;
	margin-top: 1.4em;
	color: var(--td-green);
}
.tour-detail .td-addons {
	list-style: none;
	margin: 0;
	padding: 0;
}
.tour-detail .td-addons li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	padding: 10px 0;
	border-bottom: 1px dashed var(--td-border);
	font-size: 0.9rem;
}
.tour-detail .td-addons__label { font-weight: 600; color: var(--td-ink); }
.tour-detail .td-addons__price { color: var(--td-brown); font-weight: 700; }
.tour-detail .td-addons__note { color: var(--td-ink); opacity: 0.65; font-size: 0.82rem; width: 100%; }

.tour-detail .td-payment-cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	margin: 16px 0;
}
@media (min-width: 560px) {
	.tour-detail .td-payment-cards { grid-template-columns: 1fr 1fr; }
}
.tour-detail .td-payment-card {
	background: var(--td-cream);
	border: 1px solid var(--td-border);
	border-radius: var(--td-radius-md);
	padding: 18px;
}
.tour-detail .td-payment-card__icon {
	width: 26px;
	height: 26px;
	color: var(--td-green-bright);
	margin-bottom: 8px;
}
.tour-detail .td-payment-card h4 { margin-bottom: 4px; font-size: 1rem; }
.tour-detail .td-payment-card p { margin: 0; font-size: 0.85rem; opacity: 0.8; }

.tour-detail .td-payment-note {
	font-size: 0.88rem;
	color: var(--td-brown);
	font-style: italic;
	margin: 4px 0 0;
}

.tour-detail .td-note {
	background: var(--td-cream);
	border-left: 3px solid var(--td-brown);
	padding: 16px 20px;
	border-radius: var(--td-radius-sm);
	font-size: 0.9rem;
	margin-top: 22px;
}
.tour-detail .td-note p:last-child { margin-bottom: 0; }

/* =========================================================
   8b. CANCELLATION POLICY / PAYMENT METHOD
   ========================================================= */
.tour-detail .td-cancellation__card {
	background: var(--td-white);
	border: 1px solid var(--td-border);
	border-left: 4px solid var(--td-green);
	border-radius: var(--td-radius-md);
	padding: 20px 22px;
	box-shadow: var(--td-shadow);
	font-size: 0.9rem;
}
.tour-detail .td-cancellation__card p:last-child { margin-bottom: 0; }

/* =========================================================
   9. BOOKING PROCESS (full-width)
   ========================================================= */
.tour-detail .td-process-steps {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
	margin: 22px 0 0;
}
@media (min-width: 720px) {
	.tour-detail .td-process-steps { grid-template-columns: repeat(4, 1fr); }
}
.tour-detail .td-process-step {
	text-align: center;
}
.tour-detail .td-process-step__icon {
	width: 40px;
	height: 40px;
	color: var(--td-white);
	background: var(--td-green);
	border-radius: 50%;
	padding: 10px;
	margin: 0 auto 12px;
}
.tour-detail .td-process-step h4 { font-size: 0.92rem; margin-bottom: 4px; }
.tour-detail .td-process-step p { font-size: 0.8rem; opacity: 0.75; margin: 0; }

.tour-detail .td-booking-box {
	background: var(--td-cream);
	border: 1px solid var(--td-border);
	border-radius: var(--td-radius-lg);
	padding: 30px;
	text-align: center;
}
.tour-detail .td-booking-box h3 { margin-bottom: 0.4em; }
.tour-detail .td-booking-box p { opacity: 0.8; }

/* Trust points, folded inside the booking card — compact icon+label row. */
.tour-detail .td-booking-box .td-trust-row {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px solid var(--td-border);
	text-align: left;
}
@media (min-width: 420px) {
	.tour-detail .td-booking-box .td-trust-row { grid-template-columns: repeat(4, 1fr); text-align: center; }
}
.tour-detail .td-booking-box .td-trust-item {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	font-size: 0.72rem;
	line-height: 1.25;
	color: var(--td-ink);
}
@media (min-width: 420px) {
	.tour-detail .td-booking-box .td-trust-item { flex-direction: column; gap: 6px; }
}
.tour-detail .td-booking-box .td-trust-item svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	color: var(--td-green-bright);
}

/* =========================================================
   11. TERMS & CONDITIONS
   ========================================================= */
.tour-detail .td-terms__list {
	list-style: disc;
	padding-left: 1.2em;
	margin: 0;
	columns: 1;
	column-gap: 30px;
	font-size: 0.88rem;
	color: var(--td-ink);
	opacity: 0.9;
}
@media (min-width: 640px) {
	.tour-detail .td-terms__list { columns: 2; }
	.tour-detail .td-terms__list li { break-inside: avoid; }
}
.tour-detail .td-terms__list li { margin-bottom: 10px; }

/* =========================================================
   BUTTONS (scoped overrides of global .btn/.btn-wa)
   ========================================================= */
.tour-detail .btn.btn-wa.td-btn-wa {
	background: var(--td-green-bright);
}
.tour-detail .btn.btn-wa.td-btn-wa:hover {
	background: var(--td-green);
}
.tour-detail .td-btn-wa--lg {
	padding: 16px 28px;
	font-size: 0.9rem;
}
.tour-detail .td-btn-wa--sm {
	padding: 10px 18px;
	font-size: 0.72rem;
}

/* =========================================================
   STICKY MOBILE BOOK BAR
   ========================================================= */
.tour-detail .td-sticky-cta {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 998;
	background: var(--td-white);
	border-top: 1px solid var(--td-border);
	box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
	transform: translateY(100%);
	transition: transform 0.25s ease;
	display: none;
}
.tour-detail .td-sticky-cta.is-visible {
	transform: translateY(0);
}
.tour-detail .td-sticky-cta__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	max-width: var(--container-max);
	margin: 0 auto;
}
.tour-detail .td-sticky-cta__title {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--td-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
@media (max-width: 767px) {
	.tour-detail .td-sticky-cta { display: block; }
	/* Avoid colliding with the site-wide floating WA button (footer.php .wa-float). */
	body.single-tour_package .wa-float { display: none; }
}
