/* Homy cart stepper: one control per product card, Swiggy-style. */

:root {
	--homy-pink: #D6006E;
	--homy-pink-dark: #A80057;
	--homy-cream: #FDF6EE;
	--homy-plum: #2E1A22;
	--homy-yellow: #F2B705;
}

/* Retire the stock WooCommerce button pair once our control is mounted. */
.woocommerce ul.products li.product .homy-cta-host .button,
.woocommerce ul.products li.product .homy-cta-host .added_to_cart,
.homy-cta-host > .button,
.homy-cta-host > .added_to_cart,
.homy-cta-host > .add_to_cart_button {
	display: none !important;
}

.homy-cta-host {
	position: relative;
}

/* ---- the control ---- */

.homy-cta {
	--h: 42px;
	position: relative;
	display: block;
	width: 100%;
	min-height: var(--h);
	font-family: inherit;
	-webkit-tap-highlight-color: transparent;
}

.homy-cta.is-busy {
	opacity: .72;
}

.homy-cta__add,
.homy-cta__qty {
	width: 100%;
	height: var(--h);
	border-radius: 10px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1;
	box-sizing: border-box;
	transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}

/* ADD */
.homy-cta__add {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0 14px;
	background-color: #FFFFFF;
	color: var(--homy-pink);
	border: 1.5px solid var(--homy-pink);
	box-shadow: 0 1px 2px rgba(46, 26, 34, .06);
	cursor: pointer;
	text-transform: uppercase;
}

.homy-cta__add:hover {
	background-color: var(--homy-pink);
	color: #FFFFFF;
	box-shadow: 0 6px 16px -8px rgba(214, 0, 110, .55);
}

.homy-cta__add:active {
	transform: translateY(1px);
}

/* stepper */
.homy-cta__qty {
	display: none;
	align-items: center;
	justify-content: space-between;
	padding: 0;
	background-color: var(--homy-pink);
	border: 1.5px solid var(--homy-pink);
	color: #FFFFFF;
	overflow: hidden;
	box-shadow: 0 6px 16px -10px rgba(214, 0, 110, .6);
}

.homy-cta[data-qty="0"] .homy-cta__qty { display: none; }
.homy-cta[data-qty="0"] .homy-cta__add { display: flex; }
.homy-cta:not([data-qty="0"]) .homy-cta__add { display: none; }
.homy-cta:not([data-qty="0"]) .homy-cta__qty { display: flex; }

.homy-cta__step {
	flex: 0 0 auto;
	width: 40px;
	height: 100%;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	color: #FFFFFF;
	font-size: 19px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color .14s ease;
}

.homy-cta__step:hover {
	background-color: rgba(255, 255, 255, .16);
}

.homy-cta__step:active {
	background-color: rgba(255, 255, 255, .26);
}

.homy-cta__num {
	flex: 1 1 auto;
	text-align: center;
	font-size: 15px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: #FFFFFF;
	letter-spacing: 0;
	user-select: none;
}

.homy-cta__add:focus-visible,
.homy-cta__step:focus-visible {
	outline: 3px solid var(--homy-yellow);
	outline-offset: 2px;
}

/* ---- sticky view cart bar ---- */

.homy-cartbar {
	position: fixed;
	left: 50%;
	bottom: calc(18px + env(safe-area-inset-bottom, 0px));
	transform: translateX(-50%);
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	width: min(620px, calc(100% - 32px));
	padding: 11px 12px 11px 20px;
	background-color: var(--homy-plum);
	color: #FFFFFF;
	border-radius: 100px;
	box-shadow: 0 14px 34px -12px rgba(46, 26, 34, .55);
	font-size: 14px;
	animation: homy-cartbar-in .22s ease-out both;
}

.homy-cartbar[hidden] { display: none !important; }

@keyframes homy-cartbar-in {
	from { opacity: 0; transform: translate(-50%, 14px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

.homy-cartbar__info {
	color: #FFFFFF;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.homy-cartbar__info strong { font-weight: 700; }

.homy-cartbar__dot {
	display: inline-block;
	width: 4px;
	height: 4px;
	margin: 0 4px 3px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, .55);
	vertical-align: middle;
}

.homy-cartbar__link {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	background-color: var(--homy-pink);
	color: #FFFFFF !important;
	border-radius: 100px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: background-color .16s ease;
}

.homy-cartbar__link:hover {
	background-color: var(--homy-pink-dark);
	color: #FFFFFF !important;
}

.homy-cartbar__link:focus-visible {
	outline: 3px solid var(--homy-yellow);
	outline-offset: 2px;
}

body.has-homy-cartbar { padding-bottom: 76px; }

@media (max-width: 767px) {
	.homy-cta { --h: 44px; }
	.homy-cta__add,
	.homy-cta__qty { font-size: 13.5px; }
	.homy-cta__step { width: 44px; }
	.homy-cartbar {
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		width: calc(100% - 24px);
		padding: 9px 10px 9px 16px;
		font-size: 13px;
	}
	.homy-cartbar__link { padding: 9px 16px; font-size: 12.5px; }
	body.has-homy-cartbar { padding-bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
	.homy-cta__add,
	.homy-cta__qty,
	.homy-cartbar { animation: none !important; transition: none !important; }
}

/* ---- single product page ---- */

form.cart.homy-cart-replaced .quantity,
form.cart.homy-cart-replaced .single_add_to_cart_button {
	display: none !important;
}

.homy-cta-host--single { margin: 2px 0 22px; max-width: 300px; }
.homy-cta-host--single .homy-cta { --h: 52px; }
.homy-cta-host--single .homy-cta__add,
.homy-cta-host--single .homy-cta__qty { border-radius: 12px; font-size: 15px; }
.homy-cta-host--single .homy-cta__step { width: 52px; font-size: 22px; }
.homy-cta-host--single .homy-cta__num { font-size: 17px; }

/* ---- buy box facts ---- */

.homy-stock {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 14px;
	padding: 5px 13px 5px 11px;
	background-color: #EDF7EE;
	color: #1F6B2C;
	border-radius: 100px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .02em;
}
.homy-stock--out { background-color: #FBEAEA; color: #9B2226; }
.homy-stock__dot { width: 7px; height: 7px; border-radius: 50%; background-color: currentColor; }

.homy-buybox {
	margin: 0 0 22px;
	padding: 16px 18px;
	background-color: #FDF6EE;
	border: 1px solid #F1E4DA;
	border-radius: 14px;
}
.homy-buybox__facts { margin: 0; padding: 0; list-style: none; }
.homy-buybox__facts li {
	position: relative;
	margin: 0 0 9px;
	padding-left: 26px;
	font-size: 14px;
	line-height: 1.5;
	color: #4A3038;
}
.homy-buybox__facts li:last-child { margin-bottom: 0; }
.homy-buybox__facts li svg { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; color: #D6006E; }
.homy-buybox__help {
	margin: 14px 0 0;
	padding-top: 13px;
	border-top: 1px solid #F1E4DA;
	font-size: 13.5px;
	color: #6B4A55;
}
.homy-buybox__help a { color: #D6006E !important; font-weight: 600; text-decoration: none !important; }
.homy-buybox__help a:hover { text-decoration: underline !important; }

@media (max-width: 767px) {
	.homy-cta-host--single { max-width: none; }
}

/* ---- reviews as their own section ---- */

.homy-reviews {
	margin: 44px 0 0;
	padding: 34px 0 0;
	border-top: 1px solid #F1E4DA;
	clear: both;
}
.homy-reviews #reviews { margin: 0; }
.homy-reviews .woocommerce-Reviews-title { margin-top: 0; }

.woocommerce div.product .related.products,
.woocommerce div.product .up-sells.upsells {
	margin-top: 46px;
	padding-top: 34px;
	border-top: 1px solid #F1E4DA;
	clear: both;
}

/* ---- mobile: keep the buy control above the fold ---- */

@media (max-width: 767px) {
	.woocommerce div.product .woocommerce-product-gallery {
		width: 100% !important;
		max-width: none !important;
		margin: 0 0 12px !important;
		padding-bottom: 0 !important;
		float: none !important;
	}
	/* FlexSlider positions the track itself: centring it with flex shifts both slides. */
	.woocommerce div.product .woocommerce-product-gallery__wrapper,
	.woocommerce div.product .woocommerce-product-gallery .flex-viewport {
		display: block !important;
	}
	.woocommerce div.product .woocommerce-product-gallery .flex-viewport { overflow: hidden !important; }
	.woocommerce div.product .woocommerce-product-gallery__image { text-align: center; }
	.woocommerce div.product div.summary { margin-top: 0 !important; }
	.woocommerce div.product .product_title {
		margin-bottom: 6px !important;
		font-size: 24px !important;
		line-height: 1.25 !important;
	}
	.woocommerce div.product .summary p.price { margin: 0 0 10px !important; }
	.woocommerce div.product .woocommerce-product-details__short-description {
		margin: 0 0 12px !important;
		font-size: 14px;
		line-height: 1.5;
	}
	.homy-stock { margin-bottom: 10px !important; }
	.homy-cta-host--single { margin: 0 0 18px !important; }
	.homy-buybox { padding: 14px 15px; }
	.homy-reviews { margin-top: 32px; padding-top: 26px; }
}

/* ---- scroll-to-top vs the sticky cart bar ---- *
 * Kadence positions this button in a way that ignores bottom, margin and top
 * overrides, so it cannot be moved reliably. While the cart bar is up the bar
 * is the more important control, so the scroll-to-top steps aside.
 */

body.has-homy-cartbar #kt-scroll-up,
body.has-homy-cartbar #kt-scroll-up-reader {
	display: none !important;
}

@media (max-width: 767px) {
	#kt-scroll-up {
		min-width: 44px;
		min-height: 44px;
	}
}

/* ---- mobile: claw back height above the buy control ---- */

@media (max-width: 767px) {
	.woocommerce div.product .woocommerce-product-gallery { margin-bottom: 8px !important; }
	.woocommerce div.product .summary .price { margin-bottom: 6px !important; }
	.woocommerce div.product .woocommerce-product-details__short-description { margin-bottom: 8px !important; }
	.woocommerce div.product .homy-stock { margin-top: 4px !important; margin-bottom: 6px !important; }
}
