/**
 * Woofix — base styles.
 *
 * Intentionally light: layout + sensible defaults only, so cards inherit the
 * active theme's typography/colors. Visual details are driven by the Elementor
 * style controls (which output higher-specificity rules per widget instance).
 */

.woofix-grid {
	display: grid;
	grid-template-columns: repeat( var( --woofix-cols, 4 ), minmax( 0, 1fr ) );
	gap: var( --woofix-gap, 24px );
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Shortcode responsive fallback (Elementor instances override per breakpoint). */
@media ( max-width: 1024px ) {
	.woofix-grid {
		grid-template-columns: repeat( var( --woofix-cols-t, 2 ), minmax( 0, 1fr ) );
	}
}

@media ( max-width: 767px ) {
	.woofix-grid {
		grid-template-columns: repeat( var( --woofix-cols-m, 1 ), minmax( 0, 1fr ) );
	}
}

.woofix-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
	box-sizing: border-box;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.woofix-card__media {
	position: relative;
	margin-bottom: 12px;
	line-height: 0;
}

.woofix-card__image-link {
	display: block;
}

.woofix-card__media img {
	display: block;
	width: 100%;
	height: auto;
}

.woofix-card__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	display: inline-block;
	padding: 2px 10px;
	border-radius: 3px;
	background: #e2401c;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	text-transform: uppercase;
}

.woofix-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

.woofix-card__brand-wrap {
	margin-bottom: 8px;
	line-height: 0;
}

.woofix-card__brand {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
}

.woofix-card__brand-logo {
	display: inline-block;
	max-width: 100%;
	max-height: 40px;
	width: auto;
	height: auto;
}

.woofix-card__brand-name {
	font-size: 13px;
	line-height: 1.3;
}

.woofix-card__title {
	margin: 0 0 8px;
	font-size: inherit;
	line-height: 1.3;
	overflow-wrap: break-word;
}

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

.woofix-card__rating {
	margin-bottom: 6px;
}

.woofix-card__rating .star-rating {
	display: inline-block;
	margin: 0;
}

.woofix-card__price {
	margin-bottom: 10px;
}

.woofix-card__price del {
	opacity: 0.6;
	margin-right: 6px;
}

.woofix-card__excerpt {
	margin-bottom: 12px;
	font-size: 0.9em;
	overflow-wrap: break-word;
}

.woofix-card__excerpt p:last-child {
	margin-bottom: 0;
}

/* Push the button to the bottom so cards of different heights stay aligned. */
.woofix-card__cart {
	margin-top: auto;
}

.woofix-card__cart .added_to_cart {
	display: inline-block;
	margin-top: 6px;
}

.woofix--empty {
	opacity: 0.7;
	font-style: italic;
}
