.rpbh-booking-fields { margin: 12px 0 20px; clear: both; }
.rpbh-grid { display: grid; grid-template-columns: 1fr; gap: 8px 14px; }
.rpbh-grid--single { grid-template-columns: 1fr; }
.rpbh-grid .form-row { margin: 0; }
.rpbh-booking-fields .form-row input[type="text"],
.rpbh-booking-fields .form-row input[type="email"],
.rpbh-booking-fields .form-row input[type="tel"],
.rpbh-booking-fields .form-row input[type="number"],
.rpbh-booking-fields .form-row select,
.rpbh-booking-fields .form-row textarea { width: 100%; max-width: 100%; box-sizing: border-box; }
.rpbh-more-kegs-label { display: flex; align-items: flex-start; gap: 0.5rem; font-weight: 600; cursor: pointer; }
.rpbh-more-kegs-label input[type="checkbox"] { margin-top: 0.2em; flex-shrink: 0; }
.rpbh-additional-kegs-wrap[hidden] { display: none !important; }
.rpbh-bar-description { font-size: 1rem; line-height: 1.55; margin-top: 12px; }
.rpbh-bar-description:empty { display: none; }
.rpbh-price-box { margin: 16px 0; border: 1px solid #ccc; border-radius: 0; padding: 1rem 1.1rem; background: #fff; }
.rpbh-price-box > div { display: flex; justify-content: space-between; margin-bottom: 8px; }
.rpbh-price-box .rpbh-total { border-top: 1px solid #ddd; padding-top: 8px; margin-top: 10px; font-size: 1.1em; }
.rpbh-terms { display: block; margin: 12px 0; }
body.rpbh-bar-hire-product div.product .woocommerce-product-gallery {
	opacity: 1 !important;
	width: 100%;
	max-width: 100%;
}

/* Botiga (and similar): gallery + summary share .product-gallery-summary — match default shop ~50/50 columns */
@media (min-width: 901px) {
	body.rpbh-bar-hire-product.single-product div.product .product-gallery-summary {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: clamp(1.25rem, 4vw, 3rem);
		row-gap: 1.5rem;
		align-items: start;
		width: 100%;
	}
	body.rpbh-bar-hire-product.single-product div.product .product-gallery-summary .woocommerce-product-gallery {
		grid-column: 1;
		min-width: 0;
		width: 100%;
		max-width: 100%;
	}
	body.rpbh-bar-hire-product.single-product div.product .product-gallery-summary .summary.entry-summary {
		grid-column: 2;
		min-width: 0;
		width: 100%;
		max-width: 100%;
	}
	/* Fill the gallery track (Flexslider / theme caps can leave images visually small) */
	body.rpbh-bar-hire-product.single-product .woocommerce-product-gallery .flex-viewport,
	body.rpbh-bar-hire-product.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
		width: 100% !important;
		max-width: 100%;
	}
}

@media (max-width: 900px) {
	body.rpbh-bar-hire-product.single-product div.product .product-gallery-summary {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		row-gap: 1.5rem;
	}
	body.rpbh-bar-hire-product.single-product div.product .product-gallery-summary .woocommerce-product-gallery,
	body.rpbh-bar-hire-product.single-product div.product .product-gallery-summary .summary.entry-summary {
		width: 100%;
		max-width: 100%;
		grid-column: auto;
	}
	/* Classic Woo: stack gallery then summary (same as Botiga mobile) */
	body.rpbh-bar-hire-product.single-product div.product:has(> .woocommerce-product-gallery):has(> .summary.entry-summary) {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		row-gap: 1.5rem;
	}
	body.rpbh-bar-hire-product.single-product div.product:has(> .woocommerce-product-gallery):has(> .summary.entry-summary) > .woocommerce-product-gallery,
	body.rpbh-bar-hire-product.single-product div.product:has(> .woocommerce-product-gallery):has(> .summary.entry-summary) > .summary.entry-summary {
		grid-column: auto;
		width: 100%;
		max-width: 100%;
	}
}

/* Classic WooCommerce (no .product-gallery-summary): direct #product children gallery | summary */
@media (min-width: 901px) {
	body.rpbh-bar-hire-product.single-product div.product:has(> .woocommerce-product-gallery):has(> .summary.entry-summary) {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: clamp(1.25rem, 4vw, 3rem);
		row-gap: 1.5rem;
		align-items: start;
	}
	body.rpbh-bar-hire-product.single-product div.product:has(> .woocommerce-product-gallery):has(> .summary.entry-summary) > .woocommerce-product-gallery {
		grid-column: 1;
		min-width: 0;
		width: 100%;
		max-width: 100%;
	}
	body.rpbh-bar-hire-product.single-product div.product:has(> .woocommerce-product-gallery):has(> .summary.entry-summary) > .summary.entry-summary {
		grid-column: 2;
		min-width: 0;
		width: 100%;
		max-width: 100%;
	}
	body.rpbh-bar-hire-product.single-product div.product:has(> .woocommerce-product-gallery):has(> .summary.entry-summary) > .woocommerce-tabs,
	body.rpbh-bar-hire-product.single-product div.product:has(> .woocommerce-product-gallery):has(> .summary.entry-summary) > section.related.products,
	body.rpbh-bar-hire-product.single-product div.product:has(> .woocommerce-product-gallery):has(> .summary.entry-summary) > .merchant-product-navigation {
		grid-column: 1 / -1;
	}
}

/* Optional custom template wrapper: children participate in parent layout */
body.rpbh-bar-hire-product .rpbh-product-wrap {
	display: contents;
}

/* Gallery slides built by Woo / plugin — keep full width inside __wrapper */
body.rpbh-bar-hire-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img,
body.rpbh-bar-hire-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image a {
	display: block;
	max-width: 100%;
}
body.rpbh-bar-hire-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img {
	width: 100%;
	height: auto;
}
/* Flatpickr buttons */
.rpbh-fp-buttons { display: flex; justify-content: space-between; padding: 6px 10px; border-top: 1px solid #e0e0e0; }
.rpbh-fp-btn { border: none; padding: 6px 18px; border-radius: 4px; font-size: 14px; cursor: pointer; font-weight: 600; }
.rpbh-fp-clear { background: #eee; color: #333; }
.rpbh-fp-ok { background: #2a7a2a; color: #fff; }
.rpbh-fp-clear:hover { background: #ddd; }
.rpbh-fp-ok:hover { background: #236b23; }
/* Flatpickr time picker: steppers on the side of each field, not full-width over the digits */
.flatpickr-time .flatpickr-am-pm,
.flatpickr-time .numInputWrapper { height: 50px; }
.flatpickr-time .numInputWrapper {
	width: auto;
	min-width: 3.25em;
	max-width: 5rem;
	position: relative;
	padding-right: 26px;
	box-sizing: border-box;
}
.flatpickr-time .numInputWrapper span.arrowUp,
.flatpickr-time .numInputWrapper span.arrowDown {
	width: 24px;
	right: 0;
	left: auto;
	height: 38%;
	opacity: 1;
	border: none;
	background: #f0f0f0;
}
.flatpickr-time .numInputWrapper span.arrowUp:hover,
.flatpickr-time .numInputWrapper span.arrowDown:hover { background: #ddd; }
.flatpickr-time .numInputWrapper span.arrowUp::after,
.flatpickr-time .numInputWrapper span.arrowDown::after {
	border-width: 8px;
}
.flatpickr-time input.flatpickr-hour,
.flatpickr-time input.flatpickr-minute { font-size: 18px; height: 50px; }
/* Inline time picker: one block with the input (no floating arrow gap) */
body.rpbh-bar-hire-product .flatpickr-wrapper:has(#rpbh_event_time) {
	display: flex;
	flex-direction: column;
	align-items: stretch;
}
body.rpbh-bar-hire-product .flatpickr-calendar.static {
	position: relative;
	top: auto;
	left: auto;
	width: 100%;
	max-width: 100%;
	margin-top: -1px;
	box-shadow: none;
	border: 1px solid #111;
	border-top: none;
	border-radius: 0;
}
body.rpbh-bar-hire-product .flatpickr-calendar.static:before,
body.rpbh-bar-hire-product .flatpickr-calendar.static:after {
	display: none !important;
}
body.rpbh-bar-hire-product #rpbh_event_time.flatpickr-input,
body.rpbh-bar-hire-product input#rpbh_event_time {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

/* Bar hire booking form: full-width fields (overrides themes that inline email/tel or cap input width) */
body.rpbh-bar-hire-product .rpbh-booking-fields .rpbh-grid .form-row.form-row-wide {
	width: 100%;
	max-width: 100%;
	float: none;
	clear: both;
}
body.rpbh-bar-hire-product .rpbh-booking-fields .rpbh-grid .form-row.form-row-wide > label:first-child:not(.rpbh-more-kegs-label) {
	display: block;
	width: 100%;
	margin-bottom: 0.35em;
}
body.rpbh-bar-hire-product .rpbh-booking-fields input[type="text"],
body.rpbh-bar-hire-product .rpbh-booking-fields input[type="email"],
body.rpbh-bar-hire-product .rpbh-booking-fields input[type="tel"],
body.rpbh-bar-hire-product .rpbh-booking-fields input[type="number"],
body.rpbh-bar-hire-product .rpbh-booking-fields select,
body.rpbh-bar-hire-product .rpbh-booking-fields textarea {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}
body.rpbh-bar-hire-product .rpbh-bar-description {
	margin: 0 0 1rem;
	line-height: 1.65;
}
.rpbh-field-error { border-left: 3px solid #c00 !important; padding-left: 8px; }
.rpbh-field-error input, .rpbh-field-error select, .rpbh-field-error textarea { border-color: #c00 !important; }
.rpbh-damage-gate label,
.rpbh-access-gate label,
.rpbh-terms-gate label { opacity: 0.5; }
.rpbh-gate-unlocked label { opacity: 1; }
.rpbh-damage-gate .rpbh-damage-link,
.rpbh-access-gate .rpbh-access-link,
.rpbh-terms-gate .rpbh-terms-link { opacity: 1; pointer-events: auto; text-decoration: underline; font-weight: 700; }
.rpbh-damage-hint, .rpbh-access-hint, .rpbh-terms-hint { display: block; color: #888; font-style: italic; margin-top: 2px; }
.rpbh-power-field { border: none; padding: 0; margin: 0; }
.rpbh-power-field legend { font-weight: 600; margin-bottom: 4px; }
.rpbh-power-field label { display: inline-flex; align-items: center; gap: 4px; margin-right: 16px; cursor: pointer; }
