/**
 * Build Your Own package builder (Phase 24.70 / 24.72).
 * Scoped to .wre-byo / .wre-byo-fullwidth. Does not restyle individual or preset product pages.
 */

.wre-byo-fullwidth {
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 1.5rem 0 0;
	padding: 0;
	clear: both;
	float: none;
	overflow-x: clip;
}

.wre-byo-fullwidth > form.cart {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	float: none;
}

.wre-byo {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0 0 1.25rem;
	padding: 0;
	overflow-x: clip;
}

.wre-byo *,
.wre-byo *::before,
.wre-byo *::after {
	box-sizing: border-box;
}

.wre-byo__heading {
	margin: 0 0 12px;
	color: var(--wre-color-primary, #c4a35a);
}

.wre-byo__hint {
	margin: 0 0 1rem;
	font-size: 0.98rem;
	line-height: 1.45;
}

.wre-byo__grid {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.wre-byo__card {
	margin: 0;
	padding: 1rem;
	border: 1px solid var(--wre-color-border, #d4cbb8);
	border-radius: var(--wre-radius, 2px);
	background: var(--wre-color-light, #f5f0e6);
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	position: relative;
}

.wre-byo__card.is-selected {
	border-color: var(--wre-color-primary, #c4a35a);
	background: var(--wre-color-light-accent, #efe6d4);
	box-shadow: inset 0 0 0 1px var(--wre-color-primary, #c4a35a);
}

.wre-byo__selected-badge {
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	z-index: 2;
	margin: 0;
	padding: 0.15rem 0.45rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.2;
	color: var(--wre-color-dark, #1a1a1a);
	background: var(--wre-color-primary, #c4a35a);
	border-radius: var(--wre-radius, 2px);
	pointer-events: none;
}

.wre-byo__selected-badge[hidden] {
	display: none !important;
}

.wre-byo__card.is-unavailable {
	opacity: 1;
	position: relative;
}

.wre-byo__card.is-unavailable .wre-byo__media {
	opacity: 0.55;
}

.wre-byo__card.is-unavailable .wre-byo__title,
.wre-byo__card.is-unavailable .wre-byo__title a {
	opacity: 1;
	color: inherit;
}

.wre-byo__card.is-unavailable .wre-byo__avail {
	color: var(--wre-color-muted, #6b6560);
}

.wre-byo__card.is-unavailable .wre-byo__qty {
	opacity: 0.55;
}

.wre-byo__media {
	margin: 0 0 0.35rem;
	aspect-ratio: 4 / 3; /* Phase 26.35 — product-card thumbnails */
	overflow: hidden;
}

.wre-byo__media a {
	display: block;
	height: 100%;
}

.wre-byo__media img,
.wre-byo__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wre-byo__title {
	margin: 0;
	font-size: 21px; /* Phase 26.23.18.4 — product-card titles */
	font-weight: 600; /* Phase 26.33 — readability */
	line-height: 1.3;
	overflow-wrap: anywhere;
	color: var(--wre-color-text-dark, #1a1a1a);
}

.wre-byo__title a {
	color: inherit;
	text-decoration: none;
}

.wre-byo__title a:hover,
.wre-byo__title a:focus {
	text-decoration: underline;
}

.wre-byo__price {
	margin: 0;
	font-weight: 600;
	color: var(--wre-color-primary, #c4a35a);
}

.wre-byo__avail {
	margin: 0;
	min-height: 1.1em;
	font-size: 0.92rem;
}

.wre-byo__qty {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	margin-top: 0.4rem;
}

.wre-byo__qty-btn {
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	font-size: 1.35rem;
	line-height: 1;
	border: 1px solid var(--wre-color-primary, #c4a35a);
	background: var(--wre-color-dark, #1a1a1a);
	color: var(--wre-color-primary, #c4a35a);
	cursor: pointer;
}

.wre-byo__qty-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.wre-byo__qty-value {
	min-width: 1.75rem;
	text-align: center;
	font-weight: 600;
}

.wre-byo__summary {
	margin: 0 0 1.25rem;
	padding: 1.1rem 1.2rem;
	border: 1px solid var(--wre-color-border, #d4cbb8);
	border-top: 3px solid var(--wre-color-primary, #c4a35a);
	background: var(--wre-color-light, #f5f0e6);
}

.wre-byo__summary-heading {
	margin: 0 0 12px;
	color: var(--wre-color-primary, #c4a35a);
}

.wre-byo__live {
	margin: 0 0 0.65rem;
	min-height: 1.2em;
}

.wre-byo__totals {
	margin: 0;
}

.wre-byo__row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin: 0 0 0.35rem;
}

.wre-byo__row dt,
.wre-byo__row dd {
	margin: 0;
}

.wre-byo__row--final {
	margin-top: 0.5rem;
	font-weight: 700;
}

.wre-byo__next {
	margin: 0.75rem 0 0;
	font-size: 0.95rem;
	line-height: 1.45;
}

.wre-byo-fullwidth .wre-product-recs-host {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.wre-byo-fullwidth .wre-recommendations {
	margin: 0 0 1.25rem;
}

.wre-byo-fullwidth .single_add_to_cart_button {
	margin: 0;
	max-width: 100%;
}

.wre-byo-guide {
	box-sizing: border-box;
	position: fixed;
	left: 50%;
	bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	transform: translateX(-50%);
	z-index: 40;
	width: calc(100% - 24px);
	max-width: 32rem;
	margin: 0;
	padding: 0.7rem 1rem;
	border: 1px solid var(--wre-color-primary, #c4a35a);
	border-radius: var(--wre-radius, 2px);
	background: var(--wre-color-light, #f5f0e6);
	color: var(--wre-color-text, #2c2416);
	box-shadow: var(--wre-shadow, 0 2px 10px rgba(44, 36, 22, 0.12));
	pointer-events: none;
}

.wre-byo-guide[hidden] {
	display: none;
}

.wre-byo-guide__line {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.wre-byo-guide__line + .wre-byo-guide__line {
	margin-top: 0.25rem;
}

.wre-byo.is-guide-visible {
	padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
}

/*
 * Phase 26.19 — fullwidth no longer uses 5.75rem (~92px) padding-bottom as a
 * permanent tail under Add Package. Nested inner padding stays 0 (26.16).
 * Mobile: sticky action + raised guide (mobile-sticky-actions.css).
 * Tablet/desktop: balanced button margins; guide stays viewport-fixed over later page chrome.
 */
.wre-byo-fullwidth.is-guide-visible {
	padding-bottom: 0;
}

.wre-byo-fullwidth .wre-byo.is-guide-visible {
	padding-bottom: 0;
}

@media (min-width: 768px) {
	.wre-byo-guide {
		width: auto;
		min-width: 22rem;
		max-width: 36rem;
		bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	}

	.wre-byo-fullwidth .wre-recommendations {
		margin-bottom: 2rem;
	}

	.wre-byo-fullwidth .single_add_to_cart_button {
		margin: 0 0 2rem;
	}
}

.wre-current-product--byo_package .wre-product-booking__price {
	display: none !important;
}

.wre-current-product--byo_package .summary > .price,
.wre-current-product--byo_package p.price {
	display: none;
}

@media (min-width: 768px) {
	.wre-byo__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.wre-byo__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Phase 26.42 — desktop stays at 3 columns (no 4-up at 1280px). */

@media (max-width: 767px) {
	.wre-cart-shell .wre-byo__heading,
	.wre-current-product--byo_package .wre-byo__heading,
	.wre-current-product--byo_package .wre-byo__summary-heading {
		font-size: 30px;
		line-height: 1.2;
	}
}
