/* STX Bullseye — Manufacturer logo library */

:root {
	--stx-mfg-card-bg: #ffffff;
	--stx-mfg-card-radius: 13px;
	--stx-mfg-card-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
	--stx-mfg-card-shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.34);
	--stx-mfg-card-border: 1px solid rgba(255, 255, 255, 0.12);
}

.stx-mfg-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	vertical-align: middle;
}

.stx-mfg-logo__img {
	display: block;
	width: auto;
	height: var(--stx-mfg-logo-height, 1.75rem);
	max-width: 100%;
	max-height: var(--stx-mfg-logo-max-height, var(--stx-mfg-logo-height, 1.75rem));
	object-fit: contain;
	object-position: center;
}

.stx-mfg-logo--mono .stx-mfg-logo__img {
	filter: brightness(0) invert(1) opacity(0.92);
}

.stx-mfg-logo--mono.stx-mfg-logo--strip .stx-mfg-logo__img,
.stx-mfg-logo--mono.stx-mfg-logo--menu .stx-mfg-logo__img {
	filter: brightness(0) invert(1) opacity(0.78);
}

.stx-mfg-logo--color .stx-mfg-logo__img {
	filter: none;
}

/* White logo cards — shared treatment */
.stx-mfg-logo-card,
.stx-mfg-logo-strip__item,
.stx-mfg-logo-grid__item,
.stx-product-card__brand-logo,
.stx-product-detail__brand-logo,
.stx-page-intro__brand-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	background: var(--stx-mfg-card-bg);
	border: var(--stx-mfg-card-border);
	border-radius: var(--stx-mfg-card-radius);
	box-shadow: var(--stx-mfg-card-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.stx-mfg-logo-strip__item,
.stx-mfg-logo-grid__item {
	display: flex;
	width: 100%;
	min-width: 0;
}

.stx-mfg-logo-strip__item:hover,
.stx-mfg-logo-grid__item:hover,
.stx-product-card:hover .stx-product-card__brand-logo,
.stx-product-detail__brand-logo:hover,
.stx-page-intro__brand-logo:hover {
	transform: translateY(-3px);
	box-shadow: var(--stx-mfg-card-shadow-hover);
	filter: brightness(1.04);
	background-color: #ffffff;
}

/* Inner logo sits on the white card — no nested chip */
.stx-mfg-logo-strip__item .stx-mfg-logo--color,
.stx-mfg-logo-grid__item .stx-mfg-logo--color,
.stx-product-card__brand-logo .stx-mfg-logo--color,
.stx-product-detail__brand-logo .stx-mfg-logo--color,
.stx-page-intro__brand-logo .stx-mfg-logo--color {
	padding: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.stx-mfg-logo--sm { --stx-mfg-logo-height: 1.4rem; }
.stx-mfg-logo--md { --stx-mfg-logo-height: 2.2rem; }
.stx-mfg-logo--lg { --stx-mfg-logo-height: 2.9rem; }

.stx-mfg-logo-fallback {
	border: 1px solid rgba(217, 119, 6, 0.28);
	border-radius: 0.45rem;
	background: linear-gradient(145deg, rgba(22, 27, 34, 0.95), rgba(13, 17, 23, 0.82));
	padding: 0.25rem 0.55rem;
}

.stx-mfg-logo-strip__item .stx-mfg-logo-fallback,
.stx-mfg-logo-grid__item .stx-mfg-logo-fallback,
.stx-product-card__brand-logo .stx-mfg-logo-fallback {
	border: 0;
	border-radius: 0;
	background: transparent;
	padding: 0;
}

.stx-mfg-logo__text {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--stx-mfg-logo-height, 1.75rem);
	color: #1a1a1a;
	font-size: 0.72rem;
	font-weight: 900;
	letter-spacing: 0.06em;
	line-height: 1.1;
	text-align: center;
	text-transform: uppercase;
	white-space: nowrap;
}

.stx-mfg-logo--text.stx-mfg-logo--sm .stx-mfg-logo__text {
	font-size: 0.62rem;
}

.stx-mfg-logo--text.stx-mfg-logo--lg .stx-mfg-logo__text {
	font-size: 0.82rem;
}

.stx-mfg-logo-link {
	display: inline-flex;
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.stx-mfg-logo-link:hover {
	transform: none;
	opacity: 1;
}

.stx-mfg-logo__text--fallback[hidden] {
	display: none !important;
}

.stx-mfg-logo--text .stx-mfg-logo__text--fallback:not([hidden]) {
	display: inline-flex;
}

/* Brand strip (homepage + shared) */
.stx-mfg-logo-strip {
	--stx-mfg-strip-item-height: 4.1rem;
	--stx-mfg-strip-gap: 0.85rem;
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: center;
	gap: var(--stx-mfg-strip-gap);
	width: 100%;
}

.stx-brand-strip .stx-mfg-logo-strip {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--stx-mfg-strip-gap);
	align-items: stretch;
	justify-items: stretch;
}

.stx-mfg-logo-strip__item {
	padding: 0.85rem 1rem;
	min-height: var(--stx-mfg-strip-item-height);
	overflow: hidden;
}

.stx-mfg-logo-strip__item .stx-mfg-logo-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	text-decoration: none;
	color: inherit;
}

.stx-mfg-logo-strip__item .stx-mfg-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	max-width: 100%;
}

.stx-mfg-logo--strip.stx-mfg-logo-fallback {
	width: 100%;
	min-width: 0;
}

.stx-mfg-logo--menu.stx-mfg-logo-fallback {
	width: 100%;
	padding: 0.15rem 0.35rem;
}

.stx-mfg-logo--strip {
	--stx-mfg-logo-height: 1.7rem;
	--stx-mfg-logo-max-height: 2.35rem;
}

.stx-mfg-logo--strip .stx-mfg-logo__img {
	height: var(--stx-mfg-logo-height);
	max-height: calc(var(--stx-mfg-strip-item-height) - 1.35rem);
}

.stx-mfg-logo--strip .stx-mfg-logo__text {
	display: -webkit-box;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	min-height: var(--stx-mfg-logo-height, 1.7rem);
	margin: 0;
	padding: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
	hyphens: auto;
	line-height: 1.15;
	text-align: center;
}

/* Product cards */
.stx-product-card__brand-logo {
	margin: 0 0 0.45rem;
	padding: 0.55rem 0.8rem;
	width: fit-content;
	max-width: 100%;
}

.stx-mfg-logo--card {
	--stx-mfg-logo-height: 1.45rem;
	--stx-mfg-logo-max-height: 1.85rem;
	justify-content: center;
}

.stx-mfg-logo--card.stx-mfg-logo-fallback {
	justify-content: center;
	padding: 0;
}

.stx-mfg-logo--card .stx-mfg-logo__text {
	justify-content: center;
	font-size: 0.68rem;
}

.stx-mfg-logo--detail.stx-mfg-logo-fallback {
	padding: 0;
}

/* Product detail */
.stx-product-detail__brand-logo {
	margin: 0 0 0.85rem;
	padding: 0.75rem 1rem;
}

.stx-mfg-logo--detail {
	--stx-mfg-logo-height: 2.5rem;
	--stx-mfg-logo-max-height: 3rem;
}

/* Catalog filters */
.stx-filter-list .stx-mfg-logo-link {
	width: 100%;
}

.stx-filter-list .stx-mfg-logo--filter {
	--stx-mfg-logo-height: 1rem;
	width: 100%;
	justify-content: flex-start;
}

.stx-mfg-logo--filter.stx-mfg-logo-fallback {
	width: 100%;
	padding: 0.2rem 0.5rem;
	background: linear-gradient(145deg, rgba(22, 27, 34, 0.95), rgba(13, 17, 23, 0.82));
}

.stx-filter-list .stx-mfg-logo--filter .stx-mfg-logo__text {
	justify-content: flex-start;
	color: #e2e8f0;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: none;
}

.stx-filter-list li.is-mfg-logo a {
	padding-top: 0.45rem;
	padding-bottom: 0.45rem;
}

/* Mega menu brands */
.stx-mfg-logo-menu {
	border-top: 1px solid var(--stx-border, #30363d);
	margin-top: 0.85rem;
	padding-top: 0.85rem;
}

.stx-mfg-logo-menu__label {
	margin: 0 0 0.65rem;
	color: var(--stx-muted, #94a3b8);
	font-size: 0.62rem;
	font-weight: 900;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.stx-mfg-logo-menu .stx-mfg-logo-strip {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	justify-content: flex-start;
	gap: 0.55rem;
}

.stx-mfg-logo-strip__empty {
	margin: 0;
	color: var(--stx-muted, #94a3b8);
	font-size: 0.8rem;
}

/* Mega menu: white dropdown — span full width below rail + panels */
.site-shell .stx-firearms-mega {
	grid-template-rows: auto auto;
}

.site-shell .stx-firearms-mega > .stx-mfg-logo-menu {
	grid-column: 1 / -1;
	margin-top: 0;
	padding: 0 28px 22px;
	border-top: 1px solid #e6e9ee;
}

.site-shell .stx-firearms-mega > .stx-mfg-logo-menu .stx-mfg-logo-menu__label {
	color: #64748b;
}

.site-shell .stx-firearms-mega .stx-mfg-logo-strip__item {
	background: #f8fafc;
	border: 1px solid #dfe4ea;
	box-shadow: none;
}

.site-shell .stx-firearms-mega .stx-mfg-logo-strip__item:hover {
	border-color: #c9a66b;
	background: #fff;
}

.site-shell .stx-firearms-mega .stx-mfg-logo--mono .stx-mfg-logo__img {
	filter: brightness(0) saturate(100%);
	opacity: 0.82;
}

.site-shell .stx-firearms-mega .stx-mfg-logo--color .stx-mfg-logo__img {
	filter: none;
	opacity: 1;
}

.site-shell .stx-firearms-mega .stx-mfg-logo--text .stx-mfg-logo__text {
	color: #334155;
}

.stx-mfg-logo-menu .stx-mfg-logo-strip__item {
	min-width: 0;
	min-height: 3.1rem;
	padding: 0.55rem 0.7rem;
}

.stx-mfg-logo--menu {
	--stx-mfg-logo-height: 1.35rem;
	--stx-mfg-logo-max-height: 1.75rem;
}

/* Manufacturer intro / landing */
.stx-page-intro__brand-logo {
	margin-top: 0.75rem;
	padding: 0.75rem 1.1rem;
}

.stx-mfg-logo--intro {
	--stx-mfg-logo-height: 2.8rem;
	--stx-mfg-logo-max-height: 3.25rem;
}

.stx-mfg-logo-grid-wrap {
	margin-top: 2rem;
}

/* Featured manufacturers grid */
.stx-mfg-logo-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.85rem;
}

.stx-mfg-logo-grid__item {
	min-height: 5.6rem;
	padding: 1rem 1.15rem;
}

.stx-mfg-logo--grid.stx-mfg-logo-fallback {
	width: 100%;
	padding: 0;
}

.stx-mfg-logo--grid {
	--stx-mfg-logo-height: 2.05rem;
	--stx-mfg-logo-max-height: 2.75rem;
}

@media (min-width: 480px) {
	.stx-brand-strip .stx-mfg-logo-strip {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 640px) {
	.stx-mfg-logo-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 900px) {
	.stx-brand-strip .stx-mfg-logo-strip {
		grid-template-columns: repeat(8, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.stx-mfg-logo-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.stx-mfg-logo-menu .stx-mfg-logo-strip {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}
