@font-face {
font-family: IRANSansWeb;
src: url(fonts/IRANSansWeb.woff) format("woff");
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: #f6f7f9;
	color: #C03;
	font-family: IRANSansWeb;
}

.cart-page {
	max-width: 1250px;
	margin: 40px auto;
	padding: 0 20px 50px;
}

/* Header */

.cart-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 25px;
}

.cart-title {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
}

.cart-count {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 30px;
	padding: 9px 16px;
	font-size: 14px;
	color: #555;
}

/* Layout */

.cart-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 350px;
	gap: 25px;
	align-items: start;
}

/* Cart items */

.cart-items-box {
	background: #fff;
	border-radius: 18px;
	border: 1px solid #e7e8eb;
	overflow: hidden;
}

.cart-item {
	display: grid;
	grid-template-columns: 110px minmax(0, 1fr) auto;
	gap: 20px;
	padding: 22px;
	border-bottom: 1px solid #eee;
	position: relative;
	transition: opacity .2s ease, transform .2s ease;
}

.cart-item:last-child {
	border-bottom: 0;
}

.cart-item.removing {
	opacity: 0;
	transform: translateX(20px);
}

/* Image */

.cart-item-image {
	width: 110px;
	height: 110px;
	border-radius: 14px;
	overflow: hidden;
	background: #f4f4f4;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cart-item-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Product */

.cart-item-info {
	min-width: 0;
}

.cart-item-name {
	margin: 0 0 10px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.7;
}

.cart-item-price {
	color: #555;
	font-size: 14px;
	margin-bottom: 15px;
}

.cart-item-price strong {
	color: #C03;
	font-size: 16px;
}

.price-changed {
	display: none;
	margin-top: 8px;
	padding: 8px 10px;
	border-radius: 8px;
	background: #fff7e6;
	color: #a15c00;
	font-size: 12px;
}

.stock-warning {
	display: none;
	margin-top: 8px;
	padding: 8px 10px;
	border-radius: 8px;
	background: #fff0f0;
	color: #c62828;
	font-size: 12px;
}

/* Quantity */

.quantity-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
}

.quantity-box {
	display: flex;
	align-items: center;
	border: 1px solid #ddd;
	border-radius: 10px;
	overflow: hidden;
	height: 42px;
}

.quantity-btn {
	width: 40px;
	height: 40px;
	border: 0;
	background: #f8f8f8;
	cursor: pointer;
	font-size: 19px;
	transition: background .15s;
}

.quantity-btn:hover {
	background: #eee;
}

.quantity-value {
	min-width: 42px;
	text-align: center;
	font-weight: 700;
}

/* Right */

.cart-item-side {
	min-width: 130px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
	gap: 15px;
}

.item-total {
	font-size: 18px;
	font-weight: 700;
	white-space: nowrap;
}

.remove-btn {
	border: 0;
	background: transparent;
	color: #d32f2f;
	cursor: pointer;
	font-size: 13px;
	padding: 5px;
}

.remove-btn:hover {
	text-decoration: underline;
}

/* Summary */

.cart-summary {
	background: #fff;
	border: 1px solid #e7e8eb;
	border-radius: 18px;
	padding: 24px;
	position: sticky;
	top: 20px;
}

.summary-title {
	margin: 0 0 22px;
	font-size: 19px;
	font-weight: 700;
}

.summary-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	color: #555;
	font-size: 14px;
}

.summary-total {
	margin-top: 12px;
	padding-top: 18px;
	border-top: 1px solid #eee;
	font-size: 19px;
	color: #C03;
	font-weight: 700;
}

.checkout-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 52px;
	margin-top: 22px;
	border: 0;
	border-radius: 12px;
	background: #C03;
	color: #fff;
	text-decoration: none;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity .2s;
}

.checkout-btn:hover {
	opacity: .9;
}

.continue-shopping {
	display: block;
	text-align: center;
	margin-top: 15px;
	color: #555;
	text-decoration: none;
	font-size: 13px;
}

.continue-shopping:hover {
	color: #111;
}

/* Empty */

.empty-cart {
	background: #fff;
	border: 1px solid #e7e8eb;
	border-radius: 18px;
	padding: 70px 20px;
	text-align: center;
}

.empty-icon {
	font-size: 55px;
	margin-bottom: 20px;
}

.empty-cart h2 {
	margin: 0 0 10px;
	font-size: 23px;
}

.empty-cart p {
	margin: 0 0 25px;
	color: #777;
	font-size: 14px;
}

.empty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 25px;
	border-radius: 10px;
	background: #C03;
	color: #fff;
	text-decoration: none;
}

/* Toast */

.cart-toast {
	position: fixed;
	left: 25px;
	bottom: 25px;
	background: #C03;
	color: #fff;
	padding: 13px 18px;
	border-radius: 10px;
	font-size: 13px;
	opacity: 0;
	transform: translateY(15px);
	pointer-events: none;
	transition: all .25s ease;
	z-index: 9999;
}

.cart-toast.show {
	opacity: 1;
	transform: translateY(0);
}

.cart-toast.error {
	background: #c62828;
}

/* Loading */

.cart-loading {
	opacity: .55;
	pointer-events: none;
}

/* Mobile */

@media (max-width: 850px) {

	.cart-layout {
		grid-template-columns: 1fr;
	}

	.cart-summary {
		position: static;
	}

}

@media (max-width: 600px) {

	.cart-page {
		margin: 20px auto;
		padding: 0 12px 35px;
	}

	.cart-header {
		margin-bottom: 15px;
	}

	.cart-title {
		font-size: 22px;
	}

	.cart-count {
		padding: 7px 11px;
		font-size: 12px;
	}

	.cart-item {
		grid-template-columns: 80px minmax(0, 1fr);
		gap: 13px;
		padding: 15px;
	}

	.cart-item-image {
		width: 80px;
		height: 80px;
	}

	.cart-item-name {
		font-size: 14px;
		margin-bottom: 5px;
	}

	.cart-item-price {
		margin-bottom: 10px;
		font-size: 12px;
	}

	.cart-item-side {
		grid-column: 1 / -1;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding-top: 5px;
	}

	.item-total {
		font-size: 16px;
	}

	.quantity-box {
		height: 38px;
	}

	.quantity-btn {
		width: 36px;
		height: 36px;
	}

	.quantity-value {
		min-width: 35px;
	}

	.cart-summary {
		padding: 18px;
	}

}

