/* ==========================================================================
   Awesome Product Grid Widget (Global Token Edition v2.5.0)
   ========================================================================== */

@property --awea-prod-angle {
	syntax: "<angle>";
	initial-value: 0deg;
	inherits: false;
}

.awea-product-grid-wrap {
	--awea-pgd-primary: var(--e-global-color-primary);
	--awea-pgd-secondary: var(--e-global-color-secondary);
	--awea-pgd-text: var(--e-global-color-text);
	--awea-pgd-accent: var(--e-global-color-accent);
	--awea-pgd-surface: var(--e-global-color-background, #ffffff);
	--awea-pgd-border: color-mix(in srgb, currentColor 12%, transparent);

	width: 100%;
	position: relative;
	box-sizing: border-box;
}

.awea-product-grid-wrap *,
.awea-product-grid-wrap *::before,
.awea-product-grid-wrap *::after {
	box-sizing: border-box;
}

.awea-product-grid-wrap .awea-grid-row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 24px;
	width: 100%;
	align-items: stretch;
}

.awea-product-grid-wrap .awea-grid-item {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* --------------------------------------------------------------------------
   Product Card Shell
   -------------------------------------------------------------------------- */
.awea-product-grid-wrap .awea-card {
	--awea-pgd-beam-color: var(--awea-pgd-accent);
	--awea-pgd-beam-speed: 3s;

	position: relative;
	width: 100%;
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 100%;
	background-color: color-mix(in srgb, currentColor 3%, transparent);
	border: 1px solid var(--awea-pgd-border);
	transition:
		background-color 0.25s ease,
		border-color 0.25s ease,
		box-shadow 0.3s ease,
		transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.awea-product-grid-wrap .awea-card:hover {
	border-color: var(--awea-pgd-beam-color);
	box-shadow: 0 20px 40px -15px color-mix(in srgb, var(--awea-pgd-primary) 12%, transparent);
}

.awea-pgd-motion-lift .awea-product-grid-wrap .awea-card:hover {
	transform: translateY(-6px);
}

.awea-pgd-motion-scale .awea-product-grid-wrap .awea-card:hover {
	transform: scale(1.02);
}

/* --------------------------------------------------------------------------
   Kinetic Border Glow Beam
   -------------------------------------------------------------------------- */
.awea-product-grid-wrap .awea-card.awea-has-beam::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1.5px;
	background: conic-gradient(from var(--awea-prod-angle), transparent 70%, var(--awea-pgd-beam-color), transparent);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.awea-product-grid-wrap .awea-card.awea-has-beam:hover::after {
	opacity: 1;
	animation: aweaProdSpin var(--awea-pgd-beam-speed, 3s) linear infinite;
}

@keyframes aweaProdSpin {
	to {
		--awea-prod-angle: 360deg;
	}
}

/* --------------------------------------------------------------------------
   Sale Badge
   -------------------------------------------------------------------------- */
.awea-product-grid-wrap .awea-badge-sale {
	position: absolute;
	top: 14px;
	inset-inline-start: 14px;
	color: var(--awea-pgd-surface);
	padding: 4px 10px;
	border-radius: 100px;
	font-size: 0.72em;
	background-color: var(--awea-pgd-accent);
	z-index: 3;
	line-height: 1.2;
}

/* --------------------------------------------------------------------------
   Image Container
   -------------------------------------------------------------------------- */
.awea-product-grid-wrap .awea-image-container {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background-color: color-mix(in srgb, currentColor 6%, transparent);
	position: relative;
}

.awea-product-grid-wrap .awea-image-container a {
	display: block;
	width: 100%;
	height: 100%;
}

.awea-product-grid-wrap .awea-image-container a:focus-visible {
	outline: 2px solid var(--awea-pgd-accent);
	outline-offset: -2px;
}

.awea-product-grid-wrap .awea-image-container img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}

.awea-product-grid-wrap .awea-card:hover .awea-image-container img {
	transform: scale(1.04);
}

/* --------------------------------------------------------------------------
   Post Content
   -------------------------------------------------------------------------- */
.awea-product-grid-wrap .awea-post-content {
	padding: 20px 22px 14px;
	flex-grow: 1;
}

.awea-product-grid-wrap .awea-brand {
	color: var(--awea-pgd-accent);
	margin: 0 0 6px 0;
	line-height: 1.3;
}

.awea-product-grid-wrap .awea-product-name {
	margin: 0;
	line-height: 1.35;
	word-break: break-word;
}

.awea-product-grid-wrap .awea-product-name a {
	text-decoration: none;
	color: var(--awea-pgd-primary);
	transition: color 0.25s ease;
}

.awea-product-grid-wrap .awea-card:hover .awea-product-name a,
.awea-product-grid-wrap .awea-product-name a:hover {
	color: var(--awea-pgd-accent);
}

.awea-product-grid-wrap .awea-product-name a:focus-visible {
	outline: 2px solid var(--awea-pgd-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

.awea-product-grid-wrap .awea-pgd-rating {
	margin-top: 8px;
	font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   Footer & Action Button
   -------------------------------------------------------------------------- */
.awea-product-grid-wrap .awea-footer {
	padding: 16px 22px;
	border-top: 1px solid color-mix(in srgb, currentColor 8%, transparent);
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: transparent;
	gap: 12px;
}

.awea-product-grid-wrap .awea-pricing {
	display: flex;
	flex-direction: column;
}

.awea-product-grid-wrap .awea-old-price {
	font-size: 0.82em;
	color: var(--awea-pgd-text);
	opacity: 0.55;
	text-decoration: line-through;
}

.awea-product-grid-wrap .awea-current-price {
	color: var(--awea-pgd-primary);
	font-variant-numeric: tabular-nums;
	line-height: 1.2;
}

.awea-product-grid-wrap .awea-current-price ins {
	text-decoration: none;
	color: inherit;
}

.awea-product-grid-wrap .awea-action-container {
	display: flex;
	align-items: center;
}

.awea-product-grid-wrap .awea-action-container .added_to_cart {
	display: none !important;
}

.awea-product-grid-wrap .awea-buy-btn {
	background-color: color-mix(in srgb, currentColor 6%, transparent);
	color: var(--awea-pgd-primary);
	padding: 8px 16px;
	border-radius: 100px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	border: 1px solid var(--awea-pgd-border);
	cursor: pointer;
	text-decoration: none;
	flex-shrink: 0;
	transition:
		background-color 0.25s ease,
		color 0.25s ease,
		border-color 0.25s ease;
	line-height: 1;
}

.awea-product-grid-wrap .awea-buy-btn:focus-visible {
	outline: 2px solid var(--awea-pgd-accent);
	outline-offset: 2px;
}

.awea-product-grid-wrap .awea-buy-btn:hover,
.awea-product-grid-wrap .awea-buy-btn:focus-visible {
	background-color: var(--awea-pgd-accent);
	color: var(--awea-pgd-surface);
	border-color: var(--awea-pgd-accent);
}

.awea-product-grid-wrap .awea-buy-btn i {
	font-size: 13px;
}

.awea-product-grid-wrap .awea-btn-label {
	white-space: nowrap;
}

.awea-product-grid-wrap .awea-view-cart-btn {
	display: none;
	background-color: #16a34a !important;
	color: #ffffff !important;
	border-color: transparent !important;
}

.awea-product-grid-wrap .product-in-cart .awea-add-to-cart-btn {
	display: none;
}

.awea-product-grid-wrap .product-in-cart .awea-view-cart-btn {
	display: inline-flex;
}

/* --------------------------------------------------------------------------
   Accessibility & Responsive
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.awea-product-grid-wrap .awea-card,
	.awea-product-grid-wrap .awea-image-container img,
	.awea-product-grid-wrap .awea-buy-btn {
		transition: none !important;
		transform: none !important;
	}

	.awea-product-grid-wrap .awea-card.awea-has-beam:hover::after {
		animation: none !important;
	}
}

@media (max-width: 767px) {
	.awea-product-grid-wrap .awea-card {
		border-radius: 14px;
	}

	.awea-product-grid-wrap .awea-post-content {
		padding: 16px 18px 12px;
	}

	.awea-product-grid-wrap .awea-footer {
		padding: 14px 18px;
	}

	.awea-product-grid-wrap .awea-buy-btn {
		padding: 7px 12px;
	}
}