.lf-browse {
	margin: 0 0 20px;
}

.lf-browse ul.products {
	display: grid !important;
	grid-auto-flow: row !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 22px !important;
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
}

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

/* The theme's own clearfix ::before/::after (content:" "; display:table;)
   generate real boxes that become phantom grid items, shoving every real
   card one cell out of place. Neutralise them inside this grid only. */
.lf-browse ul.products::before,
.lf-browse ul.products::after {
	display: none !important;
	content: none !important;
}

.lf-browse li.product.lf-browse__item {
	display: block !important;
	position: relative;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	float: none !important;
	clear: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 8px; /* matches .lf-hero's own corner radius */
	overflow: hidden;
	aspect-ratio: 3 / 5;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
	background: #eee;
	list-style: none;
	text-align: left;
}

/* hover:hover excludes touch devices — no tap-and-stick hover state on mobile.
   Card itself stays put on hover (no lift/shadow) — only the photo reacts,
   plus a clean underline on the title. */
@media (hover: hover) and (pointer: fine) {
	.lf-browse li.product.lf-browse__item:hover .lf-browse__img {
		transform: scale(1.045);
	}
	.lf-browse li.product.lf-browse__item:hover .lf-browse__title-link::after {
		width: 100%;
	}
}

.lf-browse__media {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden;
	background: #17140f;
}

/* No longer shown — Tony chose crop-to-fill (below) over letterboxing, so the
   real photo always fully covers the frame and this backdrop never shows
   through. Left in the markup (harmless, fully hidden) rather than touching
   the PHP again for a purely cosmetic no-op. */
.lf-browse__media-bg {
	display: none;
}

/* Theme/WooCommerce ships ".woocommerce img { height:auto !important }" which
   collapses this to its native square size, leaving a blank gap above the
   glass panel. Beat it with !important, scoped to this card only.
   object-fit:contain (not cover) + 'full' size image (in the PHP) means the
   whole original photo is always visible, never cropped. */
.lf-browse__img {
	/* position:relative with NO z-index: needs to be "positioned" so it paints
	   in the same tier as its sibling .media-bg (also position:absolute,
	   z-index:auto) — a plain static img paints a tier below positioned
	   siblings and would hide behind the backdrop. But an explicit z-index
	   here escapes even higher, above the sibling .lf-browse__panel too
	   (neither .media nor the li establishes its own stacking context) —
	   hiding the title. Leave z-index unset; DOM order alone (this comes
	   after .media-bg, before .panel) already puts everything in the right
	   order. */
	position: relative;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important; /* full original 'full' size (see PHP) means this
		crops only a little off the sides at this card's tall 3:5 ratio — no
		top/bottom crop, since the source (1080×1440) fits the card's height
		exactly and only overflows sideways. */
	object-position: center;
	display: block;
	transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); /* smooth ease-out, not a snappy linear/short one */
}

.lf-browse__panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 16px;
	background: rgba(16, 14, 12, 0.5);
	-webkit-backdrop-filter: blur(16px) saturate(150%);
	backdrop-filter: blur(16px) saturate(150%);
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.lf-browse__title-link {
	text-decoration: none;
	color: #fff !important;
	display: inline-block;
	position: relative;
}

/* Clean, minimal underline — hidden width:0 at rest, grows smoothly on hover
   (triggered by hovering anywhere on the card, see the hover:hover block
   below), rather than a plain always-on or instantly-snapped underline. */
.lf-browse__title-link::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 1px;
	width: 0;
	height: 1px;
	background: currentColor;
	transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.lf-browse__title {
	margin: 0 0 14px !important;
	font-family: "Italiana", serif !important;
	font-size: 19px !important;
	font-weight: 400 !important;
	color: #fff !important; /* theme's own product-title rule beats font-size/family/color alike, not just color — !important on all of them */
	line-height: 1.25 !important;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.lf-browse__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.lf-browse__price-pill {
	display: inline-flex;
	align-items: center;
	padding: 0;
	border-radius: 0;
	background: transparent;
	border: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	font-family: "Montserrat", sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1; /* matches the button's line-height:1 below — without this
		the price's extra font leading made it sit visibly higher than the
		button despite align-items:center on the row */
	color: #d4af6a;
	white-space: nowrap;
}

.lf-browse__price-pill .price,
.lf-browse__price-pill .woocommerce-Price-amount {
	color: #d4af6a;
}

.lf-browse__row .add_to_cart_button {
	display: inline-flex !important;
	align-items: center !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: #111 !important;
	padding: 7px 14px !important; /* was 10px 20px — pill was too big */
	font-family: "Montserrat", sans-serif !important;
	font-size: 0 !important; /* real WooCommerce text hidden; shown via ::after
		below as "Purchase" instead — keeps the real add-to-cart link/class/
		functionality untouched in the DOM for screen readers and JS */
	font-weight: 500 !important;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	border: none !important;
	white-space: nowrap;
	line-height: 1;
	flex-shrink: 0;
	transition: background 0.25s ease, color 0.25s ease;
}

.lf-browse__row .add_to_cart_button::after {
	content: "Purchase";
	font-size: 10px; /* pseudo-element needs its own size — doesn't inherit
		the button's zeroed font-size for its generated content */
	font-family: "Montserrat", sans-serif;
	font-weight: 500;
	letter-spacing: 0.6px;
	text-transform: uppercase;
}

.lf-browse__row .add_to_cart_button::before {
	content: "";
	width: 10px;
	height: 10px;
	margin-right: 5px; /* not `gap` — the mobile "Buy" swap leaves a hidden
		zero-width text node between icon and label, and `gap` would space
		both sides of it, making the icon-to-label gap look doubled/uneven */
	flex-shrink: 0;
	background-repeat: no-repeat;
	background-size: contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
}

.lf-browse__row .add_to_cart_button:hover::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
}

.lf-browse__row .add_to_cart_button:hover {
	background: #000 !important;
	color: #fff !important;
}

.lf-browse__load-wrap {
	text-align: center;
	margin-top: 32px;
}

.lf-browse__load-more {
	display: inline-block;
	padding: 14px 40px;
	border: 1px solid #000;
	border-radius: 30px;
	background: transparent;
	font-family: "Montserrat", sans-serif;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.92px;
	text-transform: uppercase;
	color: #000;
	cursor: pointer;
	transition: background 0.3s ease, color 0.3s ease;
}

.lf-browse__load-more:hover {
	background: #000;
	color: #fff;
}

.lf-browse__load-more:disabled {
	opacity: 0.5;
	cursor: default;
}

@media (max-width: 767px) {
	.lf-browse ul.products {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 12px !important;
	}
	.lf-browse__panel {
		padding: 14px;
	}
	.lf-browse__title {
		font-size: 16px !important;
		margin-bottom: 10px !important;
		display: -webkit-box !important;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
	.lf-browse__price-pill {
		font-size: 13px;
	}
	/* Real button text ("Add to basket") stays in the DOM for
	   functionality and screen readers — just visually swapped for a
	   short "Buy" so it fits next to the price on a narrow card. */
	.lf-browse__row .add_to_cart_button {
		font-size: 0 !important;
		padding: 10px 16px !important;
	}
	.lf-browse__row .add_to_cart_button::after {
		content: "Buy";
		font-family: "Montserrat", sans-serif;
		font-size: 11px;
		font-weight: 500;
		letter-spacing: 0.6px;
		text-transform: uppercase;
	}
}
