/* KachoTech sliding mini-cart */

body.kt-mini-cart-open {
	overflow: hidden;
}

.kt-mini-cart {
	position: fixed;
	inset: 0;
	z-index: 100050;
	pointer-events: none;
	visibility: hidden;
}

.kt-mini-cart.is-open {
	pointer-events: auto;
	visibility: visible;
}

.kt-mini-cart-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.kt-mini-cart.is-open .kt-mini-cart-overlay {
	opacity: 1;
}

.kt-mini-cart-panel {
	position: absolute;
	top: 0;
	right: 0;
	width: min(400px, 100%);
	height: 100%;
	background: #ffffff;
	box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.kt-mini-cart.is-open .kt-mini-cart-panel {
	transform: translateX(0);
}

.kt-mini-cart-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.kt-mini-cart-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #0f172a;
	letter-spacing: -0.02em;
}

.kt-mini-cart-count-label {
	font-weight: 500;
	color: #6b7280;
	font-size: 15px;
}

.kt-mini-cart-close {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 999px;
	background: #f3f4f6;
	color: #111827;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease;
}

.kt-mini-cart-close:hover {
	background: #ec234a;
	color: #fff;
}

.kt-mini-cart-body {
	flex: 1;
	overflow-y: auto;
	padding: 12px 16px 20px;
	-webkit-overflow-scrolling: touch;
}

.kt-mini-cart-empty {
	text-align: center;
	padding: 48px 16px;
	color: #6b7280;
}

.kt-mini-cart-empty .dashicons {
	font-size: 42px;
	width: 42px;
	height: 42px;
	color: #d1d5db;
	margin-bottom: 12px;
}

.kt-mini-cart-empty p {
	margin: 0 0 16px;
	font-size: 15px;
}

.kt-mini-cart-shop {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	border-radius: 999px;
	background: #111827;
	color: #fff !important;
	text-decoration: none !important;
	font-size: 13px;
	font-weight: 600;
}

.kt-mini-cart-shop:hover {
	background: #ec234a;
}

.kt-mini-cart-items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.kt-mini-cart-item {
	display: grid;
	grid-template-columns: 72px 1fr auto;
	gap: 12px;
	align-items: start;
	padding: 12px;
	border: 1px solid #eef0f4;
	border-radius: 12px;
	background: #fafbfc;
	transition: opacity 0.2s ease;
}

.kt-mini-cart-item.is-removing {
	opacity: 0.45;
}

.kt-mini-cart-thumb {
	width: 72px;
	height: 72px;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #eef0f4;
}

.kt-mini-cart-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.kt-mini-cart-title {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a !important;
	text-decoration: none !important;
	line-height: 1.35;
	margin-bottom: 6px;
}

.kt-mini-cart-title:hover {
	color: #ec234a !important;
}

.kt-mini-cart-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	align-items: baseline;
	font-size: 13px;
}

.kt-mini-cart-qty {
	color: #6b7280;
}

.kt-mini-cart-price {
	color: #ec234a;
	font-weight: 600;
}

.kt-mini-cart-remove {
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	border: 1px solid #e5e7eb;
	color: #6b7280;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.kt-mini-cart-remove:hover {
	background: #fee2e2;
	border-color: #fecaca;
	color: #dc2626;
}

.kt-mini-cart-footer {
	flex-shrink: 0;
	padding: 16px 20px 20px;
	border-top: 1px solid #e5e7eb;
	background: #fff;
}

.kt-mini-cart-footer.is-empty {
	display: none;
}

.kt-mini-cart-subtotal {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
	font-size: 15px;
	color: #374151;
}

.kt-mini-cart-subtotal strong {
	font-size: 18px;
	color: #0f172a;
}

.kt-mini-cart-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.kt-mini-cart-view,
.kt-mini-cart-checkout {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	text-align: center;
	transition: background 0.15s ease, color 0.15s ease;
}

.kt-mini-cart-view {
	background: #f3f4f6;
	color: #111827 !important;
}

.kt-mini-cart-view:hover {
	background: #e5e7eb;
}

.kt-mini-cart-checkout {
	background: #ec234a;
	color: #fff !important;
}

.kt-mini-cart-checkout:hover {
	background: #d11d40;
}

/* Hide WooCommerce's injected "View cart" link beside product cards */
a.added_to_cart.wc-forward,
.kt-footer-actions a.added_to_cart,
.kt-product-card a.added_to_cart,
.kt-related-grid a.added_to_cart {
	display: none !important;
}

/* Keep card footer tidy after ATC */
.kt-footer-actions {
	align-items: center;
}

@media (max-width: 480px) {
	.kt-mini-cart-panel {
		width: 100%;
	}
}
