/* WooCommerce Product Categories - Elementor Widget
   Structural styles only. All visual values here are fallbacks;
   the Elementor control selectors override them per widget. */

.woo-cat-widget-wrapper {
	scroll-margin-top: 120px; /* keeps "See Less" scroll clear of sticky headers */
}

/* Grid (defaults; Columns / Gap controls override via Elementor CSS) */
.woo-cat-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	column-gap: 20px;
	row-gap: 20px;
	width: 100%;
	box-sizing: border-box;
}

@media (max-width: 767px) {
	.woo-cat-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Card: the whole box is one link */
.woo-cat-card {
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	background-color: #ffffff;
	border-radius: 12px;
	padding: 12px 12px 14px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
	color: inherit;
	transition-property: transform, box-shadow, background-color, border-color;
	transition-duration: 0.3s;
	transition-timing-function: ease;
}

.woo-cat-card,
.woo-cat-card:hover,
.woo-cat-card:focus {
	text-decoration: none;
}

.woo-cat-card:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Equal height */
.woo-cat-equal-height-yes .woo-cat-card {
	height: 100%;
}

/* Image area */
.woo-cat-media {
	position: relative;
	display: block;
	width: 100%;
	height: 180px;
	overflow: hidden;
	border-radius: 8px;
	margin-bottom: 14px;
	box-sizing: border-box;
	transform: translateZ(0); /* Safari: keep zoomed image inside rounded corners */
}

.woo-cat-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.woo-cat-img-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #f2f2f4 25%, #e9e9ec 25%, #e9e9ec 50%, #f2f2f4 50%, #f2f2f4 75%, #e9e9ec 75%);
	background-size: 24px 24px;
}

/* Shine (soft white light sliding left to right) */
.woo-cat-shine {
	position: absolute;
	top: 0;
	left: -150%;
	height: 100%;
	width: 50%;
	background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 100%);
	transform: skewX(-25deg);
	transition: left 0.9s ease-in-out;
	pointer-events: none;
	z-index: 2;
}

.woo-cat-card:hover .woo-cat-shine {
	left: 150%;
}

/* Optional continuous shine loop (Automatic Animation control) */
.woo-cat-shine-auto-yes .woo-cat-shine {
	animation: wooCatShineLoop 2.7s ease-in-out infinite;
}

@keyframes wooCatShineLoop {
	0% {
		left: -150%;
	}
	50%,
	100% {
		left: 150%;
	}
}

/* Bottom row: heading + arrow */
.woo-cat-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	margin-top: auto;
	box-sizing: border-box;
}

.woo-cat-card .woo-cat-meta-title {
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: #1e1e1e;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color 0.3s ease;
}

.woo-cat-meta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	font-size: 15px;
	color: #1e1e1e;
	transition: transform 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

.woo-cat-meta-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Hidden cards + smooth reveal (no page reload) */
.woo-cat-card-hidden {
	display: none !important;
}

.woo-cat-card-reveal {
	animation: wooCatReveal 0.45s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes wooCatReveal {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* See More button */
.woo-cat-action {
	width: 100%;
	text-align: center;
	margin-top: 30px;
	box-sizing: border-box;
}

.woo-cat-btn {
	display: inline-block;
	max-width: 100%;
	border: 0;
	cursor: pointer;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	color: #ffffff;
	background-color: #1e1e1e;
	padding: 12px 28px;
	border-radius: 6px;
	transition: all 0.3s ease;
}

.woo-cat-btn:hover,
.woo-cat-btn:focus {
	background-color: #444444;
}

.woo-cat-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Accessibility: respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
	.woo-cat-card,
	.woo-cat-img,
	.woo-cat-shine,
	.woo-cat-meta-icon,
	.woo-cat-card-reveal {
		transition: none !important;
		animation: none !important;
	}
}