/* Weskis Safe Sticky Add to Cart — nho, gon, ton trong safe-area va chat widget. */

.wssac-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	/* Duoi Magnific Popup cua Flatsome (mfp-bg 1042 / mfp-wrap 1043: lightbox anh,
	   off-canvas mini-cart) va duoi Kira chat (999999) — moi overlay phu len bar. */
	z-index: 1041;
	background: #fff;
	border-top: 1px solid #e2e2e2;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
	transform: translateY(110%);
	/* visibility hidden khi KHONG co .wssac-on: CTA/View cart ra khoi tab order,
	   khong the focus/Enter khi bar vo hinh; delay 0.25s de kip animation truot. */
	visibility: hidden;
	transition: transform 0.25s ease, visibility 0s linear 0.25s;
	padding-bottom: env(safe-area-inset-bottom, 0);
}

.wssac-bar.wssac-on {
	transform: translateY(0);
	visibility: visible;
	transition: transform 0.25s ease;
}

.wssac-inner {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 1080px;
	margin: 0 auto;
	padding: 8px 12px;
}

/* Chua Kira chat bubble goc phai (54px + offset ~16px = footprint ~70px). */
.wssac-bar.wssac-has-chat .wssac-inner {
	padding-right: 84px;
}

.wssac-thumb {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 6px;
	overflow: hidden;
}

.wssac-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wssac-meta {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.wssac-title {
	font-size: 13px;
	font-weight: 600;
	color: #222;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Gia + ma tien te LUON tren 1 dong: khong bao gio de $ hoac ma roi xuong dong. */
.wssac-sub {
	display: flex;
	align-items: baseline;
	gap: 5px;
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
}

.wssac-price {
	font-weight: 700;
	color: #111;
	white-space: nowrap;
}

.wssac-price del {
	opacity: 0.5;
	font-weight: 400;
}

/* Ma tien te ISO (USD, EUR...) — cung dong voi gia. Rong thi khong chiem cho. */
.wssac-ccy {
	color: #555;
	font-weight: 600;
	white-space: nowrap;
}

.wssac-ccy:empty {
	display: none;
}

.wssac-viewcart {
	flex: 0 0 auto;
	font-size: 12px;
	text-decoration: underline;
	color: #0a6640;
	white-space: nowrap;
}

.wssac-cta {
	flex: 0 0 auto;
	/* Vien 2px o MOI trang thai + min-width co dinh -> doi Choose options <-> Add to cart
	   KHONG lam nhay layout (cung chieu cao, cung be rong toi thieu). */
	border: 2px solid #ff4d00;
	border-radius: 6px;
	padding: 8px 18px;
	/* Du rong cho trang thai DAI hon ("Choose options ▾") de doi sang "Add to cart"
	   KHONG lam nut co lai / layout nhay. */
	min-width: 162px;
	box-sizing: border-box;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	color: #ff4d00;
	background: #fff;
	transition: background 0.15s ease, color 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}

/* Choose options (ke ca truoc khi JS chay = init): nen trang, vien + chu cam. */
.wssac-cta[data-wssac-state='options'],
.wssac-cta[data-wssac-state='init'] {
	background: #fff;
	color: #ff4d00;
	border-color: #ff4d00;
}

/* Mui ten xuong nho, goi y "cuon xuong chon" — khong lam nut chat vi da co min-width. */
.wssac-cta[data-wssac-state='options']::after,
.wssac-cta[data-wssac-state='init']::after {
	content: ' \25BE';
	font-size: 0.8em;
	opacity: 0.9;
}

/* Bam/di chuot vao Choose options -> dao mau: nen cam, chu trang. */
.wssac-cta[data-wssac-state='options']:hover,
.wssac-cta[data-wssac-state='options']:active,
.wssac-cta[data-wssac-state='init']:active {
	background: #ff4d00;
	color: #fff;
}

/* Add to cart: nen cam dac, chu trang (giu nguyen hanh vi). */
.wssac-cta[data-wssac-state='ready'] {
	background: #ff4d00;
	color: #fff;
	border-color: #ff4d00;
}

.wssac-cta[data-wssac-state='ready']:hover {
	background: #e04500;
	border-color: #e04500;
}

.wssac-cta:disabled {
	opacity: 0.7;
	cursor: default;
}

/* Nhay sang field con thieu khi khach duoc dua ve form goc. */
.wssac-flash {
	outline: 2px solid #ff4d00;
	outline-offset: 3px;
	border-radius: 4px;
	transition: outline-color 0.3s ease;
}

@media ( max-width: 480px ) {
	.wssac-thumb {
		flex-basis: 38px;
		width: 38px;
		height: 38px;
	}

	.wssac-title {
		font-size: 12px;
	}

	.wssac-cta {
		padding: 8px 12px;
		font-size: 12px;
		min-width: 142px; /* du cho "Choose options ▾" 12px (~138) -> khong nhay khi ve "Add to cart" */
	}

	.wssac-bar.wssac-has-chat .wssac-inner {
		padding-right: 84px;
	}
}
