/* ==========================================================================
   Barton Creek widget styles — trimmed to 4 widgets (v2)
   Cave Hero, Photo Gallery Hero, Tours Rail, Sticky Booking Sidebar
   ========================================================================== */


/* Shared container — most widgets bound to 1400px max content width */
.bcw-hero__inner,
.bcw-pgh__container,
.bcw-rail__container {
	max-width: 1400px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}
@media (min-width: 768px) {
	.bcw-hero__inner,
	.bcw-pgh__container,
	.bcw-rail__container {
		padding-left: 32px;
		padding-right: 32px;
	}
}


/* ============================================================================
   1. CAVE HERO
   ============================================================================ */

.bcw-hero {
	position: relative;
	overflow: hidden;
	min-height: 720px;
	display: flex;
	flex-direction: column;
}

.bcw-hero__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-repeat: no-repeat;
	filter: saturate(0.85) contrast(1.05) brightness(0.85);
}

.bcw-hero__scrim,
.bcw-hero__grain {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.bcw-hero__inner {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	padding-top: 32px;
	padding-bottom: 0;
	width: 100%;
}

.bcw-hero__top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

.bcw-hero__top-right { display: none; }
@media (min-width: 768px) { .bcw-hero__top-right { display: inline; } }

.bcw-hero__content {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-top: 64px;
	padding-bottom: 112px;
	max-width: 980px;
}
@media (min-width: 768px) {
	.bcw-hero__content { padding-top: 96px; padding-bottom: 144px; }
}

.bcw-hero__tag {
	color: var(--bc-macaw);
	margin-bottom: 24px;
	display: inline-flex;
	align-items: center;
	gap: 12px;
}
.bcw-hero__dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--bc-macaw);
	display: inline-block;
}

.bcw-hero__headline {
	font-size: 56px;
	color: var(--bc-cream);
	margin: 0;
	line-height: 0.95;
}
@media (min-width: 640px) { .bcw-hero__headline { font-size: 96px; } }
@media (min-width: 1024px) { .bcw-hero__headline { font-size: 132px; } }

.bcw-hero__subtitle {
	margin-top: 32px;
	max-width: 600px;
	color: rgba(251, 247, 240, 0.85);
	font-size: 17px;
	line-height: 1.7;
}
@media (min-width: 768px) { .bcw-hero__subtitle { font-size: 19px; } }

.bcw-hero__cta { margin-top: 40px; }

.bcw-hero__tribute {
	position: relative;
	background: rgba(15, 76, 92, 0.6);
	border-top: 1px solid rgba(251, 247, 240, 0.1);
}
.bcw-hero__tribute-inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 12px 20px;
	text-align: center;
	color: rgba(251, 247, 240, 0.7);
	font-size: 12.5px;
	font-style: italic;
	font-family: var(--bc-font-serif);
}


/* ============================================================================
   2. PHOTO GALLERY HERO
   ============================================================================ */

.bcw-pgh {
	padding-top: 24px;
	padding-bottom: 48px;
	background-color: var(--bc-cream);
}
@media (min-width: 768px) { .bcw-pgh { padding-top: 32px; padding-bottom: 64px; } }

.bcw-pgh__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 24px;
	margin-bottom: 24px;
}
.bcw-pgh__title {
	font-size: 40px;
	margin-top: 8px;
	line-height: 1;
}
@media (min-width: 768px) { .bcw-pgh__title { font-size: 64px; } }

.bcw-pgh__price { text-align: right; }
.bcw-pgh__price-num {
	font-size: 36px;
	margin-top: 4px;
	margin-bottom: 4px;
}

.bcw-pgh__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	position: relative;
	border-radius: 16px;
	overflow: hidden;
}
@media (min-width: 768px) {
	.bcw-pgh__grid { grid-template-columns: 2fr 1fr; }
}

.bcw-pgh__cell {
	border: none;
	padding: 0;
	background: none;
	cursor: pointer;
	display: block;
	width: 100%;
	position: relative;
	overflow: hidden;
	border-radius: 12px;
}
.bcw-pgh__cell--main { aspect-ratio: 4 / 3; }
.bcw-pgh__cell .bc-ph { width: 100%; height: 100%; }

.bcw-pgh__cell-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
.bcw-pgh__cell-grid .bcw-pgh__cell { aspect-ratio: 4 / 3; }

.bcw-pgh__count {
	position: absolute;
	left: 50%; top: 50%;
	transform: translate(-50%, -50%);
	background: rgba(15, 76, 92, 0.85);
	color: var(--bc-cream);
	padding: 6px 14px;
	border-radius: 999px;
	font-family: var(--bc-font-mono);
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	z-index: 3;
}

.bcw-pgh__show-all {
	position: absolute;
	bottom: 16px;
	right: 16px;
	background: var(--bc-cream);
	color: var(--bc-ink);
	border: 1px solid rgba(15, 76, 92, 0.15);
	padding: 10px 16px;
	border-radius: 999px;
	font-family: var(--bc-font-sans);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	z-index: 4;
	transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.bcw-pgh__show-all:hover {
	background: var(--bc-ink);
	color: var(--bc-cream);
	transform: translateY(-1px);
}


/* Lightbox */
.bcw-lb {
	position: fixed;
	inset: 0;
	z-index: 9990;
	background: rgba(15, 25, 32, 0.95);
	display: none;
	align-items: center;
	justify-content: center;
}
.bcw-lb.bc-open { display: flex; }
.bcw-lb__close,
.bcw-lb__nav {
	position: absolute;
	background: rgba(251, 247, 240, 0.1);
	color: var(--bc-cream);
	border: 1px solid rgba(251, 247, 240, 0.2);
	width: 48px; height: 48px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
	z-index: 2;
}
.bcw-lb__close:hover,
.bcw-lb__nav:hover { background: rgba(251, 247, 240, 0.2); transform: scale(1.05); }
.bcw-lb__close { top: 24px; right: 24px; }
.bcw-lb__nav--prev { left: 24px; top: 50%; transform: translateY(-50%); }
.bcw-lb__nav--next { right: 24px; top: 50%; transform: translateY(-50%); }
.bcw-lb__nav--prev:hover,
.bcw-lb__nav--next:hover { transform: translateY(-50%) scale(1.05); }

.bcw-lb__stage {
	max-width: min(90vw, 1400px);
	max-height: 85vh;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}
.bcw-lb__slide {
	display: none;
	margin: 0;
	max-width: 100%;
	max-height: 85vh;
	flex-direction: column;
	align-items: center;
}
.bcw-lb__slide.bc-active { display: flex; }
.bcw-lb__slide img {
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
	border-radius: 8px;
}
.bcw-lb__slide figcaption {
	margin-top: 16px;
	color: rgba(251, 247, 240, 0.7);
	font-family: var(--bc-font-mono);
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-align: center;
}
.bcw-lb__counter {
	position: absolute;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(251, 247, 240, 0.1);
	color: var(--bc-cream);
	padding: 6px 14px;
	border-radius: 999px;
	font-family: var(--bc-font-mono);
	font-size: 12px;
	letter-spacing: 0.1em;
}


/* ============================================================================
   3. TOURS RAIL
   ============================================================================ */

.bcw-rail {
	overflow: hidden;
	border-top: 1px solid rgba(15, 76, 92, 0.1);
	padding-top: 80px;
	padding-bottom: 80px;
	background: var(--bc-parchment);
}

.bcw-rail__head {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	align-items: end;
	margin-bottom: 24px;
}
@media (min-width: 768px) {
	.bcw-rail__head { grid-template-columns: 7fr 5fr; gap: 40px; }
}

.bcw-rail__headline {
	font-size: 40px;
	margin-top: 20px;
	line-height: 0.95;
}
@media (min-width: 768px) { .bcw-rail__headline { font-size: 60px; } }

.bcw-rail__intro {
	color: rgba(45, 42, 38, 0.85);
	font-size: 15px;
	line-height: 1.7;
}

.bcw-rail__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 32px;
	margin-bottom: 24px;
}
.bcw-rail__nav-buttons { display: flex; gap: 12px; margin-left: auto; }

.bcw-rail__btn {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--bc-cream);
	border: 1px solid rgba(15, 76, 92, 0.18);
	color: var(--bc-ink);
	cursor: pointer;
	transition: background 0.2s, transform 0.2s, border-color 0.2s, color 0.2s;
}
.bcw-rail__btn:hover {
	background: var(--bc-ink);
	color: var(--bc-cream);
	border-color: var(--bc-ink);
	transform: translateY(-1px);
}

.bcw-rail__wrap { position: relative; }
.bcw-rail__track {
	display: flex;
	gap: 40px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 8px 5vw 32px;
	scrollbar-width: none;
	-ms-overflow-style: none;
	scroll-behavior: smooth;
	cursor: grab;
}
.bcw-rail__track::-webkit-scrollbar { display: none; }
.bcw-rail__track.bc-rail-dragging { cursor: grabbing; scroll-behavior: auto; }

.bcw-rail__card {
	flex: 0 0 auto;
	width: 280px;
	text-align: left;
}
.bcw-rail__link { display: block; color: inherit; text-decoration: none; }

.bcw-rail__frame {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1.05;
	overflow: hidden;
	background: var(--bc-sand);
	transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bcw-rail__card:hover .bcw-rail__frame { transform: translateY(-4px); }

/* Force ANY image inside the frame to fill it (object-fit on img). */
.bcw-rail__frame img,
.bcw-rail__frame .bcw-rail__img {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
	max-width: none !important;
	transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bcw-rail__card:hover .bcw-rail__frame img,
.bcw-rail__card:hover .bcw-rail__frame .bcw-rail__img { transform: scale(1.06); }

/* Organic shape variants */
.bcw-frame-arch   { border-radius: 50% 50% 12px 12px / 60% 60% 12px 12px; }
.bcw-frame-drop   { border-radius: 14px 14px 50% 50% / 14px 14px 60% 60%; }
.bcw-frame-pebble { border-radius: 56% 44% 52% 48% / 48% 56% 44% 52%; }
.bcw-frame-circle { border-radius: 50%; }
.bcw-frame-leaf   { border-radius: 50% 12% 50% 12% / 50% 12% 50% 12%; }

/* Placeholder color variants for rail (used when no photo set) */
.bcw-ph-jade  { background: repeating-linear-gradient(135deg, #2D6B7A 0 14px, #1F5763 14px 28px); }
.bcw-ph-ink   { background: repeating-linear-gradient(135deg, #0F4C5C 0 14px, #0A3B47 14px 28px); }
.bcw-ph-ochre { background: repeating-linear-gradient(135deg, #C79A3A 0 14px, #A37E2C 14px 28px); }
.bcw-ph-macaw { background: repeating-linear-gradient(135deg, #E36F1E 0 14px, #B85513 14px 28px); }
.bcw-ph-bark  { background: repeating-linear-gradient(135deg, #6B6560 0 14px, #0F4C5C 14px 28px); }

.bcw-rail__img-label {
	position: absolute;
	left: 50%; top: 50%;
	transform: translate(-50%, -50%);
	font-family: var(--bc-font-mono);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--bc-cream);
	background: rgba(28, 19, 12, 0.55);
	padding: 5px 9px;
	border-radius: 2px;
	white-space: nowrap;
	z-index: 2;
}

.bcw-rail__meta {
	margin-top: 20px;
	display: flex;
	align-items: flex-start;
	gap: 12px;
}
.bcw-rail__tile {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	flex-shrink: 0;
}
.bcw-rail__name {
	font-size: 20px;
	line-height: 1.1;
	color: var(--bc-ink);
	margin: 0;
}
.bcw-rail__loc {
	color: rgba(107, 101, 96, 0.8);
	margin-top: 6px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}


/* ============================================================================
   4. STICKY BOOKING SIDEBAR
   ============================================================================ */

.bcw-book__sticky-col { display: block; }
@media (min-width: 1024px) {
	.bcw-book__sticky-col {
		position: sticky;
		top: 88px;
	}
}

.bcw-book__panel {
	background: var(--bc-cream);
	border: 1px solid rgba(15, 76, 92, 0.12);
	border-radius: 16px;
	padding: 24px;
	box-shadow: 0 8px 24px -12px rgba(15, 76, 92, 0.18);
}

.bcw-book__head { margin-bottom: 12px; }

.bcw-book__headline {
	font-size: 28px;
	margin-top: 6px;
	line-height: 1.1;
	color: var(--bc-ink);
}

.bcw-book__intro {
	font-size: 12.5px;
	color: rgba(107, 101, 96, 0.9);
	line-height: 1.6;
	margin-bottom: 16px;
}

.bcw-book__options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 16px;
}

.bcw-book__opt {
	background: var(--bc-parchment);
	border: 1px solid rgba(15, 76, 92, 0.15);
	border-radius: 12px;
	padding: 14px 16px;
	text-align: left;
	cursor: pointer;
	position: relative;
	font-family: inherit;
	color: inherit;
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.bcw-book__opt:hover {
	border-color: var(--bc-ink);
	transform: translateY(-1px);
}
.bcw-book__opt[aria-checked="true"] {
	border-color: var(--bc-ink);
	background: var(--bc-cream);
	box-shadow: inset 0 0 0 1px var(--bc-ink);
}

.bcw-book__opt.has-badge { padding-top: 30px; }

.bcw-book__badge {
	position: absolute;
	top: 8px;
	left: 14px;
	background: var(--bc-macaw);
	color: var(--bc-cream);
	font-family: var(--bc-font-mono);
	font-size: 9px;
	padding: 3px 8px;
	border-radius: 4px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.bcw-book__opt-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}
.bcw-book__opt-name,
.bcw-book__opt-price {
	font-family: var(--bc-font-serif);
	font-size: 18px;
	color: var(--bc-ink);
	letter-spacing: -0.01em;
}

.bcw-book__opt-meta {
	display: flex;
	gap: 10px;
	margin-top: 4px;
	font-family: var(--bc-font-mono);
	font-size: 10px;
	color: var(--bc-bark);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.bcw-book__opt-meta span:not(:last-child)::after {
	content: "·";
	margin-left: 10px;
}

.bcw-book__opt-desc {
	margin-top: 8px;
	font-size: 12.5px;
	color: rgba(107, 101, 96, 0.95);
	line-height: 1.55;
}

.bcw-book__action {
	margin-top: 12px;
	margin-bottom: 12px;
}

/* Booking action button — full-width pill */
.bcw-book__btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 14px 18px !important;
	border-radius: 999px !important;
	font-family: var(--bc-font-sans) !important;
	font-weight: 500 !important;
	font-size: 14px !important;
	line-height: 1 !important;
	text-decoration: none !important;
	border: none !important;
	cursor: pointer !important;
	transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	white-space: nowrap !important;
}

.bcw-book__btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 24px -10px rgba(15, 76, 92, 0.45);
}

.bcw-book__btn--whatsapp {
	background: var(--bc-wa-green);
	color: var(--bc-cream);
}
.bcw-book__btn--whatsapp:hover {
	background: var(--bc-wa-green-deep) !important;
}

.bcw-book__footnote {
	margin-top: 12px;
	text-align: center;
	color: rgba(107, 101, 96, 0.7);
	font-size: 10px;
}


/* ============================================================================
   5. MOBILE BOTTOM BAR + MODAL (booking)
   ============================================================================ */

.bcw-mobile-bar {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	background: var(--bc-cream);
	border-top: 1px solid rgba(15, 76, 92, 0.15);
	box-shadow: 0 -4px 20px -8px rgba(15, 76, 92, 0.2);
	z-index: 80;
	padding: 12px 16px env(safe-area-inset-bottom, 12px);
	transform: translateY(120%);
	transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bcw-mobile-bar.bc-visible { transform: translateY(0); }
@media (min-width: 1024px) { .bcw-mobile-bar { display: none; } }

.bcw-mobile-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 600px;
	margin: 0 auto;
}
.bcw-mobile-bar__label {
	font-family: var(--bc-font-serif);
	font-size: 18px;
	line-height: 1.1;
	color: var(--bc-ink);
	margin-top: 2px;
}
.bcw-mobile-bar__cta {
	flex-shrink: 0;
	padding: 12px 18px;
	font-size: 13px;
}


.bcw-modal {
	position: fixed;
	inset: 0;
	z-index: 9000;
}
.bcw-modal[hidden] { display: none; }

.bcw-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 25, 32, 0.6);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.bcw-modal.bc-open .bcw-modal__backdrop { opacity: 1; }

.bcw-modal__panel {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	background: var(--bc-cream);
	border-radius: 16px 16px 0 0;
	max-height: 92vh;
	overflow-y: auto;
	transform: translateY(100%);
	transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bcw-modal.bc-open .bcw-modal__panel { transform: translateY(0); }

.bcw-modal__close {
	position: sticky;
	top: 12px;
	margin-left: auto;
	margin-right: 12px;
	margin-top: 12px;
	background: var(--bc-cream);
	border: 1px solid rgba(15, 76, 92, 0.15);
	color: var(--bc-ink);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	cursor: pointer;
	z-index: 2;
	float: right;
}

.bcw-modal__inner {
	padding: 16px 24px 32px;
	clear: both;
}
