.emargy-variant-grid-wrap {
	width: 100%;
}

.emargy-variant-grid-wrap.is-loading {
	opacity: 0.72;
	pointer-events: none;
}

.emargy-variant-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 16px;
	margin: 0 0 28px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--emargy-border-color, #e5e7eb);
}

.emargy-variant-filters__field {
	display: grid;
	gap: 8px;
	min-width: 180px;
}

.emargy-variant-filters__field span {
	color: var(--emargy-secondary-color, #4b5563);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 1.2;
	text-transform: uppercase;
}

.emargy-variant-filters__field select,
.emargy-variant-filters__field input[type="range"],
.emargy-variant-filters__reset {
	min-height: 42px;
	border: 1px solid var(--emargy-border-color, #e5e7eb);
	border-radius: 8px;
	background: #fff;
	color: var(--emargy-primary-color, #111827);
	font-size: 13px;
	font-weight: 500;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
	transition: all 0.2s ease;
}

.emargy-variant-filters__field select {
	appearance: none;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
	background-position: right 12px center;
	background-repeat: no-repeat;
	background-size: 18px;
	padding: 8px 36px 8px 14px;
}

.emargy-variant-filters__field select:focus {
	border-color: var(--emargy-accent-color, #111827);
	outline: none;
}

.emargy-variant-filters__field--price {
	min-width: 240px;
}

.emargy-variant-filters__field--price small {
	color: var(--emargy-secondary-color, #6b7280);
	font-size: 12px;
	font-weight: 500;
}

.emargy-variant-filters__reset {
	padding: 10px 20px;
	cursor: pointer;
	font-weight: 600;
	text-align: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.emargy-variant-filters__reset:hover {
	background: var(--emargy-primary-color, #111827);
	color: #fff;
	border-color: var(--emargy-primary-color, #111827);
}

.emargy-variant-grid {
	--evg-columns: 4;
	--evg-gap: 28px;
	display: grid;
	grid-template-columns: repeat(var(--evg-columns), minmax(0, 1fr));
	gap: var(--evg-gap);
}

.emargy-variant-grid--carousel {
	display: flex;
	grid-template-columns: none;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scrollbar-width: thin;
	scroll-snap-type: x proximity;
}

.emargy-variant-grid--carousel .emargy-variant-card {
	flex: 0 0 calc((100% - (var(--evg-gap) * (var(--evg-columns) - 1))) / var(--evg-columns));
	scroll-snap-align: start;
}

.emargy-variant-card {
	overflow: hidden;
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 12px;
	border: 1px solid var(--emargy-border-color, #e5e7eb);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.emargy-variant-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.08);
}

.emargy-variant-card__image {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	background: #faf9f6;
	aspect-ratio: 4 / 5;
	color: inherit;
	text-decoration: none;
}

.emargy-variant-card__gallery-nav {
	position: absolute;
	top: 50%;
	inset-inline: 12px;
	z-index: 4;
	display: flex;
	justify-content: space-between;
	pointer-events: none;
	opacity: 0;
	transform: translateY(-50%);
	transition: opacity 0.2s ease;
}

.emargy-variant-card:hover .emargy-variant-card__gallery-nav,
.emargy-variant-card__gallery-nav.is-always-visible {
	opacity: 1;
}

.emargy-variant-card__gallery-nav button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: 50%;
	background: rgba(17, 24, 39, 0.7);
	color: #fff;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	pointer-events: auto;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.emargy-variant-card__gallery-nav button:hover {
	background: rgba(17, 24, 39, 0.9);
	transform: scale(1.05);
}

.emargy-variant-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.emargy-variant-card__image .emargy-variant-card__image-hover {
	position: absolute;
	inset: 0;
	z-index: 1;
	opacity: 0;
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.emargy-variant-card__image:hover .emargy-variant-card__image-hover {
	opacity: 1;
}

.emargy-variant-card:hover .emargy-variant-card__image img {
	transform: scale(1.03);
}

.emargy-variant-card:hover .emargy-variant-card__image .emargy-variant-card__image-hover {
	transform: scale(1.03);
}

.emargy-variant-card__badge {
	position: absolute;
	top: 12px;
	inset-inline-start: 12px;
	z-index: 2;
	padding: 5px 10px;
	border-radius: 4px;
	background: var(--emargy-accent-color, #111827);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.emargy-variant-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	padding: 16px 14px;
}

.emargy-variant-card__category {
	color: var(--emargy-secondary-color, #6b7280);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.emargy-variant-card__title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

.emargy-variant-card__title a {
	color: var(--emargy-primary-color, #111827);
	text-decoration: none;
	transition: color 0.2s ease;
}

.emargy-variant-card__title a:hover {
	color: var(--emargy-accent-color, #3b82f6);
}

.emargy-variant-card__price {
	color: var(--emargy-primary-color, #111827);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

.emargy-variant-card__hint {
	color: var(--emargy-secondary-color, #6b7280);
	font-size: 12px;
	line-height: 1.4;
}

.emargy-variant-options {
	display: grid;
	gap: 12px;
	margin: 4px 0;
}

.emargy-variant-options__row {
	display: grid;
	gap: 8px;
}

.emargy-variant-options__label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	color: var(--emargy-secondary-color, #4b5563);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.emargy-variant-options__label small {
	color: var(--emargy-primary-color, #111827);
	font-weight: 700;
	text-transform: none;
}

.emargy-variant-options__items {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.emargy-variant-swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--emargy-border-color, #e5e7eb);
	background: #fff;
	color: var(--emargy-secondary-color, #4b5563);
	cursor: pointer;
	font: inherit;
	line-height: 1;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.emargy-variant-swatch--color {
	width: 28px;
	height: 28px;
	padding: 2.5px;
	border-radius: 50%;
}

.emargy-variant-swatch--color span {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	border: 1px solid rgba(0, 0, 0, 0.08);
	background: var(--evg-swatch-color, #d1d5db);
}

.emargy-variant-swatch--image span {
	background-image: var(--evg-swatch-image);
	background-position: center;
	background-size: cover;
}

.emargy-variant-swatch--text {
	min-height: 34px;
	padding: 8px 14px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 6px;
}

.emargy-variant-swatch.is-selected {
	border-color: var(--emargy-accent-color, #111827);
	box-shadow: 0 0 0 1px #fff, 0 0 0 2.5px var(--emargy-accent-color, #111827);
}

.emargy-variant-swatch--text.is-selected {
	background: var(--emargy-primary-color, #111827);
	color: #fff;
	box-shadow: none;
}

.emargy-variant-swatch.is-unavailable,
.emargy-variant-swatch:disabled {
	cursor: not-allowed;
	opacity: 0.35;
}

.emargy-variant-options__clear {
	justify-self: start;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--emargy-secondary-color, #6b7280);
	cursor: pointer;
	font-size: 11px;
	font-weight: 500;
	text-decoration: underline;
	transition: color 0.2s ease;
}

.emargy-variant-options__clear:hover {
	color: var(--emargy-primary-color, #111827);
}

.emargy-variant-card__quantity {
	width: 76px;
	min-height: 38px;
	padding: 8px 10px;
	border: 1px solid var(--emargy-border-color, #e5e7eb);
	border-radius: 6px;
	background: #fff;
	color: var(--emargy-primary-color, #111827);
	font-size: 13px;
	font-weight: 500;
	text-align: center;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.emargy-variant-card__message {
	min-height: 18px;
	color: var(--emargy-secondary-color, #6b7280);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
}

.emargy-variant-card__message.is-error {
	color: #b91c1c;
}

.emargy-variant-card__message.is-success {
	color: #047857;
}

.emargy-variant-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: auto;
}

.emargy-variant-card--actions-bottom .emargy-variant-card__actions {
	margin-top: auto;
}

.emargy-variant-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 10px 20px;
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.emargy-variant-card__button:hover,
.emargy-variant-card__button:focus {
	transform: translateY(-1.5px);
	text-decoration: none;
}

.emargy-variant-card__button:active {
	transform: scale(0.98);
}

.emargy-variant-card__button--cart {
	background: var(--emargy-primary-color, #111827);
	border-color: var(--emargy-primary-color, #111827);
	color: #fff;
}

.emargy-variant-card__button--cart:hover {
	background: var(--emargy-primary-hover-color, #1f2937);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.emargy-variant-card__button--quick,
.emargy-variant-card__button--details {
	background: transparent;
	border-color: var(--emargy-primary-color, #111827);
	color: var(--emargy-primary-color, #111827);
}

.emargy-variant-card__button--quick:hover,
.emargy-variant-card__button--details:hover {
	background: var(--emargy-primary-color, #111827);
	color: #fff;
}

.emargy-variant-card__button:disabled {
	cursor: not-allowed;
	opacity: 0.55;
	transform: none;
	box-shadow: none;
}

.emargy-variant-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 32px;
}

.emargy-variant-pagination__load,
.emargy-variant-pagination__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	border: 1px solid var(--emargy-border-color, #e5e7eb);
	border-radius: 8px;
	background: #fff;
	color: var(--emargy-primary-color, #111827);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	padding: 10px 20px;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.emargy-variant-pagination__load:hover,
.emargy-variant-pagination__load:focus,
.emargy-variant-pagination__number:hover,
.emargy-variant-pagination__number:focus,
.emargy-variant-pagination__number.is-active {
	background: var(--emargy-primary-color, #111827);
	border-color: var(--emargy-primary-color, #111827);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.emargy-variant-pagination__load:disabled {
	cursor: wait;
	opacity: 0.65;
}

@media (max-width: 767px) {
	.emargy-variant-grid {
		grid-template-columns: repeat(var(--evg-columns, 2), minmax(0, 1fr));
	}

	.emargy-variant-grid--carousel .emargy-variant-card {
		flex-basis: calc((100% - (var(--evg-gap) * (var(--evg-columns) - 1))) / var(--evg-columns));
	}

	.emargy-variant-card__actions {
		flex-direction: column;
	}

	.emargy-variant-card__button {
		width: 100%;
	}
}
