.ctc-cart-page {
	--ctc-bg: #f0f1f3;
	--ctc-card-bg: #ffffff;
	--ctc-text: #111827;
	--ctc-text-muted: #6b7280;
	--ctc-border: #e5e7eb;
	--ctc-red: #ef4444;
	--ctc-radius-lg: 22px;
	--ctc-radius-md: 14px;

	background: var(--ctc-bg);
	border-radius: 28px;
	padding: 28px;
	max-width: 1200px;
	margin: 0 auto;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
	color: var(--ctc-text);
}

.ctc-cart-page * {
	box-sizing: border-box;
}

.ctc-cart-heading {
	margin-bottom: 18px;
}

.ctc-cart-title {
	font-size: 26px;
	font-weight: 700;
	margin: 0;
}

.ctc-cart-layout {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 24px;
	align-items: start;
}

.ctc-cart-left {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

/* ===== Select bar ===== */

.ctc-select-bar {
	background: var(--ctc-card-bg);
	border-radius: var(--ctc-radius-lg);
	padding: 16px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ctc-select-label-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
}

.ctc-checkbox {
	width: 18px;
	height: 18px;
	accent-color: #111827;
	cursor: pointer;
	flex-shrink: 0;
}

.ctc-delete-btn {
	position: relative;
	background: #111827;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 9px 22px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
}

.ctc-delete-btn:hover:not(:disabled) {
	background: #000;
}

.ctc-delete-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* ===== Items card ===== */

.ctc-items-card {
	background: var(--ctc-card-bg);
	border-radius: var(--ctc-radius-lg);
	padding: 8px 20px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ctc-item-row {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 18px 0;
	transition: opacity 0.2s ease;
}

.ctc-item-row.ctc-row-loading {
	opacity: 0.55;
	pointer-events: none;
}

.ctc-item-divider {
	height: 1px;
	background: var(--ctc-border);
}

.ctc-item-row .ctc-checkbox {
	margin-top: 30px;
}

.ctc-item-image {
	width: 76px;
	height: 76px;
	border-radius: 14px;
	background: #f3f4f6;
	overflow: hidden;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ctc-item-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ctc-item-body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ctc-item-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}

.ctc-item-name {
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 4px;
}

.ctc-item-attr {
	font-size: 13px;
	color: var(--ctc-text-muted);
	line-height: 1.5;
}

.ctc-attr-label {
	color: var(--ctc-text);
	font-weight: 600;
}

.ctc-item-delete {
	background: transparent;
	border: none;
	color: var(--ctc-red);
	cursor: pointer;
	padding: 6px;
	border-radius: 8px;
	flex-shrink: 0;
	transition: background 0.15s ease;
	display: flex;
}

.ctc-item-delete:hover {
	background: #fee2e2;
}

.ctc-item-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.ctc-item-price {
	font-weight: 700;
	font-size: 15px;
}

.ctc-qty-stepper {
	display: flex;
	align-items: center;
	gap: 2px;
	background: #f3f4f6;
	border-radius: 999px;
	padding: 4px;
}

.ctc-qty-btn {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: none;
	background: transparent;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #111827;
	transition: background 0.15s ease;
}

.ctc-qty-btn:hover {
	background: #e5e7eb;
}

.ctc-qty-value {
	min-width: 22px;
	text-align: center;
	font-weight: 700;
	font-size: 14px;
}

/* ===== Order summary ===== */

.ctc-summary-card {
	background: var(--ctc-card-bg);
	border-radius: var(--ctc-radius-lg);
	padding: 22px 22px 24px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	position: sticky;
	top: 20px;
}

.ctc-summary-title {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 16px;
}

.ctc-coupon-row {
	display: flex;
	gap: 8px;
}

.ctc-coupon-input-wrap {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f3f4f6;
	border-radius: 999px;
	padding: 0 14px;
}

.ctc-coupon-icon {
	color: var(--ctc-text-muted);
	flex-shrink: 0;
}

#ctc-coupon-input {
	border: none;
	background: transparent;
	outline: none;
	padding: 11px 0;
	font-size: 13px;
	width: 100%;
	color: var(--ctc-text);
}

#ctc-coupon-input::placeholder {
	color: #9ca3af;
}

.ctc-apply-btn {
	position: relative;
	background: #111827;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 0 20px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease;
}

.ctc-apply-btn:hover {
	background: #000;
}

.ctc-coupon-message {
	font-size: 12.5px;
	margin-top: 8px;
	opacity: 0;
	height: 0;
	overflow: hidden;
	transition: opacity 0.2s ease;
}

.ctc-coupon-message.active {
	opacity: 1;
	height: auto;
	margin-bottom: 4px;
}

.ctc-coupon-message.ctc-msg-success {
	color: #16a34a;
}

.ctc-coupon-message.ctc-msg-error {
	color: var(--ctc-red);
}

.ctc-applied-coupon {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #f0fdf4;
	color: #16a34a;
	font-size: 12.5px;
	font-weight: 600;
	padding: 8px 12px;
	border-radius: 10px;
	margin-top: 10px;
}

.ctc-remove-coupon {
	background: transparent;
	border: none;
	color: #16a34a;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 0 0 0 8px;
}

.ctc-summary-rows {
	margin-top: 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ctc-summary-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 14px;
	color: var(--ctc-text-muted);
}

.ctc-summary-row span:last-child {
	color: var(--ctc-text);
	font-weight: 600;
}

.ctc-discount-row span:last-child {
	color: var(--ctc-red) !important;
}

.ctc-summary-total-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 17px;
	font-weight: 700;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--ctc-border);
}

.ctc-checkout-btn {
	margin-top: 20px;
	width: 100%;
	background: #111827;
	color: #fff;
	border: none;
	border-radius: var(--ctc-radius-md);
	padding: 15px;
	font-size: 14px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.1s ease;
}

.ctc-checkout-btn:hover {
	background: #000;
	color: #fff;
}

.ctc-checkout-btn:active {
	transform: scale(0.98);
}

/* ===== Button loading state (Delete / Apply) ===== */

.ctc-btn-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -7px 0 0 -7px;
	animation: ctc-cart-spin 0.6s linear infinite;
}

@keyframes ctc-cart-spin {
	to {
		transform: rotate(360deg);
	}
}

.ctc-loading .ctc-btn-text {
	opacity: 0;
}

.ctc-loading .ctc-btn-spinner {
	display: block;
}

/* ===== Empty cart ===== */

.ctc-cart-empty {
	background: var(--ctc-card-bg);
	border-radius: var(--ctc-radius-lg);
	padding: 60px 24px;
	text-align: center;
	color: var(--ctc-text-muted);
}

.ctc-cart-empty-icon {
	color: #9ca3af;
	margin-bottom: 14px;
}

.ctc-cart-empty h2 {
	font-size: 20px;
	color: var(--ctc-text);
	margin: 0 0 6px;
}

.ctc-cart-empty p {
	font-size: 14px;
	margin: 0 0 20px;
}

.ctc-cart-empty-btn {
	display: inline-block;
	background: #111827;
	color: #fff;
	text-decoration: none;
	padding: 12px 26px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
}

.ctc-cart-empty-btn:hover {
	background: #000;
	color: #fff;
}

/* ===== Responsive ===== */

@media (max-width: 900px) {
	.ctc-cart-layout {
		grid-template-columns: 1fr;
	}

	.ctc-summary-card {
		position: static;
	}
}

@media (max-width: 560px) {
	.ctc-cart-page {
		padding: 16px;
		border-radius: 20px;
	}

	.ctc-cart-title {
		font-size: 21px;
	}

	.ctc-select-bar,
	.ctc-items-card,
	.ctc-summary-card {
		border-radius: 16px;
	}

	.ctc-select-bar {
		padding: 13px 16px;
	}

	.ctc-items-card {
		padding: 4px 14px;
	}

	.ctc-item-row {
		gap: 10px;
		padding: 14px 0;
	}

	.ctc-item-row .ctc-checkbox {
		margin-top: 24px;
	}

	.ctc-item-image {
		width: 60px;
		height: 60px;
		border-radius: 10px;
	}

	.ctc-item-name {
		font-size: 14px;
	}

	.ctc-item-attr {
		font-size: 12px;
	}

	.ctc-item-price {
		font-size: 14px;
	}

	.ctc-summary-card {
		padding: 18px 16px 20px;
	}
}
