/**
 * Homepage collection tiles — [pb_home_collections] (Catalog\Collections).
 *
 * Styled to MATCH the theme's own homepage banner row (motta-banner widgets
 * "Women / Modest Fashion / Men", measured live 2026-10-04): 7px corners, the
 * photo covering the card, a bold white Poppins title bottom-left and the
 * theme's teal "Shop Now" pill (.motta-button classes, so it is the real
 * button style). Owner: "the design should match the current theme".
 *
 *   >= 1024px  one row of three wide rectangles, 24px gaps, 180px tall
 *   768–1023   one row of three, 16px gaps, 150px tall
 *   <  768px   two side by side + the third full width below, 110px tall,
 *              title only (the theme hides the banner button on phones too)
 *   Owner 2026-10-05: "make the boxes into rectangles, not big".
 *
 * Every rule is scoped under .pb-hc; visual props that Motta / Elementor set on
 * links + images carry enough specificity to win. Loaded only where the
 * shortcode renders — printed in place, right before the section.
 */

.pb-hc {
	margin: 0;
	padding: 0;
}

.pb-hc .pb-hc__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pb-hc .pb-hc__item {
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pb-hc .pb-hc__item::before,
.pb-hc .pb-hc__item::marker {
	content: none;
}

/* One link = the whole card. */
.pb-hc .pb-hc__tile {
	position: relative;
	display: block;
	overflow: hidden;
	height: 180px;
	border-radius: 7px; /* = .motta-banner */
	background: #f1eee9; /* while the photo loads */
	color: #fff;
	text-decoration: none;
	isolation: isolate;
	-webkit-tap-highlight-color: transparent;
}

.pb-hc .pb-hc__tile:hover,
.pb-hc .pb-hc__tile:focus,
.pb-hc .pb-hc__tile:active {
	color: #fff;
	text-decoration: none;
}

.pb-hc .pb-hc__tile:focus {
	outline: none;
}

.pb-hc .pb-hc__tile:focus-visible {
	outline: 3px solid #2095b8;
	outline-offset: 3px;
}

.pb-hc .pb-hc__media {
	position: absolute;
	inset: 0;
	display: block;
}

.pb-hc .pb-hc__media .pb-hc__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	border-radius: 0;
	object-fit: cover;
	object-position: 50% 22%; /* a wide crop of a portrait photo: keep the bodice / neckline */
}

/* A light scrim so the white title stays readable on pale photos (the theme's
   own banners use darker photos; this keeps the same look on ours). */
.pb-hc .pb-hc__tile::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 45%, rgba(0, 0, 0, 0) 75%);
}

.pb-hc .pb-hc__body {
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 22px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

/* = .motta-banner__before-title */
.pb-hc .pb-hc__title {
	font-family: Poppins, sans-serif;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.05;
	color: #fff;
	overflow-wrap: anywhere;
}

/* The theme's .motta-button-primary --medium pill (44px, teal, cream text).
   Pinned here too so a theme change to `button` defaults can't distort it. */
.pb-hc .pb-hc__btn.motta-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	min-width: 0 !important;
	padding: 0 18px;
	border-radius: 999px;
	background-color: #2095b8;
	color: rgb(242, 237, 214);
	font-family: Poppins, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 44px;
	white-space: nowrap;
	pointer-events: none; /* the whole tile is the link */
}

.pb-hc .pb-hc__btn .motta-button__text {
	color: inherit;
}

@media (hover: hover) and (pointer: fine) {
	.pb-hc .pb-hc__tile:hover .pb-hc__btn.motta-button {
		background-color: #1a7d9b;
	}
}

/* Tablet: same row of three, a little shorter. */
@media (min-width: 768px) and (max-width: 1023px) {
	.pb-hc .pb-hc__grid {
		gap: 16px;
	}

	.pb-hc .pb-hc__tile {
		height: 150px;
	}

	.pb-hc .pb-hc__body {
		left: 16px;
		right: 16px;
		bottom: 14px;
		gap: 8px;
	}

	.pb-hc .pb-hc__title {
		font-size: 20px;
	}

	.pb-hc .pb-hc__btn.motta-button {
		height: 36px;
		line-height: 36px;
		padding: 0 14px;
		font-size: 13px;
	}
}

/* Mobile: 2 + 1, title only — as the theme's banners on phones. */
@media (max-width: 767px) {
	.pb-hc .pb-hc__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.pb-hc .pb-hc__item--wide {
		grid-column: 1 / -1;
	}

	.pb-hc .pb-hc__tile {
		height: 110px;
	}

	.pb-hc .pb-hc__body {
		left: 14px;
		right: 12px;
		bottom: 12px;
	}

	.pb-hc .pb-hc__title {
		font-size: 18px;
	}

	.pb-hc .pb-hc__btn.motta-button {
		display: none;
	}
}
