/**
 * Beast Products Grid
 *
 * @package BeastThemesElements
 */

/* ==========================================================================
   Base
   ========================================================================== */

.beast-products-grid {
	--bpg-text: #ffffff;
	--bpg-muted: #9ca3b4;
	--bpg-border: rgba(255, 255, 255, 0.10);
	--bpg-card-bg: #0d1220;
	--bpg-accent: #7047e8;

	width: 100%;
	box-sizing: border-box;
}

.beast-products-grid *,
.beast-products-grid *::before,
.beast-products-grid *::after {
	box-sizing: border-box;
}

.beast-products-grid button,
.beast-products-grid input,
.beast-products-grid a {
	font-family: inherit;
}

.beast-products-grid button {
	margin: 0;
}

.beast-products-grid img {
	max-width: 100%;
}


/* ==========================================================================
   Accessibility
   ========================================================================== */

.beast-products-grid .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}


/* ==========================================================================
   Toolbar
   ========================================================================== */

.beast-products-grid__toolbar {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 42px;
}

.beast-products-grid__filters {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	min-width: 0;
}

.beast-products-grid__filter {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;

	padding: 8px 18px;

	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 999px;

	background: rgba(255, 255, 255, 0.035);
	color: #aab0c0;

	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;

	cursor: pointer;

	appearance: none;
	-webkit-appearance: none;

	outline: none;

	transition:
		color 0.25s ease,
		background-color 0.25s ease,
		background-image 0.25s ease,
		border-color 0.25s ease,
		box-shadow 0.25s ease,
		transform 0.25s ease;
}

.beast-products-grid__filter:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.075);
	border-color: rgba(255, 255, 255, 0.18);
}

.beast-products-grid__filter:focus-visible {
	outline: 2px solid rgba(124, 92, 246, 0.85);
	outline-offset: 3px;
}

.beast-products-grid__filter.is-active {
	color: #ffffff;
	background: linear-gradient(
		135deg,
		#3478ff 0%,
		#8b3dff 100%
	);
	border-color: transparent;
	box-shadow:
		0 6px 22px rgba(91, 54, 217, 0.20);
}

.beast-products-grid__filter.is-active:hover {
	color: #ffffff;
	border-color: transparent;
	transform: translateY(-1px);
}


/* ==========================================================================
   Search
   ========================================================================== */

.beast-products-grid__search {
	position: relative;
	flex: 0 1 255px;
	width: 255px;
	min-width: 0;
}

.beast-products-grid__search-icon {
	position: absolute;
	top: 50%;
	left: 16px;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	color: #8e96a8;
	font-size: 14px;
	line-height: 1;

	transform: translateY(-50%);

	pointer-events: none;
	z-index: 2;
}

.beast-products-grid__search-icon svg {
	display: block;
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.beast-products-grid__search-input {
	display: block;

	width: 100%;
	height: 40px;

	padding: 0 20px;

	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 999px;

	background: rgba(255, 255, 255, 0.04);
	color: #ffffff;

	font-size: 13px;
	line-height: 1.2;

	outline: none;

	-webkit-appearance: none;
	appearance: none;

	transition:
		border-color 0.25s ease,
		box-shadow 0.25s ease,
		background-color 0.25s ease;
}

.beast-products-grid__search-icon + .beast-products-grid__search-input {
	padding-left: 42px;
}

.beast-products-grid__search-input::placeholder {
	color: #8e96a8;
	opacity: 1;
}

.beast-products-grid__search-input:focus {
	border-color: #6d5dfc;
	box-shadow:
		0 0 0 3px rgba(109, 93, 252, 0.10);
}

.beast-products-grid__search-input::-webkit-search-cancel-button {
	cursor: pointer;
}


/* ==========================================================================
   Product Grid
   ========================================================================== */

.beast-products-grid__items {
	display: grid;

	grid-template-columns: repeat(3, minmax(0, 1fr));

	column-gap: 24px;
	row-gap: 24px;

	width: 100%;
}


/* ==========================================================================
   Product Card
   ========================================================================== */

.beast-products-grid__card {
	position: relative;

	display: flex;
	flex-direction: column;

	min-width: 0;

	overflow: hidden;

	background:
		linear-gradient(
			180deg,
			rgba(20, 25, 40, 0.96) 0%,
			rgba(8, 12, 22, 0.98) 100%
		);

	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 20px;

	box-shadow: none;

	transition:
		transform 0.30s ease,
		background-color 0.30s ease,
		background-image 0.30s ease,
		border-color 0.30s ease,
		box-shadow 0.30s ease;

	will-change: transform;
}

.beast-products-grid__card:hover {
	border-color: rgba(124, 58, 237, 0.45);

	transform: translateY(-5px);

	box-shadow:
		0 20px 60px rgba(0, 0, 0, 0.30),
		0 0 40px rgba(124, 58, 237, 0.08);
}

/* Full-card product links. */
.beast-products-grid__card--link {
	display: flex;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.beast-products-grid__card--link:hover,
.beast-products-grid__card--link:visited,
.beast-products-grid__card--link:active {
	color: inherit;
	text-decoration: none;
}

.beast-products-grid__card--link:focus {
	color: inherit;
	text-decoration: none;
	outline: none;
}

.beast-products-grid__card--link:focus-visible {
	outline: 2px solid rgba(124, 92, 246, 0.90);
	outline-offset: 4px;
}

.beast-products-grid__card--link .beast-products-grid__action {
	pointer-events: none;
}

.beast-products-grid__card.is-hidden {
	display: none !important;
}


/* ==========================================================================
   Product Preview
   ========================================================================== */

.beast-products-grid__preview {
	position: relative;

	display: flex;
	align-items: center;
	justify-content: center;

	width: auto;
	height: 224px;

	margin: 24px 24px 0;

	overflow: hidden;

	background:
		radial-gradient(
			circle at 100% 0%,
			rgba(124, 58, 237, 0.18),
			transparent 45%
		),
		#080c15;

	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 16px;

	isolation: isolate;
}

.beast-products-grid__preview::after {
	content: "";

	position: absolute;
	inset: 0;

	background:
		linear-gradient(
			135deg,
			rgba(255, 255, 255, 0.025),
			transparent 45%
		);

	pointer-events: none;

	z-index: 1;
}

.beast-products-grid__preview img {
	position: relative;
	z-index: 0;

	display: block;

	width: 100%;
	height: 100%;

	max-width: none;

	object-fit: cover;
	object-position: center center;

	transition:
		transform 0.35s ease,
		filter 0.35s ease;

	will-change: transform;
}

.beast-products-grid__card:hover .beast-products-grid__preview img {
	transform: scale(1.02);
}

.beast-products-grid__placeholder {
	position: relative;

	width: 100%;
	height: 100%;

	background:
		linear-gradient(
			180deg,
			rgba(255, 255, 255, 0.035),
			rgba(255, 255, 255, 0.015)
		),
		#0a0e18;
}

.beast-products-grid__placeholder::before {
	content: "";

	position: absolute;

	left: 12%;
	right: 12%;
	top: 12%;

	height: 7px;

	border-radius: 999px;

	background: rgba(255, 255, 255, 0.11);

	box-shadow:
		0 18px 0 rgba(255, 255, 255, 0.055),
		0 36px 0 rgba(255, 255, 255, 0.035);
}

.beast-products-grid__placeholder::after {
	content: "";

	position: absolute;

	left: 12%;
	top: 28%;

	width: 54%;
	height: 46%;

	border-radius: 5px;

	background:
		linear-gradient(
			180deg,
			rgba(255, 255, 255, 0.055),
			rgba(255, 255, 255, 0.025)
		);
}


/* ==========================================================================
   Badge
   ========================================================================== */

.beast-products-grid__badge {
	position: absolute;
	z-index: 3;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	top: 12px;
	left: 12px;

	padding: 5px 9px;

	border-radius: 999px;

	background: linear-gradient(
		135deg,
		#3478ff,
		#8b3dff
	);

	color: #ffffff;

	font-size: 10px;
	font-weight: 700;
	line-height: 1;

	text-transform: uppercase;
	letter-spacing: 0.05em;

	pointer-events: none;
}

/*
 * Badge position classes.
 */
.beast-badge-position-top-left .beast-products-grid__badge {
	top: 12px;
	left: 12px;
	right: auto;
	bottom: auto;
}

.beast-badge-position-top-right .beast-products-grid__badge {
	top: 12px;
	right: 12px;
	left: auto;
	bottom: auto;
}

.beast-badge-position-bottom-left .beast-products-grid__badge {
	bottom: 12px;
	left: 12px;
	top: auto;
	right: auto;
}

.beast-badge-position-bottom-right .beast-products-grid__badge {
	bottom: 12px;
	right: 12px;
	top: auto;
	left: auto;
}


/* ==========================================================================
   Product Content
   ========================================================================== */

.beast-products-grid__content {
	display: flex;
	flex-direction: column;

	flex: 1 1 auto;

	min-width: 0;

	padding: 24px;
}

.beast-products-grid__category {
	margin: 0 0 8px;

	color: #9ca3af;

	font-size: 12px;
	font-weight: 500;
	line-height: 1.35;

	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.beast-products-grid__title {
	margin: 0 0 8px;

	padding: 0;

	color: #ffffff;

	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;

	overflow-wrap: anywhere;
}

.beast-products-grid__description {
	margin: 0;

	color: #9ca3b4;

	font-size: 14px;
	font-weight: 400;
	line-height: 1.55;

	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;

	overflow: hidden;

	overflow-wrap: anywhere;
}


/* ==========================================================================
   Bottom Row
   ========================================================================== */

.beast-products-grid__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;

	gap: 15px;

	width: 100%;

	margin-top: 24px;
}

.beast-products-grid__rating {
	display: flex;
	align-items: center;
	flex-wrap: wrap;

	gap: 5px;

	min-width: 0;

	color: #d7dbe6;

	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
}

.beast-products-grid__star {
	display: inline-flex;
	align-items: center;

	color: #ffc400;

	font-size: 13px;
	line-height: 1;

	flex: 0 0 auto;
}

.beast-products-grid__meta {
	display: inline-flex;
	align-items: center;

	color: #8f96a8;

	font-size: inherit;
	line-height: inherit;
}

.beast-products-grid__meta-separator {
	display: inline-block;

	margin-right: 5px;

	color: #6f7789;
}


/* ==========================================================================
   Action
   ========================================================================== */

.beast-products-grid__action {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;

	flex: 0 0 auto;

	gap: 5px;

	margin: 0;
	padding: 0;

	color: #ffffff;

	background: transparent;
	border: 0;

	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;

	text-decoration: none;

	cursor: pointer;

	transition:
		color 0.20s ease,
		opacity 0.20s ease;
}

.beast-products-grid__action:hover {
	color: #9d7cff;
	text-decoration: none;
}

.beast-products-grid__action:focus-visible {
	outline: 2px solid rgba(124, 92, 246, 0.85);
	outline-offset: 4px;
	border-radius: 4px;
}

.beast-products-grid__action-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	flex: 0 0 auto;

	line-height: 1;

	transition:
		transform 0.20s ease,
		color 0.20s ease;
}

.beast-products-grid__action-icon svg {
	display: block;

	width: 1em;
	height: 1em;

	fill: currentColor;
}

.beast-products-grid__action:hover .beast-products-grid__action-icon {
	transform: translateX(3px);
}


/* ==========================================================================
   Empty State
   ========================================================================== */

.beast-products-grid__empty {
	width: 100%;

	margin-top: 24px;

	padding: 50px 20px;

	color: #9ca3af;

	font-size: 14px;
	line-height: 1.5;

	text-align: center;

	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 16px;

	background: rgba(255, 255, 255, 0.02);
}

.beast-products-grid__empty[hidden] {
	display: none !important;
}


/* ==========================================================================
   Filter Animation
   ========================================================================== */

.beast-products-grid__card {
	animation-duration: 0.25s;
	animation-timing-function: ease;
	animation-fill-mode: both;
}

.beast-products-grid__card.beast-product-filter-in {
	animation-name: beastProductFadeIn;
}

@keyframes beastProductFadeIn {
	0% {
		opacity: 0;
		transform: translateY(8px);
	}

	100% {
		opacity: 1;
		transform: translateY(0);
	}
}


/* ==========================================================================
   Elementor Editor
   ========================================================================== */

.elementor-editor-active .beast-products-grid__filter {
	cursor: pointer;
}

.elementor-editor-active .beast-products-grid__search-input {
	cursor: text;
}


/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

	.beast-products-grid *,
	.beast-products-grid *::before,
	.beast-products-grid *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}

}


/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 1024px) {

	.beast-products-grid__items {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.beast-products-grid__toolbar {
		gap: 18px;
	}

	.beast-products-grid__preview {
		margin-left: 20px;
		margin-right: 20px;
	}

	.beast-products-grid__content {
		padding: 20px;
	}

}


/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 767px) {

	.beast-products-grid__toolbar {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
	}

	.beast-products-grid__filters {
		width: 100%;
	}

	.beast-products-grid__filter {
		flex: 0 0 auto;
	}

	.beast-products-grid__search {
		width: 100%;
		flex-basis: auto;
	}

	.beast-products-grid__items {
		grid-template-columns: 1fr;
	}

	.beast-products-grid__preview {
		margin: 16px 16px 0;
	}

	.beast-products-grid__content {
		padding: 18px;
	}

	.beast-products-grid__bottom {
		align-items: flex-start;
	}

	.beast-products-grid__rating {
		flex: 1 1 auto;
	}

	.beast-products-grid__action {
		flex: 0 0 auto;
	}

}


/* ==========================================================================
   Small Mobile
   ========================================================================== */

@media (max-width: 480px) {

	.beast-products-grid__filters {
		gap: 7px;
	}

	.beast-products-grid__filter {
		padding: 7px 13px;
		font-size: 12px;
	}

	.beast-products-grid__bottom {
		flex-direction: column;
		align-items: stretch;
	}

	.beast-products-grid__action {
		justify-content: flex-start;
	}

}