/* Home category bar (owner 2026-08-15: width UNLOCKED for the extra tiles).
   Desktop: the same one-row layout as before — every card visible, equal
   widths, no scrolling — but the bar now breaks out of the 1280px container to
   the full viewport (the hero's own 100vw technique; it overhangs the page by
   half the scrollbar per side and the theme clips page-level x-overflow), so
   the 7–8 cards keep a comfortable size. Phones keep the swipe rail. */
.laymoun-cats {
	width: 100vw;
	max-width: none;
	margin: 24px 0 8px;
	margin-inline-start: calc(50% - 50vw);
	padding: 0 30px;
}
.laymoun-cats__row {
	display: flex;
	gap: 16px;
}
.laymoun-cats__card {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	background: #fff;
	text-decoration: none;
	transition: box-shadow .16s ease, transform .16s ease;
}
.laymoun-cats__card:hover {
	transform: translateY(-4px);
}
.laymoun-cats__card:hover .laymoun-cats__img {
	box-shadow: 0 10px 24px rgba(24, 96, 52, .16);
}
.laymoun-cats__img {
	display: block;
	aspect-ratio: 1 / 1;             /* square (owner 2026-07-18; was 4:3) —
	                                    matches the mostly square artwork, so
	                                    cover barely crops */
	background: #f2f5ee;
	overflow: hidden;
	border-radius: 16px 16px 0 0;
}
.laymoun-cats__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 0 !important;
}
.laymoun-cats__name {
	display: block;
	padding: 13px 8px 15px;
	text-align: center;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.25;
	color: #1f2421;
}
/* ── Mobile: big swipeable cards ─────────────────────────────────────────────
   One horizontal swipe row instead of squeezing the cards across the screen.
   The scroller is full-bleed (same breakout as above) so cards slide under the
   screen edges; the first card still starts on the 30px content line and every
   swipe snaps back to it. A partial next card stays visible ("peek") so users
   know they can swipe. */
@media (max-width: 767px) {
	.laymoun-cats {
		margin-block: 16px 8px;
		padding: 0;
	}
	.laymoun-cats__row {
		gap: 12px;
		overflow-x: auto;
		padding-inline: 30px;
		padding-bottom: 4px;                 /* keep the card shadow unclipped */
		scroll-snap-type: x mandatory;
		scroll-padding-inline-start: 30px;   /* snap cards onto the content line */
		overscroll-behavior-x: contain;      /* don't trigger browser back-swipe */
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;               /* swipe UI — no scrollbar (Firefox) */
	}
	.laymoun-cats__row::-webkit-scrollbar {
		display: none;                       /* …and Chrome/Safari */
	}
	.laymoun-cats__card {
		flex: 0 0 auto;                      /* fixed size, don't squeeze to fit */
		width: clamp(148px, 41vw, 200px);    /* ~2.2 cards visible on phones */
		scroll-snap-align: start;
	}
	.laymoun-cats__name {
		font-size: 13px;
		padding: 10px 6px 12px;
	}
}

/* ── Group cards: a category's types first in its grid (client feedback 9 #9,
   2026-10-16, app repo docs/plans/73) ────────────────────────────────────────
   Replaces the chip row above the grid (owner 2026-10-02 / 10-08). The card is
   the product card's own box (laymoun_type_cards_html()), so the grid already
   gives it the product card's width, corners, shadow and row height, and puts
   the picture first; it carries only the type's name. The name's link stretches
   over the whole card, so a tap anywhere opens the type (the picture's own link
   is hidden from keyboards and screen readers, which would announce it twice). */
.woocommerce .products .product.lm-group-card .product-name a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.woocommerce .products .product.lm-group-card .product-name a:focus-visible {
	outline: none;
}
.woocommerce .products .product.lm-group-card:focus-within {
	outline: 2px solid #186034;
	outline-offset: 2px;
}

/* ── Product count of a type (owner 2026-10-24): after the name in the sidebar's
   Category list, and under the name on a type card. Number only, so it needs no
   translation; logical properties keep it right in Arabic (RTL). */
.lm-type-count {
	margin-inline-start: 8px;
	padding: 1px 8px;
	border-radius: 999px;
	background: #eef3ee;
	color: #186034;
	font-size: 12px;
	font-weight: 600;
	line-height: 18px;
	white-space: nowrap;
}
.woocommerce .products .product.lm-group-card .item-description .lm-type-count {
	display: inline-block;
	align-self: center;
	width: auto;
	margin: 6px auto 0;
	padding-inline: 12px;
}
/* The sidebar row's count reads like the listing heading ("3 products"), not "3 Products". */
.ftc-product-categories-list ul.product-categories ul.children > li > a .lm-cat-count {
	text-transform: none;
}
