/* ==========================================================================
   GCF product card + product grid (misscookieghana.com style, GCF colours,
   Landspire theme font). Used on the shop, brand/category pages and homepage.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Grid: phones 2 · tablets 2 · desktop 4–5 (fills the available width).
   -------------------------------------------------------------------------- */
html body ul.products.gcf-products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
html body ul.products.gcf-products::before,
html body ul.products.gcf-products::after {
	display: none; /* WooCommerce clearfix pseudo-elements would become grid items */
}
/* Extra classes: WooCommerce/Landspire size items with nth-child rules (4 classes) on small screens. */
html body ul.products.gcf-products > li.product.gcf-products__item,
html body ul.products.gcf-products > li.product {
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
	list-style: none;
}
@media (min-width: 1024px) {
	html body ul.products.gcf-products {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* 4 per row at ~1300px, 5 from ~1370px */
		gap: 40px 24px;
	}
	/* Fixed column counts (homepage widget). */
	html body ul.products.gcf-products.gcf-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	html body ul.products.gcf-products.gcf-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	html body ul.products.gcf-products.gcf-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.gcf-pcard {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	font-family: var(--gcf-font, inherit);
	color: var(--gcf-charcoal, #2B2B2B);
}

.gcf-pcard__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	padding: 10%;
	border-radius: 14px;
	background: #F2F2F1; /* light neutral tile */
	overflow: hidden;
}
.gcf-pcard__media img,
.gcf-pcard .gcf-pcard__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	transition: transform 0.35s ease;
}
.gcf-pcard:hover .gcf-pcard__media img {
	transform: scale(1.04);
}

/* WPC Smart Wishlist button as a small round heart on the tile. */
.gcf-pcard__wish {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
}
.gcf-pcard__wish .woosw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: var(--gcf-charcoal, #2B2B2B);
	font-size: 0;
	line-height: 1;
	box-shadow: 0 1px 4px rgba(20, 20, 20, 0.12);
}
/* The plugin prints a text button (with aria-label); show a heart icon instead. */
.gcf-pcard__wish .woosw-btn::before {
	content: "";
	display: block;
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.6%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M12 20s-7.5-4.6-7.5-10A4.3 4.3 0 0 1 12 7.6 4.3 4.3 0 0 1 19.5 10c0 5.4-7.5 10-7.5 10Z%27/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27black%27 stroke-width=%271.6%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M12 20s-7.5-4.6-7.5-10A4.3 4.3 0 0 1 12 7.6 4.3 4.3 0 0 1 19.5 10c0 5.4-7.5 10-7.5 10Z%27/%3E%3C/svg%3E") center / contain no-repeat;
}
.gcf-pcard__wish .woosw-btn.woosw-added::before {
	/* filled heart once in the wishlist */
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M12 20s-7.5-4.6-7.5-10A4.3 4.3 0 0 1 12 7.6 4.3 4.3 0 0 1 19.5 10c0 5.4-7.5 10-7.5 10Z%27/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27%3E%3Cpath d=%27M12 20s-7.5-4.6-7.5-10A4.3 4.3 0 0 1 12 7.6 4.3 4.3 0 0 1 19.5 10c0 5.4-7.5 10-7.5 10Z%27/%3E%3C/svg%3E");
}
.gcf-pcard__wish .woosw-btn:hover,
.gcf-pcard__wish .woosw-btn.woosw-added {
	color: var(--gcf-red-ui, #E31B22);
}
.gcf-pcard__wish .woosw-btn:focus-visible {
	outline: 2px solid var(--gcf-red-ui, #E31B22) !important;
	outline-offset: 2px;
}

.gcf-pcard__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding-top: 16px;
}

.gcf-pcard .gcf-pcard__brand {
	margin: 0 0 6px;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--gcf-grey, #6B6B6B);
}

.gcf-pcard__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 4px;
}
.gcf-pcard .gcf-pcard__title {
	flex: 1;
	min-width: 0;
	margin: 0;
	font-family: var(--gcf-font-heading, inherit);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	color: var(--gcf-ink, #141414);
}
.gcf-pcard .gcf-pcard__title a {
	color: inherit;
	text-decoration: none;
}
.gcf-pcard .gcf-pcard__title a:hover {
	color: var(--gcf-red-ui, #E31B22);
}
.gcf-pcard__price {
	flex: none;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	color: var(--gcf-ink, #141414);
}
.gcf-pcard__price del {
	margin-right: 4px;
	font-weight: 400;
	color: var(--gcf-grey, #6B6B6B);
}
.gcf-pcard__price ins {
	text-decoration: none;
}

.gcf-pcard .gcf-pcard__desc {
	margin: 0 0 14px;
	overflow: hidden;
	font-size: 14px;
	line-height: 1.5;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--gcf-grey, #6B6B6B);
}

/* Size pills */
.gcf-pcard .gcf-pcard__sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
	padding: 0;
	border: 0;
	min-width: 0;
}
.gcf-pill {
	position: relative;
	margin: 0;
	cursor: pointer;
}
.gcf-pill input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.gcf-pill span {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0 14px;
	border: 1px solid #D9D7D3;
	border-radius: 999px;
	background: #fff;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gcf-charcoal, #2B2B2B);
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.gcf-pill:hover span {
	border-color: var(--gcf-charcoal, #2B2B2B);
}
.gcf-pill input:checked + span {
	border-color: var(--gcf-ink, #1E1E1E);
	background: var(--gcf-ink, #1E1E1E);
	color: #fff;
}
.gcf-pill input:focus-visible + span {
	outline: 2px solid var(--gcf-red-ui, #E31B22);
	outline-offset: 2px;
}
/* Single-size products: one static pill, shown as selected. */
.gcf-pill.is-static { cursor: default; }
.gcf-pill.is-static span {
	border-color: var(--gcf-ink, #1E1E1E);
	background: var(--gcf-ink, #1E1E1E);
	color: #fff;
}
.gcf-pill.is-out span {
	opacity: 0.45;
	text-decoration: line-through;
	cursor: not-allowed;
}

/* Quantity stepper + button */
.gcf-pcard__form {
	display: flex;
	flex-direction: column;
	margin-top: auto;
}
.gcf-pcard__buy {
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
}
.gcf-qty {
	display: inline-flex;
	flex: none;
	align-items: center;
	height: 44px;
	border: 1px solid #D9D7D3;
	border-radius: 999px;
	background: #fff;
}
.gcf-qty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: none;
	font-size: 18px;
	line-height: 1;
	color: var(--gcf-charcoal, #2B2B2B);
	cursor: pointer;
}
.gcf-qty__btn:hover {
	color: var(--gcf-red-ui, #E31B22);
}
html body .gcf-qty .gcf-qty__input {
	width: 32px;
	height: 42px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	font-family: inherit;
	font-size: 14px;
	text-align: center;
	color: var(--gcf-ink, #141414);
	-moz-appearance: textfield;
	appearance: textfield;
}
.gcf-qty__input::-webkit-outer-spin-button,
.gcf-qty__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

html body .gcf-pcard .gcf-pcard__add {
	display: inline-flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: var(--gcf-red-ui, #E31B22); /* white text: 4.7:1 */
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease;
	min-width: 0;
	overflow: hidden;
}
html body .gcf-pcard .gcf-pcard__add:hover {
	background: var(--gcf-red-dark, #C4161D);
	color: #fff;
}
.gcf-pcard__add .gcf-icon {
	width: 16px;
	height: 16px;
	stroke-width: 1.8;
}
.gcf-pcard__add[disabled],
.gcf-pcard__add.is-loading {
	opacity: 0.7;
	cursor: progress;
}
.gcf-pcard__add.is-added {
	background: var(--gcf-ink, #1E1E1E);
}

/* Sizes without a price: "Call for price" link instead of the stepper and button. */
.gcf-pcard__buy[hidden],
.gcf-pcard__call[hidden] {
	display: none;
}
.gcf-pcard__call {
	display: flex;
	margin-top: auto;
}
html body .gcf-pcard .gcf-pcard__add--call {
	flex-wrap: wrap;
	column-gap: 6px;
	row-gap: 2px;
	padding: 8px 16px;
	background: var(--gcf-ink, #1E1E1E);
	white-space: normal;
	text-align: center;
	line-height: 1.3;
}
html body .gcf-pcard .gcf-pcard__add--call:hover {
	background: var(--gcf-red-ui, #E31B22);
}
.gcf-pcard__call-number {
	white-space: nowrap;
	letter-spacing: 0.06em;
}
.gcf-call-price {
	font-weight: 600;
}

/* Focus states */
.gcf-pcard a:focus-visible,
.gcf-pcard button:focus-visible,
.gcf-qty__input:focus-visible {
	outline: 2px solid var(--gcf-red-ui, #E31B22) !important;
	outline-offset: 2px;
}

/* Phones: stepper and button stacked, full width. */
@media (max-width: 767.98px) {
	.gcf-pcard .gcf-pcard__title,
	.gcf-pcard__price {
		font-size: 14px;
	}
	.gcf-pcard__row {
		flex-direction: column;
		gap: 2px;
	}
	.gcf-pcard .gcf-pcard__desc {
		font-size: 13px;
	}
	.gcf-pill span {
		min-height: 30px;
		padding: 0 10px;
	}
	.gcf-pcard__buy {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}
	.gcf-qty {
		justify-content: space-between;
		width: 100%;
	}
	html body .gcf-qty .gcf-qty__input {
		flex: 1;
	}
	html body .gcf-pcard .gcf-pcard__add {
		width: 100%;
		padding: 0 10px;
		letter-spacing: 0.08em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gcf-pcard__media img,
	.gcf-pill span,
	.gcf-pcard__add {
		transition: none;
	}
}
