/* =========================================================
   CCG â€“ SINGLE BOAT
   Loads after villa.css and uses its tokens (.ccg-villa) and
   components. Only what's new for boats lives here: the spec
   bar, pricing table and the per-person bits. The photos, the
   header under them and the WhatsApp QR pop-up are the villa
   page's, except that the photos here are a full-width
   carousel on desktop too (see "Hero carousel").
   ========================================================= */

.ccg-boat [id] { scroll-margin-top: 96px; }   /* under the section nav */

/* ---------- Hero carousel ---------- */

/* Phones and tablets already get villa.css's swipe track. From 1000px villa.css
   turns it into a grid showing one photo; here it stays a full-width carousel,
   at the grid's height, with arrows. */
.boat-hero__nav { display: none; }

@media (min-width: 1000px) {
	.villa-gallery.boat-hero .villa-gallery__track {
		display: flex;
		gap: 0;
		height: clamp(420px, 68vh, 780px);
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
	}
	.villa-gallery.boat-hero .villa-gallery__item:nth-child(n) {
		display: block;
		flex: 0 0 100%;
		height: 100%;
		max-height: none;
		aspect-ratio: auto;
		grid-row: auto;
		scroll-snap-align: start;
	}
	/* The zoom on hover is for the old single photo; it fights the slide */
	.villa-gallery.boat-hero .villa-gallery__item:hover img { transform: none; filter: none; }

	.villa-gallery.boat-hero .boat-hero__nav {
		display: inline-grid;
		position: absolute;
		top: 50%;
		z-index: 2;
		width: 48px;
		height: 48px;
		margin-top: -24px;
		border: 1px solid rgba(255, 255, 255, .3);
		background: rgba(0, 0, 0, .5);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
		color: #fff;
		transition: background-color .2s, opacity .2s;
	}
	.villa-gallery.boat-hero .boat-hero__nav:hover { background: var(--nectar-extra-color-3); }
	.villa-gallery.boat-hero .boat-hero__nav:disabled { opacity: 0; pointer-events: none; }
	.villa-gallery.boat-hero .boat-hero__nav.is--prev { left: 35px; }
	.villa-gallery.boat-hero .boat-hero__nav.is--next { right: 35px; }

	/* Counter bottom left, "Show all photos" stays bottom right */
	.villa-gallery.boat-hero .villa-gallery__count {
		display: block;
		left: 35px;
		right: auto;
		bottom: 20px;
		z-index: 2;
	}
}

/* Desktop: the estimate card lines up with the top of the name (or its labels) */
@media (min-width: 1000px) {
	.ccg-boat .villa-aside {/* padding-top: 0; */}
}

/* ---------- Spec bar (in the header, under the name) ---------- */

/* Each spec draws the divider above it and to its left. The -1px margins push
   the ones along the bar's top and left edges outside it, where overflow clips
   them. Specs grow to fill their row, so a short last row leaves no gaps in
   the lines. At most 4 specs a row (3 with 5 or 6 specs, so rows balance). */
.ccg-villa ul.boat-specs {
	--boat-specs-line: var(--v-line);
	display: flex;
	flex-wrap: wrap;
	margin: 24px 0 0;
	overflow: hidden;
	border-radius: var(--v-radius);
	background: var(--v-surface);
}
/* The line colour made solid: where two see-through dividers cross, the
   overlap would show as a brighter dot */
@supports (color: color-mix(in srgb, red, blue)) {
	.ccg-villa ul.boat-specs { --boat-specs-line: color-mix(in srgb, #fff 12%, var(--v-surface, #111)); }
}
.ccg-villa .boat-specs li {
	display: flex;
	flex: 1 1 max(170px, 21%);
	align-items: center;
	gap: 14px;
	min-width: 0;
	margin: -1px 0 0 -1px;
	padding: 18px 22px;
	border-top: 1px solid var(--boat-specs-line);
	border-left: 1px solid var(--boat-specs-line);
}
.ccg-villa .boat-specs.is--rows-of-3 li { flex-basis: max(170px, 26%); }
.boat-specs__icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	flex: none;
	border-radius: 50%;
	border: 1px solid var(--v-line-strong);
}
.boat-specs__icon .villa-icon { width: 1.2rem; height: 1.2rem; }
.boat-specs__text { display: grid; gap: 5px; min-width: 0; }
.boat-specs__label {
	font-size: 0.65rem;
	line-height: 1;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--v-muted);
}
.boat-specs__value {
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.25;
}

/* ---------- Pricing ---------- */

.boat-pricing__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 24px;
	margin-bottom: 25px;
}
body .boat-pricing__head .villa-h2 { margin: 12px 0 0; }

/* Per boat / per person */
.boat-toggle {
	display: inline-flex;
	padding: 4px;
	border: 1px solid var(--v-line);
	border-radius: 999px;
	background: var(--v-surface);
}
.boat-toggle[hidden] { display: none; }
.ccg-villa .boat-toggle button {
	padding: 0.6rem 1rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--v-muted);
	font-size: 0.7rem;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .1em;
	text-transform: uppercase;
	transition: background-color .25s, color .25s;
}
.ccg-villa .boat-toggle button:hover { color: var(--v-text); }
.ccg-villa .boat-toggle button[aria-pressed="true"] { background: #fff; color: #000; }

.boat-prices__wrap {
	overflow: hidden;
	border-radius: var(--v-radius);
	background: var(--v-surface);
}

/* Salient styles every table: reset ours */
body .ccg-boat table.boat-prices {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	background: transparent;
	font-size: 1rem;
}
body .ccg-boat .boat-prices th,
body .ccg-boat .boat-prices td {
	padding: 20px 24px;
	border: 0;
	background: transparent;
	color: inherit;
	vertical-align: middle;
	font-weight: 400;
}
/* Salient also puts a near-white border on the first cell of every row
   (body:not(.woocommerce-cart) .main-content tr th:first-child), which beats
   the reset above. These selectors are stronger, so only our divider shows. */
body .ccg-boat .boat-prices__wrap table.boat-prices tr > th,
body .ccg-boat .boat-prices__wrap table.boat-prices tr > td { border: 0; }
body .ccg-boat .boat-prices__wrap table.boat-prices thead tr > th { border-bottom: 1px solid var(--v-line); }

.ccg-boat .boat-prices thead th {
	position: relative;
	padding-top: 40px;
	padding-bottom: 18px;
	text-align: center;
	vertical-align: bottom;
}
.boat-prices__season-name {
	font-size: 0.78rem;
	font-weight: 500;
	line-height: 1.1 !important;
	letter-spacing: .14em;
	text-transform: uppercase;
	display: block;
}
/* Above the season name, so both season names line up */
.boat-prices__badge {
	position: absolute;
	top: 14px;
	left: 50%;
	transform: translateX(-50%);
	white-space: nowrap;
	padding: 0.3rem 0.55rem;
	border-radius: 999px;
	background: var(--v-eyebrow);
	color: #000;
	font-size: 0.55rem;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .1em;
	text-transform: uppercase;
}
.boat-prices__months {
	display: block;
	margin-top: 6px;
	font-size: 0.75rem;
	line-height: 1;
	letter-spacing: .04em;
	color: var(--v-muted);
}

/* Salient paints odd table rows near-white (.main-content table tr:nth-child(2n+1)): reset ours */
body .ccg-boat .boat-prices__wrap table.boat-prices tr:nth-child(n) { background: transparent; }
body .ccg-boat .boat-prices__wrap table.boat-prices tbody tr:nth-child(even) { background: rgba(255, 255, 255, .035); }
.ccg-boat .boat-prices tbody th { text-align: left; }
.boat-prices__charter {
	display: block;
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.boat-prices__times {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 8px;
	margin-top: 6px;
	font-size: 0.78rem;
	line-height: 1.3;
	color: var(--v-muted);
}
.boat-prices__times span + span::before { content: 'Â·'; margin-right: 8px; }

.ccg-boat .boat-prices td {
	width: 24%;
	text-align: center;
	white-space: nowrap;
}
.boat-prices__total,
.boat-prices__pp {
	font-size: 1.2rem;
	font-weight: 500;
	line-height: 1;
	color: var(--v-text);
}
.boat-prices__pp small { font-size: 0.7rem; font-weight: 400; color: var(--v-muted); }
.boat-prices__none { font-size: 0.8rem; color: var(--v-muted); }
/* High season prices in gold, every other season in white */
.boat-prices__cell.is--high .boat-prices__total,
.boat-prices__cell.is--high .boat-prices__pp { color: var(--v-eyebrow); }

/* Per person view (boat.js toggles .is--pp) */
.boat-prices__pp,
.boat-pricing__pp-note { display: none; }
.boat-pricing.is--pp .boat-prices__total { display: none; }
.boat-pricing.is--pp .boat-prices__pp { display: inline; }
.boat-pricing.is--pp .boat-pricing__pp-note { display: inline; }

body .boat-pricing__note { margin-top: 14px; }

.boat-pricing__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 25px;
}
body .boat-pricing__group { flex-basis: 100%; margin-top: 6px; }

/* No table, just a "From" price */
.boat-price-single {
	display: grid;
	gap: 10px;
	padding: 24px;
	border-radius: var(--v-radius);
	background: var(--v-surface);
}
.boat-price-single__from { display: flex; align-items: baseline; gap: 8px; color: var(--v-muted); }
.boat-price-single__from strong { font-size: 1.85rem; font-weight: 500; line-height: 1; color: var(--v-text); }
.boat-price-single__pp { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--v-eyebrow); }

/* ---------- What's included ---------- */

body .boat-included { margin-bottom: 0; }

/* ---------- Estimate card ---------- */

.ccg-villa p.boat-card__pp {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: -10px 0 20px;
	font-size: 0.82rem;
	line-height: 1.35;
	color: var(--v-eyebrow);
}
.boat-card__pp .villa-icon { width: 1.05rem; height: 1.05rem; margin-top: 1px; }

.boat-estimate .boat-estimate__pp { margin-top: 6px; }
/* Each price takes its label's colour: the charter total in white, the split
   per guest in gold (villa.css makes every estimate price gold) */
.villa-card__estimate.boat-estimate dt,
.villa-card__estimate.boat-estimate dd { color: var(--v-text) !important; }
.villa-card__estimate.boat-estimate .boat-estimate__pp dt,
.villa-card__estimate.boat-estimate .boat-estimate__pp dd { color: var(--v-eyebrow) !important; }
.boat-estimate .boat-estimate__pp[hidden] { display: none; }
body .boat-estimate p { max-width: none; margin-top: 8px; }

/* Other yachts: "View all yachts" beside the title on desktop is villa.css's
   (.villa-similar), shared with the villa page */

/* ---------- Mobile bar ---------- */

.boat-bar__from { font-size: 0.8rem; color: var(--v-muted); }

/* ---------- Smaller screens ---------- */

.boat-crumbs__current { display: contents; }

/* Below 1000px each charter becomes a card with its prices side by side
   (the full table crunches its text at these widths) */
@media (max-width: 999px) {
	.boat-prices__wrap { background: transparent; border-radius: 0; overflow: visible; }
	.ccg-boat .boat-prices thead { display: none; }
	.ccg-boat .boat-prices,
	.ccg-boat .boat-prices tbody,
	.ccg-boat .boat-prices th,
	.ccg-boat .boat-prices td { display: block; }
	.ccg-boat .boat-prices tbody tr {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 10px;
		padding: 18px;
		border-radius: var(--v-radius);
		background: var(--v-surface) !important;
	}
	.ccg-boat .boat-prices tbody tr + tr { margin-top: 10px; }
	.ccg-boat .boat-prices.is--cols-1 tbody tr { grid-template-columns: 1fr; }
	body .ccg-boat .boat-prices tbody th { grid-column: 1 / -1; padding: 0 0 4px; }
	body .ccg-boat .boat-prices td {
		width: auto;
		padding: 12px 14px;
		border-radius: 10px;
		background: rgba(0, 0, 0, .3);
		text-align: left;
	}
	/* "HIGH SEASON" then "JUN â€“ SEP" on the next line */
	.ccg-boat .boat-prices td::before {
		content: attr(data-label) "\A" attr(data-months);
		display: block;
		margin-bottom: 8px;
		font-size: 0.6rem;
		line-height: 1.1;
		letter-spacing: .1em;
		text-transform: uppercase;
		white-space: pre-line;
		color: var(--v-muted);
	}
	/* Daily rates: the months are already under the season name */
	.ccg-boat .boat-prices.is--daily td::before { content: attr(data-label); }
}

@media (max-width: 690px) {
	.boat-crumbs__current { display: none; }   /* the name is right below */

	/* 2 a row; an odd one out takes the whole last row */
	.ccg-villa .boat-specs li,
	.ccg-villa .boat-specs.is--rows-of-3 li { flex-basis: 40%; gap: 12px; padding: 15px 16px; }
	.boat-specs__icon { width: 36px; height: 36px; }

	.boat-pricing__cta .villa-btn { width: 100%; white-space: normal; text-align: center; }
	.boat-pricing__head { align-items: flex-start; }
}
