

*::after,
*::before {
	box-sizing: border-box;
}



a {
	text-decoration: none;
	color: var(--color-link);
	outline: none;
}

a:hover,
a:focus {
	color: var(--color-link-hover);
	outline: none;
}

button:focus {
	outline: none;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
	content: '';
	position: fixed;
	z-index: 100000;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #333;
}

.js .loading::after {
	background: url(../img/electric-guitar.svg) no-repeat 50% 50%;
	background-size: 5em;
	pointer-events: none;
	opacity: 0.1;
	animation: loaderAnim 1s linear infinite alternate forwards;
}

@keyframes loaderAnim {
	to {
		opacity: 1;
	}
}

.hidden {
	position: absolute;
	overflow: hidden;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* Icons */
.icon {
	display: block;
	width: 2vw;
	height: 2vw;
	margin: 0 auto;
	fill: currentColor;
}

main {
	position: relative;
	width: 100%;
}

.content {
	position: relative;
	display: block;
}

/* Header */
.codrops-header {
	padding: 2em;
	position: relative;
	z-index: 100;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	align-items: center;
}

.codrops-header__title {
	font-size: 2em;
	font-weight: bold;
	margin: 0;
	padding: 0.75em 0;
}

.codrops-links {
	position: relative;
	display: flex;
	justify-content: center;
	text-align: center;
	white-space: nowrap;
}

.codrops-icon {
	display: inline-block;
	padding: 0.25em;
}

.info {
	color: var(--color-info);
	text-align: center;
}

.github {
	display: block;
}

.grid {

	position: relative;

	display: flex;align-items: center;

	grid-template-columns: repeat(var(--grid-columns), 1fr);
}

.grid__item {
	width: 25%;
}



.product {
	height: 100%;
	position: relative;
	cursor: pointer;
	display: flex;flex-direction: column;align-items: center;overflow: hidden;
}

.product__bg {
	height: 36vw;
	background: #d72823;
	position: relative;
}

.product__img {
	width: 100%;height: 100%;
	margin: 0 auto;
	display: block;
	position: absolute;
	top: 0;
	left: 0%;transition: all .5s;transition-timing-function:cubic-bezier(0.645, 0.045, 0.355, 1);
	pointer-events: none;
	/* filter: grayscale(100%); */
}

.product__title {
	position: relative;

	font-size: 1.75em;
	color: #fff;
	font-family: "Playfair Display", serif;
	font-weight: 700;text-align: center;
}

.product__subtitle {
	position: relative;
	margin: 20px 0;
	text-transform: uppercase;
	color: #fff;

	letter-spacing: 0.115em;text-align: center;font-weight: 100;font-size: 14px;
}



.product__description,
.product__price {
	opacity: 0;
	position: absolute;
}

.details {
	position: fixed;
	width: 100%;
	height: 100%;
	bottom: 0;
	left: 0;
	padding: 40vh 0 10vh 10vw;
	z-index: 1000111111;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	pointer-events: none;
	box-sizing: border-box;
}

.details--open {
	pointer-events: auto;
}

.details > * {
	position: relative;
	opacity: 0;
}

.details__bg {
	width: 100%;
	position: fixed;
	left: 0;
}

.details__bg--up {
	top: 0;
	height: 100vh;
	background: #fff;
}

.details__bg--down {
	top: 40vh;
	height: 60vh;
	background: #d72823;
}

.details__img {
	position: absolute;
	top: 10vh;
	right: 10vw;
	height: 80vh;
}

.details__bg,
.details__img {
	transform-origin: 0 0;
}

.details__title {
	margin: -1.5em 0 1.1em;
	font-size: 4.5em;
	color: var(--color-details-title);
	font-family: "Playfair Display", serif;
	font-weight: 700;
}

.details__subtitle {
	text-transform: uppercase;
	margin: 0.75em 0 1em 0;
	letter-spacing: 0.115em;
	font-size: 1.75em;
	color: #fff;
}

.details__description {
	line-height: 1.5;
	font-weight: bold;
	max-width: 50%;
	margin: 2em 0 0 0;
	color: #fff
}

.details__price {
	font-size: 2em;
	font-weight: bold;
	color: #fff
}

.details__addtocart {
	border: 0;
	margin: auto 0 0 0;
	background: rgba(255,255,255,.7);
	color: #d72823;
	padding: 0.75em 2em;
	font-weight: bold;transition: all .5s ease;
}

.details__addtocart:hover {
	background: rgba(255,255,255,1);color: #d72823;
}

.details__close {
	position: absolute;
	top: 0;
	right: 0;
	border: 0;
	background: none;
	margin: 2em;
	cursor: pointer;
	font-size: 0.85em;
	color: var(--color-close);
}

.dummy-menu {
	border: 0;
	background: none;
	padding: 0;
	position: fixed;
	top: 0;
	right: 50%;transform: translateX(50%);
	font-size: 0.85em;
	color: var(--color-close);
	cursor: pointer;
	z-index: 1000;
	top: 4vw;
}

.details__magnifier {
	border: 0;
	background: none;
	background: var(--color-bg-magnifier);
	color: var(--color-magnifier);
	padding: 1em;
	border-radius: 50%;
	position: absolute;
	z-index: 1000;
	right: calc(21.5vh + 10vw);
	top: 75vh;
	cursor: pointer;
	display: none;
}

.details__magnifier:hover {
	background: var(--color-btn-hover);
}

.details__deco {
	width: 7em;
	height: 20px;
	background-position: 50% 97%;
	background-size: 150%;display: none;
}

/* Related demos */
.content--related {
	padding: 8em 5vw;
	font-weight: bold;
	text-align: center;
	background: #000;
	color: #f0f0f0;
}

.content--related a:hover {
	color: #fff;
}

.content--related h2 {
	font-size: 1.25em;
}

.content--related .demos {
	padding-bottom: 3em;
}

.media-item {
	display: inline-block;
	padding: 1em;
	vertical-align: top;
	transition: color 0.3s;
}

.media-item__img {
	max-width: 100%;
	opacity: 0.8;
	transition: opacity 0.3s;
}

.media-item:hover .media-item__img,
.media-item:focus .media-item__img {
	opacity: 1;
}

.media-item__title {
	font-size: 1em;
	margin: 0;
	padding: 0.5em;
}

@media screen and (max-width: 40em) {
	.grid {
		padding: 0 1vw;
	}
	.grid__item {
		padding: 0 2vw;
	}
	.product__bg {
		height: 10em;
	}
	.product__img {
		max-height: 19em;
		
	}
	.product__title {
		font-size: 1.25em;
	}
	.product__subtitle {
		font-size: 0.75em;
	}
	.details {
		padding: 30vh 0 5vh 10vw;
	}
	.details__bg--down {
		top: 30vh;
		height: 70vh;
	}
	.details__title {
		font-size: 2em;
	}
	.details__subtitle {
		font-size: 1em;
	}
	.details__price {
		font-size: 1.5em;
	}
	.details__description {
		max-width: 70%;
		font-size: 0.85em;
		margin: 1em 0 0 0;
	}
	.details__deco {
		height: 7px;
		width: 4em;
	}
	.details__img {
		right: -12vh;
	}
	.details__magnifier {
		display: none;
	}
	.codrops-header {
		padding: 1em 4em;
	}
	.codrops-header__title {
		font-weight: bold;
		padding-bottom: 0.25em;
		text-align: center;
		font-size: 1.25em;
	}
	.dummy-menu {
		margin: 1.75em 1.5em 0 0;
	}
}


@media screen and (max-width: 992px) {
	.grid {flex-wrap: wrap;justify-content: space-between;}
	.grid__item {width: 49%;margin-bottom: 2vw;}
	.product__bg {height: 66vw;}
	.index-product .grid .product-wenzi {transform: translateY(0);}
	.product__subtitle {font-size: 2vw;}
	.product__title {font-size: 5vw;}
	.product-wenzi>div {width: 6vw;
		height: 6vw;}
}