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

.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,
.sm-hb-picker-close {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	font-family: inherit;
}

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

.sm-hb-heading {
	margin: 0 0 14px;
	font-size: 20px;
	font-weight: 700;
}

/* ---------------- Row scroll arrows (own row, above both columns) ---------------- */
.sm-hb-row-nav {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-bottom: 12px;
}

.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;
	padding: 8px 4px 16px;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.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;
	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;
}

.sm-hb-add-tile {
	border: 2px dashed #ccc;
	background: transparent;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	transition: border-color .2s ease, transform .1s ease;
}

.sm-hb-add-tile:hover {
	border-color: #999;
}

.sm-hb-add-tile:active {
	transform: scale(.97);
}

.sm-hb-add-icon {
	font-size: 30px;
	line-height: 1;
	color: #999;
}

.sm-hb-add-label {
	font-size: 13px;
	font-weight: 600;
	color: #777;
	text-align: center;
	padding: 0 8px;
}

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

@media (max-width: 480px) {
	.sm-hb-tile { width: 110px; height: 148px; border-radius: 16px; }
	.sm-hb-row { gap: 8px; }
	.sm-hb-plus { font-size: 18px; }
	.sm-hb-add-label { font-size: 11px; }
	.sm-hb-add-icon { font-size: 22px; }
}

/* ---------------- Add Item picker (full width, closable) ---------------- */
.sm-hb-picker {
	position: relative;
	width: 100%;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 20px;
	box-shadow: 0 12px 30px rgba(0,0,0,.12);
	padding: 22px 56px 20px 20px;
	margin-top: 18px;
}

.sm-hb-picker-close {
	position: absolute !important;
	top: 12px !important;
	right: 12px !important;
	left: auto !important;
	width: 30px !important;
	height: 30px !important;
	min-width: 30px !important;
	min-height: 30px !important;
	max-width: 30px !important;
	max-height: 30px !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 50% !important;
	background: #f0f0f0 !important;
	color: #555 !important;
	line-height: 1 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: none !important;
	transition: background .15s ease, transform .1s ease;
}

.sm-hb-picker-close svg {
	display: block;
	pointer-events: none;
}

.sm-hb-picker-close:hover {
	background: #e2e2e2 !important;
}

.sm-hb-picker-close:active {
	transform: scale(.9);
}

.sm-hb-picker-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 14px;
}

.sm-hb-picker-item {
	cursor: pointer;
	text-align: center;
	border-radius: 12px;
	padding: 6px;
	transition: background .15s ease;
}

.sm-hb-picker-item:hover {
	background: #f5f5f5;
}

.sm-hb-picker-item img {
	width: 100%;
	aspect-ratio: 3/4;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}

.sm-hb-picker-item span {
	display: block;
	font-size: 11px;
	margin-top: 6px;
	font-weight: 600;
}

.sm-hb-picker-empty {
	grid-column: 1 / -1;
	font-size: 13px;
	opacity: .6;
	text-align: center;
	padding: 14px;
}

@media (max-width: 480px) {
	.sm-hb-picker { padding: 20px 46px 16px 16px; }
	.sm-hb-picker-grid {
		grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
		gap: 8px;
	}
}

/* ---------------- 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: 12px; }
	.sm-hb-box-visual { width: 72px; height: 72px; }
	.sm-hb-total { font-size: 19px; }
	.sm-hb-buy-btn { width: 100%; }
}
