/* =============================================
   CART PAGE — Complete Visual Redesign
   ============================================= */

.cart-page {
	padding: 40px 0 80px;
	background: #F5F2EE;
	min-height: 75vh;
}

.cart-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ── Page Header ── */

.cart-header-section {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 32px;
	padding-bottom: 16px;
	border-bottom: 2px solid #E8E2DA;
}

.cart-page-title {
	font-size: 28px;
	font-weight: 700;
	color: #1A1A2E;
	margin: 0;
	letter-spacing: -0.3px;
}

.cart-count-label {
	font-size: 14px;
	color: #8B7F74;
	margin: 0;
	background: #EDE8E2;
	padding: 4px 14px;
	border-radius: 20px;
}

/* ── Layout (items + summary) ── */

.cart-layout {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 32px;
	align-items: start;
}

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

/* ── Animations ── */

@keyframes fadeUp {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
	from { opacity: 0; transform: translateY(-10px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulseOnce {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.15); }
	100% { transform: scale(1); }
}

@keyframes slideOut {
	to { opacity: 0; transform: translateX(60px) scale(0.95); }
}

@keyframes shimmer {
	0%   { background-position: -200px 0; }
	100% { background-position: calc(200px + 100%) 0; }
}

@keyframes checkmark {
	0%   { stroke-dashoffset: 24; }
	100% { stroke-dashoffset: 0; }
}

.cart-item-card.removing {
	animation: slideOut 0.35s ease forwards;
	pointer-events: none;
}

/* ── Empty State ── */

.cart-empty-state {
	grid-column: 1 / -1;
	text-align: center;
	padding: 100px 20px;
	animation: fadeUp 0.5s ease-out;
}

.cart-empty-state .empty-icon {
	margin-bottom: 24px;
	display: inline-block;
	background: #EDE8E2;
	padding: 32px;
	border-radius: 50%;
}

.cart-empty-state h3 {
	font-size: 24px;
	font-weight: 700;
	color: #1A1A2E;
	margin: 0 0 8px;
}

.cart-empty-state p {
	font-size: 15px;
	color: #8B7F74;
	margin: 0 0 28px;
}

.btn-shop-now {
	display: inline-block;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: #1A1A2E;
	padding: 14px 40px;
	border-radius: 100px;
	text-decoration: none;
	transition: all 0.25s;
	box-shadow: 0 4px 14px rgba(26, 26, 46, 0.15);
}

.btn-shop-now:hover {
	background: #2D2D4E;
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(26, 26, 46, 0.2);
	color: #fff;
}

/* ── Cart Item Card ── */

.cart-item-card {
	display: flex;
	align-items: center;
	gap: 24px;
	background: #fff;
	border-radius: 16px;
	padding: 20px 24px;
	margin-bottom: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
	transition: box-shadow 0.25s, transform 0.2s;
	animation: fadeUp 0.45s ease-out backwards;
	position: relative;
}

.cart-item-card:nth-child(1) { animation-delay: 0.04s; }
.cart-item-card:nth-child(2) { animation-delay: 0.08s; }
.cart-item-card:nth-child(3) { animation-delay: 0.12s; }
.cart-item-card:nth-child(4) { animation-delay: 0.16s; }
.cart-item-card:nth-child(5) { animation-delay: 0.20s; }
.cart-item-card:nth-child(6) { animation-delay: 0.24s; }
.cart-item-card:nth-child(7) { animation-delay: 0.28s; }
.cart-item-card:nth-child(8) { animation-delay: 0.32s; }

.cart-item-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	transform: translateY(-1px);
}

/* Stock badge */

.stock-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 600;
	color: #0B6E4F;
	background: #E0F5EC;
	padding: 3px 10px;
	border-radius: 20px;
	margin-bottom: 8px;
	letter-spacing: 0.2px;
}

/* Image */

.cart-item-image {
	flex-shrink: 0;
	width: 100px;
	height: 100px;
	border-radius: 12px;
	overflow: hidden;
	background: #F5F2EE;
	border: 1px solid #EDE8E2;
}

.cart-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s;
}

.cart-item-card:hover .cart-item-image img {
	transform: scale(1.05);
}

/* Details */

.cart-item-details {
	flex: 1;
	min-width: 0;
}

.cart-item-name {
	font-size: 16px;
	font-weight: 600;
	color: #1A1A2E;
	text-decoration: none;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	transition: color 0.2s;
	margin-bottom: 2px;
	line-height: 1.4;
}

.cart-item-name:hover {
	color: #E85D3A;
}

.cart-item-price {
	font-size: 15px;
	font-weight: 500;
	color: #8B7F74;
	margin-bottom: 14px;
}

/* Actions row */

.cart-item-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Quantity Selector */

.qty-selector {
	display: inline-flex;
	align-items: center;
	border: 1px solid #E8E2DA;
	border-radius: 100px;
	overflow: hidden;
	background: #F9F7F5;
}

.qty-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: none;
	background: transparent;
	color: #6B5F55;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	padding: 0;
	border-radius: 50%;
}

.qty-btn:hover {
	background: #EDE8E2;
	color: #1A1A2E;
}

.qty-btn:disabled {
	opacity: 0.25;
	cursor: not-allowed;
}

.qty-btn:disabled:hover {
	background: transparent;
	color: #6B5F55;
}

.qty-value {
	font-size: 14px;
	font-weight: 600;
	color: #1A1A2E;
	min-width: 30px;
	text-align: center;
	user-select: none;
}

.qty-value.pulse {
	animation: pulseOnce 0.3s ease;
	color: #E85D3A;
}

/* Remove Button */

.btn-remove {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	font-weight: 500;
	color: #B8A9A0;
	background: transparent;
	border: none;
	padding: 6px 10px;
	cursor: pointer;
	transition: all 0.2s;
	border-radius: 8px;
}

.btn-remove:hover {
	color: #DC2626;
	background: #FEF2F2;
}

.btn-remove svg {
	transition: transform 0.2s;
}

.btn-remove:hover svg {
	transform: scale(1.15);
}

/* Save for later button */

.btn-save-later {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	font-weight: 500;
	color: #B8A9A0;
	background: transparent;
	border: none;
	padding: 6px 10px;
	cursor: pointer;
	transition: all 0.2s;
	border-radius: 8px;
}

.btn-save-later:hover {
	color: #E85D3A;
	background: #FDF2ED;
}

/* Item Total */

.cart-item-total {
	flex-shrink: 0;
	text-align: right;
	min-width: 110px;
}

.cart-item-total .total-label {
	display: block;
	font-size: 11px;
	font-weight: 500;
	color: #B8A9A0;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	margin-bottom: 2px;
}

.cart-item-total .total-value {
	font-size: 18px;
	font-weight: 700;
	color: #1A1A2E;
}

/* Divider between items */

.cart-items-divider {
	height: 1px;
	background: #EDE8E2;
	margin: 0 0 12px;
}

@media (max-width: 768px) {
	.cart-item-card {
		flex-wrap: wrap;
		padding: 16px;
		gap: 16px;
	}

	.cart-item-image {
		width: 80px;
		height: 80px;
	}

	.cart-item-total {
		width: 100%;
		text-align: left;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		padding-top: 14px;
		border-top: 1px dashed #EDE8E2;
	}

	.cart-item-total .total-label {
		margin-bottom: 0;
	}
}

/* ── Order Summary ── */

.cart-summary {
	position: sticky;
	top: 24px;
	animation: fadeUp 0.5s ease-out 0.1s backwards;
}

.summary-card {
	background: #fff;
	border-radius: 16px;
	padding: 28px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.summary-title {
	font-size: 18px;
	font-weight: 700;
	color: #1A1A2E;
	margin: 0 0 20px;
	letter-spacing: -0.2px;
}

.summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 15px;
	color: #6B5F55;
	padding: 8px 0;
}

.shipping-note {
	font-size: 13px;
	color: #B8A9A0;
}

.summary-divider {
	height: 1px;
	background: #EDE8E2;
	margin: 12px 0;
}

.summary-total {
	font-size: 17px;
	font-weight: 700;
	color: #1A1A2E;
	padding-bottom: 20px;
}

/* ── Shipping Info Toggle ── */

.shipping-info {
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid #EDE8E2;
}

.shipping-info-header {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 500;
	color: #8B7F74;
	cursor: pointer;
	padding: 4px 0;
	transition: color 0.2s;
	user-select: none;
}

.shipping-info-header:hover {
	color: #1A1A2E;
}

.shipping-info-header .chevron {
	margin-left: auto;
	transition: transform 0.25s;
}

.shipping-info-header .chevron.open {
	transform: rotate(180deg);
}

.shipping-info-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 10px;
	padding: 12px;
	background: #F9F7F5;
	border-radius: 10px;
	animation: fadeUp 0.2s ease-out;
}

.shipping-rate {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	color: #6B5F55;
	padding: 4px 0;
}

.shipping-rate span:first-child {
	font-weight: 500;
}

.shipping-rate span:last-child {
	font-weight: 600;
	color: #1A1A2E;
	font-feature-settings: "tnum";
}

.shipping-note-cod {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: #E85D3A;
	background: #FDF2ED;
	padding: 6px 10px;
	border-radius: 6px;
	margin-top: 4px;
}

/* ── Coupon Section ── */

.coupon-section {
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid #EDE8E2;
}

.coupon-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 500;
	color: #E85D3A;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	transition: color 0.2s;
}

.coupon-toggle:hover {
	color: #D14D2A;
}

.coupon-input-group {
	display: flex;
	gap: 8px;
	margin-top: 12px;
	animation: fadeUp 0.25s ease-out;
}

.coupon-input {
	flex: 1;
	font-size: 14px;
	padding: 10px 14px;
	border: 1px solid #E8E2DA;
	border-radius: 10px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	background: #F9F7F5;
}

.coupon-input:focus {
	border-color: #E85D3A;
	box-shadow: 0 0 0 3px rgba(232, 93, 58, 0.1);
	background: #fff;
}

.coupon-apply-btn {
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: #1A1A2E;
	border: none;
	border-radius: 10px;
	padding: 10px 20px;
	cursor: pointer;
	transition: background 0.2s;
	white-space: nowrap;
}

.coupon-apply-btn:hover {
	background: #2D2D4E;
}

/* Buttons */

.btn-checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(135deg, #1A1A2E, #2D2D4E);
	padding: 16px 0;
	border-radius: 12px;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: all 0.25s;
	margin-bottom: 12px;
	box-shadow: 0 4px 14px rgba(26, 26, 46, 0.15);
}

.btn-checkout:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 28px rgba(26, 26, 46, 0.2);
	color: #fff;
}

.btn-checkout svg {
	transition: transform 0.2s;
}

.btn-checkout:hover svg {
	transform: translateX(3px);
}

.btn-continue-shopping {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	font-size: 14px;
	font-weight: 500;
	color: #8B7F74;
	background: #F5F2EE;
	padding: 12px 0;
	border-radius: 12px;
	text-decoration: none;
	transition: all 0.2s;
}

.btn-continue-shopping:hover {
	color: #1A1A2E;
	background: #EDE8E2;
}

/* ── Skeleton Loading ── */

.skeleton-card {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 20px 24px;
	margin-bottom: 12px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.skeleton-image {
	width: 100px;
	height: 100px;
	border-radius: 12px;
	background: linear-gradient(90deg, #F0EDE9 25%, #E8E2DA 50%, #F0EDE9 75%);
	background-size: 200px 100%;
	animation: shimmer 1.5s infinite;
	flex-shrink: 0;
}

.skeleton-lines {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.skeleton-line {
	height: 14px;
	border-radius: 4px;
	background: linear-gradient(90deg, #F0EDE9 25%, #E8E2DA 50%, #F0EDE9 75%);
	background-size: 200px 100%;
	animation: shimmer 1.5s infinite;
}

.skeleton-line:first-child { width: 55%; height: 16px; }
.skeleton-line:nth-child(2) { width: 35%; }
.skeleton-line:nth-child(3) { width: 45%; }

/* ── Undo Toast ── */

.undo-toast {
	position: fixed;
	bottom: 28px;
	left: 50%;
	transform: translateX(-50%) translateY(80px);
	font-size: 14px;
	font-weight: 500;
	color: #fff;
	background: #1A1A2E;
	padding: 14px 24px;
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba(26, 26, 46, 0.25);
	display: flex;
	align-items: center;
	gap: 16px;
	opacity: 0;
	transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
	z-index: 9999;
	pointer-events: none;
}

.undo-toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
	pointer-events: auto;
}

.undo-btn {
	font-size: 14px;
	font-weight: 700;
	color: #F7B267;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px 12px;
	border-radius: 8px;
	transition: background 0.15s;
}

.undo-btn:hover {
	background: rgba(255, 255, 255, 0.08);
}

/* ── Page title (backward compat with other pages) ── */

.page-title-two {
	background: #F5F2EE;
	padding: 24px 0;
	text-align: center;
}

.page-title-two h1 {
	color: #1A1A2E;
	font-size: 26px;
	font-weight: 700;
	margin: 0;
}

/* ── Responsive ── */

@media (max-width: 576px) {
	.cart-page {
		padding: 20px 0 48px;
	}

	.cart-container {
		padding: 0 16px;
	}

	.cart-header-section {
		flex-direction: column;
		gap: 8px;
	}

	.cart-page-title {
		font-size: 24px;
	}

	.cart-item-card {
		padding: 14px;
		gap: 14px;
	}

	.cart-item-image {
		width: 70px;
		height: 70px;
	}

	.summary-card {
		padding: 20px;
	}

	.cart-item-actions {
		flex-wrap: wrap;
	}

	.btn-save-later {
		padding: 4px 8px;
	}
}
