/* Sperobrew — Buy Now buttons (product page + shop / home lists) */
:root {
	/* Change these 3 values to recolor BOTH buttons at once */
	--sbc-btn-bg: linear-gradient(90deg, #f6973d 0%, #e8613a 100%);
	--sbc-btn-color: #fff;
	--sbc-btn-h: 46px;
}

.sbc-buy-now,
a.button.sbc-buy-now,
button.button.sbc-buy-now {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 0 0 10px !important;
	padding: 0 22px !important;
	min-height: 44px;
	border: 0 !important;
	border-radius: 10px !important;
	background: var(--sbc-btn-bg) !important;
	color: #fff !important;
	font-weight: 600 !important;
	font-size: 15px;
	line-height: 1 !important;
	text-decoration: none !important;
	text-transform: none;
	box-shadow: 0 8px 20px rgba(232, 100, 50, .25);
	cursor: pointer;
	transition: filter .2s ease, transform .15s ease;
	vertical-align: middle;
}
.sbc-buy-now:hover { filter: brightness(1.07); transform: translateY(-1px); color: #fff !important; }

/* In product lists: sits right next to "Add to cart" (wraps below on narrow cards) */
.sbc-buy-now-loop,
a.button.sbc-buy-now.sbc-buy-now-loop {
	display: inline-flex !important;
	width: auto;
	margin: 0 0 0 10px !important;
	padding: 0 20px !important;
	min-height: 44px;
	font-size: 14px !important;
	font-weight: 700 !important;
	text-transform: none !important;
	letter-spacing: 0;
	box-shadow: 0 6px 16px rgba(232, 100, 50, .22);
}


/* ------------------------------------------------------------------
   Product page: Qty + Add to cart + Buy Now → one aligned row,
   both buttons identical color / height / radius / font
   ------------------------------------------------------------------ */
form.cart:not(.variations_form),
form.cart .woocommerce-variation-add-to-cart,
form.cart .single_variation_wrap .woocommerce-variation-add-to-cart {
	display: flex !important;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 10px;
}
form.cart .quantity {
	flex: 0 0 auto;
	margin: 0 !important;
	float: none !important;
	display: flex;
}
form.cart .quantity input.qty {
	height: var(--sbc-btn-h) !important;
	min-height: var(--sbc-btn-h);
	margin: 0 !important;
	box-sizing: border-box;
}
form.cart .single_add_to_cart_button,
form.cart .sbc-buy-now {
	flex: 1 1 0;
	min-width: 0;
	box-sizing: border-box;
	height: var(--sbc-btn-h) !important;
	min-height: var(--sbc-btn-h) !important;
	margin: 0 !important;
	padding: 0 12px !important;
	float: none !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	text-align: center;
	white-space: nowrap;
	border: 0 !important;
	border-radius: 10px !important;
	background: var(--sbc-btn-bg) !important;
	color: var(--sbc-btn-color) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-transform: none !important;
	letter-spacing: 0;
	box-shadow: 0 8px 20px rgba(232, 100, 50, .25) !important;
	vertical-align: top;
}
form.cart .single_add_to_cart_button:hover,
form.cart .sbc-buy-now:hover {
	filter: brightness(1.07);
	color: var(--sbc-btn-color) !important;
}

/* Shop / home product cards: Add to cart gets the same look as Buy Now */
a.add_to_cart_button,
a.ajax_add_to_cart,
a.button.product_type_simple {
	background: var(--sbc-btn-bg) !important;
	color: var(--sbc-btn-color) !important;
	border: 0 !important;
	border-radius: 10px !important;
	min-height: 44px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	line-height: 1 !important;
	vertical-align: middle;
}

@media (max-width: 480px) {
	form.cart .single_add_to_cart_button,
	form.cart .sbc-buy-now { font-size: 14px !important; }
}


/* ------------------------------------------------------------------
   v1.0.5 — Product cards (shop / home / Elementor): fix squished
   "Buy Now" button. Text was overflowing a tiny box because the theme
   forced a narrow width / zero flex-basis. These rules win over it and
   make Buy Now match "Add to cart" (same height, radius, color, font).
   Change --sbc-loop-bg to recolor both card buttons at once.
   ------------------------------------------------------------------ */
:root {
	--sbc-loop-bg: linear-gradient(135deg, #1fa31f 0%, #008000 55%, #005c00 100%);
	--sbc-loop-bg-hover: linear-gradient(135deg, #e8893f 0%, #D2691E 55%, #a64f14 100%);
	--sbc-loop-h: 48px;
	--sbc-loop-radius: 12px;
}

/* Button row: Add to cart + Buy Now side by side, wrap on very narrow cards */
:where(.product, li.product, .elementor-widget-container, .e-con-inner, .elementor-element):has(> a.sbc-buy-now-loop) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

html body a.button.sbc-buy-now.sbc-buy-now-loop,
html body .sbc-buy-now.sbc-buy-now-loop {
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 1 1 auto !important;
	width: auto !important;
	min-width: max-content !important;
	max-width: none !important;
	height: var(--sbc-loop-h) !important;
	min-height: var(--sbc-loop-h) !important;
	margin: 0 !important;
	padding: 0 24px !important;
	overflow: visible !important;
	white-space: nowrap !important;
	text-indent: 0 !important;
	border: 0 !important;
	border-radius: var(--sbc-loop-radius) !important;
	background: var(--sbc-loop-bg) !important;
	color: #fff !important;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: 0 !important;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: none !important;
	box-shadow: none !important;
	float: none !important;
	position: static !important;
	transform: none;
}
html body a.button.sbc-buy-now.sbc-buy-now-loop:hover,
html body a.button.sbc-buy-now.sbc-buy-now-loop:focus,
html body .product a.add_to_cart_button:hover,
html body .product a.ajax_add_to_cart:hover,
html body .product a.add_to_cart_button:focus,
html body .product a.ajax_add_to_cart:focus {
	background: var(--sbc-loop-bg-hover) !important;
	filter: none;
	transform: translateY(-1px);
	color: #fff !important;
}

/* Add to cart on the same row: same height / radius so both line up */
html body a.add_to_cart_button + a.sbc-buy-now-loop,
html body a.ajax_add_to_cart + a.sbc-buy-now-loop { flex: 1 1 auto !important; }
html body .product a.add_to_cart_button,
html body .product a.ajax_add_to_cart {
	height: var(--sbc-loop-h);
	min-height: var(--sbc-loop-h);
	border-radius: var(--sbc-loop-radius) !important;
	background: var(--sbc-loop-bg) !important;
	flex: 1 1 auto;
	box-sizing: border-box;
	padding: 0 24px !important;
	margin: 0 !important;
	color: #fff !important;
	transition: filter .2s ease, transform .15s ease, box-shadow .2s ease;
}

@media (max-width: 380px) {
	html body a.button.sbc-buy-now.sbc-buy-now-loop { flex-basis: 100% !important; }
}
