/*
 * SupplyComm site styles (child theme of Blocksy).
 *
 * Set colours, fonts, spacing and layout in Appearance › Customize first. Blocksy exposes its
 * palette as CSS variables (--theme-palette-color-1 … 8), so use those here instead of hard-coded colours.
 * Use this file only for what the Customizer can't do.
 */

/* ---------------------------------------------------------------------------
 * Product images (shop grid and product page)
 *
 * Supplier photos are small (~350-400 px) and rarely square. Show the whole image, never enlarge it
 * past its real size (avoids blur), centred on white inside a square frame.
 * ------------------------------------------------------------------------ */
ul.products li.product .ct-media-container,
.woocommerce-product-gallery .ct-media-container {
	background: #fff;
	border: 1px solid var(--theme-border-color, #e1e8ed);
	border-radius: 8px;
	overflow: hidden;
}

ul.products li.product .ct-media-container img {
	aspect-ratio: 1 / 1 !important; /* Blocksy sets the card ratio inline */
	width: 100%;
	height: auto;
	object-fit: scale-down !important;
	padding: 8%;
	transition: transform 0.2s ease;
}

ul.products li.product:hover .ct-media-container img {
	transform: scale(1.03);
}

.woocommerce-product-gallery .ct-media-container img {
	object-fit: scale-down !important;
	padding: 6%;
}

/* ---------------------------------------------------------------------------
 * Shop grid
 * ------------------------------------------------------------------------ */
ul.products li.product .woocommerce-loop-product__title {
	font-size: 15px;
	line-height: 1.35;
}

ul.products li.product .price .woocommerce-price-suffix {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	font-weight: 400;
	color: var(--theme-text-color);
	opacity: 0.75;
}

/* ---------------------------------------------------------------------------
 * Single product
 * ------------------------------------------------------------------------ */
.single-product .product_title {
	font-size: clamp(22px, 2.1vw, 28px);
	line-height: 1.25;
}

/* Price first, then "inc GST ($x ex GST)" smaller underneath */
.single-product .summary .price .woocommerce-price-suffix {
	display: block;
	margin-top: 4px;
	font-size: 14px;
	font-weight: 400;
	color: var(--theme-text-color);
	opacity: 0.8;
}

.single-product .summary .stock {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

.single-product .summary .stock::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
}

.single-product .summary .stock.in-stock {
	color: #1a7f37;
}

.single-product .summary .stock.available-on-backorder {
	color: #9a6700;
}

.single-product .summary .stock.out-of-stock {
	color: #b42318;
}

/* ---------------------------------------------------------------------------
 * Cart and checkout (classic WooCommerce templates; the Eway gateway needs Classic checkout)
 * ------------------------------------------------------------------------ */
