/* ===========================
   CARTIZAN — FLOATING CART
=========================== */
.cz-floating-cart {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9998;
	font-family: inherit;
	opacity: 0;
	transform: translateY(16px) scale(0.9);
	pointer-events: none;
	transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.cz-floating-cart.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* ---- Toggle button ---- */
.cz-floating-cart__toggle {
	position: relative;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #E78800;
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 22px rgba(231, 136, 0, 0.40);
	transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.cz-floating-cart__toggle:hover,
.cz-floating-cart__toggle:focus-visible {
	background: #c97800;
	box-shadow: 0 8px 26px rgba(231, 136, 0, 0.5);
	transform: translateY(-2px);
	outline: none;
}
.cz-floating-cart__icon { display: block; }
.cz-floating-cart__count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: #130130;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	box-shadow: 0 0 0 2px #fff;
}

/* Pulse ring when an item is added */
.cz-floating-cart.cz-pulse .cz-floating-cart__toggle::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 2px solid #E78800;
	animation: czCartPulse 0.7s ease-out;
}
@keyframes czCartPulse {
	from { opacity: 0.8; transform: scale(1); }
	to   { opacity: 0; transform: scale(1.7); }
}

/* ---- Panel ---- */
.cz-floating-cart__panel {
	position: absolute;
	right: 0;
	bottom: 72px;
	width: min(390px, 90vw);
	max-height: 70vh;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 16px 48px rgba(19, 1, 48, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px) scale(0.97);
	transform-origin: bottom right;
	transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s;
}
.cz-floating-cart.is-open .cz-floating-cart__panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.cz-floating-cart__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	background: #B4DDEE;
	flex-shrink: 0;
}
.cz-floating-cart__title {
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #130130;
}
.cz-floating-cart__close {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.4rem;
	line-height: 1;
	color: #130130;
	padding: 2px 6px;
	border-radius: 6px;
	transition: background 0.15s;
}
.cz-floating-cart__close:hover { background: rgba(19, 1, 48, 0.08); }

#cz-floating-cart .cz-floating-cart__body {
	padding: 6px 20px 20px;
	overflow-y: auto;
}

/* ---- WooCommerce mini-cart overrides ---- */
/* Selectors are prefixed with #cz-floating-cart to out-specificity
   WooCommerce core's ".woocommerce ul.cart_list li" style rules. */
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
}
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart-item {
	box-sizing: content-box;
	position: relative;
	min-height: 48px;
	padding: 14px 32px 14px 60px;
	border-bottom: 1px solid #f0ede8;
}
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart-item:last-child {
	border-bottom: none;
}
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart-item > a:not(.remove) {
	display: block;
	font-size: 0.86rem;
	font-weight: 600;
	line-height: 1.35;
	color: #130130;
	text-decoration: none;
}
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart-item > a:not(.remove):hover { color: #E78800; }
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart-item img {
	position: absolute;
	top: 14px;
	left: 0;
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 8px;
}
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart-item .quantity {
	display: block;
	margin: 4px 0 0;
	font-size: 0.8rem;
	color: #777;
}
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart-item .remove {
	position: absolute;
	top: 14px;
	right: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #f4f2f0;
	color: #948f8a !important;
	text-decoration: none;
	font-size: 15px;
	line-height: 1;
	transition: background 0.15s, color 0.15s;
}
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart-item .remove:hover {
	background: #fbe4e4;
	color: #c0392b !important;
}

#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart__empty-message {
	font-size: 0.85rem;
	color: #666;
	text-align: center;
	padding: 20px 0;
	margin: 0;
}

#cz-floating-cart .cz-floating-cart__body .total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 700;
	color: #130130;
	padding-top: 10px;
	margin-bottom: 14px;
}
#cz-floating-cart .cz-floating-cart__body .total strong { font-weight: 700; }

#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart__buttons {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
}
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart__buttons a.button {
	display: block;
	text-align: center;
	padding: 11px 16px;
	border-radius: 50px;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart__buttons a.wc-forward:not(.checkout) {
	background: #fff;
	color: #130130 !important;
	box-shadow: inset 0 0 0 1.5px #130130;
}
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart__buttons a.wc-forward:not(.checkout):hover {
	background: #FFF8ED;
}
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart__buttons a.checkout {
	background: #E78800;
	color: #fff !important;
	box-shadow: 0 2px 12px rgba(231, 136, 0, 0.30);
}
#cz-floating-cart .cz-floating-cart__body .woocommerce-mini-cart__buttons a.checkout:hover {
	background: #c97800;
}

/* Scrollbar tidy-up */
#cz-floating-cart .cz-floating-cart__body::-webkit-scrollbar { width: 6px; }
#cz-floating-cart .cz-floating-cart__body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
	.cz-floating-cart { right: 14px; bottom: 14px; }
	.cz-floating-cart__toggle { width: 52px; height: 52px; }
	.cz-floating-cart__panel { width: calc(100vw - 28px); bottom: 64px; max-height: 75vh; }
}
