/* ── Cart ── */
.cart-wrapper {
	position: relative;
	margin-right: 16px;
}

.cart-toggle {
	background: none;
	border: none;
	cursor: pointer;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
	color: #fff;
	transition: opacity 0.2s;
}

.cart-toggle:hover {
	opacity: 0.8;
}

.cart-toggle:focus,
.cart-toggle:focus-visible {
	outline: none;
	box-shadow: none;
}

.cart-count {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #d5fb7b;
	color: #191919;
	font-size: 0.6rem;
	font-weight: 700;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* ── Cart Dropdown Panel ── */
.cart-panel {
	position: absolute;
	top: calc(100% + 12px);
	right: -16px;
	width: 340px;
	max-width: calc(100vw - 24px);
	background: #191919;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
	z-index: 100;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	pointer-events: none;
}

@media (max-width: 768px) {
	.cart-panel {
		position: fixed;
		top: 72px;
		right: 12px;
		left: 12px;
		width: auto;
		max-width: none;
	}
}

.cart-panel.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.cart-panel-heading {
	font-family: 'Archivo', sans-serif;
	font-size: 18px;
	font-weight: 700;
	color: #fff;
	text-transform: uppercase;
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.cart-empty {
	font-family: 'Archivo', sans-serif;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.5);
}

.cart-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	font-family: 'Archivo', sans-serif;
	font-size: 14px;
	color: #fff;
}

.cart-item:last-child {
	border-bottom: none;
}

.cart-item-title {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 500;
}

.cart-item-price {
	font-weight: 700;
	white-space: nowrap;
	color: #d5fb7b;
}

.cart-item-remove {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 16px;
	color: rgba(255, 255, 255, 0.4);
	padding: 0 2px;
	line-height: 1;
	transition: color 0.15s;
}

.cart-item-remove:hover {
	color: #fff;
}

.cart-panel-total {
	font-family: 'Archivo', sans-serif;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	text-align: right;
	padding-top: 12px;
	margin-top: 4px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.cart-panel-discount {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #d5fb7b;
	margin-bottom: 2px;
}

.cart-panel-total-amount {
	display: block;
}

.cart-checkout.cew-btn {
	margin-top: 16px;
	justify-content: center;
	text-decoration: none;
	display: flex !important;
}

.cart-email {
	width: 100%;
	padding: 0.5rem;
	margin-top: 0.75rem;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	font-size: 0.85rem;
	outline: none;
	transition: border-color 0.2s;
}

.cart-email:focus {
	border-color: #111;
}

.cart-email--error {
	border-color: #c00;
}

.cart-checkout:not(.cew-btn) {
	width: 100%;
	padding: 0.6rem;
	margin-top: 0.75rem;
	background: #111;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.cart-checkout:hover {
	background: #333;
}

.cart-checkout:disabled {
	background: #999;
	cursor: default;
}

/* Cart checkout link styled as button (legacy, non cew-btn) */
a.cart-checkout:not(.cew-btn) {
	display: block;
	width: 100%;
	padding: 0.6rem;
	margin-top: 0.75rem;
	background: #111;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	text-align: center;
	text-decoration: none;
}

a.cart-checkout:not(.cew-btn):hover {
	background: #333;
}
