/**
 * WooCommerce Category Cards - Frontend styles
 */

.wcc-wrapper {
	--wcc-columns: 3;
	box-sizing: border-box;
}

.wcc-wrapper *,
.wcc-wrapper *::before,
.wcc-wrapper *::after {
	box-sizing: inherit;
}

.wcc-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.wcc-notice {
	padding: 16px;
	border: 1px dashed #d0d0d0;
	background: #f8f8f8;
	color: #666;
	font-size: 14px;
}

/* ---------------------------------------------------------------------
 * Card base
 * ------------------------------------------------------------------- */
.wcc-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	transition-property: transform, box-shadow, border-color;
	transition-duration: 300ms;
	transition-timing-function: ease;
	will-change: transform;
}

.wcc-card__image-wrap img {
	transition-property: transform;
	transition-duration: 300ms;
	transition-timing-function: ease;
}

/* ---------------------------------------------------------------------
 * Hover effects (toggled via the "Hover Animation" style control, which
 * adds a "wcc-hover-{effect}" class to this widget's wrapper element)
 * ------------------------------------------------------------------- */
.wcc-hover-none .wcc-card:hover {
	transform: none;
	box-shadow: none;
}

.wcc-hover-lift .wcc-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.wcc-hover-zoom .wcc-card__image-wrap {
	overflow: hidden;
}

.wcc-hover-zoom .wcc-card:hover .wcc-card__image-wrap img {
	transform: scale(1.08);
}

.wcc-hover-shadow .wcc-card:hover {
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.wcc-hover-glow .wcc-card {
	border: 2px solid transparent;
}

.wcc-hover-glow .wcc-card:hover {
	border-color: currentColor;
	box-shadow: 0 0 0 4px rgba(51, 51, 51, 0.15);
}

.wcc-card__image-wrap {
	display: block;
	position: relative;
	width: 100%;
	height: 220px;
	overflow: hidden;
	background: #f2f2f2;
}

.wcc-card__image-wrap img,
.wcc-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wcc-card__content {
	display: flex;
	flex-direction: column;
	padding: 16px;
}

.wcc-card__title {
	margin: 16px 0 0;
	font-size: 18px;
	line-height: 1.3;
}

.wcc-card__title a {
	color: inherit;
	text-decoration: none;
}

.wcc-card__count {
	display: inline-block;
	margin-top: 4px;
	font-size: 13px;
	opacity: 0.7;
}

.wcc-card__description {
	margin-top: 8px;
	font-size: 14px;
	line-height: 1.6;
	color: #555555;
}

.wcc-card__button {
	display: inline-block;
	align-self: flex-start;
	margin-top: 16px;
	padding: 10px 20px;
	background: #333333;
	color: #ffffff;
	text-decoration: none;
	border-radius: 4px;
	font-size: 14px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.wcc-card__button:hover {
	background: #111111;
	color: #ffffff;
}

/* ---------------------------------------------------------------------
 * Layout 3 — background image card with title/description overlay
 * ------------------------------------------------------------------- */
.wcc-card--layout-3 {
	min-height: 320px;
	justify-content: flex-end;
}

.wcc-card--layout-3 .wcc-card__bg-link {
	position: absolute;
	inset: 0;
	display: block;
	text-decoration: none;
	color: inherit;
}

.wcc-card--layout-3 .wcc-card__image-wrap--bg {
	position: absolute;
	inset: 0;
	height: 100%;
}

.wcc-card--layout-3 .wcc-card__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.15) 60%, rgba(0, 0, 0, 0) 100%);
	pointer-events: none;
}

.wcc-card--layout-3 .wcc-card__content--overlay {
	position: relative;
	z-index: 1;
	padding: 20px;
	color: #ffffff;
}

.wcc-card--layout-3 .wcc-card__content--overlay .wcc-card__title {
	margin-top: 0;
	color: inherit;
}

.wcc-card--layout-3 .wcc-card__content--overlay .wcc-card__description {
	color: rgba(255, 255, 255, 0.85);
}

.wcc-card--layout-3 .wcc-card__button {
	position: relative;
	z-index: 2;
	margin: 0 20px 20px;
	align-self: flex-start;
}

/* ---------------------------------------------------------------------
 * Layout 4 — minimal, image left / content right
 * ------------------------------------------------------------------- */
.wcc-card--layout-4 .wcc-card__row {
	display: flex;
	flex-direction: row;
	align-items: stretch;
}

.wcc-card--layout-4 .wcc-card__image-wrap {
	flex: 0 0 35%;
	max-width: 35%;
	height: auto;
}

.wcc-card--layout-4 .wcc-card__content {
	flex: 1;
	justify-content: center;
}

.wcc-card--layout-4 .wcc-card__title {
	margin-top: 0;
}

/* ---------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.wcc-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.wcc-grid {
		grid-template-columns: repeat(1, 1fr);
	}

	.wcc-card--layout-4 .wcc-card__row {
		flex-direction: column;
	}

	.wcc-card--layout-4 .wcc-card__image-wrap {
		flex: none;
		max-width: 100%;
		height: 180px;
	}
}
