/* ═══════════════════════════════════════════════════════════
   HOCLIN — Sticky Buy Bar
   ═══════════════════════════════════════════════════════════ */

.hx-sticky-buy {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 880;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: saturate(1.4) blur(8px);
	-webkit-backdrop-filter: saturate(1.4) blur(8px);
	border-block-start: 1px solid var(--hx-line);
	box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
	padding-block-end: env(safe-area-inset-bottom, 0px);
	transform: translateY(110%);
	visibility: hidden;
	transition: transform var(--hx-dur-slow) var(--hx-ease), visibility var(--hx-dur-slow);
}
.hx-sticky-buy.is-visible { transform: translateY(0); visibility: visible; }

body.hx-sc-open .hx-sticky-buy,
body.hx-drawer-open .hx-sticky-buy { transform: translateY(110%); visibility: hidden; }

.hx-sticky-buy__inner {
	max-width: 1280px;
	margin-inline: auto;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--hx-sp-3);
	padding: var(--hx-sp-2) var(--hx-sp-4);
}
.hx-sticky-buy__thumb {
	width: 48px;
	height: 48px;
	border-radius: var(--hx-radius-sm);
	overflow: hidden;
	background: var(--hx-bg-alt);
	border: 1px solid var(--hx-line);
	flex: 0 0 auto;
}
.hx-sticky-buy__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hx-sticky-buy__info { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.hx-sticky-buy__name {
	font-size: var(--hx-fs-sm);
	font-weight: 700;
	color: var(--hx-ink);
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.hx-sticky-buy__price {
	font-size: var(--hx-fs-base);
	font-weight: 800;
	color: var(--hx-price);
	line-height: 1.2;
	display: flex;
	flex-wrap: wrap;
	gap: var(--hx-sp-2);
	align-items: baseline;
}
.hx-sticky-buy__price del { color: var(--hx-ink-light); font-weight: 500; font-size: 0.8em; }
.hx-sticky-buy__price ins { text-decoration: none; }
.hx-sticky-buy__price .woocommerce-Price-amount { white-space: nowrap; }

.hx-sticky-buy__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: var(--hx-sp-2) var(--hx-sp-6);
	background: var(--hx-primary-fill);
	color: #fff !important;
	border: 0;
	border-radius: var(--hx-radius);
	font-size: var(--hx-fs-sm);
	font-weight: 800;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
	transition: background var(--hx-dur) var(--hx-ease), transform var(--hx-dur) var(--hx-ease);
	cursor: pointer;
}
.hx-sticky-buy__btn:hover { background: var(--hx-primary-dark); }
.hx-sticky-buy__btn:active { transform: translateY(1px); }
.hx-sticky-buy__btn:focus-visible { outline: 2px solid var(--hx-primary); outline-offset: 2px; }

@media (max-width: 991px) {
	/* Keep the last footer line readable above the fixed bar. */
	body.single-product .hx-footer { padding-block-end: calc(var(--hx-sp-5) + 4.5rem); }
}
@media (min-width: 992px) {
	.hx-sticky-buy:not([data-desktop]) { display: none; }
	.hx-sticky-buy[data-desktop] .hx-sticky-buy__inner { padding-inline: var(--hx-sp-8); }
	.hx-sticky-buy[data-desktop] .hx-sticky-buy__btn { padding-inline: var(--hx-sp-10); }
}
@media (max-width: 480px) {
	.hx-sticky-buy__inner { gap: var(--hx-sp-2); padding-inline: var(--hx-sp-3); }
	.hx-sticky-buy__thumb { width: 42px; height: 42px; }
	.hx-sticky-buy__name { font-size: var(--hx-fs-xs); }
	.hx-sticky-buy__price { font-size: var(--hx-fs-sm); }
	.hx-sticky-buy__btn { padding-inline: var(--hx-sp-4); min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
	.hx-sticky-buy, .hx-sticky-buy__btn { transition: none; }
}