/*
 * Point Blank Product Actions — front-end styles.
 *
 * Self-contained and theme-agnostic: readable on dark product summaries (pointblank theme)
 * and light pages (Storefront, light content canvases).
 *
 * Specificity: every rule that sets a link/button colour is at least (0,3,1) so it beats
 * theme rules such as `body.pb-light-canvas .pb-content a` (0,2,2), and every :hover/:focus
 * colour rule is at least (0,4,1) to beat `body.pb-light-canvas .pb-content a:hover` (0,3,2).
 * Minimum text size 12.5px; tap targets >= 44px.
 */

/* =========================================================================
   1. Product page: .pbpa-actions
   ========================================================================= */

.pbpa-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	width: 100%;
	margin: 14px 0 18px;
	clear: both;
}

.pbpa-actions a.pbpa-btn {
	-webkit-tap-highlight-color: transparent;
	box-sizing: border-box;
	display: inline-flex;
	flex: 1 1 200px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 2px 8px;
	min-height: 48px;
	margin: 0;
	padding: 10px 18px;
	border: 2px solid transparent;
	border-radius: 6px;
	box-shadow: none;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	font-style: normal;
	line-height: 1.25;
	letter-spacing: normal;
	text-align: center;
	text-decoration: none;
	text-shadow: none;
	text-transform: none;
	white-space: normal;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pbpa-actions a.pbpa-btn .pbpa-icon {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	margin: 0;
}

.pbpa-actions a.pbpa-btn small {
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.2;
	opacity: 0.8;
	white-space: nowrap;
}

/* Amazon: #111 on #FF9900 = 8.8:1, on #F08804 = 7.4:1 */
.pbpa-actions a.pbpa-btn.pbpa-btn--amazon,
.pbpa-actions a.pbpa-btn.pbpa-btn--amazon:visited {
	background: #ff9900;
	border-color: #ff9900;
	color: #111;
	text-decoration: none;
}

.pbpa-actions a.pbpa-btn.pbpa-btn--amazon:hover,
.pbpa-actions a.pbpa-btn.pbpa-btn--amazon:focus,
.pbpa-actions a.pbpa-btn.pbpa-btn--amazon:active {
	background: #f08804;
	border-color: #f08804;
	color: #111;
	text-decoration: none;
}

/* Brochure: outline button that takes the surrounding text colour (dark or light). */
.pbpa-actions a.pbpa-btn.pbpa-btn--brochure,
.pbpa-actions a.pbpa-btn.pbpa-btn--brochure:visited {
	background: transparent;
	border-color: currentColor;
	color: inherit;
	text-decoration: none;
}

.pbpa-actions a.pbpa-btn.pbpa-btn--brochure:hover,
.pbpa-actions a.pbpa-btn.pbpa-btn--brochure:focus,
.pbpa-actions a.pbpa-btn.pbpa-btn--brochure:active {
	background: rgba(128, 128, 128, 0.16);
	border-color: currentColor;
	color: inherit;
	text-decoration: none;
}

/* Two-tone ring: the white ring shows on dark backgrounds, the dark ring on light ones. */
.pbpa-actions a.pbpa-btn:focus-visible {
	outline: 2px solid transparent;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1b1d21;
}

/* =========================================================================
   2. Brochure Center: [pointblank_brochures]
   ========================================================================= */

.pbpa-brochures {
	margin: 0 0 40px;
	font-size: 15px;
	line-height: 1.5;
}

.pbpa-brochures *,
.pbpa-brochures *::before,
.pbpa-brochures *::after {
	box-sizing: border-box;
}

.pbpa-brochures .pbpa-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---- Intro ---- */

.pbpa-brochures .pbpa-intro {
	margin: 0 0 22px;
}

.pbpa-brochures h2.pbpa-intro__title {
	margin: 0 0 6px;
	font-size: clamp(26px, 3.2vw, 34px);
	line-height: 1.15;
	color: inherit;
}

.pbpa-brochures p.pbpa-intro__lead {
	max-width: 62ch;
	margin: 0;
	font-size: 16px;
	line-height: 1.55;
	color: inherit;
}

/* ---- Shared buttons ---- */

.pbpa-brochures a.pbpa-btn {
	-webkit-tap-highlight-color: transparent;
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 2px 8px;
	min-height: 44px;
	margin: 0;
	padding: 10px 16px;
	border: 2px solid transparent;
	border-radius: 6px;
	box-shadow: none;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-align: center;
	text-decoration: none;
	text-shadow: none;
	text-transform: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pbpa-brochures a.pbpa-btn .pbpa-icon {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
}

.pbpa-brochures a.pbpa-btn small {
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.2;
	opacity: 0.85;
	white-space: nowrap;
}

/* Primary: #fff on #a3161b = 7.8:1 */
.pbpa-brochures a.pbpa-btn.pbpa-btn--primary,
.pbpa-brochures a.pbpa-btn.pbpa-btn--primary:visited {
	background: #a3161b;
	border-color: #a3161b;
	color: #fff;
	text-decoration: none;
}

.pbpa-brochures a.pbpa-btn.pbpa-btn--primary:hover,
.pbpa-brochures a.pbpa-btn.pbpa-btn--primary:focus,
.pbpa-brochures a.pbpa-btn.pbpa-btn--primary:active {
	background: #8a1216;
	border-color: #8a1216;
	color: #fff;
	text-decoration: none;
}

/* ---- Featured catalogue card (dark with red accent on any page colour) ---- */

.pbpa-brochures .pbpa-featured {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px 22px;
	margin: 0 0 28px;
	padding: 22px 24px;
	border: 1px solid #2c2f35;
	border-left: 4px solid #e31e24;
	border-radius: 10px;
	background-color: #17181b;
	background-image: linear-gradient(110deg, rgba(227, 30, 36, 0.2) 0%, rgba(227, 30, 36, 0) 48%);
	color: #f2f3f5;
}

.pbpa-brochures .pbpa-featured__icon {
	display: flex;
	line-height: 0;
}

.pbpa-brochures .pbpa-featured__icon .pbpa-icon {
	width: 48px;
	height: 56px;
}

.pbpa-brochures p.pbpa-featured__eyebrow {
	margin: 0;
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #ff9a9e;
}

.pbpa-brochures .pbpa-featured .pbpa-featured__body h3.pbpa-featured__title {
	margin: 2px 0 4px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
}

.pbpa-brochures p.pbpa-featured__meta {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
	color: #c9ccd3;
}

.pbpa-brochures .pbpa-featured__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.pbpa-brochures .pbpa-featured a.pbpa-btn.pbpa-btn--primary {
	border-color: #e31e24;
}

.pbpa-brochures .pbpa-featured a.pbpa-btn.pbpa-btn--primary:hover,
.pbpa-brochures .pbpa-featured a.pbpa-btn.pbpa-btn--primary:focus {
	background: #c41a20;
	border-color: #e31e24;
	color: #fff;
}

.pbpa-brochures a.pbpa-btn.pbpa-btn--ghost,
.pbpa-brochures a.pbpa-btn.pbpa-btn--ghost:visited {
	background: transparent;
	border-color: #f2f3f5;
	color: #f2f3f5;
	text-decoration: none;
}

.pbpa-brochures a.pbpa-btn.pbpa-btn--ghost:hover,
.pbpa-brochures a.pbpa-btn.pbpa-btn--ghost:focus,
.pbpa-brochures a.pbpa-btn.pbpa-btn--ghost:active {
	background: rgba(255, 255, 255, 0.12);
	border-color: #fff;
	color: #fff;
	text-decoration: none;
}

/* ---- Toolbar: search + category chips ---- */

.pbpa-brochures .pbpa-toolbar {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0 0 14px;
}

.pbpa-brochures .pbpa-search-wrap {
	position: relative;
	width: 100%;
	max-width: 520px;
}

.pbpa-brochures .pbpa-search-icon {
	position: absolute;
	top: 50%;
	left: 14px;
	transform: translateY(-50%);
	color: #4b5260;
	pointer-events: none;
}

.pbpa-brochures .pbpa-toolbar input[type="search"].pbpa-search {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	min-width: 0;
	height: 48px;
	margin: 0;
	padding: 10px 14px 10px 42px;
	border: 1px solid #868e9c;
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
	color: #1b1d21;
	font-family: inherit;
	font-size: 16px; /* >= 16px stops iOS zooming on focus */
	line-height: 1.3;
}

.pbpa-brochures .pbpa-toolbar input[type="search"].pbpa-search::placeholder {
	color: #6b7280;
	opacity: 1;
}

.pbpa-brochures .pbpa-toolbar input[type="search"].pbpa-search:focus {
	border-color: #a3161b;
	outline: 2px solid transparent;
	box-shadow: 0 0 0 2px #a3161b;
}

.pbpa-brochures .pbpa-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 4px;
	scrollbar-width: thin;
}

.pbpa-brochures .pbpa-chips button.pbpa-chip {
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	margin: 0;
	padding: 8px 14px;
	border: 1px solid #868e9c;
	border-radius: 999px;
	background: #fff;
	box-shadow: none;
	color: #1b1d21;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-shadow: none;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pbpa-brochures .pbpa-chips button.pbpa-chip:hover {
	border-color: #a3161b;
	background: #fff;
	color: #a3161b;
}

.pbpa-brochures .pbpa-chips button.pbpa-chip[aria-pressed="true"],
.pbpa-brochures .pbpa-chips button.pbpa-chip[aria-pressed="true"]:hover {
	border-color: #1b1d21;
	background: #1b1d21;
	color: #fff;
}

.pbpa-brochures .pbpa-chips .pbpa-chip__count {
	padding: 1px 7px;
	border-radius: 999px;
	background: #eef0f3;
	color: #3d4450;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.4;
}

.pbpa-brochures .pbpa-chips button.pbpa-chip[aria-pressed="true"] .pbpa-chip__count {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.pbpa-brochures p.pbpa-count {
	margin: 0 0 14px;
	font-size: 14px;
	font-weight: 600;
	color: inherit;
}

/* ---- Grid & cards (always light, whatever the page colour) ---- */

.pbpa-brochures ul.pbpa-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pbpa-brochures li.pbpa-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid #e2e5ea;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
	color: #1b1d21;
	list-style: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pbpa-brochures li.pbpa-card::before,
.pbpa-brochures li.pbpa-card::marker {
	content: none;
}

.pbpa-brochures li.pbpa-card:hover {
	border-color: #c9ced8;
	box-shadow: 0 6px 18px rgba(16, 24, 40, 0.1);
}

.pbpa-brochures a.pbpa-card__media {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-bottom: 1px solid #e2e5ea;
	background: #fff;
}

.pbpa-brochures a.pbpa-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: contain;
}

.pbpa-brochures .pbpa-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	padding: 14px 16px 16px;
}

/* #4b5260 on #fff = 7.9:1 */
.pbpa-brochures p.pbpa-card__cat {
	margin: 0;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #4b5260;
}

.pbpa-brochures .pbpa-card .pbpa-card__body h3.pbpa-card__title {
	margin: 0 0 4px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	color: #1b1d21;
	overflow-wrap: break-word;
	hyphens: manual;
}

.pbpa-brochures .pbpa-card .pbpa-card__body h3.pbpa-card__title a,
.pbpa-brochures .pbpa-card .pbpa-card__body h3.pbpa-card__title a:visited {
	color: #1b1d21;
	font-weight: inherit; /* Storefront sets `h3 a { font-weight: 300 }` */
	text-decoration: none;
}

.pbpa-brochures .pbpa-card .pbpa-card__body h3.pbpa-card__title a:hover,
.pbpa-brochures .pbpa-card .pbpa-card__body h3.pbpa-card__title a:focus {
	color: #a3161b;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.pbpa-brochures .pbpa-card__actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
	margin-top: auto;
	padding-top: 6px;
}

.pbpa-brochures .pbpa-card a.pbpa-btn {
	width: 100%;
	padding-right: 12px;
	padding-left: 12px;
	gap: 2px 6px;
}

.pbpa-brochures .pbpa-card a.pbpa-card__link,
.pbpa-brochures .pbpa-card a.pbpa-card__link:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	font-size: 14px;
	font-weight: 600;
	color: #1b1d21;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.pbpa-brochures .pbpa-card a.pbpa-card__link:hover,
.pbpa-brochures .pbpa-card a.pbpa-card__link:focus {
	color: #a3161b;
	text-decoration: underline;
}

/* ---- Empty state ---- */

.pbpa-brochures .pbpa-empty,
.pbpa-brochures p.pbpa-empty-static {
	margin: 0;
	padding: 28px 20px;
	border: 1px dashed #c9ced8;
	border-radius: 10px;
	background: #fff;
	color: #1b1d21;
	text-align: center;
}

.pbpa-brochures .pbpa-empty p {
	margin: 0 0 12px;
	font-size: 16px;
	color: #1b1d21;
}

.pbpa-brochures .pbpa-empty button.pbpa-reset {
	-webkit-appearance: none;
	appearance: none;
	min-height: 44px;
	margin: 0;
	padding: 8px 18px;
	border: 2px solid #1b1d21;
	border-radius: 6px;
	background: #fff;
	box-shadow: none;
	color: #1b1d21;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-shadow: none;
	text-transform: none;
	cursor: pointer;
}

.pbpa-brochures .pbpa-empty button.pbpa-reset:hover {
	background: #1b1d21;
	color: #fff;
}

/* ---- Focus rings (white inner + red outer ring: visible on light and dark) ---- */

.pbpa-brochures a.pbpa-btn:focus-visible,
.pbpa-brochures .pbpa-card a:focus-visible,
.pbpa-brochures .pbpa-chips button.pbpa-chip:focus-visible,
.pbpa-brochures .pbpa-empty button.pbpa-reset:focus-visible {
	outline: 2px solid transparent;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #a3161b;
}

/* ---- [hidden] must win over the display rules above ---- */

.pbpa-brochures .pbpa-toolbar[hidden],
.pbpa-brochures li.pbpa-card[hidden],
.pbpa-brochures .pbpa-empty[hidden] {
	display: none;
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
	.pbpa-brochures .pbpa-featured {
		grid-template-columns: auto minmax(0, 1fr);
		padding: 18px;
	}

	.pbpa-brochures .pbpa-featured__actions {
		grid-column: 1 / -1;
	}

	.pbpa-brochures .pbpa-featured__actions a.pbpa-btn {
		flex: 1 1 140px;
	}

	/* One swipeable row of chips instead of several wrapped rows. */
	.pbpa-brochures .pbpa-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		padding-bottom: 8px;
	}

	.pbpa-brochures .pbpa-search-wrap {
		max-width: none;
	}
}

/* Phones: compact horizontal cards (thumbnail left). Title + image already link to the product. */
@media (max-width: 520px) {
	.pbpa-brochures ul.pbpa-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.pbpa-brochures li.pbpa-card {
		flex-direction: row;
		align-items: stretch;
	}

	.pbpa-brochures a.pbpa-card__media {
		flex: 0 0 96px;
		align-self: flex-start;
		width: 96px;
		border-right: 1px solid #e2e5ea;
		border-bottom: 1px solid #e2e5ea;
		border-bottom-right-radius: 10px;
	}

	.pbpa-brochures .pbpa-card__body {
		padding: 12px 14px 14px;
	}

	.pbpa-brochures .pbpa-card .pbpa-card__body h3.pbpa-card__title {
		font-size: 15px;
	}

	.pbpa-brochures .pbpa-card a.pbpa-card__link {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pbpa-actions a.pbpa-btn,
	.pbpa-brochures a.pbpa-btn,
	.pbpa-brochures li.pbpa-card,
	.pbpa-brochures .pbpa-chips button.pbpa-chip {
		transition: none;
	}
}
