/**
 * SK Electricals — Featured product cards
 * Reference: design/SK Electricals Home.dc.html (#featured)
 *
 * - No font-family overrides (site/theme fonts stay)
 * - Product image presentation left to Blocksy/WooCommerce
 * - Sale badge text unchanged (SALE / -33% from Customizer)
 */

:root {
	--sk-card-bg: #ffffff;
	--sk-card-border: #dde4ee;
	--sk-card-radius: 14px;
	--sk-card-pad: 16px;
	--sk-navy: #0f2b4c;
	--sk-navy-hover: #1c3a63;
	--sk-muted: #5f6c82;
	--sk-muted-soft: #8a97a8;
	--sk-accent: #e0a726;
	--sk-gap: 18px;
}

/* ---------- Grid gap ---------- */
[data-products] {
	gap: var(--sk-gap) !important;
	row-gap: var(--sk-gap) !important;
}

/* ---------- Card shell ---------- */
[data-products] .product {
	display: flex;
	flex-direction: column;
	background: var(--sk-card-bg);
	border: 1px solid var(--sk-card-border);
	border-radius: var(--sk-card-radius);
	box-shadow: none;
	overflow: hidden;
	padding: 0;
	align-items: stretch !important;
	text-align: left !important;
	--horizontal-alignment: stretch;
	--text-horizontal-alignment: left;
	--product-element-spacing: 4px;
	height: 100%;
}

/* Content padding (not the image) */
[data-products] .product > *:not(figure) {
	padding-inline: var(--sk-card-pad);
	width: 100%;
	box-sizing: border-box;
}

/*
 * Image area: design height (1 / 0.82).
 * object-fit: cover fills the frame without stretching/squashing
 * (may crop edges slightly; proportions stay natural).
 */
[data-products] .product > figure {
	position: relative;
	width: 100%;
	margin: 0;
	order: 1;
	aspect-ratio: 1 / 0.82;
	background: #eef2f7;
	overflow: hidden;
}

[data-products] .product > figure > .ct-media-container,
[data-products] .product > figure > a.ct-media-container {
	position: absolute !important;
	inset: 0 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	aspect-ratio: unset !important;
	border-radius: 0 !important;
	overflow: hidden !important;
	--theme-object-fit: cover;
}

[data-products] .product > figure .ct-media-container::before {
	content: none !important;
	display: none !important;
	padding: 0 !important;
}

[data-products] .product > figure .ct-media-container img,
[data-products] .product > figure .ct-media-container picture,
[data-products] .product > figure img {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	aspect-ratio: unset !important;
	object-fit: cover !important;
	object-position: center center !important;
	border-radius: 0 !important;
}

/* Sale badge: leave Blocksy default look + text (e.g. -33%) */

/* ---------- Brand / category line ---------- */
[data-products] .product > .entry-meta {
	order: 2;
	margin: 16px 0 0 !important;
	padding-top: 0;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sk-muted);
	--theme-font-size: 11px;
	--theme-link-initial-color: var(--sk-muted);
	--theme-link-hover-color: var(--sk-navy);
}

[data-products] .product > .entry-meta a {
	color: inherit;
	text-decoration: none;
}

/* ---------- Title ---------- */
[data-products] .product > .woocommerce-loop-product__title {
	order: 3;
	margin: 0 !important;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--sk-navy);
	--theme-link-initial-color: var(--sk-navy);
	--theme-link-hover-color: var(--sk-navy);
}

/* If category/meta is off, keep top spacing under the image */
[data-products] .product > figure + .woocommerce-loop-product__title {
	margin-top: 16px !important;
}

[data-products] .product > .woocommerce-loop-product__title a {
	color: inherit;
	text-decoration: none;
}

/* ---------- Price ---------- */
[data-products] .product > .price {
	order: 4;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px;
	margin: 8px 0 0 !important;
	color: var(--sk-navy);
	font-size: 19px;
	font-weight: 800;
	--theme-font-size: 19px;
}

[data-products] .product > .price .amount,
[data-products] .product > .price .woocommerce-Price-amount {
	color: inherit;
	font-weight: inherit;
}

[data-products] .product > .price del,
[data-products] .product > .price del .amount,
[data-products] .product > .price del .woocommerce-Price-amount {
	font-size: 12px;
	font-weight: 500;
	color: var(--sk-muted-soft);
	opacity: 1;
}

[data-products] .product > .price ins {
	text-decoration: none;
	order: -1;
	font-weight: 800;
	color: var(--sk-navy);
}

/* ---------- Rating: design has none; hide visually only ---------- */
[data-products] .product > .ct-woo-card-rating {
	display: none !important;
}

/* ---------- Add to cart ---------- */
[data-products] .product > .ct-woo-card-actions {
	order: 6;
	display: block !important;
	width: 100%;
	margin-top: 12px;
	margin-bottom: var(--sk-card-pad);
	padding-top: 0;
	padding-inline: var(--sk-card-pad);
}

[data-products] .product > .ct-woo-card-actions .button,
[data-products] .product > .ct-woo-card-actions .added_to_cart {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 42px;
	min-height: 42px;
	padding: 0 16px;
	margin: 0;
	border: none;
	border-radius: 10px;
	background-color: var(--sk-navy) !important;
	color: #fff !important;
	font-size: 13.5px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	box-shadow: none !important;
	transform: none !important;
}

[data-products] .product > .ct-woo-card-actions .button:hover,
[data-products] .product > .ct-woo-card-actions .button:focus,
[data-products] .product > .ct-woo-card-actions .added_to_cart:hover {
	background-color: var(--sk-navy-hover) !important;
	color: #fff !important;
}

/* ---------- Type-2 compatibility ---------- */
[data-products="type-2"] .product {
	padding-inline: 0 !important;
	padding-bottom: 0 !important;
	--horizontal-alignment: stretch;
	--text-horizontal-alignment: left;
}

[data-products="type-2"] .product > figure,
[data-products="type-2"] .product > .ct-woo-card-actions {
	width: 100% !important;
	margin-inline: 0 !important;
}

[data-products="type-2"] .product > .ct-woo-card-actions {
	flex-direction: column;
	align-items: stretch;
	border: none !important;
	margin-bottom: var(--sk-card-pad) !important;
	gap: 12px;
	padding-inline: var(--sk-card-pad);
}

[data-products="type-2"] .product > .ct-woo-card-actions > * {
	flex: none;
	width: 100%;
	min-height: 0;
	padding: 0;
}

[data-products="type-2"] .product > .ct-woo-card-actions .price {
	justify-content: flex-start;
	margin-top: 8px;
}

[data-products="type-2"] .product > .ct-woo-card-actions .price:after {
	display: none;
}

[data-products="type-2"] .product > .ct-woo-card-actions .button,
[data-products="type-2"] .product > .ct-woo-card-actions .added_to_cart {
	background-color: var(--sk-navy) !important;
	color: #fff !important;
	border-radius: 10px;
	height: 42px;
}
