/* ==========================================================
   DIGBANG CART — FILLED STATE
========================================================== */

.db-cart-filled {
	width: 100%;

	padding: 64px 0 88px;

	background: #FFFFFF;
}


/* ==========================================================
   MAIN CONTAINER
========================================================== */

.db-cart-filled__container {
	display: grid;

	/*
	 * RTL:
	 * ستون اول = محصولات سمت راست
	 * ستون دوم = صورت حساب سمت چپ
	 */
	grid-template-columns: 1fr 391px;

	column-gap: 64px;

	width: 1320px;

	margin: 0 auto;

	align-items: start;
}


/* ==========================================================
   PRODUCTS COLUMN
========================================================== */

.db-cart-filled__products {
	width: 100%;
	min-width: 0;
}


/* ==========================================================
   PRODUCTS HEADER
========================================================== */

.db-cart-filled__products-header {
	display: flex;
	align-items: center;

	width: 100%;

	margin-bottom: 48px;
}


/* ==========================================================
   PRODUCTS HEADING
========================================================== */

.db-cart-filled__products-heading {
	display: flex;
	align-items: baseline;

	gap: 16px;
}


/* ==========================================================
   CART TITLE
========================================================== */

.db-cart-filled__title {
	margin: 0;

	font-family: "Vazirmatn", sans-serif;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.5;

	color: #8E7D71;
}


/* ==========================================================
   CART COUNT
========================================================== */

.db-cart-filled__count {
	margin: 0;

	font-family: "Vazirmatn", sans-serif;
	font-size: 16px;
	font-weight: 300;
	line-height: 1.5;

	color: #B8A292;

	white-space: nowrap;
}


/* ==========================================================
   CLEAR CART BUTTON
========================================================== */

.db-cart-filled__clear {
	display: inline-flex;
	align-items: center;

	margin-right: 130px;

	padding: 0;

	background: transparent;
	color: #B8A292;

	border: 0;

	font-family: "Vazirmatn", sans-serif;
	font-size: 16px;
	font-weight: 300;
	line-height: 1.5;

	cursor: pointer;

	gap: 12px;

	transition:
		color 0.2s ease,
		opacity 0.2s ease;
}


.db-cart-filled__clear::after {
	content: "";

	display: block;
	flex: 0 0 16px;

	width: 16px;
	height: 16px;

	background:
		url("../../images/cart/trash.svg")
		center / contain
		no-repeat;
}


.db-cart-filled__clear:hover {
	color: #CC5200;
}


.db-cart-filled__clear.is-loading,
.db-cart-filled__clear:disabled {
	opacity: 0.5;

	cursor: default;
}


/* ==========================================================
   ITEMS
========================================================== */

.db-cart-filled__items {
	display: flex;
	flex-direction: column;

	width: 100%;

	gap: 10px;
}


/* ==========================================================
   PRODUCT ROW
========================================================== */

.db-cart-item {
	position: relative;

	display: grid;

	grid-template-columns:
		234px
		minmax(0, 1fr)
		99.67px
		minmax(0, 1fr)
		minmax(0, 1fr);

	grid-template-areas:
		"image total quantity price name";

	column-gap: 48px;

	align-items: start;

	width: 865px;
	height: 230px;

	padding: 0;

	background: #FFFFFF;

	border: 0;
	border-radius: 28px;

	overflow: hidden;

	direction: ltr;

	transition:
		box-shadow 0.2s ease,
		opacity 0.2s ease,
		transform 0.2s ease;
}


.db-cart-item:hover {
	box-shadow:
		0 6px 20px rgba(246, 237, 222, 1);
}


.db-cart-item__image {
	grid-area: image;
}


.db-cart-item__name {
	grid-area: name;

	direction: rtl;
}


.db-cart-item__price {
	grid-area: price;

	direction: rtl;
}


.db-cart-item__quantity {
	grid-area: quantity;

	direction: rtl;
}


.db-cart-item__total {
	grid-area: total;

	direction: rtl;
}


/* ==========================================================
   PRODUCT IMAGE
========================================================== */

.db-cart-item__image {
	position: relative;

	width: 234px;
	height: 230px;

	overflow: hidden;

	background: #F9F9F9;

	border-radius: 24px 0 0 24px;
}


.db-cart-item__image a {
	display: block;

	width: 100%;
	height: 100%;
}


.db-cart-item__image img {
	display: block;

	width: 100%;
	height: 100%;

	object-fit: cover;
}


/* ==========================================================
   ITEM COLUMNS
========================================================== */

.db-cart-item__name,
.db-cart-item__price,
.db-cart-item__quantity,
.db-cart-item__total {
	min-width: 0;

	padding-top: 64px;
}


/* ==========================================================
   LABELS
========================================================== */

.db-cart-item__label {
	display: block;

	margin: 0;

	font-family: "Vazirmatn", sans-serif;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.5;

	color: #3D3631;

	white-space: nowrap;
}


/* ==========================================================
   PRODUCT NAME
========================================================== */

.db-cart-item__name {
	padding-right: 24px;

	text-align: right;
}


.db-cart-item__product-name {
	display: block;

	margin-top: 48px;

	font-family: "Vazirmatn", sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;

	color: #3D3631;

	text-align: right;

	text-decoration: none;
}


.db-cart-item__product-name:hover {
	color: #CC5200;
}


/* ==========================================================
   PRICE
========================================================== */

.db-cart-item__price,
.db-cart-item__quantity,
.db-cart-item__total {
	text-align: center;
}


.db-cart-item__value {
	display: block;

	margin-top: 48px;

	font-family: "Vazirmatn", sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;

	color: #3D3631;

	text-align: center;

	white-space: nowrap;
}

/* ==========================================================
   PRODUCT PRICE FORMAT
========================================================== */

.db-cart-item__price-value {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	gap: 4px;

	direction: rtl;
}

.db-cart-item__amount {
	order: 1;
	direction: ltr;
}

.db-cart-item__currency {
	order: 2;
	direction: rtl;
}

/* ==========================================================
   QUANTITY
========================================================== */

.db-cart-item__quantity-control {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	box-sizing: border-box;

	width: 99.67px;
	height: 32px;

	margin-top: 44px;

	padding: 4.98px 14.93px;

	background: #FFFFFF;

	border: 0.62px solid #3D3631;
	border-radius: 4.98px;

	gap: 19.91px;

direction: ltr;

	transition: opacity 0.2s ease;
}


.db-cart-item__quantity-button {
	display: flex;
	align-items: center;
	justify-content: center;

	flex: 0 0 auto;

	width: auto;
	height: auto;

	padding: 0;

	background: transparent;
	color: #3D3631;

	border: 0;

	font-family: "Vazirmatn", sans-serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;

	cursor: pointer;
}


.db-cart-item__quantity-button:hover {
	background: transparent;
}


.db-cart-item__quantity-number {
	display: flex;
	align-items: center;
	justify-content: center;

	flex: 0 0 auto;

	width: auto;
	height: auto;

	font-family: "Vazirmatn", sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;

	color: #3D3631;
}


.db-cart-item__quantity-control.is-loading {
	opacity: 0.65;
}


/* ==========================================================
   REMOVE ITEM
========================================================== */

.db-cart-item__remove {
	position: absolute;

	left: 16px;
	bottom: 16px;

	display: block;

	width: 24px;
	height: 24px;

	padding: 0;

	background-color: #C8B7A8;

	-webkit-mask:
		url("../../images/cart/trash.svg")
		center / 24px 24px
		no-repeat;

	mask:
		url("../../images/cart/trash.svg")
		center / 24px 24px
		no-repeat;

	border: 0;

	font-size: 0;
	line-height: 0;

	cursor: pointer;

	opacity: 1;

	transition:
		background-color 0.2s ease,
		opacity 0.2s ease;
}


.db-cart-item:hover .db-cart-item__remove {
	background-color: #FF6600;
}


.db-cart-item__remove:hover {
	opacity: 1;
}


.db-cart-item__remove:disabled {
	opacity: 0.4;

	cursor: default;
}
/* ==========================================================
   SUMMARY COLUMN
========================================================== */

.db-cart-filled__summary {
	width: 391px;
}


/* ==========================================================
   SUMMARY TITLE
========================================================== */

.db-cart-filled__summary-title {
	margin: 0 0 48px;

	font-family: "Vazirmatn", sans-serif;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.5;

	color: #8E7D71;
}


/* ==========================================================
   CART SUMMARY
========================================================== */

.db-cart-summary {
	box-sizing: border-box;

	display: flex;
	flex-direction: column;

	width: 391px;
	height: 297px;

	padding: 30px 24px 24px;

	background: #FDF6F6;

	border-radius: 24px;

	direction: rtl;
}


/* ==========================================================
   SUMMARY ROW
========================================================== */

.db-cart-summary__row {
	display: flex;
	align-items: center;
	justify-content: space-between;

	width: 100%;

	margin: 0;
}


/* ==========================================================
   PRODUCTS PRICE
========================================================== */

.db-cart-summary__row:first-child {
	padding-left: 6px;
}


.db-cart-summary__row:first-child .db-cart-summary__label {
	font-family: "Vazirmatn", sans-serif;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.5;

	color: #3D3631;
}


.db-cart-summary__row:first-child .db-cart-summary__value {
	font-family: "Vazirmatn", sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;

	color: #3D3631;

	white-space: nowrap;
}


/* ==========================================================
   DISCOUNT
========================================================== */

.db-cart-summary__row:nth-child(2) {
	margin-top: 32px;
}


.db-cart-summary__row:nth-child(2) .db-cart-summary__label {
	font-family: "Vazirmatn", sans-serif;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.5;

	color: #FF4400;
}


.db-cart-summary__row:nth-child(2) .db-cart-summary__value {
	font-family: "Vazirmatn", sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;

	color: #FF4400;

	white-space: nowrap;
}


/* ==========================================================
   DIVIDER
========================================================== */

.db-cart-summary__divider {
	display: none;
}


/* ==========================================================
   TOTAL
========================================================== */

.db-cart-summary__row--total {
	margin-top: 32px;
}


.db-cart-summary__row--total .db-cart-summary__label {
	font-family: "Vazirmatn", sans-serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.5;

	color: #3D3631;
}


.db-cart-summary__row--total .db-cart-summary__value {
	font-family: "Vazirmatn", sans-serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.5;

	color: #3D3631;

	white-space: nowrap;
}


/* ==========================================================
   CHECKOUT BUTTON
========================================================== */

.db-cart-summary__button {
	display: flex;
	align-items: center;
	justify-content: center;

	flex: 0 0 49px;

	width: 343px;
	height: 49px;

	/*
	 * باقی فضای کارت اینجا جذب می‌شود
	 * تا دکمه دقیقاً 24px از پایین بماند.
	 */
	margin-top: auto;

	padding: 0;

	background: #FF6600;
	color: #FFFFFF;

	border: 0;
	border-radius: 5.23px;

	font-family: "Vazirmatn", sans-serif;
	font-size: 18px;
	font-weight: 600;
	line-height: 1;

	text-decoration: none;

	transition:
		background-color 0.2s ease,
		color 0.2s ease;
}


.db-cart-summary__button:hover,
.db-cart-summary__button:focus-visible {
	background: #CC5200;
	color: #FFFFFF;
}


/* ==========================================================
   SHIPPING NOTE
========================================================== */

.db-cart-summary__shipping-note {
	width: 391px;

	margin: 32px 0 0;

	font-family: "Vazirmatn", sans-serif;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.5;

	color: #8E7D71;

	text-align: center;
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1199px) {

	.db-cart-filled__container {
		grid-template-columns: 1fr 320px;

		width: calc(100% - 64px);

		column-gap: 32px;
	}


	.db-cart-filled__summary {
		width: 320px;
	}


	.db-cart-filled__clear {
		margin-right: auto;
	}


	.db-cart-item {
		grid-template-columns:
			140px
			minmax(100px, 1.2fr)
			minmax(90px, 1fr)
			90px
			minmax(90px, 1fr);

		column-gap: 16px;
	}


	.db-cart-item__image {
		width: 140px;
		height: 140px;

		border-radius: 18px;
	}


	.db-cart-item__label {
		font-size: 14px;
	}

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 767px) {

	.db-cart-filled {
		width: 100%;

		padding: 32px 16px 56px;

		overflow: hidden;

		box-sizing: border-box;
	}


	/* =========================
	   MAIN LAYOUT
	========================= */

	.db-cart-filled__container {
		display: flex;
		flex-direction: column;

		width: 100%;
		max-width: none;

		margin: 0;

		gap: 48px;
	}


	.db-cart-filled__products,
	.db-cart-filled__summary {
		width: 100%;
		min-width: 0;
	}


	/* =========================
	   PRODUCTS HEADER
	========================= */

	.db-cart-filled__products-header {
		display: flex;
		align-items: center;
		justify-content: space-between;

		width: 100%;

		margin-bottom: 24px;

		gap: 12px;
	}


	.db-cart-filled__products-heading {
		display: flex;
		align-items: baseline;

		min-width: 0;

		gap: 8px;
	}


	.db-cart-filled__title {
		font-size: 22px;

		white-space: nowrap;
	}


	.db-cart-filled__count {
		font-size: 13px;
	}


	.db-cart-filled__clear {
		flex: 0 0 auto;

		margin-right: auto;

		font-size: 12px;

		gap: 6px;
	}


	.db-cart-filled__clear::after {
		width: 14px;
		height: 14px;

		flex-basis: 14px;
	}


	/* =========================
	   ITEMS
	========================= */

	.db-cart-filled__items {
		width: 100%;

		gap: 16px;
	}


	/* =========================
   PRODUCT CARD
========================= */

.db-cart-item {
	display: grid;

	grid-template-columns: 96px minmax(0, 1fr);

	grid-template-areas:
		"image name"
		"image price"
		"image quantity"
		"image total";

	column-gap: 16px;
	row-gap: 10px;

	align-items: start;

	width: 100%;
	height: auto;
	min-height: 190px;

	padding: 16px 16px 40px;

	background: #FFFFFF;

	border-radius: 18px;

	overflow: hidden;

	direction: ltr;

	box-sizing: border-box;
}


.db-cart-item:hover {
	box-shadow:
		0 4px 16px rgba(246, 237, 222, 0.8);
}


/* =========================
   PRODUCT IMAGE
========================= */

.db-cart-item__image {
	grid-area: image;

	width: 96px;
	height: 96px;

	border-radius: 14px;

	overflow: hidden;
}


.db-cart-item__image img {
	width: 100%;
	height: 100%;

	object-fit: cover;
}


/* =========================
   PRODUCT INFO COLUMN
========================= */

.db-cart-item__name,
.db-cart-item__price,
.db-cart-item__quantity,
.db-cart-item__total {
	grid-column: 2;

	display: grid;

	grid-template-columns: 72px minmax(0, 1fr);

	align-items: center;

	column-gap: 8px;

	width: 100%;
	min-width: 0;

	padding: 0;

	direction: rtl;

	text-align: right;
}


/* جای هر ردیف در گرید */

.db-cart-item__name {
	grid-area: name;
}

.db-cart-item__price {
	grid-area: price;
}

.db-cart-item__quantity {
	grid-area: quantity;
}

.db-cart-item__total {
	grid-area: total;
}


/* =========================
   LABELS
========================= */

.db-cart-item__label {
	display: block;

	width: 72px;

	margin: 0;

	font-size: 12px;
	font-weight: 600;
	line-height: 1.7;

	text-align: right;

	white-space: nowrap;
}


/* =========================
   PRODUCT NAME
========================= */

.db-cart-item__product-name {
	display: block;

	width: 100%;

	margin: 0;

	font-size: 13px;
	line-height: 1.7;

	text-align: right;
}


/* =========================
   PRICE / TOTAL
========================= */

.db-cart-item__value {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;

	width: 100%;

	margin: 0;

	font-size: 13px;
	line-height: 1.7;

	text-align: right;

	white-space: nowrap;
}


.db-cart-item__price-value {
	display: inline-flex;

	font-size: 13px;
}


/* =========================
   QUANTITY
========================= */

.db-cart-item__quantity-control {
	width: 86px;
	height: 30px;

	margin: 0;

	padding: 4px 10px;

	gap: 14px;
}


.db-cart-item__quantity-button {
	font-size: 18px;
}


.db-cart-item__quantity-number {
	font-size: 14px;
}

	/* =========================
	   REMOVE
	========================= */

	.db-cart-item__remove {
		right: auto;
		left: 16px;
		bottom: 12px;

		width: 20px;
		height: 20px;

		-webkit-mask-size: 20px 20px;
		mask-size: 20px 20px;
	}


	/* =========================
	   SUMMARY
	========================= */

	.db-cart-filled__summary-title {
		margin-bottom: 24px;

		font-size: 22px;
	}


	.db-cart-summary {
		width: 100%;
		height: auto;
		min-height: 270px;

		padding: 24px 20px;

		border-radius: 20px;

		box-sizing: border-box;
	}


	.db-cart-summary__row:first-child .db-cart-summary__label,
	.db-cart-summary__row:first-child .db-cart-summary__value,
	.db-cart-summary__row:nth-child(2) .db-cart-summary__label,
	.db-cart-summary__row:nth-child(2) .db-cart-summary__value {
		font-size: 14px;
	}


	.db-cart-summary__row:nth-child(2) {
		margin-top: 24px;
	}


	.db-cart-summary__row--total {
		margin-top: 24px;
	}


	.db-cart-summary__row--total .db-cart-summary__label,
	.db-cart-summary__row--total .db-cart-summary__value {
		font-size: 17px;
	}


	/* =========================
	   CHECKOUT BUTTON
	========================= */

	.db-cart-summary__button {
		flex: 0 0 46px;

		width: 100%;
		height: 46px;

		margin-top: 32px;

		font-size: 14px;
	}


	/* =========================
	   SHIPPING NOTE
	========================= */

	.db-cart-summary__shipping-note {
		width: 100%;

		margin-top: 20px;

		font-size: 13px;
		line-height: 1.8;

		text-align: center;
	}

}
/* ==========================================================
   SUMMARY PRICE DIRECTION
========================================================== */

.db-cart-summary__value {
	display: inline-flex;
	align-items: center;
	gap: 4px;

	direction: rtl;

	white-space: nowrap;
}


.db-cart-summary__currency {
	order: 2;

	direction: rtl;
}


.db-cart-summary__amount {
	order: 1;

	direction: ltr;
}