.hbg-section {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* True edge-to-edge full width: breaks out of any theme/page-builder
   container (Woodmart row max-width, etc) regardless of nesting. */
html body div.hbg-section.hbg-full-bleed {
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	flex: none !important;
}

@media (max-width: 768px) {
	html body div.hbg-section.hbg-full-bleed {
		width: 100vw !important;
		max-width: 100vw !important;
		margin-left: calc(50% - 50vw) !important;
		margin-right: calc(50% - 50vw) !important;
		flex: none !important;
	}
}

/* Some themes/page-builders add overflow-x:hidden to wrapping containers to
   prevent horizontal scrollbars. That clips this section's negative-margin
   full-bleed trick visually even though the box-model math is correct.
   Force the nearest known wrappers back to visible so the bleed isn't cut off. */
html, body {
	overflow-x: clip;
}

body .hbg-section.hbg-full-bleed,
body .wp-block-wd-section:has(.hbg-section.hbg-full-bleed),
body .wp-block-wd-container:has(.hbg-section.hbg-full-bleed) {
	overflow: visible !important;
}

.hbg-section.hbg-full-bleed .hbg-inner {
	box-sizing: border-box;
	padding-left: 24px;
	padding-right: 24px;
}

.hbg-inner {
	width: var(--hbg-section-width, 100%);
	max-width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
	padding: 20px 0;
}

.hbg-header {
	display: flex !important;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 20px;
}

.hbg-header-text {
	flex: 1 1 auto;
	min-width: 0;
}

.hbg-heading {
	font-size: var(--hbg-heading-size, 28px);
	font-weight: 700;
	margin: 0 0 8px 0;
	line-height: 1.2;
}

.hbg-description {
	font-size: var(--hbg-desc-size, 16px);
	margin: 0;
	line-height: 1.5;
	max-width: 700px;
}

.hbg-header-button {
	flex: 0 0 auto;
	flex-shrink: 0;
}

.hbg-browse-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	height: var(--hbg-btn-height, 50px);
	min-width: 120px;
	padding: 0 24px;
	background-color: var(--hbg-btn-bg, #272357);
	color: var(--hbg-btn-color, #ffffff) !important;
	font-size: var(--hbg-btn-font-size, 16px);
	border-radius: var(--hbg-btn-radius, 6px);
	text-decoration: none !important;
	white-space: nowrap;
	font-weight: 600;
	border: none;
	box-sizing: border-box;
	transition: opacity .2s ease;
}

.hbg-browse-btn:hover {
	opacity: .88;
	color: var(--hbg-btn-color, #ffffff) !important;
}

.hbg-button-mobile {
	display: none !important;
	order: 3;
	margin-top: 20px;
}

.hbg-button-mobile .hbg-browse-btn {
	width: 100%;
}

/* Slider */
.hbg-slider-wrap {
	width: 100%;
	overflow: hidden;
}

.hbg-slider {
	display: flex;
	gap: var(--hbg-card-gap, 20px);
	overflow-x: auto;
	scroll-behavior: auto;
	cursor: grab;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	user-select: none;
	scroll-snap-type: x mandatory;
}

.hbg-slider::-webkit-scrollbar {
	display: none;
}

.hbg-slider.hbg-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
}

.hbg-card {
	flex: 0 0 auto;
	width: var(--hbg-card-w-desktop, 280px);
	height: var(--hbg-card-h-desktop, 320px);
	border-radius: var(--hbg-card-radius, 8px);
	overflow: hidden;
	background: #f2f2f2;
	scroll-snap-align: start;
}

.hbg-card[data-hbg-modal] {
	cursor: pointer;
}

.hbg-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

/* Slider progress indicator */
.hbg-slider-progress {
	width: 100%;
	height: 4px;
	background: #e5e5e5;
	border-radius: 4px;
	margin-top: 16px;
	overflow: hidden;
}

.hbg-slider-progress-bar {
	height: 100%;
	width: 20%;
	background: var(--hbg-btn-bg, #272357);
	border-radius: 4px;
	transform: translateX(0);
	transition: transform .05s linear, width .05s linear;
}

/* Product popup modal */
.hbg-modal {
	display: none !important;
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	height: 100% !important;
	z-index: 999999 !important;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
	padding: 0 !important;
}

.hbg-modal.hbg-modal-open {
	display: flex !important;
}

.hbg-modal-overlay {
	position: absolute !important;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, .55);
}

.hbg-modal-dialog {
	position: relative;
	background: #fff;
	width: 92%;
	max-width: 420px;
	max-height: 88vh;
	overflow-y: auto;
	border-radius: 6px;
	z-index: 1;
}

.hbg-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: none;
	background: rgba(255, 255, 255, .9);
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: var(--hbg-btn-bg, #272357);
	z-index: 2;
}

.hbg-modal-image img {
	width: 100%;
	display: block;
	max-height: 320px;
	object-fit: cover;
}

.hbg-modal-body {
	padding: 20px 22px 24px;
}

.hbg-modal-handle {
	margin: 0 0 8px 0;
	color: #777;
	font-size: 14px;
}

.hbg-modal-product {
	margin: 0 0 10px 0;
	font-size: 19px;
	line-height: 1.3;
}

.hbg-modal-product a {
	color: inherit;
	text-decoration: none;
}

.hbg-modal-price {
	margin: 0 0 18px 0;
	font-weight: 700;
	font-size: 16px;
}

.hbg-modal-shop-btn {
	display: block;
	width: 100%;
	text-align: center;
	padding: 14px 0;
	background: var(--hbg-btn-bg, #272357);
	color: var(--hbg-btn-color, #fff) !important;
	border-radius: var(--hbg-btn-radius, 6px);
	text-decoration: none !important;
	font-weight: 600;
	font-size: var(--hbg-btn-font-size, 16px);
}

.hbg-modal-shop-btn:hover {
	opacity: .9;
}

@media (max-width: 768px) {
	.hbg-section.hbg-full-bleed .hbg-inner {
		padding-left: 16px;
		padding-right: 16px;
	}

	.hbg-header {
		flex-direction: column !important;
		align-items: flex-start;
	}

	.hbg-button-desktop {
		display: none !important;
	}

	.hbg-button-mobile {
		display: block !important;
	}

	.hbg-card {
		width: var(--hbg-card-w-mobile, 220px);
		height: var(--hbg-card-h-mobile, 260px);
	}
}
