.sm-hb-widget {
	font-family: inherit;
	width: 100%;
	max-width: 100%;
	position: relative;
	box-sizing: border-box;
	overflow-x: hidden;
}

.sm-hb-widget *,
.sm-hb-widget *::before,
.sm-hb-widget *::after {
	box-sizing: border-box;
}

/* ==================================================================
   Hard reset for every <button> this widget renders. Some themes
   apply their own border/box-shadow/transition to bare "button"
   elements, which fights with the button styles below. "all: unset"
   wipes that out completely; every specific rule further down in
   this file re-applies exactly what's needed, and — because these
   are plain class selectors of equal specificity — the later rule
   always wins the cascade regardless of what the theme does.
   ================================================================== */
.sm-hb-buy-btn,
.sm-hb-scroll-btn {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	font-family: inherit;
}

.sm-hb-buy-btn:focus-visible,
.sm-hb-scroll-btn:focus-visible {
	outline: 2px solid #1E6B47;
	outline-offset: 2px;
}

.sm-hb-heading {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	flex: 1 1 auto;
	min-width: 0;
}

/* ---------------- Toolbar: heading + scroll arrows on one row ---------------- */
.sm-hb-toolbar {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 12px;
	margin-bottom: 14px;
}

.sm-hb-row-nav {
	display: flex;
	flex-shrink: 0;
	gap: 10px;
	margin-left: auto;
}

.sm-hb-scroll-btn {
	width: 42px !important;
	height: 42px !important;
	min-width: 42px !important;
	min-height: 42px !important;
	max-width: 42px !important;
	max-height: 42px !important;
	border-radius: 50% !important;
	padding: 0 !important;
	margin: 0 !important;
	background: #ffffff !important;
	color: #2C2C2C !important;
	line-height: 1 !important;
	font-weight: 400 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: none !important;
	outline: none;
	box-shadow: 0 3px 8px rgba(0,0,0,.2) !important;
	transition: box-shadow .15s ease, transform .15s ease;
}

.sm-hb-scroll-btn svg {
	display: block;
	pointer-events: none;
}

.sm-hb-scroll-btn:hover {
	box-shadow: 0 5px 14px rgba(0,0,0,.28) !important;
	transform: translateY(-2px);
}

.sm-hb-scroll-btn:active {
	box-shadow: 0 2px 4px rgba(0,0,0,.2) !important;
	transform: translateY(0);
}

/* ---------------- Layout: main column + right-side box ---------------- */
.sm-hb-layout {
	display: flex;
	align-items: center;
	gap: 24px;
}

.sm-hb-main {
	flex: 1 1 0;
	min-width: 0;
}

.sm-hb-summary {
	width: 300px;
	flex: 0 0 300px;
	display: flex;
	align-items: center;
	gap: 16px;
	background: #fff;
	border-radius: 20px;
	padding: 20px;
	border: 1px solid #eee;
}

@media (max-width: 900px) {
	.sm-hb-layout {
		flex-direction: column;
	}
	.sm-hb-summary {
		width: 100%;
		flex-basis: auto;
	}
}

/* ---------------- Item tiles ---------------- */
.sm-hb-row {
	display: flex;
	align-items: center;
	gap: 14px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 8px 4px 16px;
	scroll-padding-left: 4px;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
}

.sm-hb-row::-webkit-scrollbar {
	display: none;
}

.sm-hb-plus {
	font-size: 24px;
	font-weight: 700;
	color: #999;
	flex-shrink: 0;
}

.sm-hb-tile {
	position: relative;
	flex-shrink: 0;
	scroll-snap-align: start;
	width: 170px;
	height: 220px;
	border-radius: 22px;
	border: 3px solid transparent;
	overflow: hidden;
	cursor: pointer;
	background: transparent;
	transition: border-color .2s ease, transform .2s ease, opacity .2s ease;
}

.sm-hb-tile:hover {
	transform: translateY(-3px);
}

.sm-hb-tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sm-hb-tile .sm-hb-check {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #1E6B47;
	display: none;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

.sm-hb-tile .sm-hb-check .sm-hb-icon-check {
	display: block;
	width: 10px;
	height: 5px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(-45deg);
	margin-top: -2px;
}

.sm-hb-tile.is-selected {
	border-color: #1E6B47;
}

.sm-hb-tile.is-selected .sm-hb-check {
	display: flex;
}

.sm-hb-tile:not(.is-selected) img {
	filter: grayscale(35%) opacity(0.75);
}

/* Applied to unselected tiles once the max-items limit (if enabled) is reached. */
.sm-hb-tile.is-limit-reached {
	cursor: not-allowed;
	opacity: .4;
	pointer-events: none;
}

@media (max-width: 900px) {
	.sm-hb-tile { width: 140px; height: 185px; border-radius: 18px; }
}

@media (max-width: 480px) {
	.sm-hb-tile { width: 108px; height: 142px; border-radius: 14px; }
	.sm-hb-row { gap: 8px; padding: 6px 2px 14px; }
	.sm-hb-plus { font-size: 16px; }
	.sm-hb-toolbar { gap: 8px; margin-bottom: 10px; }
	.sm-hb-heading { font-size: 16px; line-height: 1.3; }
	.sm-hb-scroll-btn {
		width: 34px !important;
		height: 34px !important;
		min-width: 34px !important;
		min-height: 34px !important;
		max-width: 34px !important;
		max-height: 34px !important;
	}
	.sm-hb-scroll-btn svg { width: 13px; height: 13px; }
}

/* ---------------- Box + total (right sidebar) ---------------- */
.sm-hb-box-visual {
	width: 100px;
	height: 100px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sm-hb-box-visual img,
.sm-hb-box-visual .sm-hb-box-icon {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transform-origin: 50% 80%;
}

@keyframes smHbShake {
	0%, 100% { transform: rotate(0deg) translateX(0); }
	20% { transform: rotate(-7deg) translateX(-3px); }
	40% { transform: rotate(6deg) translateX(3px); }
	60% { transform: rotate(-5deg) translateX(-2px); }
	80% { transform: rotate(4deg) translateX(2px); }
}

.sm-hb-box-visual.is-shaking img,
.sm-hb-box-visual.is-shaking .sm-hb-box-icon {
	animation: smHbShake .5s ease;
}

.sm-hb-info {
	flex: 1;
	min-width: 0;
}

.sm-hb-label {
	font-weight: 700;
	margin: 0 0 2px;
	font-size: 15px;
}

.sm-hb-empty-msg {
	font-size: 12px;
	opacity: .6;
	margin: 0 0 12px;
	line-height: 1.4;
}

.sm-hb-filled-msg {
	margin-bottom: 12px;
}

.sm-hb-count {
	font-size: 12px;
	opacity: .65;
	margin: 0;
}

.sm-hb-limit-msg {
	font-size: 11px;
	color: #B3261E;
	margin: 2px 0 0;
}

.sm-hb-total {
	font-size: 24px;
	font-weight: 800;
	margin: 2px 0 0;
}

/* ==================================================================
   Buy Now button — shared base, then one block per style variant.
   The store's chosen color(s) come in as CSS custom properties set
   inline by the widget / Elementor color controls.
   ================================================================== */
.sm-hb-buy-btn {
	--sm-hb-btn-color: #FFC93C;
	--sm-hb-btn-text: #1B1B1B;
	--sm-hb-btn-shadow: #B88400;
	--sm-hb-btn-radius: 999px;
	position: relative;
	overflow: hidden;
	border-radius: var(--sm-hb-btn-radius) !important;
	min-height: 0 !important;
	font-weight: 700 !important;
	letter-spacing: .02em;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
	transition: box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}

.sm-hb-buy-btn .sm-hb-btn-label {
	position: relative;
	z-index: 1;
}

.sm-hb-buy-btn:disabled {
	opacity: .4;
	cursor: not-allowed;
	transform: none !important;
}

/* Sizes */
.sm-hb-btn-size-small { padding: 9px 16px !important; font-size: 12px; }
.sm-hb-btn-size-normal { padding: 13px 24px !important; font-size: 14px; }
.sm-hb-btn-size-large { padding: 17px 32px !important; font-size: 16px; }

/* Style: Flat */
.sm-hb-btn-style-flat {
	background: var(--sm-hb-btn-color) !important;
	color: var(--sm-hb-btn-text) !important;
	border: none !important;
	box-shadow: none !important;
}

.sm-hb-btn-style-flat:not(:disabled):hover {
	filter: brightness(0.95);
}

.sm-hb-btn-style-flat:not(:disabled):active {
	transform: scale(.98);
}

/* Style: 3D (glossy press) */
.sm-hb-btn-style-3d {
	background: var(--sm-hb-btn-color) !important;
	color: var(--sm-hb-btn-text) !important;
	border: none !important;
	box-shadow: 0 5px 0 var(--sm-hb-btn-shadow) !important;
}

.sm-hb-btn-style-3d::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255,255,255,.45) 0%, rgba(255,255,255,0) 60%);
	pointer-events: none;
}

.sm-hb-btn-style-3d:not(:disabled):hover {
	box-shadow: 0 2px 0 var(--sm-hb-btn-shadow) !important;
	transform: translateY(3px);
}

.sm-hb-btn-style-3d:not(:disabled):active {
	box-shadow: none !important;
	transform: translateY(5px);
}

.sm-hb-btn-style-3d:disabled {
	box-shadow: 0 5px 0 var(--sm-hb-btn-shadow) !important;
}

/* Style: Outline / Ghost */
.sm-hb-btn-style-outline {
	background: transparent !important;
	color: var(--sm-hb-btn-color) !important;
	border: 2px solid var(--sm-hb-btn-color) !important;
	box-shadow: none !important;
}

.sm-hb-btn-style-outline:not(:disabled):hover {
	background: var(--sm-hb-btn-color) !important;
	color: var(--sm-hb-btn-text) !important;
}

.sm-hb-btn-style-outline:not(:disabled):active {
	transform: scale(.98);
}

@media (max-width: 480px) {
	.sm-hb-summary {
		padding: 16px;
		gap: 14px;
		border-radius: 16px;
	}
	.sm-hb-box-visual { width: 64px; height: 64px; }
	.sm-hb-label { font-size: 14px; }
	.sm-hb-empty-msg { font-size: 12px; margin-bottom: 10px; }
	.sm-hb-count { font-size: 12px; }
	.sm-hb-total { font-size: 20px; margin: 2px 0 10px; }
	.sm-hb-buy-btn {
		width: 100%;
		min-height: 46px;
	}
	.sm-hb-btn-size-small.sm-hb-buy-btn { min-height: 40px; }
	.sm-hb-btn-size-large.sm-hb-buy-btn { min-height: 52px; }
}

@media (max-width: 360px) {
	.sm-hb-summary { flex-direction: column; align-items: flex-start; text-align: left; }
	.sm-hb-box-visual { width: 56px; height: 56px; }
}
