/* ==========================================================
   DIGBANG SHOP LAYOUT
========================================================== */

.db-shop__catalog {
	width: 1320px;
	max-width: calc(100% - 64px);

	margin: 56px auto 0;
}


.db-shop__container {
	display: grid;

	/*
	 * صفحه RTL است:
	 * ستون اول = سمت راست = Sidebar
	 * ستون دوم = سمت چپ = Products
	 */
	grid-template-columns: 280px minmax(0, 1016px);

	column-gap: 24px;

	align-items: start;

	width: 100%;
}


/* ==========================================================
   PRODUCTS
========================================================== */

.db-shop-products {
	width: 1016px;
	max-width: 100%;

	min-width: 0;
}


/* ==========================================================
   PRODUCTS GRID
========================================================== */

.db-shop-products__grid {
	display: grid;

	grid-template-columns: repeat(3, 312px);

	column-gap: 24px;
	row-gap: 24px;

	justify-content: start;

	width: 100%;
}


/* ==========================================================
   SIDEBAR
========================================================== */

.db-shop-sidebar {
	width: 280px;
}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1199px) {

	.db-shop__catalog {
		width: calc(100% - 48px);
		max-width: none;

		margin-top: 48px;
	}


	.db-shop__container {
		grid-template-columns: 240px minmax(0, 1fr);

		column-gap: 20px;
	}


	.db-shop-sidebar {
		width: 240px;
	}


	.db-shop-products {
		width: 100%;
	}


	.db-shop-products__grid {
		grid-template-columns:
			repeat(
				2,
				minmax(0, 1fr)
			);

		column-gap: 20px;
		row-gap: 20px;
	}

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 767px) {

	.db-shop__catalog {
		width: calc(100% - 32px);
		max-width: none;

		margin: 32px auto 0;
	}


	.db-shop__container {
		display: flex;
		flex-direction: column;

		width: 100%;

		gap: 24px;
	}


	.db-shop-sidebar {
		width: 100%;
	}


	.db-shop-products {
		width: 100%;
		max-width: none;

		min-width: 0;
	}


	.db-shop-products__grid {
	display: grid;

	grid-template-columns: 1fr;

	width: 100%;

	column-gap: 0;
	row-gap: 16px;

	justify-content: stretch;
	justify-items: center;
}

}