/*---------------------------------------------------------------*
 * 1. General Styles and Color Definitions
 * 2. Mixins
 * 3. Image Container
 * 4. Shop Widget
 * 5. Shop Button
 *---------------------------------------------------------------*/

/*---------------------------------------------------------------*
 * 1. General Styles and Color Definitions
 *---------------------------------------------------------------*/

$black: #000000;
$white: #ffffff;
$gray: #676869;
$active-blue: #2190ff;
$inactive-blue: #0080ff;
$red: #ff0000;
$drop-shadow: 5px 5px 5px -5px $black;
$open-sans: 'open sans',
sans-serif;
.frenzy-loading-indicator {
	background: $black;
	top: 0;
	padding: 10px;
	display: inline-block;
	position: absolute;
	display: none;
	z-index: 10000000;
	height: 25px;
	max-width: 60px;

	img {
		vertical-align: middle;
	}
}

.frenzy-strong {
	font-weight: bold;
	color: $white;
}

#frenzy-sale-ribbon,
#frenzy-sold-out-button {
	display: none;
}


.frenzy-position-above {
	z-index: 10000005;
}

.frenzy-position-under {
	z-index: -1;
}

/*---------------------------------------------------------------*
 * 2. Mixins
 *---------------------------------------------------------------*/

@mixin navigation-shadow() {
	transition: 0.3s;
	border-radius: 80px;
	background-color: #888;
	box-shadow: 2px 2px 5px 0px $black;
	-moz-box-shadow: 2px 2px 5px 0px $black;
	-webkit-box-shadow: 2px 2px 5px 0px $black;
	-o-box-shadow: 2px 2px 5px 0px $black;
}

/*---------------------------------------------------------------*
 * 3. Image Container
 *---------------------------------------------------------------*/

.frenzy-image {
	position: relative;
	padding: 0;
	margin: 0;
	-webkit-transition: all 0.50s;
	transition: all 0.50s;

	img[data-frenzy] {
		position: static !important;
	}

	.no-touch & {
		&:hover {
			filter: brightness(105%);
			-webkit-filter: brightness(105%);
			-moz-filter: brightness(105%);
			-o-filter: brightness(105%);
			-ms-filter: brightness(105%);
			-webkit-transition: all 0.50s;
			transition: all 0.50s;

			.frenzy-shop-button:last-child {
				display: block;

				span {
					display: block;
				}
			}
		}
	}
}

div[data-sale="true"] {
	color: $red !important;
}

div[data-no-shopsimilar="true"] {
	opacity: 0.5;
	cursor: default;
}

/*---------------------------------------------------------------*
 * 4. Shop Widget
 *---------------------------------------------------------------*/

.frenzy-shop-content {
	cursor: move;
	color: $black;
	text-align: center;
	background-color: #fff;
	border: 2px solid $black;
	box-shadow: $drop-shadow;
	width: 80%;
	height: 80%;
	position: fixed;
	overflow: hidden;
	border-radius: 10px;
	font-family: $open-sans;
	z-index: 10000000; // We have to use a high number because extensions use higher.
	display: flex;
	flex-direction: column;
	justify-content: center;

	div {
		font-family: $open-sans;
	}

	&.hidden {
		display: none;
	}

	@media screen and (min-height: 440px) {
		height: 420px;
	}
	@media screen and (min-width: 960px) {
		width: 630px;
	}
}

#frenzy-loading-gif {
	margin-top: 25%;
	width: 100px;
	height: 100px;
	opacity: 0.5;
}

#frenzy-close-on {
	display: none;
}

.frenzy-back-button {
	display: none;
	position: absolute;
	top: 0;
	right: 0;
	width: 30px;
	height: 30px;
	margin: 10px;
	border: none;
	border-radius: 15px;
	background: $gray url('../../images/icon-back.png') no-repeat center;
	background-size: 100%;
	cursor: pointer;
	z-index: 999;

	&:hover {
		opacity: 1;
	}
}

#frenzy-shopsimilar {
	display: none;
}

#frenzy-shopsimilar-producer {
	width: auto;
}

.frenzy-navigate-left {
	left: 10px;
	transition: 0.3s;
	background: url("../../images/product-carousel-arrow.png") no-repeat white;
	background-size: 82%;
	background-position: 5px;
	transform: rotate(180deg);

	&:hover {
		@include navigation-shadow();
	}
}

.frenzy-navigate-right {
	right: 10px;
	transition: 0.3s;
	background: url("../../images/product-carousel-arrow.png") no-repeat white;
	background-size: 82%;
	background-position: 5px;

	&:hover {
		@include navigation-shadow();
	}
}

.frenzy-carousel-navigation {
	cursor: pointer;
	z-index: 100;
	padding: 0;
	width: 40px;
	height: 40px;
	border-radius: 20px;
	overflow: hidden;
	display: flex;
	justify-content: center;
	align-items: center;
	position: absolute;
	top: 50%;
	margin-top: -20px;

	img {
		width: 70%;
	}

	&:hover {
		opacity: 0.7;
	}
}

.powered-by-fetch {
	position: absolute;
	bottom: 10px;
	width: 100%;
	z-index: 10;

	a {
		color: #000;
	}
}

.frenzy-close-button {
	cursor: pointer;
	position: absolute;
	top: 0;
	right: 0;
	z-index: 500;
	display: none;
	margin: 10px 10px 0 0;
	padding: 0;
	width: 30px;
	height: 30px;
	color: #000;
	overflow: hidden;
	font-size: 20px;
	font-weight: bold;
	background: url('../../images/icon-close.png') no-repeat center;
	background-size: 70%;
}

.frenzy-content-wrapper,
.frenzy-content,
.frenzy-image-list,
.frenzy-image-list li,
.frenzy-images-shopsimilar,
.frenzy-images-shopsimilar li {
	height: 100%;
}

.frenzy-images-shopsimilar,
.frenzy-images-shopsimilar li {
	@media screen and (min-height: 440px) {
		height: calc(100% - 66px); // 100% - (shopsimilar control box height)
	}
}

.frenzy-image-list,
.frenzy-images-shopsimilar {
	list-style-type: none;
	padding: 0;
	width: 100%;
	display: flex;
	align-items: center;
	z-index: 1;
	position: relative;
	margin: 0;

	li {
		width: 400px;
		min-width: 400px;
		margin: 0;
		transition: all 0.4s;
		position: relative;
		display: flex;
		flex-direction: column;
		justify-content: center;
		// Landscape mode.
		@media screen and (min-height: 300px) {
			@media screen and (min-device-width: 375px) {
				margin-left: calc(50% - 200px);
			}
			@media screen and (min-width: 768px) {
			}
		}

		// Portrait mode.
		@media screen and (min-height: 440px) {
			height: 420px;
			width: 180px;
			min-width: 180px;
			margin-left: calc(50% - 90px);
			@media screen and (min-width: 768px) {
				margin-left: 40px;
				width: 160px;
			}
		}

		&.outside {
			margin-left: -400px;

			.frenzy-single-image {
				overflow: hidden;
			}

			@media screen and (min-height: 440px) {
				margin-left: -180px;
			}
		}

		&.active {
			@media screen and (min-width: 768px) {
				margin-left: 130px;
			}
			@media screen and (min-width: 768px) and (min-height: 440px) {
				margin-left: 100px;
			}
		}
	}

	img {
		z-index: 10000000;
		background: $white;
		margin: 0;
		max-width: 100%;
	}

	.frenzy-single-image {
		overflow: visible;
	}
}

.frenzy-brand,
.frenzy-item-title,
.frenzy-price {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: $black;
	width: 100%;
	box-sizing: border-box;
}

.frenzy-single-image {
	height: 100%;
	top: 0;
}

.frenzy-images-shopsimilar {
	li {
		@media screen and (min-height: 440px) {
			height: 320px;
		}
	}
}

.frenzy-brand,
.frenzy-item-title,
.frenzy-price,
.frenzy-buy-button,
.frenzy-shopsimilar-button {
	max-width: 45%;
	box-sizing: border-box;
	@media screen and (min-height: 440px) {
		max-width: none;
		margin-left: auto;
		margin-right: auto;
	}

	&.frenzy-shopsimilar-button-off {
		display: none;
	}
}

.frenzy-price {
	@media screen and (max-width: 768px) {
		font-size: 28px;
		height: auto;
	}
}

.frenzy-shopsimilar {
	display: none;
}

.frenzy-brand,
.frenzy-price {
	line-height: 1;
	font-size: 14px;
	height: 14px;
}

.frenzy-price {
	margin-bottom: 10px;
	@media screen and (min-height: 440px) {
		margin-bottom: 0;
	}
}

.frenzy-sold-out {
	background: $black;

	&:hover {
		background: $gray;
	}
}

.frenzy-single-image {
	background: $white;
	margin: 0;
	position: absolute;
	right: 0;
	max-width: 190px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	@media screen and (min-height: 440px) {
		position: relative;
		height: 180px;
		max-height: none;
		margin: 10px auto;
		max-width: none;
	}

	.frenzy-clothing {
		max-height: 100%;
		max-width: 100%;
	}

	.frenzy-clothing.frenzy-on-sale-safari {
		transform: translateY(0%);
	}

	.frenzy-sale-ribbon {
		z-index: 10000005;
		background: transparent;
		border: 0;
		display: inherit;
		margin-bottom: -50%;
		position: absolute;
		top: -4px;
		right: -7px;
	}

	.frenzy-shopsimilar-button {
		float: left;
		position: relative;
		margin-top: 50px;
	}
}

.frenzy-shopsimilar-button {
	border: 1px solid $white;
	cursor: pointer;
	padding: 8px;
	text-transform: uppercase;
	font-size: 10px;
	border-radius: 10px;
	transition: all 0.3s;
	display: block;
	width: 100%;
	color: $white;

	&:hover {
		background-color: $white;
		color: $gray;
	}
}

.frenzy-item-title {
	font-size: 12px;
	height: 24px;
}

#frenzy-permalink {
	display: none;
}

.product-inner {
	display: flex;
	flex-direction: column;
}

.frenzy-buy-button {
	background: $inactive-blue;
	position: relative;
	padding: 8px;
	color: $white;
	border: 0;
	border-radius: 10px;
	font-size: 12px;
	text-transform: uppercase;
	margin: 0;
	margin-bottom: 10px;
	box-shadow: 0 0 0 0;
	display: block;
	z-index: 10000005;

	&:hover {
		background: $active-blue;
	}

	&.no-shopsimilar-items {
		margin: 1.5em 0;
	}
}

.frenzy-sold-out {
	background: $black;
	color: white;

	&:hover {
		background: $gray;
	}
}

// Shop Similar Controls
.frenzy-shopsimilar-controls {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-bottom: 10px;
	margin-top: 20px;
	z-index: 5;

	span,
	label {
		color: $white;
	}

	span {
		font-weight: bold;
		width: 100px;
		display: inline-block;
		text-align: center;
	}

	label {
		padding: 0 5px 0 5px;
		display: inline-block;
	}

	&.hidden {
		display: none;
	}

	// Landscape mode.
	@media screen and (min-height: 300px) and (max-height: 439px) {
		@media screen and (min-width: 375px) {
			position: absolute;
			margin-left: 10px;
			margin-top: 10px;
			top: 0;
			left: 0;
			display: block;
		}
	}
}

.frenzy-shopsimilar-filters {
	background-color: $gray;
	font-size: 10px;
	color: #fff;
	text-transform: uppercase;
	border: none;
	padding: 10px;
	height: 38px;
	width: 90%;
	border-radius: 10px;
	-webkit-appearance: none;
	cursor: pointer;
	z-index: 999;
	@media screen and (min-width: 768px) {
		margin-right: 30px;
	}
}

.frenzy-shopsimilar-filters-container {
	position: relative;
	width: 100%;
	max-width: 150px;

	&::after {
		content: "";
		position: absolute;
		top: 13px;
		right: 25px;
		border: solid #fff;
		border-width: 0 2px 2px 0;
		display: inline-block;
		padding: 3px;
		transform: rotate(45deg);
		-webkit-transform: rotate(45deg);
	}
}

.frenzy-shopsimilar-prices {
	display: none;

	label {
		text-transform: uppercase;
		font-size: 10px;
		color: #fff;
	}

	@media screen and (min-width: 768px) and (min-height: 440px) {
		display: block;
	}
}

.frenzy-sort {
	border: 2px solid $gray;
	background-color: transparent;
	color: $white;
	font-size: 10px;
	padding: 10px;
	border-radius: 10px;
	text-transform: uppercase;
	cursor: pointer;

	&.active {
		background-color: $gray;
	}
}

.frenzy-sort-low {
	margin-right: 10px;
}

/*---------------------------------------------------------------*
 * 5. Shop Button
 *---------------------------------------------------------------*/

.frenzy-shop-button {
	color: white;
	text-align: center;
	width: 25px;
	height: 25px;
	line-height: 30px;
	border-radius: 15px;
	display: flex;
	justify-content: center;
	align-items: center;
	position: absolute;
	overflow: hidden;
	cursor: pointer;
	background: #424242 url('../../images/icon-shop-dark.png') center no-repeat;
	background-position: 0 center;
	transition: all 0.3s;

	.no-touch & {
		&:hover {
			background-color: $gray;
		}
	}

	&.open {
		border-radius: 25px;
		width: 155px;

		span {
			display: block;
		}
	}

	span {
		display: none;
	}

	&.hover-only {
		display: none;

		// If they have the 'hover only' option checked, we need to ignore that on mobile.
		.mobile & {
			display: block;
		}
	}

	span {
		position: absolute;
		width: 100%;
		max-width: 165px;
		left: 8px;
		font-family: $open-sans;
		font-size: 11px;
		text-transform: uppercase;
	}
}

.position-top {
	top: 8px;
	margin-top: 0;
}

.position-bottom {
	bottom: 8px;
	margin-bottom: 0;
}

.position-left {
	left: 8px;
	margin-left: 0;
}

.position-right {
	right: 8px;
	margin-right: 0;
}

.hidden {
	display: none;
}

.frenzy-product-carousel {
	position: relative;
	overflow: hidden;

	.fetch-single-image {
		max-width: 100%;
		height: 220px;
		vertical-align: bottom;
		position: relative;
		margin-bottom: 30px;

		img {
			height: auto;
			bottom: 0;
			position: absolute;
		}
	}

	.fetch-item-title {
		text-overflow: ellipsis;
		display: block;
		overflow: hidden;
		white-space: nowrap;
	}
}

.frenzy-product-carousel .frenzy-image img {
	height: 200px;
}

.frenzy-product-carousel .frenzy-navigate-right,
.frenzy-product-carousel .frenzy-navigate-left {
	background: url('../../images/product-carousel-arrow.png') no-repeat white;
	background-size: 82%;
	background-position: 5px;
}

.frenzy-product-carousel .frenzy-navigate-left {
	transform: rotate(180deg);
}

ul.fetch-product-grid {
	box-sizing: border-box;

	&.products {
		padding-left: 0;
		display: flex;
		flex-wrap: wrap;
		text-align: center;
	}

	&.columns-4 .product {
		width: 24.9%;
	}

	&.columns-3 .product {
		width: 32.9%;
	}

	&.columns-2 .product {
		width: 49.9%;
	}

	&.columns-1 .product {
		width: 100%;
	}

	.product {
		list-style-type: none;
		box-sizing: border-box;
	}

	.fetch-product-grid-image {
		height: 200px;
	}
}

.clearfix::after {
	content: "";
	clear: both;
	display: table;
}
