.drawer-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5); 
	z-index: 110000;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.3s ease, visibility 0s linear 0.3s;
	will-change: opacity;
}
.drawer-overlay.active {
	visibility: visible;
	opacity: 1;
	transition: opacity 0.3s ease, visibility 0s linear 0s;
}
.drawer {
	position: fixed;
	top: 0;
	width: 380px;
	max-width: 90vw;
	height: 100%;
	background: var(--color-bg);
	z-index: 110001;
	visibility: hidden;
	opacity: 0;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
	            opacity 0.2s ease,
	            visibility 0s linear 0.3s;
	display: flex;
	flex-direction: column;
	box-shadow: -4px 0 15px rgba(0, 0, 0, 0.05);
	will-change: transform, opacity;
}
.drawer-right {
	right: 0;
	transform: translate3d(101%, 0, 0);
}
.drawer.active {
	visibility: visible;
	opacity: 1;
	transform: translate3d(0, 0, 0) !important;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
	            opacity 0.2s ease,
	            visibility 0s linear 0s;
}
.drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	background: var(--color-primary);
	color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	flex-shrink: 0;
}
.drawer-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	display: flex;
	align-items: center;
	gap: 6px;
}
.drawer-item-count {
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.8);
}
.drawer-close-modern {
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-circle);
	transition: background var(--transition-fast), color var(--transition-fast);
}
.drawer-close-modern svg {
	width: 20px;
	height: 20px;
}

#cart-drawer-content-inner {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.cart-drawer-items {
	flex: 1;
	overflow-y: auto;
	padding: 16px 20px;
	-webkit-overflow-scrolling: touch;
}
.cart-drawer-item {
	display: flex;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--color-bg-soft);
	animation: cartItemFadeIn 0.3s ease forwards;
}
.cart-drawer-item:last-child {
	border-bottom: none;
}
@keyframes cartItemFadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
.cart-drawer-item__img {
	flex-shrink: 0;
	width: 72px;
	height: 72px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--color-bg-light);
	border: 1px solid var(--color-border);
}
.cart-drawer-item__img a {
	display: block;
	width: 100%;
	height: 100%;
}
.cart-drawer-item__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.cart-drawer-item__details {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
}
.cart-drawer-item__top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
}
.cart-drawer-item__name {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--color-text-dark);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.cart-drawer-item__name a {
	color: inherit;
	text-decoration: none;
}
.cart-drawer-item__remove {
	flex-shrink: 0;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: #bbb;
	transition: color 0.2s ease;
	display: flex;
	align-items: center;
}
.cart-drawer-item__remove svg {
	width: 16px;
	height: 16px;
}
.cart-drawer-item__remove:hover {
	color: var(--color-danger);
}
.cart-drawer-item__price {
	font-size: 14px;
	font-weight: 700;
	color: var(--color-text-heading);
	margin: 4px 0;
}
.cart-drawer-item__price del {
	font-weight: 400;
	color: #aaa;
	font-size: 12px;
	margin-right: 4px;
}
.cart-drawer-item__price ins {
	text-decoration: none;
}
.cart-drawer-item__qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	overflow: hidden;
	width: fit-content;
}
.qty-btn {
	background: none;
	border: none;
	cursor: pointer;
	width: 26px;
	height: 26px;
	font-size: 14px;
	font-weight: 600;
	color: var(--color-text);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background var(--transition-fast), color var(--transition-fast);
	user-select: none;
}
.qty-btn:hover {
	background: #f5f5f5;
}
.qty-btn:active {
	background: #eee;
}
.qty-value {
	width: 28px;
	text-align: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--color-text-dark);
	border-left: 1px solid #e5e5e5;
	border-right: 1px solid #e5e5e5;
	line-height: 26px;
}
.cart-drawer-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 30px;
	text-align: center;
	flex: 1;
}
.cart-drawer-empty__icon {
	width: 80px;
	height: 80px;
	color: #e0e0e0;
	margin-bottom: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.cart-drawer-empty__icon .icon {
	width: 100%;
	height: 100%;
	fill: currentColor;
}
.cart-drawer-empty__title {
	font-size: 16px;
	font-weight: 700;
	color: var(--color-text-dark);
	margin: 0 0 6px;
}
.cart-drawer-empty__subtitle {
	font-size: 13px;
	color: #888;
	margin: 0 0 24px;
	line-height: 1.5;
}
.cart-drawer-empty__btn {
	display: inline-flex;
	align-items: center;
	padding: 8px 20px;
	background: #000;
	color: #fff;
	text-decoration: none;
	font-size: 12px;
	font-weight: 600;
	border-radius: var(--radius-pill);
	transition: all var(--transition-base);
}
.cart-drawer-empty__btn:hover {
	background: #222;
}
.cart-drawer-footer {
	flex-shrink: 0;
	padding: 18px 20px 20px;
	border-top: 1px solid var(--color-bg-muted);
	background: var(--color-bg-light);
	position: relative;
	z-index: 50;
}
.cart-drawer-footer__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
}
.cart-drawer-footer__label {
	font-size: 15px;
	font-weight: 700;
	color: var(--color-text-dark);
}
.cart-drawer-footer__value {
	font-size: 18px;
	font-weight: 800;
	color: var(--color-text-heading);
}
.cart-drawer-footer__checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 14px;
	background: #000;
	color: #fff;
	text-decoration: none;
	font-size: 14px;
	font-weight: 700;
	border-radius: 10px;
	box-sizing: border-box;
	cursor: pointer;
	border: none;
	z-index: 100;
	position: relative;
	transition: background 0.2s;
}
.cart-drawer-footer__checkout:hover {
	background: #222;
}
.fly-to-cart-el {
	position: fixed;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #000;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 120000;
	pointer-events: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: left 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
	            top 1s cubic-bezier(0.55, 0, 0.1, 1),
	            transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
	            opacity 0.8s ease 0.3s;
}
.fly-to-cart-el svg {
	width: 20px;
	height: 20px;
	fill: #fff;
}
@keyframes bump {
	0%   { transform: scale(1); }
	30%  { transform: scale(1.3); }
	50%  { transform: scale(0.92); }
	70%  { transform: scale(1.08); }
	100% { transform: scale(1); }
}
.header-icon.cart-bump,
.header-cart-link.cart-bump {
	animation: bump 0.5s ease-out;
}
@keyframes btn-spin {
	to { transform: rotate(360deg); }
}
.qty-btn.loading,
.cart-drawer-item__remove.loading {
	pointer-events: none;
	position: relative;
	color: transparent !important;
}
.qty-btn.loading::after,
.cart-drawer-item__remove.loading::after {
	content: '';
	position: absolute;
	width: 14px;
	height: 14px;
	border: 2px solid #ccc;
	border-top-color: #333;
	border-radius: 50%;
	animation: btn-spin 0.6s linear infinite;
}
.product-card__btn.loading {
	pointer-events: none;
	position: relative;
	color: transparent !important;
}
.product-card__btn.loading .icon {
	visibility: hidden;
}
.product-card__btn.loading::after {
	content: '';
	position: absolute;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: btn-spin 0.6s linear infinite;
}
@media (max-width: 768px) {
	.drawer {
		width: 340px;
	}
	.cart-drawer-items {
		padding: 14px 16px;
	}
	.cart-drawer-item {
		gap: 12px;
		padding: 12px 0;
	}
	.cart-drawer-item__img {
		width: 64px;
		height: 64px;
		border-radius: 8px;
	}
	.cart-drawer-item__name {
		font-size: 12px;
	}
	.cart-drawer-item__price {
		font-size: 13px;
	}
	.qty-btn {
		width: 32px;
		height: 32px;
		font-size: 18px;
	}
	.qty-value {
		width: 34px;
		line-height: 32px;
		font-size: 13px;
	}
	.cart-drawer-footer {
		padding: 14px 16px 16px;
	}
	.cart-drawer-footer__checkout {
		padding: 13px;
		font-size: 13px;
		border-radius: 8px;
	}
}
.cart-checkout-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 120000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 40px 15px; 
	box-sizing: border-box;
	overflow-y: auto; 
}
.cart-checkout-modal.is-active {
	display: flex;
}
.cart-checkout-modal__overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.05); 
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	z-index: 1;
	cursor: default;
}
.cart-checkout-modal__close svg {
	width: 20px;
	height: 20px;
	display: block;
}
.cart-checkout-modal__content {
	position: relative;
	width: 100%;
	max-width: 500px;
	z-index: 2;
	animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	margin: auto; 
}
@keyframes modalScaleUp {
	from { transform: scale(0.9); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}
.cart-checkout-modal__close {
	position: absolute;
	right: 15px;
	top: 15px;
	background: none;
	border: none;
	width: 40px;
	height: 40px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	color: #000;
	z-index: 100;
	transition: all 0.2s;
	font-weight: 300;
}
.cart-checkout-modal__close:hover {
	opacity: 0.7; 
}
.cart-checkout-modal__inner {
	padding: 0;
}
.cart-checkout-modal__inner .checkout-native {
	margin-top: 0;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}
.cart-checkout-modal__inner .checkout-native__header {
	margin-bottom: 0; 
	padding-bottom: 20px;
	margin-left: -15px; 
	margin-right: -15px;
	padding-left: 15px;
	padding-right: 15px;
	border-bottom: 1px solid #f0f0f0;
	margin-bottom: 0;
}
.cart-checkout-modal__inner .checkout-native__header h2 {
	font-size: 20px; 
	letter-spacing: -0.02em;
}
.cart-checkout-modal__inner .checkout-native__header p {
	font-size: 13px; 
	opacity: 0.8;
}
.checkout-native--cart .checkout-native__cart-items {
	margin-bottom: 15px;
	padding: 0; 
	display: flex;
	flex-direction: column;
}
.checkout-native__cart-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 15px; 
	border-bottom: 1px solid #f0f0f0;
	position: relative;
	background: transparent;
}
.checkout-native__cart-item:last-child {
	border-bottom: none;
}
.checkout-native__cart-item .item-thumb {
	width: 48px; 
	height: 48px;
	flex-shrink: 0;
	position: relative;
	background: transparent; 
	padding: 0; 
}
.checkout-native__cart-item .item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 4px;
	border: none; 
}
.checkout-native__cart-item .item-qty-badge {
	position: absolute;
	top: -6px;
	right: -6px;
	background: #888;
	color: #fff;
	width: 18px; 
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: 700;
	border: 1.5px solid #fff;
	box-shadow: 0 1px 3px rgba(var(--color-primary-rgb), 0.1);
	z-index: 2;
}
.checkout-native__cart-item .item-info {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.checkout-native__cart-item .item-name {
	font-size: 13px; 
	font-weight: 700;
	color: #111;
	line-height: 1.2;
	max-width: 95%;
	display: -webkit-box;
	-webkit-line-clamp: 2; 
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.checkout-native__cart-item .item-price {
	font-size: 13px;
	color: #111;
	font-weight: 800;
}
.checkout-native__cart-item .item-remove-btn {
	background: none;
	border: none;
	font-size: 18px;
	color: #ddd;
	cursor: pointer;
	padding: 4px;
	transition: color 0.2s;
	line-height: 1;
}
@media (max-width: 480px) {
	.cart-checkout-modal {
		padding: 10px;
	}
	.cart-checkout-modal__content {
		max-height: 95vh;
	}
}
@media (max-width: 480px) {
	.drawer {
		width: 88vw;
		max-width: 88vw;
	}
	.drawer-header {
		padding: 14px 16px;
	}
	.drawer-title {
		font-size: 14px;
	}
	.drawer-item-count {
		font-size: 12px;
	}
	.drawer-close-modern svg {
		width: 18px;
		height: 18px;
	}
	.cart-drawer-items {
		padding: 10px 14px;
	}
	.cart-drawer-item {
		gap: 12px;
		padding: 10px 0;
	}
	.cart-drawer-item__img {
		width: 54px;
		height: 54px;
		border-radius: 6px;
	}
	.cart-drawer-item__name {
		font-size: 11px;
		line-height: 1.3;
	}
	.cart-drawer-item__price {
		font-size: 12px;
		margin: 2px 0;
	}
	.cart-drawer-item__remove svg {
		width: 13px;
		height: 13px;
	}
	.cart-drawer-item__qty {
		border-radius: 5px;
	}
	.qty-btn {
		width: 26px;
		height: 26px;
		font-size: 14px;
	}
	.qty-value {
		width: 26px;
		line-height: 26px;
		font-size: 11px;
	}
	.cart-drawer-footer {
		padding: 12px 14px 14px;
	}
	.cart-drawer-footer__row {
		margin-bottom: 8px;
	}
	.cart-drawer-footer__label {
		font-size: 13px;
	}
	.cart-drawer-footer__value {
		font-size: 15px;
	}
	.cart-drawer-footer__checkout {
		padding: 12px;
		font-size: 13px;
		border-radius: 8px;
	}
	.cart-drawer-empty {
		padding: 50px 20px;
	}
	.cart-drawer-empty__icon {
		width: 60px;
		height: 60px;
	}
	.cart-drawer-empty__title {
		font-size: 15px;
	}
	.cart-drawer-empty__subtitle {
		font-size: 12px;
	}
	.cart-drawer-empty__btn {
		padding: 7px 16px;
		font-size: 11px;
	}
	.fly-to-cart-el {
		width: 32px;
		height: 32px;
	}
	.fly-to-cart-el svg {
		width: 14px;
		height: 14px;
	}
}
body.drawer-open {
	overflow: hidden;
}
