/* VCL product cards: 4-column grid (helios.vn style), square full-bleed image, Unbounded title, Roboto Light price, colour dots. */

/* Grid: 5 columns desktop, 3 tablet, 2 mobile (as in the mockups). */
.vcl-cards ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 28px 12px;
	margin: 0 !important;
	padding: 0;
}

.vcl-cards ul.products::before,
.vcl-cards ul.products::after {
	display: none !important;
}

.vcl-cards ul.products li.product {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0;
	box-shadow: none;
	background: transparent;
}

@media (max-width: 1024px) {
	.vcl-cards ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 767px) {
	.vcl-cards ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 22px 12px;
	}
}

/* Wider content area on desktop so the cards get bigger (reference: helios.vn, 20px page margin). */
@media (min-width: 1025px) {
	body.vcl-cards #content > .ast-container {
		max-width: 1760px;
		padding-left: 20px;
		padding-right: 20px;
	}
}

/* Image: square, edge to edge inside the card, no inner padding. */
.vcl-cards ul.products li.product .astra-shop-thumbnail-wrap {
	overflow: hidden;
	margin: 0;
	padding: 0;
	border-radius: 4px;
	aspect-ratio: 1 / 1;
}

.vcl-cards ul.products li.product .astra-shop-thumbnail-wrap img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	border-radius: 0;
}

/* Hide the theme's hover image after another colour was picked. */
.vcl-cards ul.products li.product.vcl-color-picked img.show-on-hover {
	display: none !important;
}

/* The earlier swatch implementations and the product blurb are replaced by the meta row. */
.vcl-cards .ccs-swatch-wrapper,
.vcl-cards .vcl-color-swatches {
	display: none !important;
}

/* Short description under the title (customer answer 4.7): two lines, then an ellipsis. */
.vcl-cards ul.products li.product .ast-woo-shop-product-description {
	display: -webkit-box;
	margin: 4px 0 0;
	overflow: hidden;
	font-family: 'Roboto', sans-serif;
	font-size: 12px;
	font-weight: 300;
	line-height: 1.5;
	color: #555;
	text-align: left;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* Paragraphs, line breaks and lists inside the text run together so the 2-line limit covers all of it. */
.vcl-cards ul.products li.product .ast-woo-shop-product-description p,
.vcl-cards ul.products li.product .ast-woo-shop-product-description ul,
.vcl-cards ul.products li.product .ast-woo-shop-product-description li {
	display: inline;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vcl-cards ul.products li.product .ast-woo-shop-product-description br {
	display: none;
}

.vcl-cards ul.products li.product .ast-woo-shop-product-description b,
.vcl-cards ul.products li.product .ast-woo-shop-product-description strong {
	font-weight: 300;
}

/* Title */
.vcl-cards ul.products li.product .astra-shop-summary-wrap {
	padding: 10px 0 0;
	text-align: left;
}

.vcl-cards ul.products li.product .woocommerce-loop-product__title {
	margin: 0;
	padding: 0;
	font-family: 'Unbounded', 'Roboto', sans-serif;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	text-align: left;
	color: #000;
}

/* Price (left) and colour dots (right) */
.vcl-card-meta {
	display: flex;
	min-width: 0;
	overflow-wrap: anywhere;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 10px;
	margin-top: 6px;
	min-height: 22px;
}

.vcl-card-price,
.vcl-card-price .woocommerce-Price-amount,
.vcl-card-price .price {
	font-family: 'Roboto', sans-serif;
	font-size: 14px;
	font-weight: 300;
	line-height: 1.4;
	text-align: left;
	color: #222;
}

.vcl-dots {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 7px;
	margin-left: auto;
	min-width: 0;
	max-width: 100%;
}

.vcl-dot {
	display: inline-block;
	width: 14px;
	height: 14px;
	margin: 0;
	padding: 0;
	border: 1px solid #000;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.vcl-dot--static {
	cursor: default;
}

.vcl-dot--unknown {
	background: repeating-linear-gradient(45deg, #ddd 0 3px, #fff 3px 6px);
}

.vcl-dot.is-selected {
	box-shadow: 0 0 0 2px #fff, 0 0 0 3px #000;
}

.vcl-dot:focus-visible {
	outline: 2px solid #000;
	outline-offset: 3px;
}

/* Larger tap area for the colour dots on touch screens (visual size unchanged). */
@media (pointer: coarse), (max-width: 768px) {
	.vcl-dot {
		position: relative;
	}

	/* The hit area grows up, down and to the left only: it must never stick out of the card on the right. */
	button.vcl-dot::after {
		content: "";
		position: absolute;
		top: -5px;
		bottom: -5px;
		left: -3px;
		right: 0;
	}

	.vcl-dots {
		padding: 5px 0;
		margin-top: -5px;
		margin-bottom: -5px;
		row-gap: 4px;
	}
}

/* ---- Phones: the two columns need a real gutter. Astra sets "gap: 0 !important" on ul.products at <= 544px,
   so the gutter is forced here with a more specific selector. Cards, titles and the price / dots row never
   spill into the neighbouring card. ---- */
@media (max-width: 767px) {
	/* Slimmer page margin so the two columns are as wide as possible. */
	body.vcl-cards #content > .ast-container {
		padding-left: 12px;
		padding-right: 12px;
	}

	body.vcl-cards ul.products {
		column-gap: 14px !important;
		row-gap: 24px !important;
	}

	body.vcl-cards ul.products li.product {
		min-width: 0;
		overflow: visible;
	}

	body.vcl-cards ul.products li.product .astra-shop-summary-wrap,
	body.vcl-cards ul.products li.product .vcl-card-meta {
		min-width: 0;
		max-width: 100%;
	}

	body.vcl-cards ul.products li.product .woocommerce-loop-product__title {
		overflow-wrap: anywhere;
		word-wrap: break-word;
		-webkit-hyphens: auto;
		hyphens: auto;
	}

	body.vcl-cards .vcl-card-price {
		flex: 0 1 auto;
		min-width: 0;
		white-space: nowrap;
	}

	body.vcl-cards .vcl-dots {
		flex: 0 1 auto;
		max-width: 100%;
	}
}
