/* BetterWoo storefront: product badges + spin-the-wheel popup. */

/* Product badge */
.woocommerce ul.products li.product,
.woocommerce .wc-block-grid__product {
	position: relative;
}
.bw-badge {
	position: absolute;
	top: 8px;
	z-index: 5;
	padding: 4px 10px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.4;
	pointer-events: none;
}
.woocommerce ul.products li.product .bw-badge,
.woocommerce .wc-block-grid__product .bw-badge {
	top: 8px;
}
.bw-badge-left { left: 8px; }
.bw-badge-right { right: 8px; }

/* Spin wheel overlay */
.bw-wheel-overlay {
	position: fixed;
	inset: 0;
	z-index: 99990;
	background: rgba(10, 10, 12, 0.65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.25s ease;
}
.bw-wheel-overlay.bw-wheel-open { opacity: 1; }
.bw-wheel-overlay[hidden] { display: none; }

.bw-wheel-modal {
	position: relative;
	width: min(420px, 100%);
	background: #fff;
	border-radius: 16px;
	padding: 28px 24px 24px;
	text-align: center;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	transform: translateY(14px) scale(0.97);
	transition: transform 0.25s ease;
	font-family: inherit;
	color: #1c1c1e;
}
.bw-wheel-overlay.bw-wheel-open .bw-wheel-modal {
	transform: translateY(0) scale(1);
}
.bw-wheel-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 30px;
	height: 30px;
	border: 0;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	color: #888;
	cursor: pointer;
	border-radius: 50%;
}
.bw-wheel-close:hover { background: #f0f0f2; color: #333; }
.bw-wheel-title { margin: 0 0 4px; font-size: 22px; font-weight: 700; }
.bw-wheel-sub { margin: 0 0 16px; font-size: 13.5px; color: #666; }

.bw-wheel-stage {
	position: relative;
	width: 280px;
	max-width: 100%;
	margin: 0 auto 18px;
	aspect-ratio: 1;
}
.bw-wheel-canvas {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18), inset 0 0 0 6px #fff;
}
.bw-wheel-pointer {
	position: absolute;
	top: -6px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 12px solid transparent;
	border-right: 12px solid transparent;
	border-top: 20px solid #1c1c1e;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
	z-index: 2;
}
.bw-wheel-spin {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 74px;
	height: 74px;
	border-radius: 50%;
	border: 0;
	background: #1c1c1e;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	cursor: pointer;
	z-index: 3;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.bw-wheel-spin:hover { background: #333; transform: scale(1.04); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), inset 0 -3px 0 rgba(0, 0, 0, 0.25); }
.bw-wheel-spin:active { transform: scale(0.97); }
.bw-wheel-spin:disabled { opacity: 0.55; cursor: default; transform: none; }

.bw-wheel-confetti {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 6;
	overflow: hidden;
	border-radius: 16px;
}

.bw-wheel-result {
	display: none;
	margin-top: 4px;
}
.bw-wheel-result.show { display: block; }
.bw-wheel-result-label { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.bw-wheel-code {
	display: inline-block;
	padding: 8px 16px;
	border: 2px dashed #1c1c1e;
	border-radius: 8px;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin-bottom: 12px;
	user-select: all;
}
.bw-wheel-result-actions { display: flex; gap: 8px; justify-content: center; }
.bw-wheel-btn {
	display: inline-block;
	padding: 9px 18px;
	border-radius: 8px;
	border: 0;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}
.bw-wheel-btn-primary { background: #1c1c1e; color: #fff; }
.bw-wheel-btn-primary:hover { background: #333; }
.bw-wheel-btn-ghost { background: #f0f0f2; color: #333; }
.bw-wheel-btn-ghost:hover { background: #e4e4e8; }
.bw-wheel-again {
	margin-top: 10px;
	background: none;
	border: 0;
	color: #888;
	font-size: 12.5px;
	cursor: pointer;
	text-decoration: underline;
}

@media (max-width: 480px) {
	.bw-wheel-stage { width: 240px; }
}

/* Single product (classic + block themes) */
div.product,
.wp-block-group.woocommerce.product {
	position: relative;
}

/* WooCommerce blocks product items */
.wc-block-product {
	position: relative;
}

/* Reviews block ([betterwoo_reviews]) */
.bw-rvw {
	--bw-rvw-gap: 16px;
	margin: 24px 0;
	font-family: inherit;
}
.bw-rvw-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--bw-rvw-gap);
}
.bw-rvw-stars {
	display: inline-flex;
	gap: 2px;
	color: #d8d8d8;
	font-size: 14px;
	line-height: 1;
}
.bw-rvw-star.is-on { color: #f5a623; }
.bw-rvw-author { font-weight: 600; font-size: 14px; }
.bw-rvw-date { font-size: 12px; opacity: 0.6; margin-left: 8px; }
.bw-rvw-product { font-size: 12px; opacity: 0.75; margin-left: 8px; }
.bw-rvw-product a { color: inherit; }

/* Cards */
.bw-rvw-cards .bw-rvw-item {
	display: flex;
	gap: 12px;
	padding: 16px;
	border: 1px solid rgba(128,128,128,0.18);
	border-radius: 10px;
	background: #fff;
}
.bw-rvw-cards .bw-rvw-thumb {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 6px;
	flex: 0 0 auto;
}
.bw-rvw-body { min-width: 0; }
.bw-rvw-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bw-rvw-author-inline { font-weight: 600; font-size: 13.5px; }
.bw-rvw-text { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.bw-rvw-meta { font-size: 12px; opacity: 0.75; }

/* List */
.bw-rvw-list .bw-rvw-grid { grid-template-columns: 1fr; }
.bw-rvw-list .bw-rvw-item {
	display: flex;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid rgba(128,128,128,0.15);
}
.bw-rvw-list .bw-rvw-thumb {
	width: 40px; height: 40px; object-fit: cover; border-radius: 6px; flex: 0 0 auto;
}
.bw-rvw-list .bw-rvw-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.bw-rvw-list .bw-rvw-date, .bw-rvw-list .bw-rvw-product { margin-left: 0; }

/* Minimal */
.bw-rvw-minimal .bw-rvw-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.bw-rvw-minimal .bw-rvw-item {
	text-align: center;
	padding: 20px 16px;
}
.bw-rvw-minimal .bw-rvw-quote {
	margin: 0 0 12px;
	font-size: 16px;
	font-style: italic;
	line-height: 1.5;
}
.bw-rvw-minimal figcaption { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bw-rvw-minimal .bw-rvw-stars { font-size: 15px; }
.bw-rvw-minimal .bw-rvw-meta { display: flex; flex-direction: column; gap: 2px; font-size: 12px; opacity: 0.75; }
.bw-rvw-minimal .bw-rvw-date, .bw-rvw-minimal .bw-rvw-product { margin-left: 0; }

/* Compact */
.bw-rvw-compact .bw-rvw-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.bw-rvw-compact .bw-rvw-item {
	padding: 12px;
	border: 1px solid rgba(128,128,128,0.15);
	border-radius: 8px;
	background: rgba(128,128,128,0.05);
}
.bw-rvw-compact .bw-rvw-text {
	font-size: 13px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bw-rvw-compact .bw-rvw-meta { font-size: 11.5px; }
.bw-rvw-compact .bw-rvw-date, .bw-rvw-compact .bw-rvw-product { margin-left: 6px; }

/* Summary strip */
.bw-rvw-summary {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
}
.bw-rvw-avg {
	font-size: 26px;
	font-weight: 800;
	line-height: 1;
}
.bw-rvw-count { font-size: 13px; opacity: 0.7; }

/* Dark theme stores */
.theme-dark .bw-rvw-cards .bw-rvw-item,
.is-dark-theme .bw-rvw-cards .bw-rvw-item {
	background: #1d1d1f;
	border-color: rgba(255,255,255,0.12);
}

/* Announcement bar */
.bw-announcement {
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	padding: 9px 16px;
	letter-spacing: 0.01em;
}
.bw-announcement .bw-ann-link {
	color: inherit;
	text-decoration: none;
	display: block;
}
.bw-announcement .bw-ann-link:hover { text-decoration: underline; }
.bw-announcement .bw-ann-text { display: inline-block; }

/* Automatic badges (stack below the custom badge when both show) */
.bw-badge-auto {
	font-size: 10px;
}
.bw-badge-sale {
	background: #c62828 !important;
	color: #fff !important;
}
.bw-badge-new {
	background: #1f6feb !important;
	color: #fff !important;
}
.bw-badge-low {
	background: #b26a00 !important;
	color: #fff !important;
}
.single-product .bw-badge,
.woocommerce-page.single-product .bw-badge {
	position: absolute;
}

/* Upsell strips */
.bw-upsell {
	margin: 28px 0;
}
.bw-upsell-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 14px;
}
.bw-upsell-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 14px;
}
.bw-upsell-item {
	border: 1px solid rgba(127, 127, 127, 0.25);
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: transparent;
}
.bw-upsell-img {
	display: block;
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
}
.bw-upsell-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.bw-upsell-sale {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #c62828;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 3px;
}
.bw-upsell-info {
	padding: 10px 12px 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}
.bw-upsell-name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
}
.bw-upsell-price {
	font-size: 14px;
	font-weight: 700;
}
.bw-upsell-add {
	margin-top: auto;
	display: inline-block;
	text-align: center;
	padding: 8px 10px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid currentColor;
	color: inherit;
	transition: background 0.15s ease, color 0.15s ease;
}
.bw-upsell-add:hover {
	background: #303030;
	color: #fff;
	border-color: #303030;
}
.bw-upsell-add.added::after {
	content: " ✓";
}
@media (max-width: 782px) {
	.bw-upsell-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Back-in-stock waitlist */
.bw-bin {
	margin: 18px 0;
	padding: 16px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafb;
}
.bw-bin-title { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.bw-bin-form { display: flex; flex-wrap: wrap; gap: 8px; }
.bw-bin-form input[type="email"],
.bw-bin-form input[type="text"] {
	flex: 1 1 160px;
	min-width: 0;
	padding: 9px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
}
.bw-bin-btn {
	flex: 0 0 auto;
	padding: 9px 18px;
	border: 0;
	border-radius: 6px;
	background: #1d2327;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.bw-bin-btn:disabled { opacity: .6; cursor: default; }
.bw-bin-msg { flex-basis: 100%; margin: 6px 0 0; font-size: 13px; min-height: 1em; }
.bw-bin-ok { color: #15803d; }
.bw-bin-err { color: #b91c1c; }

/* ---------- Contact form (Tools → Support) ---------- */
.bw-sf { max-width: 640px; margin: 0 auto; }
.bw-sf-title { font-size: 22px; margin: 0 0 6px; }
.bw-sf-intro { color: #6b7280; margin: 0 0 18px; font-size: 14px; }
.bw-sf-form { display: flex; flex-direction: column; gap: 14px; }
.bw-sf-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #1f2937; }
.bw-sf-req { color: #dc2626; }
.bw-sf-field input[type="text"],
.bw-sf-field input[type="email"],
.bw-sf-field input[type="tel"],
.bw-sf-field input[type="url"],
.bw-sf-field input[type="number"],
.bw-sf-field textarea,
.bw-sf-field select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	box-sizing: border-box;
}
.bw-sf-field textarea { resize: vertical; min-height: 110px; }
.bw-sf-field input:focus, .bw-sf-field textarea:focus, .bw-sf-field select:focus {
	outline: none;
	border-color: var(--bw-sf-accent, #111827);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--bw-sf-accent, #111827) 20%, transparent);
}
.bw-sf-check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.bw-sf-check input { width: auto; }
.bw-sf-hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }
.bw-sf-submit {
	align-self: flex-start;
	padding: 11px 26px;
	border: 0;
	border-radius: 8px;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: filter .15s;
}
.bw-sf-submit:hover { filter: brightness(1.12); }
.bw-sf-submit:disabled { opacity: .6; cursor: default; }
.bw-sf-msg { padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.bw-sf-msg.is-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.bw-sf-msg.is-err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------- AI chat widget (Tools → Support) ---------- */
.bw-chat { position: fixed; bottom: 20px; z-index: 99990; font-family: inherit; }
.bw-chat-right { right: 20px; }
.bw-chat-left { left: 20px; }
.bw-chat-bubble {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: 0;
	background: var(--bw-chat-color, #111827);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
	transition: transform .15s, box-shadow .15s;
}
.bw-chat-bubble:hover { transform: scale(1.06); box-shadow: 0 8px 26px rgba(0, 0, 0, .3); }
.bw-chat-panel {
	position: absolute;
	bottom: 68px;
	width: 340px;
	max-width: calc(100vw - 40px);
	height: 460px;
	max-height: calc(100vh - 120px);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
	overflow: hidden;
}
.bw-chat-right .bw-chat-panel { right: 0; }
.bw-chat-left .bw-chat-panel { left: 0; }
.bw-chat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: var(--bw-chat-color, #111827);
	color: #fff;
	font-weight: 600;
	font-size: 14px;
}
.bw-chat-close { background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; line-height: 1; padding: 0 4px; }
.bw-chat-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #f9fafb; }
.bw-chat-msg { max-width: 82%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; word-wrap: break-word; }
.bw-chat-msg p { margin: 0 0 6px; }
.bw-chat-msg p:last-child { margin-bottom: 0; }
.bw-chat-user { align-self: flex-end; background: var(--bw-chat-color, #111827); color: #fff; border-bottom-right-radius: 4px; }
.bw-chat-assistant { align-self: flex-start; background: #fff; color: #1f2937; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; }
.bw-chat-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; background: #f9fafb; }
.bw-chat-chip {
	border: 1px solid #d1d5db;
	background: #fff;
	border-radius: 999px;
	padding: 5px 12px;
	font-size: 12.5px;
	cursor: pointer;
	color: #374151;
}
.bw-chat-chip:hover { border-color: var(--bw-chat-color, #111827); color: var(--bw-chat-color, #111827); }
.bw-chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e5e7eb; background: #fff; }
.bw-chat-input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13.5px; }
.bw-chat-send {
	padding: 9px 16px;
	border: 0;
	border-radius: 8px;
	background: var(--bw-chat-color, #111827);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.bw-chat-send:disabled { opacity: .6; }
@media (max-width: 480px) {
	.bw-chat-panel { width: calc(100vw - 32px); height: 70vh; }
}

/* ---------- Wishlist ---------- */
.bw-wish-btn {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: var(--bw-wish-color, #d63638);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform .12s, box-shadow .12s, background .12s;
	padding: 0;
}
.bw-wish-btn:hover { transform: scale(1.12); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.bw-wish-btn.is-active { background: var(--bw-wish-color, #d63638); color: #fff; }
.woocommerce ul.products li.product .bw-wish-btn { position: absolute; top: 8px; right: 8px; z-index: 5; }
.woocommerce div.product .bw-wish-btn { margin-left: 10px; vertical-align: middle; }
.bw-wl-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	opacity: 0;
	background: #111827;
	color: #fff;
	padding: 11px 18px;
	border-radius: 10px;
	font-size: 14px;
	z-index: 99999;
	transition: opacity .25s, transform .25s;
	box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.bw-wl-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.bw-wl-toast a { color: #93c5fd; margin-left: 6px; }
.bw-wl { max-width: 900px; margin: 0 auto; }
.bw-wl-empty { text-align: center; padding: 40px 20px; color: #6b7280; }
.bw-wl-continue { display: inline-block; margin-top: 10px; color: #111827; font-weight: 600; }
.bw-wl-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.bw-wl-count { font-weight: 600; font-size: 14px; }
.bw-wl-clear { background: none; border: 0; color: #b91c1c; font-size: 13px; cursor: pointer; text-decoration: underline; }
.bw-wl-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bw-wl-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
}
.bw-wl-thumb { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 8px; overflow: hidden; background: #f3f4f6; }
.bw-wl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bw-wl-thumb-empty { display: block; width: 100%; height: 100%; }
.bw-wl-info { flex: 1; min-width: 0; }
.bw-wl-name { font-weight: 600; font-size: 14.5px; color: #111827; text-decoration: none; }
.bw-wl-name:hover { text-decoration: underline; }
.bw-wl-price { font-size: 13.5px; color: #374151; margin-top: 3px; }
.bw-wl-price del { color: #9ca3af; }
.bw-wl-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.bw-wl-add {
	display: inline-block;
	padding: 8px 16px;
	background: #111827;
	color: #fff;
	border-radius: 7px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	border: 0;
	cursor: pointer;
}
.bw-wl-add:hover { background: #1f2937; color: #fff; }
.bw-wl-remove {
	width: 30px; height: 30px;
	border: 0; border-radius: 50%;
	background: #f3f4f6; color: #6b7280;
	font-size: 16px; line-height: 1; cursor: pointer;
}
.bw-wl-remove:hover { background: #fee2e2; color: #b91c1c; }
@media (max-width: 600px) {
	.bw-wl-item { flex-wrap: wrap; }
	.bw-wl-actions { width: 100%; justify-content: flex-end; }
}

/* ================================================================== */
/* Storefront conversion widgets (delivery, recently viewed,           */
/* recommendations, order bump, upsell, bundles, size charts)          */
/* ================================================================== */

.bw-sf-delivery {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 10px 0 4px;
	padding: 10px 14px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafb;
	font-size: 13.5px;
	line-height: 1.4;
}
.bw-sf-delivery-title { font-weight: 700; }
.bw-sf-delivery-text { color: inherit; }

.bw-sf-recently,
.bw-sf-reco {
	margin: 28px 0;
}
.bw-sf-recently-title,
.bw-sf-reco-title {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 14px;
}
.bw-sf-recently-grid,
.bw-sf-reco-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}
@media (max-width: 782px) {
	.bw-sf-recently-grid,
	.bw-sf-reco-grid { grid-template-columns: repeat(2, 1fr); }
}
.bw-sf-recently-item,
.bw-sf-reco-item {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
}
.bw-sf-recently-img,
.bw-sf-reco-img {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: #f3f4f6;
	position: relative;
}
.bw-sf-recently-img img,
.bw-sf-reco-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.bw-sf-sale {
	position: absolute;
	top: 8px;
	left: 8px;
	background: #111827;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 3px 7px;
	border-radius: 4px;
}
.bw-sf-recently-info,
.bw-sf-reco-info {
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}
.bw-sf-recently-name,
.bw-sf-reco-name {
	font-size: 13.5px;
	font-weight: 600;
	color: #111827;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: flex;
}
.bw-sf-recently-name:hover,
.bw-sf-reco-name:hover { text-decoration: underline; }
.bw-sf-recently-price,
.bw-sf-reco-price {
	font-size: 13px;
	color: #374151;
}
.bw-sf-reco-price del { color: #9ca3af; margin-right: 4px; }
.bw-sf-reco-add {
	display: block;
	margin-top: auto;
	padding: 8px 12px;
	background: var(--bw-sf-accent, #111827);
	color: #fff;
	border: 0;
	border-radius: 7px;
	font-size: 12.5px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
.bw-sf-reco-add:hover { opacity: 0.88; color: #fff; }
.bw-sf-reco-add.is-added { background: #059669; }

/* Offer cards (order bump + post-purchase upsell) */
.bw-sf-offer {
	display: flex;
	gap: 16px;
	align-items: center;
	margin: 18px 0;
	padding: 16px;
	border: 2px solid var(--bw-sf-accent, #111827);
	border-radius: 12px;
	background: #fff;
}
.bw-sf-offer-media {
	flex: 0 0 88px;
	width: 88px;
	height: 88px;
	border-radius: 10px;
	overflow: hidden;
	background: #f3f4f6;
}
.bw-sf-offer-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.bw-sf-offer-body { flex: 1; min-width: 0; }
.bw-sf-offer-title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 800;
}
.bw-sf-offer-name {
	font-size: 13.5px;
	font-weight: 600;
	color: #374151;
	text-decoration: none;
}
.bw-sf-offer-name:hover { text-decoration: underline; }
.bw-sf-offer-price {
	font-size: 14px;
	font-weight: 700;
	margin: 4px 0 10px;
}
.bw-sf-offer-price del { color: #9ca3af; font-weight: 400; margin-right: 6px; }
.bw-sf-offer-btn {
	display: inline-block;
	padding: 10px 18px;
	background: var(--bw-sf-accent, #111827);
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
}
.bw-sf-offer-btn:hover { opacity: 0.88; }
.bw-sf-offer-btn:disabled { opacity: 0.6; cursor: wait; }
.bw-sf-offer-btn.is-added { background: #059669; }
@media (max-width: 600px) {
	.bw-sf-offer { flex-direction: column; text-align: center; }
}

/* Bundle box */
.bw-sf-bundle {
	margin: 14px 0;
	padding: 16px;
	border: 1px dashed #d1d5db;
	border-radius: 12px;
	background: #fffbeb;
}
.bw-sf-bundle-title { margin: 0 0 6px; font-size: 15px; font-weight: 800; }
.bw-sf-bundle-desc { margin: 0 0 6px; font-size: 13.5px; color: #374151; }
.bw-sf-bundle-save { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #b45309; }
.bw-sf-bundle-btn {
	display: inline-block;
	padding: 10px 20px;
	background: #111827;
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
}
.bw-sf-bundle-btn:hover { opacity: 0.88; }

/* Size chart table */
.bw-sf-sizechart-section { margin: 24px 0; }
.bw-sf-sizechart-title { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.bw-sf-size-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}
.bw-sf-size-table th,
.bw-sf-size-table td {
	padding: 9px 12px;
	border: 1px solid #e5e7eb;
	text-align: left;
}
.bw-sf-size-table th {
	background: #f9fafb;
	font-weight: 700;
}

/* Progress bars (free shipping / spend-to-earn credit) */
.bw-sf-progbar {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
}
.bw-sf-progbar-track {
	height: 8px;
	border-radius: 99px;
	background: var(--bw-prog-track, rgba(0,0,0,0.08));
	overflow: hidden;
}
.bw-sf-progbar-fill {
	height: 100%;
	border-radius: 99px;
	background: var(--bw-prog-bar, #303030);
	transition: width 0.35s ease;
}
.bw-sf-progbar-msg {
	margin: 8px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--bw-prog-text, inherit);
}
.bw-sf-progbar.is-complete .bw-sf-progbar-msg { color: #059669; }
.bw-sf-credit .bw-sf-progbar-fill { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

/* Popup builder */
.bw-sf-popup[hidden] { display: none; }
.bw-sf-popup {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.bw-sf-popup-backdrop {
	position: absolute;
	inset: 0;
	background: var(--bw-pop-overlay, rgba(0,0,0,0.55));
}
.bw-sf-popup-card {
	position: relative;
	width: 100%;
	max-width: 420px;
	padding: 28px 26px 24px;
	background: var(--bw-pop-bg, #fff);
	color: var(--bw-pop-text, #303030);
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0,0,0,0.28);
	text-align: center;
}
.bw-sf-popup-x {
	position: absolute;
	top: 10px;
	right: 12px;
	border: 0;
	background: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	opacity: 0.55;
}
.bw-sf-popup-x:hover { opacity: 1; }
.bw-sf-popup-title { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.bw-sf-popup-text { font-size: 14px; line-height: 1.5; margin: 0 0 14px; opacity: 0.85; }
.bw-sf-popup-text p { margin: 0 0 8px; }
.bw-sf-popup-form { display: flex; gap: 8px; }
.bw-sf-popup-input {
	flex: 1;
	min-width: 0;
	padding: 11px 13px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	color: #111827;
}
.bw-sf-popup-btn {
	padding: 11px 18px;
	border: 0;
	border-radius: 8px;
	background: var(--bw-pop-accent, #303030);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}
.bw-sf-popup-btn:hover { opacity: 0.9; }
.bw-sf-popup-code {
	margin-top: 14px;
	padding: 10px;
	border: 1px dashed var(--bw-pop-accent, #303030);
	border-radius: 8px;
	font-size: 13px;
}
.bw-sf-popup-code code {
	display: block;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: 0.06em;
}
.bw-sf-popup-success { margin: 12px 0 0; font-weight: 700; color: #059669; }
@media (max-width: 480px) {
	.bw-sf-popup-form { flex-direction: column; }
}

/* Sticky add-to-cart */
.bw-sf-stickyatc[hidden] { display: none; }
.bw-sf-stickyatc {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99980;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	background: var(--bw-sticky-bar, #fff);
	color: var(--bw-sticky-text, #303030);
	border-top: 1px solid #e5e7eb;
	box-shadow: 0 -6px 24px rgba(0,0,0,0.12);
}
.bw-sf-stickyatc-img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; }
.bw-sf-stickyatc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bw-sf-stickyatc-name {
	display: block;
	font-size: 13.5px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.bw-sf-stickyatc-price { font-size: 13px; font-weight: 600; }
.bw-sf-stickyatc-btn {
	flex: none;
	padding: 10px 20px;
	border: 0;
	border-radius: 8px;
	background: var(--bw-sticky-accent, #303030);
	color: #fff;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
}
.bw-sf-stickyatc-btn:hover { opacity: 0.9; }
@media (max-width: 600px) {
	.bw-sf-stickyatc { padding: 8px 12px; gap: 8px; }
	.bw-sf-stickyatc-btn { padding: 9px 14px; font-size: 12.5px; }
}

/* Image zoom */
.bw-sf-zoom-lens {
	position: absolute;
	display: none;
	width: 100px;
	height: 100px;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 4px 18px rgba(0,0,0,0.35);
	pointer-events: none;
	z-index: 5;
	background-repeat: no-repeat;
	overflow: hidden;
}
.bw-sf-zoom-lb[hidden] { display: none; }
.bw-sf-zoom-lb {
	position: fixed;
	inset: 0;
	z-index: 99995;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bw-zoom-overlay, rgba(0,0,0,0.88));
}
.bw-sf-zoom-img {
	max-width: 92vw;
	max-height: 88vh;
	object-fit: contain;
	border-radius: 6px;
}
.bw-sf-zoom-x {
	position: absolute;
	top: 14px;
	right: 18px;
	border: 0;
	background: none;
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.8;
}
.bw-sf-zoom-x:hover { opacity: 1; }
.bw-sf-zoom-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	border: 0;
	background: rgba(255,255,255,0.12);
	color: #fff;
	width: 46px;
	height: 64px;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	border-radius: 8px;
}
.bw-sf-zoom-nav:hover { background: rgba(255,255,255,0.25); }
.bw-sf-zoom-prev { left: 14px; }
.bw-sf-zoom-next { right: 14px; }

/* Product add-on fields */
.bw-sf-addons { margin: 14px 0; display: flex; flex-direction: column; gap: 12px; }
.bw-sf-addon-field label {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	margin-bottom: 5px;
}
.bw-sf-addon-price { font-weight: 400; opacity: 0.7; }
.bw-sf-addon-input {
	width: 100%;
	max-width: 480px;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	box-sizing: border-box;
}
.bw-sf-addon-check label { display: flex; align-items: center; gap: 8px; font-weight: 500; }

/* Progress bars on product pages */
.single-product .bw-sf-progbar { margin: 0 0 14px; max-width: 480px; }

/* Subscribe & save offer */
.bw-sf-subsav {
	margin: 0 0 14px;
	padding: 12px 14px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: var(--bw-sub-bg, #f9fafb);
	max-width: 480px;
}
.bw-sf-subsav-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.bw-sf-subsav-badge {
	display: inline-block;
	background: var(--bw-sub-accent, #303030);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 20px;
}
.bw-sf-subsav-text { margin: 0 0 8px; font-size: 13px; color: #4b5563; }
.bw-sf-subsav-check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.bw-sf-subsav-input { width: 16px; height: 16px; accent-color: var(--bw-sub-accent, #303030); }

/* Cart drawer */
.bw-sf-drawer-fab {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 99970;
	padding: 12px 20px;
	border: 0;
	border-radius: 30px;
	background: var(--bw-drawer-accent, #303030);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}
.bw-sf-drawer { position: fixed; inset: 0; z-index: 99980; }
.bw-sf-drawer[hidden] { display: none; }
.bw-sf-drawer-backdrop {
	position: absolute; inset: 0;
	background: rgba(10,10,12,0.5);
}
.bw-sf-drawer-panel {
	position: absolute;
	top: 0; right: 0; bottom: 0;
	width: min(380px, 92vw);
	background: #fff;
	color: #1f2328;
	display: flex;
	flex-direction: column;
	box-shadow: -12px 0 40px rgba(0,0,0,0.25);
	animation: bw-drawer-in 0.22s ease;
}
@keyframes bw-drawer-in { from { transform: translateX(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
.bw-sf-drawer-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 16px 18px;
	border-bottom: 1px solid #eef0f2;
	font-size: 16px;
}
.bw-sf-drawer-x { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: #666; padding: 0 4px; }
.bw-sf-drawer-upsells {
	flex: 1;
	overflow-y: auto;
	padding: 14px 18px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	align-content: start;
}
.bw-sf-drawer-upsells .bw-sf-reco-item { margin: 0; }
.bw-sf-drawer-upsells .bw-sf-reco-img img { width: 100%; height: auto; display: block; }
.bw-sf-drawer-cart {
	display: block;
	margin: 14px 18px 18px;
	padding: 13px 16px;
	background: var(--bw-drawer-accent, #303030);
	color: #fff;
	text-align: center;
	border-radius: 8px;
	font-weight: 700;
	text-decoration: none;
}
@media (max-width: 600px) {
	.bw-sf-drawer-upsells { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
 * Referral portal ([betterwoo_referral_portal])
 * ------------------------------------------------------------- */
.bw-ref-portal {
	max-width: 720px;
	font-family: inherit;
}
.bw-ref-portal h3 {
	margin: 0 0 10px;
	font-size: 20px;
}
.bw-ref-portal h4 {
	margin: 22px 0 8px;
	font-size: 15px;
}
.bw-ref-portal p { margin: 0 0 10px; }
.bw-ref-link {
	display: inline-block;
	padding: 8px 12px;
	background: #f4f5f7;
	border: 1px solid #e3e5e8;
	border-radius: 6px;
	font-size: 13px;
	word-break: break-all;
	user-select: all;
}
.bw-ref-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	margin: 18px 0;
}
.bw-ref-stat {
	background: #f8f9fa;
	border: 1px solid #eceef1;
	border-radius: 10px;
	padding: 14px 16px;
	text-align: center;
}
.bw-ref-stat-num {
	display: block;
	font-size: 22px;
	font-weight: 700;
	color: #1d2327;
}
.bw-ref-stat-label {
	display: block;
	font-size: 12px;
	color: #646970;
	margin-top: 2px;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.bw-ref-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.bw-ref-table th,
.bw-ref-table td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid #eceef1;
}
.bw-ref-table .bw-num { text-align: right; }
.bw-ref-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #646970; }
