/**
 * ==============================================================================
 * Trang Trí 4 Mùa (trangtri4mua.com) — Mobile UX Optimizations & Responsive Architecture
 * Style System: Blocksy Child Festive Commerce Edition
 * Version: 2.0.0
 * 
 * Modules:
 * 1. Mobile Sticky Bottom Bar (Safe-Area Insets, Z-Index 999, Compact Layout)
 * 2. Touch Target Audit (Minimum 44x44px for All Interactive Elements)
 * 3. Mobile Typography Rhythm (Clamped Headings, Diacritic Safety, Overflow Protection)
 * 4. Category Chip Horizontal Flick Scrolling (Hidden Scrollbar, Snap)
 * 5. Toast Notifications, Back-to-Top Positioning & Cart Feedback Micro-Interactions
 * ==============================================================================
 */

/* ==============================================================================
 * 1. Mobile Sticky Bottom Bar
 * Fixed at bottom, Safe-Area-Inset-Bottom support (iPhone notch/pill), Z-Index 999.
 * Compact layout containing Zalo icon button, "Thêm giỏ", and "Mua ngay".
 * ============================================================================== */

.tt4m-sticky-bar {
	display: none;
}

@media (max-width: 767.98px) {
	/* Prevent page content from being obscured by sticky bottom bar */
	body.single-product {
		padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
	}

	.tt4m-sticky-bar {
		display: block !important;
		position: fixed !important;
		bottom: 0 !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		min-height: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
		height: auto !important;
		z-index: 999 !important;
		background: rgba(255, 255, 255, 0.92) !important;
		backdrop-filter: blur(10px) !important;
		-webkit-backdrop-filter: blur(10px) !important;
		border-top: 1px solid rgba(229, 231, 235, 0.8) !important;
		box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05) !important;
		padding-top: 8px !important;
		padding-left: max(12px, env(safe-area-inset-left, 0px)) !important;
		padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
		padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
		box-sizing: border-box !important;
		transform: translateY(110%) !important;
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
		transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
		            opacity 0.25s ease,
		            visibility 0.35s ease !important;
	}

	/* Revealed state toggled by scroll controller */
	.tt4m-sticky-bar.is-visible {
		transform: translateY(0) !important;
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
	}

	.tt4m-sticky-inner {
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		gap: 8px !important;
		max-width: 600px !important;
		margin: 0 auto !important;
		width: 100% !important;
		height: 44px !important;
	}

	/* Zalo Quick Assist Button */
	.tt4m-sticky-zalo {
		flex: 0 0 50px !important;
		width: 50px !important;
		height: 44px !important;
		min-height: 44px !important;
		min-width: 44px !important;
		background: #EFF6FF !important;
		color: var(--tt4m-zalo, #0068FF) !important;
		border: 1px solid #BFDBFE !important;
		border-radius: 8px !important;
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 2px !important;
		font-size: 11px !important;
		font-weight: 600 !important;
		line-height: 1 !important;
		text-decoration: none !important;
		touch-action: manipulation !important;
		transition: background-color 0.15s ease, transform 0.15s ease !important;
		user-select: none !important;
		-webkit-user-select: none !important;
	}

	.tt4m-sticky-zalo svg {
		width: 18px !important;
		height: 18px !important;
		fill: currentColor !important;
		display: block !important;
	}

	.tt4m-sticky-zalo:hover,
	.tt4m-sticky-zalo:active {
		background: #DBEAFE !important;
		color: #0052CC !important;
		transform: scale(0.97) !important;
	}

	/* "Thêm giỏ" (Add to Cart) Button */
	.tt4m-sticky-atc {
		flex: 1 !important;
		height: 44px !important;
		min-height: 44px !important;
		min-width: 44px !important;
		background: var(--tt4m-primary, #14532D) !important;
		color: #ffffff !important;
		border: 1px solid rgba(0, 0, 0, 0.05) !important;
		border-radius: 8px !important;
		padding: 0 10px !important;
		font-size: 13.5px !important;
		font-weight: 600 !important;
		letter-spacing: 0.01em !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 6px !important;
		cursor: pointer !important;
		touch-action: manipulation !important;
		transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important;
		box-sizing: border-box !important;
		white-space: nowrap !important;
		user-select: none !important;
		-webkit-user-select: none !important;
	}

	.tt4m-sticky-atc:hover {
		background: var(--tt4m-primary-dark, #0F3F22) !important;
	}

	.tt4m-sticky-atc:active {
		transform: scale(0.98) !important;
		background: var(--tt4m-primary-dark, #0F3F22) !important;
	}

	.tt4m-sticky-atc.is-loading {
		opacity: 0.8 !important;
		pointer-events: none !important;
		cursor: wait !important;
	}

	.tt4m-sticky-atc.is-success {
		background: #166534 !important;
	}

	/* "Mua ngay" (Instant Checkout) Button */
	.tt4m-sticky-buy {
		flex: 1.25 !important;
		height: 44px !important;
		min-height: 44px !important;
		min-width: 44px !important;
		background: var(--tt4m-cta, #C41E2F) !important;
		color: #ffffff !important;
		border: none !important;
		border-radius: 8px !important;
		padding: 0 12px !important;
		font-size: 14px !important;
		font-weight: 700 !important;
		letter-spacing: 0.01em !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 6px !important;
		cursor: pointer !important;
		touch-action: manipulation !important;
		box-shadow: 0 2px 10px rgba(196, 30, 47, 0.35) !important;
		transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important;
		box-sizing: border-box !important;
		white-space: nowrap !important;
		user-select: none !important;
		-webkit-user-select: none !important;
	}

	.tt4m-sticky-buy:hover {
		background: var(--tt4m-cta-hover, #A01825) !important;
		box-shadow: 0 4px 14px rgba(196, 30, 47, 0.45) !important;
	}

	.tt4m-sticky-buy:active {
		transform: scale(0.98) !important;
		background: var(--tt4m-cta-hover, #A01825) !important;
	}

	.tt4m-sticky-buy.is-loading {
		opacity: 0.8 !important;
		pointer-events: none !important;
		cursor: wait !important;
	}

	/* Non-purchasable / Consultation sticky bar */
	.tt4m-sticky-contact {
		width: 100% !important;
		height: 44px !important;
		min-height: 44px !important;
		min-width: 44px !important;
		background: var(--tt4m-zalo, #0068FF) !important;
		color: #ffffff !important;
		border-radius: 8px !important;
		font-size: 14px !important;
		font-weight: 600 !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		text-decoration: none !important;
		touch-action: manipulation !important;
		transition: background-color 0.15s ease, transform 0.15s ease !important;
		box-shadow: 0 2px 8px rgba(0, 104, 255, 0.3) !important;
	}

	.tt4m-sticky-contact:hover,
	.tt4m-sticky-contact:active {
		background: #0052CC !important;
		transform: scale(0.98) !important;
	}

	/* Position Back-to-Top above sticky bar on single product pages */
	body.single-product.tt4m-has-sticky-bar .ct-back-to-top,
	body.single-product.tt4m-has-sticky-bar .tt4m-back-to-top {
		bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
	}
}

@media (min-width: 768px) {
	.tt4m-sticky-bar {
		display: none !important;
	}
}


/* ==============================================================================
 * 2. Touch Target Audit (Minimum 44x44px on Mobile Devices)
 * Buttons, inputs, links, and pagination elements must adhere to WCAG 2.5.5.
 * ============================================================================== */

@media (max-width: 768px) {
	/* Form Inputs: Minimum 44px height, 16px font-size to prevent iOS Safari auto-zoom */
	input[type="text"],
	input[type="email"],
	input[type="tel"],
	input[type="url"],
	input[type="password"],
	input[type="search"],
	input[type="number"],
	select,
	.woocommerce-input-wrapper select,
	.woocommerce-input-wrapper input {
		min-height: 44px !important;
		font-size: 16px !important; /* CRITICAL: Prevents iOS Safari page zooming on focus */
		border-radius: 6px !important;
		box-sizing: border-box !important;
	}

	textarea {
		font-size: 16px !important;
		min-height: 80px !important;
		border-radius: 6px !important;
		box-sizing: border-box !important;
	}

	/* WooCommerce quantity controller */
	div.quantity {
		display: inline-flex !important;
		align-items: center !important;
		min-height: 44px !important;
	}

	div.quantity input.qty {
		min-height: 44px !important;
		min-width: 44px !important;
		height: 44px !important;
		font-size: 16px !important;
		text-align: center !important;
	}

	div.quantity .plus,
	div.quantity .minus {
		min-width: 44px !important;
		min-height: 44px !important;
		width: 44px !important;
		height: 44px !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		cursor: pointer !important;
		touch-action: manipulation !important;
	}

	/* Main PDP Add-to-cart buttons */
	.single_add_to_cart_button,
	.tt4m-pdp-buy-now {
		min-height: 46px !important;
		min-width: 44px !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		font-size: 15px !important;
		font-weight: 600 !important;
		touch-action: manipulation !important;
	}

	/* Catalog loop Add-to-cart buttons */
	.ct-woo-card-actions a.button,
	[data-products] .product .button,
	.woocommerce-loop-product__link + a.button {
		min-height: 44px !important;
		min-width: 44px !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		padding: 10px 14px !important;
		font-size: 13.5px !important;
		border-radius: 6px !important;
		touch-action: manipulation !important;
	}

	/* Pagination Links: Minimum 44x44px touch targets */
	.ct-pagination,
	.woocommerce-pagination {
		padding: 16px 0 !important;
	}

	.ct-pagination .page-numbers,
	.woocommerce-pagination .page-numbers {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		flex-wrap: wrap !important;
		gap: 6px !important;
	}

	.ct-pagination .page-numbers a,
	.ct-pagination .page-numbers span,
	.woocommerce-pagination ul.page-numbers li a,
	.woocommerce-pagination ul.page-numbers li span {
		min-width: 44px !important;
		min-height: 44px !important;
		width: auto !important;
		height: 44px !important;
		padding: 0 12px !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		font-size: 14px !important;
		font-weight: 600 !important;
		border-radius: 6px !important;
		box-sizing: border-box !important;
		touch-action: manipulation !important;
	}

	/* Header triggers & icon buttons */
	.ct-header-trigger,
	.ct-header-cart,
	.ct-search-toggle,
	.ct-toggle-close {
		min-width: 44px !important;
		min-height: 44px !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		touch-action: manipulation !important;
	}

	/* Variation table select dropdowns */
	table.variations select {
		min-height: 44px !important;
		height: 44px !important;
		padding: 8px 12px !important;
		font-size: 16px !important;
	}

	table.variations th,
	table.variations td {
		padding-top: 10px !important;
		padding-bottom: 10px !important;
	}

	/* Assist Zalo & Hotline row on PDP */
	.tt4m-pdp-assist {
		display: flex !important;
		flex-direction: column !important;
		gap: 10px !important;
		margin: 16px 0 !important;
	}

	.tt4m-assist-btn {
		min-height: 44px !important;
		padding: 10px 14px !important;
		font-size: 14px !important;
		border-radius: 6px !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 8px !important;
		touch-action: manipulation !important;
	}

	/* Checkout action buttons */
	#place_order,
	.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
		min-height: 48px !important;
		height: 48px !important;
		font-size: 16px !important;
		font-weight: 700 !important;
		width: 100% !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		touch-action: manipulation !important;
	}

	/* Coupon submit buttons */
	.checkout_coupon button[type="submit"],
	.woocommerce-cart-form button[name="apply_coupon"] {
		min-height: 44px !important;
		padding: 0 16px !important;
		touch-action: manipulation !important;
	}

	/* Cart item remove button */
	.woocommerce-cart .product-remove a.remove,
	.woocommerce-mini-cart-item a.remove {
		min-width: 44px !important;
		min-height: 44px !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		touch-action: manipulation !important;
	}

	/* Variation labels and attributes */
	table.variations label {
		min-height: 44px !important;
		display: inline-flex !important;
		align-items: center !important;
	}

	/* Checkout checkboxes & payment method labels */
	.woocommerce-form__label-for-checkbox,
	.woocommerce-terms-and-conditions-wrapper label,
	.wc_payment_method label,
	.form-row.place-order label {
		min-height: 44px !important;
		display: inline-flex !important;
		align-items: center !important;
		touch-action: manipulation !important;
		cursor: pointer !important;
	}

	/* Breadcrumbs & Product Tabs Touch Targets */
	.woocommerce-breadcrumb a,
	.woocommerce-tabs ul.tabs li a {
		min-height: 44px !important;
		display: inline-flex !important;
		align-items: center !important;
		touch-action: manipulation !important;
	}
}


/* ==============================================================================
 * 3. Mobile Typography Adjustments
 * Prevent horizontal overflow, clamped headings, smooth font scaling, diacritic safety.
 * ============================================================================== */

/* Universal horizontal overflow protection */
html,
body {
	max-width: 100% !important;
	overflow-x: hidden !important;
	-webkit-text-size-adjust: 100% !important;
	text-size-adjust: 100% !important;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

img,
picture,
video,
canvas,
svg,
iframe {
	max-width: 100% !important;
	height: auto;
}

/* Fluid responsive typography with Vietnamese diacritic safety (generous line-height) */
@media (max-width: 767.98px) {
	h1,
	.entry-title,
	.product_title {
		font-size: clamp(1.35rem, 5.5vw, 1.75rem) !important;
		line-height: 1.35 !important;
		letter-spacing: -0.01em !important;
		word-break: break-word !important;
		overflow-wrap: break-word !important;
		margin-bottom: 12px !important;
	}

	h2,
	.ct-heading-2 {
		font-size: clamp(1.18rem, 4.5vw, 1.45rem) !important;
		line-height: 1.38 !important;
		letter-spacing: -0.01em !important;
		word-break: break-word !important;
		overflow-wrap: break-word !important;
		margin-bottom: 10px !important;
	}

	h3,
	.ct-heading-3 {
		font-size: clamp(1.05rem, 3.8vw, 1.25rem) !important;
		line-height: 1.4 !important;
		word-break: break-word !important;
		overflow-wrap: break-word !important;
		margin-bottom: 8px !important;
	}

	h4 {
		font-size: clamp(0.95rem, 3.2vw, 1.1rem) !important;
		line-height: 1.4 !important;
	}

	p,
	li,
	dd {
		font-size: 14.5px !important;
		line-height: 1.62 !important; /* Ensure Vietnamese tone marks and accents are unclipped */
		word-break: break-word !important;
		overflow-wrap: break-word !important;
	}

	/* PDP Price Display on Mobile */
	.single-product .price {
		font-size: 1.25rem !important;
		line-height: 1.3 !important;
		margin-bottom: 10px !important;
	}

	/* PDP Stock badge */
	.tt4m-stock-badge {
		font-size: 12.5px !important;
		line-height: 1.4 !important;
		margin-bottom: 8px !important;
	}

	/* PDP Freeship hint */
	.tt4m-pdp-freeship-hint {
		font-size: 13px !important;
		line-height: 1.45 !important;
		padding: 8px 12px !important;
		margin-bottom: 14px !important;
		border-radius: 6px !important;
	}

	/* 2-line clamp on catalog product titles with uniform height */
	[data-products] .woocommerce-loop-product__title,
	[data-products] .woocommerce-loop-category__title {
		font-size: 13.5px !important;
		line-height: 1.38 !important;
		display: -webkit-box !important;
		-webkit-line-clamp: 2 !important;
		-webkit-box-orient: vertical !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
		min-height: 2.76em !important;
		max-height: 2.76em !important;
		margin-bottom: 6px !important;
	}

	/* Product price on mobile cards */
	[data-products] .product .price {
		font-size: 13.5px !important;
		line-height: 1.3 !important;
		margin-bottom: 8px !important;
	}

	/* Tables responsive scroll */
	table:not(.variations) {
		display: block !important;
		width: 100% !important;
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch !important;
	}
}


/* ==============================================================================
 * 4. Mobile Category Chip Horizontal Flick Scrolling
 * Horizontal scrolling with hidden scrollbar, momentum touch, and snap alignment.
 * ============================================================================== */

@media (max-width: 767.98px) {
	.tt4m-cat-chips-wrapper {
		width: calc(100% + 24px) !important;
		margin-left: -12px !important;
		margin-right: -12px !important;
		margin-bottom: 14px !important;
		padding: 0 12px !important;
		overflow: hidden !important;
		box-sizing: border-box !important;
	}

	.tt4m-cat-chips {
		display: flex !important;
		flex-wrap: nowrap !important;
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch !important;
		scroll-snap-type: x mandatory !important;
		scrollbar-width: none !important; /* Firefox */
		-ms-overflow-style: none !important; /* IE 10+ / Edge */
		padding: 4px 2px 10px 2px !important;
		gap: 8px !important;
		width: 100% !important;
		box-sizing: border-box !important;
	}

	/* Hide scrollbar completely across WebKit browsers (Chrome, Safari, iOS, Edge) */
	.tt4m-cat-chips::-webkit-scrollbar {
		display: none !important;
		width: 0 !important;
		height: 0 !important;
		background: transparent !important;
	}

	.tt4m-chip {
		flex: 0 0 auto !important;
		scroll-snap-align: start !important;
		min-height: 44px !important;
		height: 44px !important;
		padding: 0 16px !important;
		font-size: 13.5px !important;
		font-weight: 500 !important;
		line-height: 1 !important;
		border-radius: 999px !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		white-space: nowrap !important;
		touch-action: pan-x !important;
		background: #ffffff !important;
		border: 1px solid var(--tt4m-border, #E5E7EB) !important;
		color: var(--tt4m-text, #1F2937) !important;
		text-decoration: none !important;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
		transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
		user-select: none !important;
		-webkit-user-select: none !important;
	}

	.tt4m-chip:active {
		transform: scale(0.96) !important;
	}

	.tt4m-chip.is-active {
		background: var(--tt4m-primary, #14532D) !important;
		color: #ffffff !important;
		border-color: var(--tt4m-primary, #14532D) !important;
		font-weight: 600 !important;
		box-shadow: 0 2px 6px rgba(20, 83, 45, 0.25) !important;
	}
}


/* ==============================================================================
 * 5. Toast Notifications, Back-to-Top, Select Highlight & Feedback Interactions
 * ============================================================================== */

/* Missing Variation Dropdown Subtle Outline */
.tt4m-select-highlight,
.variations select.tt4m-select-highlight,
.variations select.tt4m-select-highlight:focus,
.variations td.value select.tt4m-select-highlight:focus,
select.tt4m-select-highlight:focus {
	outline: 2px solid var(--tt4m-cta, #C41E2F) !important;
	outline-offset: 2px !important;
	border-color: var(--tt4m-cta, #C41E2F) !important;
	box-shadow: 0 0 0 4px rgba(196, 30, 47, 0.18) !important;
	transition: outline 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Floating Toast Notification Container */
.tt4m-toast-container {
	position: fixed;
	top: 24px;
	right: 24px;
	left: auto;
	transform: none;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: auto;
	max-width: 440px;
	pointer-events: none;
}

.tt4m-toast-container:empty {
	display: none !important;
}

@media (max-width: 689.98px) {
	.tt4m-toast-container {
		top: auto;
		bottom: calc(76px + env(safe-area-inset-bottom, 0px));
		left: 12px;
		right: 12px;
		width: calc(100% - 24px);
		max-width: none;
	}
}

.tt4m-toast {
	pointer-events: auto;
	background: #ffffff;
	border-radius: 10px;
	padding: 12px 14px;
	display: flex;
	align-items: center;
	gap: 10px;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
	border: 1px solid var(--tt4m-border, #E5E7EB);
	transform: translateY(-20px) scale(0.95);
	opacity: 0;
	transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.tt4m-toast.is-visible {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.tt4m-toast.is-leaving {
	transform: translateY(-20px) scale(0.95);
	opacity: 0;
}

.tt4m-toast--success {
	border-left: 4px solid var(--tt4m-primary, #14532D);
}

.tt4m-toast--warning {
	border-left: 4px solid var(--tt4m-gold, #D97706);
}

.tt4m-toast--error {
	border-left: 4px solid var(--tt4m-cta, #C41E2F);
}

.tt4m-toast--info {
	border-left: 4px solid var(--tt4m-zalo, #0068FF);
}

.tt4m-toast__icon {
	flex: 0 0 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tt4m-toast__content {
	flex: 1;
	min-width: 0;
}

.tt4m-toast__message {
	margin: 0 !important;
	font-size: 13.5px !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	color: var(--tt4m-text, #1F2937) !important;
}

.tt4m-toast__action {
	flex: 0 0 auto;
	font-size: 13px !important;
	font-weight: 700 !important;
	color: var(--tt4m-primary, #14532D) !important;
	text-decoration: underline !important;
	white-space: nowrap !important;
	padding: 4px 6px !important;
}

.tt4m-toast__close {
	flex: 0 0 44px;
	height: 44px;
	width: 44px;
	min-height: 44px;
	min-width: 44px;
	background: transparent;
	border: none;
	color: var(--tt4m-secondary, #6B7280);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border-radius: 6px;
	touch-action: manipulation;
}
.tt4m-toast__close:hover {
	color: var(--tt4m-text, #1F2937);
	background: #F3F4F6;
}

/* Back-to-Top Button Enhancements */
.tt4m-back-to-top,
.ct-back-to-top {
	position: fixed !important;
	bottom: 24px !important;
	right: 16px !important;
	width: 44px !important;
	height: 44px !important;
	min-width: 44px !important;
	min-height: 44px !important;
	border-radius: 50% !important;
	background: var(--tt4m-primary, #14532D) !important;
	color: #ffffff !important;
	border: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	z-index: 980 !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transform: translateY(12px) !important;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
	touch-action: manipulation !important;
}

.tt4m-back-to-top.is-visible,
.ct-back-to-top.is-visible,
.ct-back-to-top.ct-show {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0) !important;
}

.tt4m-back-to-top:hover,
.ct-back-to-top:hover {
	background: var(--tt4m-primary-dark, #0F3F22) !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
}

.tt4m-back-to-top:active,
.ct-back-to-top:active {
	transform: translateY(0) scale(0.96) !important;
}

.tt4m-back-to-top svg,
.ct-back-to-top svg {
	width: 18px !important;
	height: 18px !important;
	stroke: #ffffff !important;
	display: block !important;
}

/* Tactile Cart Badge Bounce Animation */
@keyframes tt4mCartBounce {
	0%, 100% {
		transform: scale(1);
	}
	30% {
		transform: scale(1.35);
	}
	60% {
		transform: scale(0.9);
	}
	80% {
		transform: scale(1.15);
	}
}

.tt4m-cart-badge-bounce {
	animation: tt4mCartBounce 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
	color: #ffffff !important;
	background-color: var(--tt4m-cta, #C41E2F) !important;
}

/* Inline Spinner for Button Loading States */
@keyframes tt4mSpin {
	to {
		transform: rotate(360deg);
	}
}

.tt4m-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #ffffff;
	animation: tt4mSpin 0.7s linear infinite;
	vertical-align: middle;
	margin-right: 4px;
}
