/* Module: availability — product page badges and list ribbons */

/* Badge under the price; it sits inside .price, hence fixed sizes */
.g4c-badge {
	display: table;
	margin-top: 10px;
	padding: 5px 10px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
}

.g4c-badge--in-stock,
.g4c-badge--delivery {
	background: #e6f7e6;
	color: #1b5e20;
}

.g4c-badge--low-stock {
	background: #fff4e5;
	color: #b34700;
}

/* Colour code shared with the photo ribbons and the card dots:
   green = ships now (office or supplier), amber = pre-order (the shop's pre-order colour),
   lavender = awaited from the supplier, grey = not available. */
.g4c-badge--temporarily-out,
.g4c-badge--upon-request {
	background: #b39dff;
	color: #170f33;
}

.g4c-badge--preorder {
	background: #ffb020;
	color: #1d1300;
}

/* Pre-orders switched off: same amber, outlined (not orderable). */
.g4c-badge--coming-soon {
	background: transparent;
	color: #ffb020;
	box-shadow: inset 0 0 0 1.5px #ffb020;
}

.g4c-badge--out-of-stock,
.g4c-badge--discontinued {
	background: #d1d5db;
	color: #1f2937;
}

.single-product .summary .price .g4c-av-note {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0;
	color: #ffc27a;
}

/* Ribbons on product photos (lists: top left; product page: in .g4c-photo-flags) */
.g4c-ribbon,
.woocommerce span.onsale.g4c-sale {
	display: inline-block;
	padding: 6px 10px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	white-space: nowrap;
}

/* The card has 20px padding around the photo: sit 8px inside the photo's corner. */
.woocommerce ul.products li.product .g4c-ribbon {
	position: absolute;
	top: 28px;
	left: 28px;
	z-index: 20;
}

.g4c-ribbon--temporarily-out,
.g4c-ribbon--upon-request {
	background: #b39dff;
	color: #170f33;
}

.g4c-ribbon--preorder {
	background: #ffb020;
	color: #1d1300;
}

.g4c-ribbon--out-of-stock {
	background: #d1d5db;
	color: #1f2937;
}

/* Discount: red, top right in lists */
.woocommerce span.onsale.g4c-sale {
	background: #e5132b !important;
	color: #fff !important;
}

.woocommerce ul.products li.product span.onsale.g4c-sale {
	position: absolute;
	top: 28px;
	right: 28px;
	left: auto;
	z-index: 20;
}

/* Product page: ribbon and discount stacked on the top left of the main photo */
.single-product div.product {
	position: relative;
}

.g4c-photo-flags {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 30;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	pointer-events: none;
}

.g4c-photo-flags .g4c-ribbon,
.g4c-photo-flags span.onsale.g4c-sale {
	position: static !important;
	font-size: 14px;
}

/* Quantity limit note (cart and product page) */
.g4c-qty-limit {
	clear: both;
	display: block;
	margin: 6px 0 0;
	padding-top: 2px;
	font-size: 13px;
	font-weight: 500;
	color: #ffc27a;
}

/* Our ribbon replaces the theme's out-of-stock badge */
.woocommerce ul.products li.product .outofstock-badge {
	display: none !important;
}
