/**
 * Shared product card — grids, 1:1 image, typography.
 */

.product-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.product-grid--2 {
	grid-template-columns: repeat(2, 1fr);
}

.product-card {
	background: var(--white, #fff);
	border: 1px solid #eee;
	border-radius: 12px;
	overflow: hidden;
	transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.product-card--link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

.product-card--link:focus-visible {
	outline: 2px solid var(--orange, #F59A57);
	outline-offset: 2px;
}

.product-card:hover,
.product-card--link:hover {
	border-color: var(--orange, #F59A57);
	box-shadow: 0 2px 8px rgba(36, 36, 36, 0.06);
	transform: none;
}

.product-card.is-filtered-out,
.product-card[hidden] {
	display: none !important;
}

/* 1:1 image area — square container, full photo visible (not category cards) */
.product-card .product-img,
.product-grid .product-img,
.ccb-cat-product-grid .product-img,
.ccb-pdp-carousel .product-img {
	position: relative;
	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	aspect-ratio: 1 / 1 !important;
	flex-shrink: 0;
	overflow: hidden;
	background: var(--blue-gray, #E0EAF0);
	line-height: 0;
}

.product-img a,
.product-img figure {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	border: 0;
	line-height: 0;
}

.product-img img,
.product-img .ccb-product-card__img,
.product-img .ccb-cat-grid-thumb,
.product-img .attachment-woocommerce_thumbnail,
.product-img .size-woocommerce_thumbnail,
.product-img .size-ccb-product-card {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0;
	object-fit: contain !important;
	object-position: center center;
	display: block;
}

.product-card:hover .product-img img,
.product-card--link:hover .product-img img {
	transform: none;
}

.product-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: inline-block;
	line-height: 1.25;
	white-space: nowrap;
	background: var(--orange, #F59A57);
	color: var(--white, #fff);
	font-family: var(--font-head, 'Urbanist', sans-serif);
	font-weight: 700;
	font-size: 11px;
	padding: 4px 10px;
	border-radius: 100px;
	pointer-events: none;
}

.product-body {
	flex: 1 1 auto;
	padding: 18px;
}

.product-cat {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--orange, #F59A57);
	font-family: var(--font-head, 'Urbanist', sans-serif);
	font-weight: 600;
	margin-bottom: 6px;
}

.product-name {
	font-family: var(--font-head, 'Urbanist', sans-serif);
	font-weight: 700;
	font-size: 15px;
	color: var(--charcoal, #242424);
	margin-bottom: 0;
	line-height: 1.3;
}

/* WooCommerce loop list items */
.ccb-cat-product-grid li.product,
.ccb-cat-product-grid li.ccb-cat-loop-item {
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	clear: none !important;
	list-style: none;
}

.ccb-cat-product-grid .product-card--link {
	border-color: #ebebeb;
}

.ccb-cat-product-grid .product-card--link:hover {
	box-shadow: 0 2px 8px rgba(36, 36, 36, 0.06);
}

/* PDP related carousel slides use the same card */
.ccb-pdp-carousel__slide.product-card--link {
	flex: 0 0 calc(25% - 15px);
	min-width: 0;
}

@media (max-width: 1024px) {
	.product-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.product-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.ccb-cat-product-grid .product-card:nth-child(6) {
		grid-column: auto;
	}
}

@media (max-width: 600px) {
	.product-grid,
	.product-grid--2,
	.ccb-cat-product-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.product-card .product-cat {
		display: none;
	}

	.product-body {
		padding: 14px 12px 16px;
	}

	.product-name {
		font-size: 14px;
	}
}
