/* ==========================================================================
   ChaloTravellers — homepage + enquiry widget custom styles
   Mobile-first. Breakpoints: 600px (tablet), 1024px (desktop).
   ========================================================================== */

:root {
	--chalo-primary: #ff5a3c;
	--chalo-primary-dark: #e14526;
	--chalo-ink: #1a1a1a;
	--chalo-muted: #6b7280;
	--chalo-border: #e5e7eb;
	--chalo-bg-soft: #f8f8f8;
	--chalo-whatsapp: #25d366;
	--chalo-radius: 14px;
	--chalo-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	--chalo-gap: 16px;
}

.chalo-section { max-width: 1200px; margin: 0 auto; padding: 32px 16px; }
.chalo-section__title { font-size: 1.4rem; font-weight: 700; margin: 0 0 16px; color: var(--chalo-ink); }
.chalo-section__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.chalo-section__header .chalo-section__title { margin: 0; }
.chalo-section__see-all { font-size: 0.9rem; font-weight: 600; color: var(--chalo-primary); text-decoration: none; white-space: nowrap; }
.chalo-no-results { color: var(--chalo-muted); padding: 24px 0; }

/* ---- Explore Destinations tabs ---- */
.chalo-explore__tabs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 4px;
	margin-bottom: 20px;
	scrollbar-width: none;
}
.chalo-explore__tabs::-webkit-scrollbar { display: none; }

.chalo-tab {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid var(--chalo-border);
	background: #fff;
	color: var(--chalo-ink);
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chalo-tab:hover { border-color: var(--chalo-primary); }
.chalo-tab.is-active { background: var(--chalo-primary); border-color: var(--chalo-primary); color: #fff; }

.chalo-explore__grid,
.chalo-upcoming__carousel {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--chalo-gap);
}
.chalo-explore__grid.is-loading { opacity: 0.5; pointer-events: none; }

/* ---- Cards (shared: destination + trip cards) ---- */
.chalo-card {
	display: block;
	border-radius: var(--chalo-radius);
	overflow: hidden;
	background: #fff;
	box-shadow: var(--chalo-shadow);
	text-decoration: none;
	color: inherit;
	transition: transform 0.15s ease;
}
.chalo-card:hover { transform: translateY(-2px); }
.chalo-card__image { aspect-ratio: 4 / 3; overflow: hidden; background: var(--chalo-bg-soft); }
.chalo-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chalo-card__image--placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #eee, #ddd); }
.chalo-card__body { padding: 12px; }
.chalo-card__title { font-size: 0.95rem; font-weight: 700; margin: 0 0 4px; line-height: 1.3; }
.chalo-card__meta { font-size: 0.8rem; color: var(--chalo-muted); margin: 0 0 4px; }
.chalo-card__price { font-size: 0.9rem; font-weight: 700; color: var(--chalo-primary-dark); margin: 0; }

/* ---- Upcoming Group Trips ---- */
.chalo-upcoming__chips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 4px;
	margin-bottom: 20px;
	scrollbar-width: none;
}
.chalo-upcoming__chips::-webkit-scrollbar { display: none; }
.chalo-chip {
	flex: 0 0 auto;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--chalo-bg-soft);
	color: var(--chalo-ink);
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.chalo-chip:hover { background: #eee; }

.chalo-upcoming__carousel {
	grid-auto-flow: column;
	grid-auto-columns: 62%;
	grid-template-columns: none;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x mandatory;
	padding-bottom: 8px;
}
.chalo-upcoming__carousel .chalo-card { scroll-snap-align: start; }

/* ---- Vibe reels ---- */
.chalo-reels__row {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x mandatory;
	padding-bottom: 8px;
}
.chalo-reel-thumb {
	position: relative;
	flex: 0 0 auto;
	width: 120px;
	aspect-ratio: 9 / 16;
	border-radius: 12px;
	overflow: hidden;
	border: none;
	padding: 0;
	background: var(--chalo-bg-soft);
	cursor: pointer;
	scroll-snap-align: start;
}
.chalo-reel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chalo-reel-thumb__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #eee, #ddd); }
.chalo-reel-thumb__play {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	color: #fff; font-size: 1.4rem; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
	background: rgba(0, 0, 0, 0.15);
}

.chalo-reel-modal,
.chalo-enquiry-modal {
	position: fixed; inset: 0; z-index: 9999;
	display: flex; align-items: center; justify-content: center;
}
.chalo-reel-modal[hidden],
.chalo-enquiry-modal[hidden] {
	display: none; /* the class rule above would otherwise override the browser's default [hidden] rule */
}
.chalo-reel-modal__backdrop,
.chalo-enquiry-modal__backdrop {
	position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7);
}
.chalo-reel-modal__content {
	position: relative; width: min(360px, 92vw); aspect-ratio: 9 / 16; background: #000; border-radius: 12px; overflow: hidden;
}
.chalo-reel-modal__media,
.chalo-reel-modal__media video,
.chalo-reel-modal__media iframe { width: 100%; height: 100%; border: 0; display: block; }
.chalo-reel-modal__close {
	position: absolute; top: 8px; right: 8px; z-index: 2;
	width: 32px; height: 32px; border-radius: 50%; border: none;
	background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 1rem; cursor: pointer;
}
body.chalo-modal-open { overflow: hidden; }

/* ---- Part 3: Listing grid (Format 1 category grid + Format 2 hub) ---- */
.chalo-listing__tabs { margin-bottom: 20px; }
.chalo-listing__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--chalo-gap);
}
.chalo-listing__grid.is-loading { opacity: 0.5; pointer-events: none; }

.chalo-listing-card {
	display: block;
	border-radius: var(--chalo-radius);
	overflow: hidden;
	background: #fff;
	box-shadow: var(--chalo-shadow);
	text-decoration: none;
	color: inherit;
	transition: transform 0.15s ease;
}
.chalo-listing-card:hover { transform: translateY(-2px); }
.chalo-listing-card__image { aspect-ratio: 4 / 3; overflow: hidden; background: var(--chalo-bg-soft); }
.chalo-listing-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chalo-listing-card__image--placeholder { background: linear-gradient(135deg, #eee, #ddd); }
.chalo-listing-card__body { padding: 14px; }
.chalo-listing-card__title { font-size: 1rem; font-weight: 700; margin: 0 0 4px; line-height: 1.3; }
.chalo-listing-card__duration { font-size: 0.78rem; color: var(--chalo-muted); margin: 0 0 4px; }
.chalo-listing-card__price { font-size: 0.95rem; font-weight: 700; color: var(--chalo-primary-dark); margin: 0 0 6px; }
.chalo-listing-card__highlight { font-size: 0.82rem; color: var(--chalo-muted); margin: 0 0 10px; line-height: 1.4; }
.chalo-listing-card__cta {
	display: inline-block; font-size: 0.82rem; font-weight: 700; color: var(--chalo-primary);
}

.chalo-listing__load-more-wrap { text-align: center; margin-top: 24px; }
.chalo-btn--secondary {
	display: inline-block; width: auto; padding: 12px 28px;
	background: #fff; color: var(--chalo-ink); border: 1px solid var(--chalo-border);
}
.chalo-btn--secondary:hover { border-color: var(--chalo-primary); color: var(--chalo-primary); }
.chalo-btn--secondary[hidden] { display: none; }

/* ---- Format 2: Destination hub hero + FAQ ---- */
.chalo-hub__hero { position: relative; min-height: 260px; display: flex; align-items: flex-end; background: var(--chalo-bg-soft); overflow: hidden; }
.chalo-hub__hero-image { position: absolute; inset: 0; }
.chalo-hub__hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chalo-hub__hero-overlay {
	position: relative; z-index: 1; width: 100%; padding: 32px 16px;
	background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
}
.chalo-hub__hero-title { color: #fff; margin: 0; font-size: 1.6rem; max-width: 1200px; margin-inline: auto; }
.chalo-hub__intro { padding-top: 32px; padding-bottom: 8px; color: var(--chalo-muted); line-height: 1.7; }
.chalo-hub__intro p:first-child { margin-top: 0; }

.chalo-faq__list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.chalo-faq__item { border: 1px solid var(--chalo-border); border-radius: 10px; overflow: hidden; }
.chalo-faq__question {
	width: 100%; display: flex; align-items: center; justify-content: space-between;
	padding: 14px 16px; background: #fff; border: none; text-align: left;
	font-weight: 700; font-size: 0.95rem; cursor: pointer;
}
.chalo-faq__icon { font-size: 1.1rem; color: var(--chalo-primary); transition: transform 0.15s ease; }
.chalo-faq__question[aria-expanded="true"] .chalo-faq__icon { transform: rotate(45deg); }
.chalo-faq__answer { padding: 0 16px 16px; color: var(--chalo-muted); font-size: 0.9rem; line-height: 1.6; }
.chalo-faq__answer[hidden] { display: none; }

/* ---- Enquiry widget ---- */
.chalo-enquiry {
	background: #fff;
	border: 1px solid var(--chalo-border);
	border-radius: var(--chalo-radius);
	box-shadow: var(--chalo-shadow);
	padding: 16px;
	max-width: 420px;
}
.chalo-enquiry__price-label { font-size: 0.8rem; color: var(--chalo-muted); margin: 0; }
.chalo-enquiry__price-row { display: flex; align-items: baseline; gap: 8px; margin: 2px 0; flex-wrap: wrap; }
.chalo-enquiry__price-now { font-size: 1.6rem; font-weight: 800; color: var(--chalo-ink); }
.chalo-enquiry__price-strike { font-size: 0.95rem; color: var(--chalo-muted); text-decoration: line-through; }
.chalo-enquiry__badge { font-size: 0.75rem; font-weight: 700; color: #fff; background: var(--chalo-primary); padding: 2px 8px; border-radius: 999px; }
.chalo-enquiry__per-person { font-size: 0.75rem; color: var(--chalo-muted); margin: 0 0 12px; }

.chalo-enquiry__section-label { font-size: 0.85rem; font-weight: 700; margin: 14px 0 8px; }
.chalo-enquiry__no-batches { font-size: 0.85rem; color: var(--chalo-muted); background: var(--chalo-bg-soft); padding: 10px; border-radius: 10px; }

.chalo-enquiry__date-pills { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
.chalo-enquiry__date-pills::-webkit-scrollbar { display: none; }
.chalo-date-pill {
	flex: 0 0 auto; min-width: 74px; display: flex; flex-direction: column; align-items: center;
	padding: 8px 10px; border-radius: 10px; border: 1px solid var(--chalo-border); background: #fff; cursor: pointer;
}
.chalo-date-pill.is-selected { border-color: var(--chalo-primary); background: #fff4f1; }
.chalo-date-pill__date { font-size: 0.8rem; font-weight: 700; }
.chalo-date-pill__price { font-size: 0.72rem; color: var(--chalo-muted); }

.chalo-stepper { display: inline-flex; align-items: center; gap: 14px; border: 1px solid var(--chalo-border); border-radius: 10px; padding: 6px 14px; }
.chalo-stepper__btn { width: 26px; height: 26px; border-radius: 50%; border: none; background: var(--chalo-bg-soft); font-size: 1rem; cursor: pointer; line-height: 1; }
.chalo-stepper__count { min-width: 16px; text-align: center; font-weight: 700; }

.chalo-btn {
	display: block; width: 100%; text-align: center; padding: 13px 16px; border-radius: 10px;
	font-weight: 700; font-size: 0.95rem; border: none; cursor: pointer; text-decoration: none; margin-top: 12px;
}
.chalo-btn--primary { background: var(--chalo-primary); color: #fff; }
.chalo-btn--primary:hover { background: var(--chalo-primary-dark); }
.chalo-btn--primary:disabled { opacity: 0.6; cursor: not-allowed; }
.chalo-btn--whatsapp { background: var(--chalo-whatsapp); color: #fff; }
.chalo-btn--whatsapp:hover { filter: brightness(0.95); }

.chalo-enquiry-modal__content {
	position: relative; width: min(400px, 92vw); background: #fff; border-radius: 14px; padding: 24px; max-height: 90vh; overflow-y: auto;
}
.chalo-enquiry-modal__content h3 { margin: 0 0 4px; }
.chalo-enquiry-modal__subtitle { margin: 0 0 16px; color: var(--chalo-muted); font-size: 0.9rem; }
.chalo-enquiry-modal__close {
	position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
	border: none; background: var(--chalo-bg-soft); cursor: pointer;
}
.chalo-field { display: block; margin-bottom: 12px; font-size: 0.85rem; font-weight: 600; }
.chalo-field span { display: block; margin-bottom: 4px; }
.chalo-field input {
	width: 100%; padding: 10px 12px; border: 1px solid var(--chalo-border); border-radius: 8px; font-size: 0.95rem; box-sizing: border-box;
}
.chalo-field input:focus { outline: 2px solid var(--chalo-primary); outline-offset: 1px; }
.chalo-enquiry-form__status { font-size: 0.85rem; min-height: 1.2em; margin: 4px 0; }
.chalo-enquiry-form__status.is-error { color: #d92d20; }
.chalo-enquiry-form__status.is-success { color: #067647; }

/* ==========================================================================
   Archive pages (product category / tag) — dense grid layout
   ========================================================================== */
.chalo-archive__title { font-size: 1.5rem; margin-bottom: 20px; }
.chalo-archive__description {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--chalo-border);
	color: var(--chalo-muted);
	line-height: 1.7;
	font-size: 0.95rem;
	overflow-wrap: break-word;
}
.chalo-archive__description h2, .chalo-archive__description h3 { color: var(--chalo-ink); }
.chalo-archive__description img { max-width: 100%; height: auto; }
.chalo-archive__description table { max-width: 100%; overflow-x: auto; display: block; }

/* ==========================================================================
   Blog archive — one card per row, image beside text (mobile-first).
   Targets the theme's own blog markup: .blog_default > article.post-wrap
   with .post-media / .post-meta / .post-excerpt / .readmore children.
   ========================================================================== */
.blog_default .post-wrap {
	display: grid;
	grid-template-columns: 1fr;      /* mobile: image on top, text below */
	gap: 0;
	background: #fff;
	border: 1px solid var(--chalo-border);
	border-radius: var(--chalo-radius);
	overflow: hidden;
	box-shadow: var(--chalo-shadow);
	margin-bottom: 20px;
	max-width: 100%;
}
.blog_default .post-wrap .post-media { margin: 0; }
.blog_default .post-wrap .post-media img {
	width: 100%;
	height: 100%;
	min-height: 200px;
	object-fit: cover;
	display: block;
}
/* everything that's not the image gets shared padding */
.blog_default .post-wrap > a,
.blog_default .post-wrap .post-meta,
.blog_default .post-wrap .post-excerpt,
.blog_default .post-wrap .readmore {
	margin-left: 16px;
	margin-right: 16px;
}
.blog_default .post-wrap > a:not(.readmore) {
	display: block;
	margin-top: 14px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
	overflow-wrap: break-word;
}
.blog_default .post-wrap .post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	padding: 0;
	margin-top: 8px;
	list-style: none;
	font-size: 0.8rem;
	color: var(--chalo-muted);
}
.blog_default .post-wrap .post-excerpt {
	margin-top: 8px;
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--chalo-muted);
	/* stop very long excerpts from making every card huge on mobile */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.blog_default .post-wrap .readmore { margin-top: 12px; margin-bottom: 16px; align-self: start; justify-self: start; }

/* Tablet+ : image left, content right — "1 card per row, side by side" */
@media (min-width: 600px) {
	.blog_default .post-wrap {
		grid-template-columns: 38% 1fr;
		align-items: start;
	}
	.blog_default .post-wrap .post-media { grid-row: 1 / span 4; height: 100%; }
	.blog_default .post-wrap > a:not(.readmore) { font-size: 1.15rem; margin-top: 18px; }
	.blog_default .post-wrap .post-excerpt { -webkit-line-clamp: 4; }
}

/* ==========================================================================
   Tablet — 600px+
   ========================================================================== */
@media (min-width: 600px) {
	.chalo-explore__grid { grid-template-columns: repeat(3, 1fr); }
	.chalo-upcoming__carousel { grid-auto-columns: 40%; }
	.chalo-reel-thumb { width: 150px; }
	.chalo-listing__grid { grid-template-columns: repeat(3, 1fr); }
	.chalo-hub__hero { min-height: 320px; }
}

/* ==========================================================================
   Desktop — 1024px+
   ========================================================================== */
@media (min-width: 1024px) {
	.chalo-explore__grid { grid-template-columns: repeat(4, 1fr); }
	.chalo-upcoming__carousel {
		grid-auto-flow: initial;
		grid-template-columns: repeat(4, 1fr);
		grid-auto-columns: initial;
		overflow-x: visible;
	}
	.chalo-listing__grid { grid-template-columns: repeat(4, 1fr); }
	.chalo-hub__hero { min-height: 380px; }
	.chalo-hub__hero-title { font-size: 2.1rem; }

	/* Sticky sidebar layout for the enquiry widget on tour pages.
	   Wrap the widget + main content in a container using this class
	   pattern in the single-tour template, e.g.:
	   <div class="chalo-tour-layout"> <main>...</main> [chalo_enquiry_widget] </div> */
	.chalo-tour-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
	.chalo-tour-layout .chalo-enquiry { position: sticky; top: 24px; max-width: none; }
}

/* ==========================================================================
   Mobile-only: sticky-bottom variant for the enquiry widget.
   Add class "chalo-enquiry--sticky-mobile" on the widget's wrapper in the
   template if you want it pinned to the bottom instead of inline-after-price.
   ========================================================================== */
@media (max-width: 1023px) {
	.chalo-enquiry--sticky-mobile {
		position: fixed;
		left: 0; right: 0; bottom: 0;
		max-width: none;
		border-radius: 16px 16px 0 0;
		box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
		z-index: 999;
	}
}
