:root {
	--color-main: #0277bd;
	--delay-global: 300ms;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	padding: 0;
	margin: 0;
	width: 100%;
	background: white;
	font-size: 16px;
}

p {
	padding-left: 1em;
}

main {
	padding: 5em 0 2em 0;
}

.header {
	margin: 0 auto;
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 1;
	box-shadow: 0 0 10px rgba(0,0,0,0.7);
	transition-duration: 1s;
}

.header__logo {
	flex: 1 0 auto;
	padding: 10px;
	font-size: 2em;
	color: #ff5c8d;
}

.header__nav {
	flex: 1 0 auto;
}

.header__menu {
	background-color: #0277bd;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: white;
}

.header__menu a {
	text-decoration: none;
	color: inherit;
}

.nav__list {
	display: flex;
	justify-content: space-around;
	margin: 0;
	padding: 0;
	display: flex;
	flex: 1 0 auto;
	list-style-type: none;
	border-right: 1px solid darkgray;
}

.nav__item {
	position: relative;	
	margin: 0 1em;
	text-align: center;
	transition-duration: var(--delay-global);	
}

.nav__item a {
	display: block;
	width: 100%;
}

.nav__item::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: white;
	transform: scaleX(0);
	transform-origin: bottom right;
	transition: transform var(--delay-global) ease-out;
}

.nav__item:hover::after {
	transform: scale(1);
	transform-origin: bottom left;
} 

.nav__button {
	position: relative;
	margin-left: 20px;
	margin-right: 20px;
}
.button {
	padding: 1em 2em;
	background-color: #ff5c8d;
	border: none;
	line-height: 0;

	text-transform: uppercase;
	font-weight: bold;
	color: white;

	cursor: pointer;
	transition: var(--delay-global);
}

.button_remove {
	padding: 1em;
}

.button_minus {
	transform: scale(0);
	
	padding: 0;
	width: 1.5em;
	height: 1.5em;
	border-radius: 0.5em;

	font-size: 1em;
}

.button_plus {
	transform: scale(0);

	padding: 0;
	width: 1.5em;
	height: 1.5em;
	border-radius: 0.5em;
	background-color: #0277bd;

	font-size: 1em;	
}

.button_delete {
	padding: 0;
	width: 1.5em;
	height: 1.5em;

	font-size: 0.6em;
}

.button:hover {
	opacity: 0.6;
}

.is-visible {
	transform: scale(1);
}


.mobile-show {
	display: none;
}

.footer {
	position: fixed;
	bottom: 0;
	padding: 0.5em 1.5em;
	border-top-right-radius: 1em;
	background-color: var(--color-main);
	font-size: 0.7em;
	color: white;
	opacity: 0.8;
}

.amount {
	position: absolute;
	bottom: -10px;
	right: -10px;
	padding: 1px;
	background: white;
	font-size: 0.8em;
	font-weight: 500;
	width: 25px;
	height: 25px;
	border-radius: 50%;
	transform: translate(50%, 50%);
	color: var(--color-main);
	text-align: center;
	line-height: 25px;
	box-shadow: 0 0 5px rgba(0,0,0,0.4);
	transform: scale(0);
	transition-duration: var(--delay-global);
}

.amount_visible {
	transform: scale(1);	
}

.catalog {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
	padding: 10px;
	transition-duration: var(--delay-global);	
}

.catalog_smooth {
	opacity: 0.3;
}

.catalog__item {
	display: block;
	margin: 0 10px 30px 10px;
	flex: 0 0 auto;
}

.cat {
	position: relative;
	cursor: pointer;
}

.cat:not(.cat_added):hover .cat__plus {
	transform: scale(1);
}

.cat_added {
	opacity: 0.3;
	cursor: default;
}

.cat__photo {
	display: flex;
	align-items: center;
	justify-content: space-around;
	height: 200px;
	width: 200px;
	background-color: aquamarine;
	border-radius: 20px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.3);	
	user-select: none;
}

.cat__img {
	position: relative;
	width: 180px;
	height: 180px;
	line-height: 180px;
	min-height: 180px;
	min-width: 180px;
	object-fit: cover;
	font-size: 0.8em;
	color: darkgray;
	text-align: center;
	transition-duration: var(--delay-global);
}

.cat__price {
	position: absolute;
	top: 15px;
	left: 15px;
	padding: 5px 10px;
	background-color: rgba(255,255,255,0.7);
	border-radius: 10px;
	font-size: 0.8em;
}

.cat__price::before {
	content: 'For Sale: ';
	font-weight: bold;
}

.cat__price::after {
	content: '$';
}

.cat__plus {
	transform: scale(0);
	position: absolute;
	width: 20%;
	height: 20%;
	top: 7%;
	right: 7%;
	border-radius: 100%;
	filter: drop-shadow(-2px 2px 2px rgba(0,0,0,0.5));
	transition: var(--delay-global);
}

.cat__info {
	display: flex;
	padding-left: 1em;
	padding-top: 0.4em;
}

.cat__name {
	font-weight: bold;
	padding-right: 10px;
}

.cat__category {
	font-style: italic;
}

.cat__category::before {
	content: "·";
	padding-right: 10px;
}

.cart-zone {
	display: flex;
	justify-content: space-around;
	align-items: center;
	visibility: hidden;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	z-index: 10;
	border: dotted 2px var(--color-main);
	background-color: rgba(255, 255, 255, 0.9);
	color: var(--color-main);
}

.cart {
	position: fixed;
	top: 5em;
	right: -1000%;
	width: 280px;
	background-color: white;	
	box-shadow: -5px 5px 10px rgba(0,0,0,0.3), 0 0 10px rgba(0,0,0,0.3);
	transition-duration: var(--delay-global);
}

.cart__header {
	background-color: #ff5c8d;
	font-size: 1.2em;
	font-weight: bold;
	text-transform: uppercase;
	color: white;
}

.cart__title {
	display: inline-block;
	padding: 0.5em 1em;	

}

.cart__close {
	display: inline-block;
	position: absolute;
	top: 0;
	right: 0;
	padding: 0.5em 1em;
	background-color: #0277bd;
	user-select: none;
	transition: ease-in var(--delay-global);
}

.cart__close:hover {
	cursor: pointer;
	background-color:white;
	color: #ff5c8d;
}

.cart__body {
	position: relative;
	padding: 2em 2em 0 2em;
	max-height: 40vh;	
	overflow: auto;	
}

.cart__item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 1em;
	padding-bottom: 0.5em;
	border-bottom: 1px dotted gray;
	user-select: none;
}

.cart__item:first-child {
	padding-top: 0;
}

.cart__item:last-child {
	border: none;
}

.cart__name {
	flex: 1;
}

.cart__control {
	display: flex;
}

.cart__amount {
	width: 2em;
	text-align: center;
}

.cart__delete {
	margin-right: 1em;
}

.cart__footer {
	padding: 1em 2em;
	text-align: center;
}

.cart__cost {
	margin-bottom: 1em;
	width: 100%;
	text-align: right;
}

.cart__total {
	font-size: 1.1em;
	font-weight: bold;
	color: var(--color-main);
}

.cart_visible {
	top: 5em;
	right: 2em;
}

.cart_empty .cart__body {
	padding-bottom: 2em;
}

.cart_empty .cart__body:before {
	content: "No item in the cart :( Please add any item(s).";
}

.cart_empty .cart__footer {
	display: none;
}

.infinity-scroll {
	text-align: center;
}

.donut-loader {
	display: inline-block;
	border: 4px solid rgba(0, 0, 0, 0.1);
	border-left-color: var(--color-main);
	border-radius: 50%;
	width: 50px;
	height: 50px;
	animation: donut-spin 1.2s linear infinite;
}

@keyframes donut-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media screen and (max-width: 480px)  {
	.nav__list {
		display: none;
	}
	
	.cat__photo {
		height: 150px;
		width: 150px;
	}

	.cat__img {
		width: 130px;
		height: 130px;
		line-height: 130px;
		min-height: 130px;
		min-width: 130px;
	}

	.cat__price {
		font-size: 0.6em;
	}

	.cat__info {
		font-size: 0.8em;
		flex-wrap: wrap;
	}
	
}

@media screen and (min-width: 1024px)  {
	.cat__photo {
		height: 300px;
		width: 300px;
	}

	.cat__img {
		width: 280px;
		height: 280px;
		line-height: 280px;
		min-height: 280px;
		min-width: 280px;
	}
	
}