/**
 * Custom WooCommerce Product Grid – base styles.
 * Every visual value below is only a fallback: Elementor controls override them.
 * No fonts are set here, so Elementor Global / Astra typography is inherited.
 */

.cwg-wrap {
	--cwg-dur: 0.35s;
	--cwg-lift: -4px;
	--cwg-zoom: 1.05;
	--cwg-fav-size: 22px;
	--cwg-badge-x: 10px;
	--cwg-badge-y: 10px;
	--cwg-toast-bg: #1F4A2A;
	--cwg-toast-color: #fff;
	box-sizing: border-box;
	width: 100%;
	background-color: #FDF1E3;
	padding: 40px 24px;
	overflow: hidden; /* never allow horizontal scroll */
}

.cwg-wrap *,
.cwg-wrap *::before,
.cwg-wrap *::after {
	box-sizing: border-box;
}

.cwg-wrap .cwg-inner {
	width: 100%;
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}

/* ---------- Section heading ---------- */
.cwg-wrap .cwg-header {
	text-align: center;
	margin-bottom: 28px;
}

.cwg-wrap .cwg-heading {
	margin: 0;
	color: #1F4A2A;
}

.cwg-wrap .cwg-subheading {
	margin: 8px 0 0;
	color: #33473A;
}

/* ---------- Grid ---------- */
.cwg-wrap .cwg-grid {
	--cwg-cols: 3;
	display: grid;
	grid-template-columns: repeat(var(--cwg-cols), minmax(0, 1fr));
	column-gap: 22px;
	row-gap: 22px;
	align-items: start;
	margin: 0;
	padding: 0;
}

.cwg-equal-yes .cwg-wrap .cwg-grid {
	align-items: stretch;
}

/* ---------- Card ---------- */
.cwg-wrap .cwg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	padding: 10px 10px 14px;
	background-color: #FFF9F1;
	border-radius: 18px;
	border: 0 solid transparent;
	transition: transform var(--cwg-dur) ease, box-shadow var(--cwg-dur) ease, background-color var(--cwg-dur) ease, border-color var(--cwg-dur) ease;
}

.cwg-equal-yes .cwg-wrap .cwg-card {
	height: 100%;
}

.cwg-wrap .cwg-card:hover {
	transform: translateY(var(--cwg-lift));
}

/* ---------- Image container ---------- */
.cwg-wrap .cwg-media {
	position: relative;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	aspect-ratio: 1 / 1.08;
	padding: 12px;
	background-color: #DFEBD3;
	border-radius: 14px;
	overflow: hidden;
	isolation: isolate;
	flex: 0 0 auto;
	transition: background-color var(--cwg-dur) ease;
}

.cwg-wrap .cwg-media-link {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	text-decoration: none;
	z-index: 1;
}

.cwg-wrap .cwg-media .cwg-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	object-fit: contain;
	object-position: center center;
	border-radius: 0;
	box-shadow: none;
	transition: transform calc(var(--cwg-dur) * 1.4) ease, opacity calc(var(--cwg-dur) * 1.2) ease;
	will-change: transform;
}

.cwg-wrap .cwg-media .cwg-img-secondary {
	position: absolute;
	inset: 0;
	margin: auto;
	opacity: 0;
}

.cwg-wrap .cwg-media.has-secondary:hover .cwg-img-secondary,
.cwg-wrap .cwg-card:hover .cwg-media.has-secondary .cwg-img-secondary {
	opacity: 1;
}

.cwg-wrap .cwg-card:hover .cwg-media.has-secondary .cwg-img-primary {
	opacity: 0;
}

/* Image hover animations */
.cwg-wrap.cwg-hover-zoom .cwg-card:hover .cwg-img {
	transform: scale(var(--cwg-zoom));
}

.cwg-wrap.cwg-hover-zoom-rotate .cwg-card:hover .cwg-img {
	transform: scale(var(--cwg-zoom)) rotate(-3deg);
}

.cwg-wrap.cwg-hover-float .cwg-card:hover .cwg-img {
	transform: translateY(-6px);
}

/* ---------- Age label ---------- */
.cwg-wrap .cwg-badge {
	position: absolute;
	z-index: 4;
	display: inline-block;
	max-width: calc(100% - 60px);
	padding: 5px 11px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #1F4A2A;
	background-color: #FFF6E8;
	border-radius: 50px;
	pointer-events: none;
}

.cwg-wrap .cwg-badge--top-left { top: var(--cwg-badge-y); left: var(--cwg-badge-x); }
.cwg-wrap .cwg-badge--top-right { top: var(--cwg-badge-y); right: var(--cwg-badge-x); }
.cwg-wrap .cwg-badge--bottom-left { bottom: var(--cwg-badge-y); left: var(--cwg-badge-x); }
.cwg-wrap .cwg-badge--bottom-right { bottom: var(--cwg-badge-y); right: var(--cwg-badge-x); }

/* ---------- Favourite icon ---------- */
.cwg-wrap .cwg-fav-pos {
	position: absolute;
	z-index: 5;
	top: 6px;
	right: 6px;
	line-height: 0;
}

.cwg-wrap .cwg-fav,
.cwg-wrap button.cwg-fav,
.cwg-wrap button.cwg-fav:hover,
.cwg-wrap button.cwg-fav:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: transparent;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	line-height: 1;
	font-size: var(--cwg-fav-size);
	transition: color var(--cwg-dur) ease, transform 0.2s ease, background-color var(--cwg-dur) ease;
	-webkit-tap-highlight-color: transparent;
}

.cwg-wrap .cwg-fav-pos {
	color: #1F4A2A;
}

.cwg-wrap span.cwg-fav {
	cursor: default;
}

.cwg-wrap .cwg-fav-pos .cwg-fav:hover {
	color: #F57C20;
	transform: scale(1.1);
}

.cwg-wrap .cwg-fav:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.cwg-wrap .cwg-fav i {
	font-size: var(--cwg-fav-size);
	color: inherit;
}

.cwg-wrap .cwg-fav svg {
	display: block;
	width: var(--cwg-fav-size);
	height: var(--cwg-fav-size);
	fill: currentColor;
}

.cwg-wrap .cwg-fav svg.cwg-heart-svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linejoin: round;
}

.cwg-wrap .cwg-fav svg.cwg-heart-svg.is-filled {
	fill: currentColor;
}

.cwg-wrap .cwg-fav-icon {
	display: inline-flex;
}

.cwg-wrap .cwg-fav .cwg-fav-on,
.cwg-wrap .cwg-fav.is-active .cwg-fav-off {
	display: none;
}

.cwg-wrap .cwg-fav.is-active .cwg-fav-on {
	display: inline-flex;
}

.cwg-wrap .cwg-fav-pos .cwg-fav.is-active {
	color: #F57C20;
}

.cwg-wrap .cwg-fav.cwg-pop {
	animation: cwg-pop 0.35s ease;
}

@keyframes cwg-pop {
	50% { transform: scale(1.3); }
}

.cwg-wrap .cwg-fav-plugin {
	line-height: 1.2;
	font-size: 12px;
}

.cwg-wrap .cwg-fav-plugin a {
	text-decoration: none;
}

/* Label + heart without an image */
.cwg-wrap .cwg-overlay-row {
	position: relative;
	min-height: 36px;
	margin-bottom: 6px;
}

/* ---------- Content ---------- */
.cwg-wrap .cwg-content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding-top: 12px;
	min-width: 0;
}

.cwg-wrap .cwg-card .cwg-title {
	margin: 0 0 2px;
	padding: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	color: #1F4A2A;
	text-align: center;
	text-transform: none;
	word-wrap: break-word;
	border: 0;
}

.cwg-wrap .cwg-card .cwg-title::before,
.cwg-wrap .cwg-card .cwg-title::after {
	display: none; /* no decorative lines from themes */
}

.cwg-wrap .cwg-card .cwg-title a {
	color: inherit;
}

.cwg-wrap .cwg-card .cwg-title a,
.cwg-wrap .cwg-card .cwg-title a:hover,
.cwg-wrap .cwg-card .cwg-title a:focus {
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	text-decoration: none;
	box-shadow: none;
	border: 0;
	transition: color var(--cwg-dur) ease;
}

.cwg-wrap .cwg-card .cwg-desc {
	margin: 0;
	font-size: 15px;
	line-height: 1.4;
	color: #33473A;
	text-align: center;
}

.cwg-wrap .cwg-card .cwg-price {
	margin: 6px 0 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: #1F4A2A;
	text-align: center;
}

.cwg-wrap .cwg-price del {
	opacity: 0.6;
	font-weight: 400;
	margin-right: 4px;
}

.cwg-wrap .cwg-price ins {
	text-decoration: none;
	background: none;
	color: #E5690C;
}

.cwg-wrap .cwg-price .amount {
	color: inherit;
}

/* ---------- Button ---------- */
.cwg-wrap .cwg-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 12px;
}

.cwg-wrap .cwg-card a.cwg-btn,
.cwg-wrap .cwg-card a.cwg-btn:visited {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 100%;
	min-height: 42px;
	margin: 0;
	padding: 8px 16px;
	overflow: hidden;
	isolation: isolate;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	color: #1C2B1C;
	background-color: #F57C20;
	border: 0 solid transparent;
	border-radius: 12px;
	box-shadow: none;
	cursor: pointer;
	transition: background-color var(--cwg-dur) ease, color var(--cwg-dur) ease, border-color var(--cwg-dur) ease, transform 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}

.cwg-wrap .cwg-card a.cwg-btn:hover {
	background-color: #E5690C;
	text-decoration: none;
}

.cwg-wrap .cwg-card a.cwg-btn:focus-visible {
	outline: 2px solid #1F4A2A;
	outline-offset: 2px;
}

.cwg-wrap .cwg-card a.cwg-btn:active {
	transform: scale(0.98);
}

.cwg-wrap .cwg-btn-text {
	position: relative;
	z-index: 3;
}

.cwg-wrap .cwg-btn.is-loading {
	pointer-events: none;
	opacity: 0.8;
}

.cwg-wrap .cwg-btn.is-loading .cwg-btn-text::after {
	content: "";
	display: inline-block;
	width: 0.9em;
	height: 0.9em;
	margin-left: 8px;
	vertical-align: -0.12em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: cwg-spin 0.7s linear infinite;
}

@keyframes cwg-spin {
	to { transform: rotate(360deg); }
}

.cwg-wrap .cwg-view-cart {
	font-size: 13px;
	font-weight: 600;
	color: #1F4A2A;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---------- Shine (image + button) ---------- */
.cwg-wrap .cwg-shine {
	position: absolute;
	inset: 0;
	z-index: 2;
	overflow: hidden;
	pointer-events: none;
	border-radius: inherit;
}

.cwg-wrap .cwg-img-shine {
	--cwg-shine-color: var(--cwg-img-shine-color, #fff);
	--cwg-shine-opacity: var(--cwg-img-shine-opacity, 0.45);
	--cwg-shine-w: var(--cwg-img-shine-width, 35%);
	--cwg-shine-i: var(--cwg-img-shine-intensity, 30);
	--cwg-shine-dur: var(--cwg-img-shine-dur, 1.2s);
	--cwg-shine-delay: var(--cwg-img-shine-delay, 0s);
}

.cwg-wrap .cwg-btn-shine {
	z-index: 1;
	--cwg-shine-color: var(--cwg-btn-shine-color, #fff);
	--cwg-shine-opacity: var(--cwg-btn-shine-opacity, 0.35);
	--cwg-shine-w: var(--cwg-btn-shine-width, 30%);
	--cwg-shine-i: var(--cwg-btn-shine-intensity, 30);
	--cwg-shine-dur: var(--cwg-btn-shine-dur, 1.4s);
	--cwg-shine-delay: var(--cwg-btn-shine-delay, 0s);
}

.cwg-wrap .cwg-shine::before {
	--cwg-core: calc(var(--cwg-shine-w) * var(--cwg-shine-i) / 200);
	--cwg-from: calc(-50% - var(--cwg-shine-w) / 2 - 10%);
	--cwg-to: calc(50% + var(--cwg-shine-w) / 2 + 10%);
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		105deg,
		transparent calc(50% - var(--cwg-shine-w) / 2),
		var(--cwg-shine-color) calc(50% - var(--cwg-core)),
		var(--cwg-shine-color) calc(50% + var(--cwg-core)),
		transparent calc(50% + var(--cwg-shine-w) / 2)
	);
	opacity: var(--cwg-shine-opacity);
	transform: translate3d(var(--cwg-from), 0, 0);
	will-change: transform;
}

@keyframes cwg-shine-move {
	from { transform: translate3d(var(--cwg-from), 0, 0); }
	to { transform: translate3d(var(--cwg-to), 0, 0); }
}

/* Hover mode */
.cwg-wrap .cwg-card:hover .cwg-img-shine[data-shine-mode="hover"]::before,
.cwg-wrap .cwg-card:focus-within .cwg-img-shine[data-shine-mode="hover"]::before,
.cwg-wrap .cwg-btn:hover .cwg-btn-shine[data-shine-mode="hover"]::before,
.cwg-wrap .cwg-btn:focus-visible .cwg-btn-shine[data-shine-mode="hover"]::before {
	animation: cwg-shine-move var(--cwg-shine-dur) ease-in-out var(--cwg-shine-delay) 1 both;
}

/* Loop / once mode (class added by script.js) */
.cwg-wrap .cwg-shine.is-shining::before {
	animation: cwg-shine-move var(--cwg-shine-dur) ease-in-out 0s 1 both;
}

/* ---------- Pagination / Load more ---------- */
.cwg-wrap .cwg-pagination,
.cwg-wrap .cwg-load-more-wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 28px;
}

.cwg-wrap .cwg-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	font-weight: 700;
	color: #1F4A2A;
	background-color: #FFF9F1;
	border-radius: 12px;
	text-decoration: none;
	transition: background-color var(--cwg-dur) ease, color var(--cwg-dur) ease;
}

.cwg-wrap .cwg-pagination .page-numbers.current,
.cwg-wrap .cwg-pagination a.page-numbers:hover {
	color: #1C2B1C;
	background-color: #F57C20;
}

.cwg-wrap .cwg-load-more-wrap .cwg-load-more,
.cwg-wrap .cwg-load-more-wrap .cwg-load-more:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 28px;
	font-weight: 700;
	line-height: 1.2;
	color: #1F4A2A;
	background-color: #FFF9F1;
	border: 0;
	border-radius: 12px;
	box-shadow: none;
	cursor: pointer;
	transition: background-color var(--cwg-dur) ease, color var(--cwg-dur) ease;
}

.cwg-wrap .cwg-load-more-wrap .cwg-load-more:hover {
	color: #1C2B1C;
	background-color: #F57C20;
}

.cwg-wrap .cwg-load-more.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

.cwg-wrap .cwg-empty {
	margin: 0;
	padding: 24px;
	text-align: center;
	border: 1px dashed currentColor;
	border-radius: 12px;
	opacity: 0.7;
}

/* ---------- Toast notification ---------- */
.cwg-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 99999;
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: calc(100vw - 32px);
	padding: 12px 18px;
	font-size: 15px;
	line-height: 1.35;
	color: #fff;
	background: #1F4A2A;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
	opacity: 0;
	transform: translate(-50%, 16px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
}

.cwg-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
	pointer-events: auto;
}

.cwg-toast a {
	color: inherit;
	font-weight: 700;
	white-space: nowrap;
	text-decoration: underline;
}

/* ---------- Responsive fallbacks (Elementor controls override) ---------- */
@media (max-width: 1024px) {
	.cwg-wrap .cwg-grid { --cwg-cols: 2; }
}

@media (max-width: 767px) {
	.cwg-wrap { padding: 28px 12px; }
	.cwg-wrap .cwg-grid { column-gap: 12px; row-gap: 14px; }
	.cwg-wrap .cwg-card { padding: 8px 8px 12px; border-radius: 16px; }
	.cwg-wrap .cwg-card .cwg-title { font-size: 16px; }
	.cwg-wrap .cwg-card .cwg-desc { font-size: 13px; }
	.cwg-wrap .cwg-card a.cwg-btn { font-size: 14px; min-height: 38px; padding: 6px 10px; }
	.cwg-wrap .cwg-badge { font-size: 11px; padding: 4px 8px; }
	.cwg-toast { left: 16px; right: 16px; transform: translateY(16px); max-width: none; }
	.cwg-toast.is-visible { transform: translateY(0); }
}

/* ---------- Accessibility: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.cwg-wrap .cwg-shine { display: none !important; }
	.cwg-wrap .cwg-card,
	.cwg-wrap .cwg-img,
	.cwg-wrap .cwg-btn,
	.cwg-wrap .cwg-fav,
	.cwg-toast { transition: none !important; animation: none !important; }
	.cwg-wrap .cwg-card:hover,
	.cwg-wrap .cwg-card:hover .cwg-img { transform: none !important; }
}