/*
 * bdo-product-loop.css — v0.4.6
 * Card styling for the product loop. Mobile-first; desktop adds the hover swap + lift.
 * Design rules: square corners, no prices, no ratings, team-color accent bar only.
 * The whole card is one tappable link (no button). Font: Poppins.
 */

.bdo-pl-grid {
	--bdo-pl-ink:   #1a1a1a;
	--bdo-pl-muted: #6b6b6b;
	--bdo-pl-faint: #9a9a9a;
	--bdo-pl-line:  #e5e5e5;
	--bdo-pl-strip: #f4f2ee;

	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	display: grid;
	/* Column counts come in as CSS vars from the renderer. Mobile-first default. */
	grid-template-columns: repeat(var(--cols-m, 2), 1fr);
	gap: 12px;
}

/* Tablet */
@media (min-width: 641px) {
	.bdo-pl-grid { grid-template-columns: repeat(var(--cols-t, 3), 1fr); gap: 16px; }
}

/* Desktop */
@media (min-width: 901px) {
	.bdo-pl-grid { grid-template-columns: repeat(var(--cols-d, 4), 1fr); }
}

/* The card is a single <a>. Reset link styling; the whole thing is tappable.
   The team-color accent bar is applied here (not inline) so :hover / :active
   can swap it to the secondary team color. Falls back cleanly when the
   accent variables aren't set (accent_bar disabled or no team color). */
.bdo-pl-card {
	background: #fff;
	border: 1px solid var(--bdo-pl-line);
	border-top: var(--bdo-pl-accent-thickness, 1px) solid var(--bdo-pl-accent, var(--bdo-pl-line));
	transition: border-top-color 0.25s ease;
	display: flex;
	flex-direction: column;
	color: var(--bdo-pl-ink);
	text-decoration: none;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease;
	/* NO border-radius anywhere. */
}
.bdo-pl-card:hover,
.bdo-pl-card:focus { color: var(--bdo-pl-ink); text-decoration: none; }

/* Desktop-only hover lift for affordance. Skipped on touch via @media (hover:hover). */
@media (hover: hover) {
	.bdo-pl-card:hover {
		transform: translateY(-3px);
		box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
		border-top-color: var(--bdo-pl-accent-hover, var(--bdo-pl-accent));
	}
}
/* Mobile / touch: the accent bar briefly flashes to the secondary team color
   while the finger is down. Also fires for keyboard :focus-visible. */
.bdo-pl-card:active,
.bdo-pl-card:focus-visible {
	border-top-color: var(--bdo-pl-accent-hover, var(--bdo-pl-accent));
}

/* Media / image */
.bdo-pl-media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	margin: 0;             /* full-bleed image: flush under the accent bar and to the card edges */
	overflow: hidden;
	background: var(--bdo-pl-strip);
}
.bdo-pl-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity .3s ease;
}
.bdo-pl-img-hover { opacity: 0; }

/* Desktop-only hover image swap. @media (hover:hover) keeps touch/mobile on the primary image. */
@media (hover: hover) {
	.bdo-pl-card:hover .bdo-pl-img-hover   { opacity: 1; }
	.bdo-pl-card:hover .bdo-pl-img-primary { opacity: 0; }
}

/* Text */
.bdo-pl-body { display: block; padding: 12px 10px; text-align: center; }
.bdo-pl-type {
	display: block;
	font-size: 10px;
	font-weight: 600;
	color: var(--bdo-pl-faint);
	text-transform: uppercase;
	letter-spacing: .07em;
	margin-bottom: 6px;
}
.bdo-pl-stadium {
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--bdo-pl-ink);
}
.bdo-pl-team { display: block; font-size: 13px; color: var(--bdo-pl-muted); margin-top: 2px; }
.bdo-pl-city { display: block; font-size: 11px; color: var(--bdo-pl-faint); margin-top: 4px; }

/* -------------------------------------------------------------------------
   View-all button (placement mode only). Links to the full category archive.
   "Split accent" design: a colored label segment + a chevron cap segment.
   Square corners + Poppins to match the cards. Resting = blue label / navy cap;
   on hover, focus, or tap the two colors swap. CSS-only, no JS.
   Palette: blue #1f6feb, navy #163a6b.
   ------------------------------------------------------------------------- */
.bdo-pl-actions {
	margin-top: 26px;
	text-align: center;
}
.bdo-pl-viewall {
	display: inline-flex;
	align-items: stretch;
	overflow: hidden;
	text-decoration: none;
	/* !important: beat the theme's default link color so text/chevron stay white. */
	color: #fff !important;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 17px;
	font-weight: 600;
	/* NO border-radius. */
}
.bdo-pl-viewall,
.bdo-pl-viewall:hover,
.bdo-pl-viewall:focus,
.bdo-pl-viewall .bdo-pl-viewall-label,
.bdo-pl-viewall .bdo-pl-viewall-cap { color: #fff !important; text-decoration: none; }

.bdo-pl-viewall-label {
	display: flex;
	align-items: center;
	white-space: nowrap;
	padding: 19px 34px;
	background: #1f6feb;                 /* blue */
	text-transform: lowercase;          /* button text renders all lower case */
	transition: background .18s ease;
}
.bdo-pl-viewall-cap {
	display: flex;
	align-items: center;
	padding: 19px 24px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
	background: #163a6b;                 /* navy */
	transition: background .18s ease;
}

/* Hover / keyboard focus / tap: swap the two segment colors. */
.bdo-pl-viewall:hover  .bdo-pl-viewall-label,
.bdo-pl-viewall:focus-visible .bdo-pl-viewall-label,
.bdo-pl-viewall:active .bdo-pl-viewall-label { background: #163a6b; }
.bdo-pl-viewall:hover  .bdo-pl-viewall-cap,
.bdo-pl-viewall:focus-visible .bdo-pl-viewall-cap,
.bdo-pl-viewall:active .bdo-pl-viewall-cap { background: #1f6feb; }

@media (prefers-reduced-motion: reduce) {
	.bdo-pl-viewall-label,
	.bdo-pl-viewall-cap { transition: none; }
}

/* -------------------------------------------------------------------------
   Category header banner (shortcode header="true"), rendered above the grid.
   Two columns on desktop (title + icon watermark | description), centered
   single column on mobile. Per-sport colors come in as --bp-bg / --bp-rule.
   Square corners, Poppins. Icon is an inline SVG watermark (currentColor).
   ------------------------------------------------------------------------- */
.bp-banner {
	--bp-bg: #78a06b;
	--bp-rule: #3f5732;
	position: relative;
	overflow: hidden;
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	background: var(--bp-bg);
	color: #f4f1ea;
	border-top: 6px solid var(--bp-rule);
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	margin: 20px 0; /* equal top + bottom spacing around the banner */
	/* NO border-radius. */
}
.bp-banner__ball {
	position: absolute;
	left: -45px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 140px;
	line-height: 0;
	color: rgba(255, 255, 255, 0.16);
	pointer-events: none;
	z-index: 0;
}
.bp-banner__title-wrap {
	position: relative;
	z-index: 1;
	padding: 34px 44px 34px 110px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.bp-banner__title {
	margin: 0;
	font-size: 40px;
	line-height: 1.02;
	font-weight: 800;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	color: #fff;
	/* Balance multi-line titles so they break into even lines (e.g. "POPULAR
	   BASEBALL" / "STADIUM PRINTS") instead of stranding one word. */
	text-wrap: balance;
}
.bp-banner__body {
	position: relative;
	z-index: 1;
	padding: 34px 44px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 16px;
	border-left: 1px solid rgba(255, 255, 255, 0.28);
}
.bp-banner__body p { margin: 0; font-weight: 300; }
.bp-banner__body p:first-child { font-size: 14px; line-height: 1.55; color: #fff; }
.bp-banner__body p:last-child  { font-size: 13px; line-height: 1.55; color: rgba(255, 255, 255, 0.82); }

@media (max-width: 768px) {
	.bp-banner { grid-template-columns: 1fr; text-align: center; }
	.bp-banner__ball {
		left: 50%;
		transform: translate(-50%, -50%);
		font-size: 200px;
		color: rgba(255, 255, 255, 0.10);
	}
	.bp-banner__title-wrap { padding: 22px 20px 14px; align-items: center; }
	.bp-banner__title { font-size: 20px; letter-spacing: -0.02em; line-height: 1.12; }
	.bp-banner__body { padding: 0 20px 24px; border-left: none; align-items: center; }
	/* Tighten the banner on mobile: show only the first paragraph. */
	.bp-banner__body p:not(:first-child) { display: none; }
}
