/* Страницы каталога оружия PUSHKA — в духе основного сайта */

body.weapon-subpage #main-content-wrap {
	padding-top: 96px;
	padding-bottom: 72px;
}

.guns-catalog-cta {
	margin-top: 1.2rem;
}

.guns-catalog-cta a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.guns-catalog-cta a:hover {
	color: #ffb3b3;
}

a.card.card-link {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	outline-offset: 4px;
}

a.card.card-link:focus-visible {
	border-color: rgba(167, 36, 36, 0.85);
}

/* Хаб каталога */
#weapon-hub {
	position: relative;
	padding-top: 4rem;
	padding-bottom: 6rem;
	background: url('../images/slider/komunist/gun.jpeg');
	background-size: cover;
}

.weapon-hub-lead {
	max-width: 72rem;
	margin: 0 auto 2.4rem;
	padding: 0 1.6rem;
}

.weapon-hub-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.4rem;
	padding: 0 1.6rem;
	max-width: 1200px;
	margin: 0 auto;
}

.weapon-hub-card {
	display: flex;
	flex-direction: column;
	background: rgba(0, 0, 0, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
	.weapon-hub-card {
		background: rgba(0, 0, 0, 0.42);
		-webkit-backdrop-filter: blur(10px);
		backdrop-filter: blur(10px);
	}
}

.weapon-hub-card:hover {
	transform: translateY(-3px);
	border-color: rgba(255, 255, 255, 0.2);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.weapon-hub-card__img {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.6rem;
	min-height: 200px;
}

.weapon-hub-card__img img {
	max-width: 100%;
	max-height: 160px;
	object-fit: contain;
}

.weapon-hub-card__body {
	padding: 1rem 1.2rem 1.4rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.weapon-hub-card__tag {
	display: inline-block;
	font-size: 1rem;
	letter-spacing: 0.14rem;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
	margin-bottom: 0.4rem;
}

.weapon-hub-card__title {
	font-size: 1.5rem;
	letter-spacing: 0.12rem;
	margin: 0;
	color: #eee;
}

/* Детальная страница */
#weapon-detail {
	position: relative;
	padding: 3rem 0 5rem;
	background: rgba(0, 0, 0, 0.78);
}

/* Декоративная SVG-прицельная сетка (вставляется скриптом, не участвует в табах/кликах) */
#pushka-sight-decoration {
	position: absolute;
	top: 0.4rem;
	right: 0.8rem;
	width: min(34vw, 152px);
	height: min(34vw, 152px);
	pointer-events: none;
	z-index: 25;
	opacity: 0.42;
	filter: drop-shadow(0 0 12px rgba(167, 36, 36, 0.15));
}

#pushka-sight-decoration svg {
	display: block;
	width: 100%;
	height: 100%;
}

@keyframes sightDecoIn {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.96);
	}

	to {
		opacity: 0.42;
		transform: none;
	}
}

@media (prefers-reduced-motion: no-preference) {
	#pushka-sight-decoration {
		animation: sightDecoIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
	}
}

@media only screen and (max-width: 600px) {
	#pushka-sight-decoration {
		width: min(26vw, 100px);
		height: min(26vw, 100px);
		opacity: 0.28 !important;
		top: 0.2rem;
		right: 0.3rem;
	}
}

.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 0.8rem;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	letter-spacing: 0.08rem;
	margin-bottom: 2rem;
	padding: 0 1.6rem;
	color: rgba(255, 255, 255, 0.65);
}

.breadcrumb a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.breadcrumb a:hover {
	color: #ffb3b3;
}

.weapon-detail__title {
	letter-spacing: 4px;
	text-align: center;
	margin-bottom: 0.6rem;
}

.weapon-detail__subtitle {
	text-align: center;
	max-width: 56rem;
	margin: 0 auto 2.4rem;
	padding: 0 1.6rem;
	color: rgba(255, 255, 255, 0.78);
	font-size: 1.45rem;
	line-height: 1.55;
}

.weapon-hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2.4rem;
	max-width: 1100px;
	margin: 0 auto 3rem;
	padding: 0 1.6rem;
	align-items: start;
}

.weapon-hero__visual {
	background: rgba(0, 0, 0, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 2rem;
	text-align: center;
}

.weapon-hero__visual img {
	max-width: 100%;
	max-height: 320px;
	object-fit: contain;
}

.weapon-hero__aside {
	display: flex;
	flex-direction: column;
	gap: 1.4rem;
}

.pushka-meter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.8rem 1.2rem;
	padding: 1.2rem 1.4rem;
	border-radius: 12px;
	border: 1px solid rgba(167, 36, 36, 0.35);
	background: linear-gradient(135deg, rgba(167, 36, 36, 0.2), rgba(0, 0, 0, 0.5));
}

.pushka-meter__label {
	font-size: 1.1rem;
	letter-spacing: 0.18rem;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.75);
}

.pushka-meter__stars {
	font-size: 1.8rem;
	letter-spacing: 0.2rem;
	color: #e8c547;
}

.pushka-meter__hint {
	font-size: 1.25rem;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
	flex: 1 1 100%;
}

.pushka-tip {
	position: relative;
	padding: 1.4rem 1.4rem 1.4rem 1.8rem;
	border-radius: 12px;
	background: rgba(30, 40, 48, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-left: 4px solid #a72424;
}

.pushka-tip::before {
	content: "Совет инструктора";
	display: block;
	font-size: 1rem;
	letter-spacing: 0.16rem;
	text-transform: uppercase;
	color: #a72424;
	margin-bottom: 0.6rem;
}

.pushka-tip p {
	margin: 0;
	font-size: 1.4rem;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.9);
}

.weapon-specs {
	width: 100%;
	border-collapse: collapse;
	font-size: 1.35rem;
}

.weapon-specs th,
.weapon-specs td {
	text-align: left;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.weapon-specs th {
	width: 42%;
	color: rgba(255, 255, 255, 0.55);
	font-weight: normal;
	letter-spacing: 0.06rem;
}

.weapon-specs td {
	color: #eee;
}

.weapon-prose {
	max-width: 720px;
	margin: 0 auto 2.4rem;
	padding: 0 1.6rem;
	text-align: left;
}

.weapon-prose h3 {
	margin-top: 2.4rem;
	margin-bottom: 1rem;
	font-size: 1.8rem;
	letter-spacing: 0.12rem;
}

.weapon-prose p {
	margin: 0 0 1rem;
	color: rgba(255, 255, 255, 0.88);
	line-height: 1.6;
}

.weapon-figure {
	max-width: 720px;
	margin: 0 auto 3rem;
	padding: 0 1.6rem;
}

.weapon-figure figure {
	margin: 0;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: #111;
}

.weapon-figure img {
	width: 100%;
	height: auto;
	display: block;
	max-height: 380px;
	object-fit: cover;
}

.weapon-figure figcaption {
	padding: 0.8rem 1rem;
	font-size: 1.15rem;
	color: rgba(255, 255, 255, 0.55);
	line-height: 1.4;
}

.cta-inline {
	text-align: center;
	margin: 2rem 0 3rem;
}

.cta-inline .button {
	display: inline-block;
	margin: 0.4rem;
}

.related-weapons {
	max-width: 1100px;
	margin: 0 auto;
	padding: 2rem 1.6rem 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-weapons h3 {
	text-align: center;
	margin-bottom: 1.6rem;
	font-size: 2rem;
	letter-spacing: 0.14rem;
}

.related-weapons__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.2rem;
}

.related-weapons__grid a {
	display: block;
	text-decoration: none;
	color: inherit;
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 1rem;
	text-align: center;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.related-weapons__grid a:hover {
	border-color: rgba(167, 36, 36, 0.5);
	transform: translateY(-2px);
}

.related-weapons__grid img {
	max-height: 100px;
	object-fit: contain;
	margin-bottom: 0.6rem;
}

.related-weapons__grid span {
	font-size: 1.2rem;
	letter-spacing: 0.1rem;
}

@media only screen and (max-width: 900px) {
	.weapon-hero {
		grid-template-columns: 1fr;
	}

	.related-weapons__grid {
		grid-template-columns: 1fr;
	}
}

/* ========== Анимации в тему тира / прицела ========== */
@media (prefers-reduced-motion: no-preference) {

	@keyframes gunFadeUp {
		from {
			opacity: 0;
			transform: translateY(22px);
		}

		to {
			opacity: 1;
			transform: none;
		}
	}

	@keyframes gunFadeLeft {
		from {
			opacity: 0;
			transform: translateX(-20px);
		}

		to {
			opacity: 1;
			transform: none;
		}
	}

	@keyframes gunFadeRight {
		from {
			opacity: 0;
			transform: translateX(20px);
		}

		to {
			opacity: 1;
			transform: none;
		}
	}

	@keyframes gunCardLiftIn {
		from {
			opacity: 0;
			transform: translateY(14px) scale(0.98);
		}

		to {
			opacity: 1;
			transform: none;
		}
	}

	@keyframes pushkaMeterGlow {

		0%,
		100% {
			box-shadow: 0 0 0 0 rgba(167, 36, 36, 0), inset 0 0 0 rgba(167, 36, 36, 0);
		}

		50% {
			box-shadow: 0 0 28px 1px rgba(167, 36, 36, 0.22), inset 0 0 20px rgba(167, 36, 36, 0.06);
		}
	}

	@keyframes pushkaStarsPulse {

		0%,
		100% {
			opacity: 1;
			filter: brightness(1);
		}

		50% {
			opacity: 0.92;
			filter: brightness(1.2);
		}
	}

	@keyframes reticleFrame {

		0%,
		100% {
			border-color: rgba(167, 36, 36, 0.12);
			opacity: 0.65;
		}

		50% {
			border-color: rgba(167, 36, 36, 0.42);
			opacity: 1;
		}
	}

	@keyframes titleScopePulse {

		0%,
		100% {
			text-shadow: 0 0 0 transparent, 0 0 20px rgba(167, 36, 36, 0);
		}

		50% {
			text-shadow: 0 0 1px rgba(255, 255, 255, 0.08), 0 0 18px rgba(167, 36, 36, 0.25);
		}
	}

	/* Вступление страницы оружия */
	body.weapon-subpage #weapon-detail > .row.section-intro {
		animation: gunFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
	}

	body.weapon-subpage #weapon-detail .weapon-detail__title {
		animation: titleScopePulse 5s ease-in-out 0.75s infinite;
	}

	body.weapon-subpage #weapon-detail .weapon-hero__visual {
		position: relative;
		animation: gunFadeLeft 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
	}

	body.weapon-subpage #weapon-detail .weapon-hero__visual img {
		position: relative;
		z-index: 0;
	}

	body.weapon-subpage #weapon-detail .weapon-hero__visual::before {
		content: "";
		position: absolute;
		inset: 12px;
		z-index: 1;
		border: 1px solid rgba(167, 36, 36, 0.25);
		border-radius: 10px;
		pointer-events: none;
		animation: reticleFrame 3.2s ease-in-out infinite;
	}

	body.weapon-subpage #weapon-detail .weapon-hero__aside {
		animation: gunFadeRight 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
	}

	body.weapon-subpage #weapon-detail .pushka-meter {
		animation: pushkaMeterGlow 4.5s ease-in-out infinite;
	}

	body.weapon-subpage #weapon-detail .pushka-meter__stars {
		display: inline-block;
		animation: pushkaStarsPulse 2.5s ease-in-out infinite;
	}

	/* Каталог: заголовок и сетка */
	body.weapon-subpage #weapon-hub > .row.section-intro {
		animation: gunFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
	}

	body.weapon-subpage #weapon-hub .weapon-hub-card {
		animation: gunCardLiftIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) backwards;
	}

	body.weapon-subpage #weapon-hub .weapon-hub-card:nth-child(1) {
		animation-delay: 0.05s;
	}

	body.weapon-subpage #weapon-hub .weapon-hub-card:nth-child(2) {
		animation-delay: 0.1s;
	}

	body.weapon-subpage #weapon-hub .weapon-hub-card:nth-child(3) {
		animation-delay: 0.15s;
	}

	body.weapon-subpage #weapon-hub .weapon-hub-card:nth-child(4) {
		animation-delay: 0.2s;
	}

	body.weapon-subpage #weapon-hub .weapon-hub-card:nth-child(5) {
		animation-delay: 0.25s;
	}

	body.weapon-subpage #weapon-hub .weapon-hub-card:nth-child(6) {
		animation-delay: 0.3s;
	}

	body.weapon-subpage #weapon-hub .weapon-hub-card:nth-child(7) {
		animation-delay: 0.35s;
	}

	body.weapon-subpage #weapon-hub .weapon-hub-card:nth-child(8) {
		animation-delay: 0.4s;
	}

	body.weapon-subpage #weapon-hub .weapon-hub-card:nth-child(9) {
		animation-delay: 0.45s;
	}

	body.weapon-subpage #weapon-hub .weapon-hub-card:nth-child(10) {
		animation-delay: 0.5s;
	}

	body.weapon-subpage #weapon-hub .weapon-hub-card:nth-child(11) {
		animation-delay: 0.55s;
	}

	body.weapon-subpage #weapon-hub .weapon-hub-card:nth-child(12) {
		animation-delay: 0.6s;
	}

	/* Главная: карточки арсенала */
	#guns .guns_list .card.card-link {
		animation: gunCardLiftIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) backwards;
	}

	#guns .guns_list .card.card-link:nth-child(1) {
		animation-delay: 0.04s;
	}

	#guns .guns_list .card.card-link:nth-child(2) {
		animation-delay: 0.08s;
	}

	#guns .guns_list .card.card-link:nth-child(3) {
		animation-delay: 0.12s;
	}

	#guns .guns_list .card.card-link:nth-child(4) {
		animation-delay: 0.16s;
	}

	#guns .guns_list .card.card-link:nth-child(5) {
		animation-delay: 0.2s;
	}

	#guns .guns_list .card.card-link:nth-child(6) {
		animation-delay: 0.24s;
	}

	#guns .guns_list .card.card-link:nth-child(7) {
		animation-delay: 0.28s;
	}

	#guns .guns_list .card.card-link:nth-child(8) {
		animation-delay: 0.32s;
	}

	#guns .guns_list .card.card-link:nth-child(9) {
		animation-delay: 0.36s;
	}

	#guns .guns_list .card.card-link:nth-child(10) {
		animation-delay: 0.4s;
	}

	#guns .guns_list .card.card-link:nth-child(11) {
		animation-delay: 0.44s;
	}

	#guns .guns_list .card.card-link:nth-child(12) {
		animation-delay: 0.48s;
	}

	#guns .guns_list .card.card-link:nth-child(13) {
		animation-delay: 0.52s;
	}

	#guns .guns_list .card.card-link:nth-child(14) {
		animation-delay: 0.56s;
	}

	#guns .guns-chip {
		transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, background 0.2s ease;
	}

	#guns .guns-chip:active {
		transform: scale(0.94);
	}
}

/* Появление блоков при прокрутке (класс выставляет main.js) */
@media (prefers-reduced-motion: no-preference) {
	.gun-inview-reveal {
		opacity: 0;
		transform: translateY(28px);
		transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
			transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.gun-inview-reveal.gun-inview-visible {
		opacity: 1;
		transform: none;
	}
}
