/* Shared coin media components, flip states, controls, and lightbox. */
.coin-flip-image {
	position: relative;
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	isolation: isolate;
}

.coin-flip-image .coin-side {
	transition: opacity 0.35s ease, transform 0.45s ease;
}

.coin-flip-image .coin-side--back {
	opacity: 0;
}

.coin-card__image .coin-flip-image.has-coin-back:hover .coin-side--front,
.catalog-coin-image .coin-flip-image.has-coin-back:hover .coin-side--front,
.coin-flip-image.has-coin-back.is-back .coin-side--front {
	opacity: 0;
	transform: translate(-50%, -50%) rotateY(-12deg) scale(0.96);
}

.coin-card__image .coin-flip-image.has-coin-back:hover .coin-side--back,
.catalog-coin-image .coin-flip-image.has-coin-back:hover .coin-side--back,
.coin-flip-image.has-coin-back.is-back .coin-side--back {
	opacity: 1;
	transform: translate(-50%, -50%) rotateY(0) scale(1);
}

.coin-flip-controls {
	position: absolute;
	right: 22px;
	bottom: 22px;
	z-index: 4;
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 999px;
	background: rgba(10, 8, 6, 0.62);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.coin-flip-controls button {
	min-height: 34px;
	padding: 7px 13px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: rgba(244, 234, 216, 0.72);
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
}

.coin-flip-controls button.is-active {
	background: linear-gradient(135deg, #f2d69a, #b98e45);
	color: #17100a;
}

.has-open-lightbox {
	overflow: hidden;
}

.has-open-overlay {
	overflow: hidden;
}

.coin-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	place-items: center;
	padding: 34px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.coin-lightbox.is-open {
	opacity: 1;
	pointer-events: auto;
}

.coin-lightbox__backdrop {
	position: absolute;
	inset: 0;
	border: 0;
	background: rgba(4, 3, 2, 0.84);
	cursor: zoom-out;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.coin-lightbox__dialog {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-rows: auto auto auto;
	place-items: center;
	width: fit-content;
	max-width: min(980px, calc(100vw - 40px));
	max-height: calc(100vh - 40px);
	padding: 24px 38px 20px;
}

.coin-lightbox__dialog::before {
	position: absolute;
	inset: 12%;
	z-index: -1;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 66%);
	content: '';
}

.coin-lightbox__image {
	display: block;
	width: auto;
	height: auto;
	max-width: min(92vw, 941px);
	max-height: min(74vh, 840px);
	object-fit: contain;
	cursor: zoom-in;
	filter: drop-shadow(0 42px 64px rgba(0, 0, 0, 0.72));
	transform: scale(0.96);
	transform-origin: var(--zoom-x, 50%) var(--zoom-y, 50%);
	transition: transform 0.25s ease;
}

.coin-lightbox.is-open .coin-lightbox__image {
	transform: scale(1);
}

.coin-lightbox.is-open.is-zoomed .coin-lightbox__image {
	transform: scale(1.85);
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Ccircle cx='13' cy='13' r='8' fill='%23100d09' fill-opacity='0.78' stroke='%23ffffff' stroke-width='2'/%3E%3Cpath d='M19 19L27 27' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") 15 15, zoom-out;
}

.coin-lightbox__thumbs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 14px;
}

.coin-lightbox__thumbs[hidden] {
	display: none;
}

.coin-lightbox__thumbs button {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 34px;
	padding: 6px 13px 6px 7px;
	border: 1px solid rgba(255, 255, 255, 0.26);
	border-radius: 999px;
	background: rgba(14, 11, 8, 0.68);
	color: rgba(244, 234, 216, 0.78);
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
}

.coin-lightbox__thumb-preview {
	display: grid;
	overflow: hidden;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.14), rgba(7, 5, 4, 0.9));
}

.coin-lightbox__thumb-preview img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.coin-lightbox__thumbs button.is-active,
.coin-lightbox__thumbs button:hover {
	border-color: rgba(255, 255, 255, 0.72);
	background: linear-gradient(135deg, #f0d398, #b98e45);
	color: #17100a;
}

.coin-lightbox__caption {
	margin-top: 10px;
	color: rgba(244, 234, 216, 0.78);
	font-size: 15px;
	text-align: center;
}

.coin-lightbox__close,
.coin-lightbox__zoom {
	position: absolute;
	top: 8px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 50%;
	background: rgba(10, 8, 6, 0.68);
	color: #f0d398;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.coin-lightbox__close {
	right: 8px;
}

.coin-lightbox__zoom {
	right: 58px;
	font-size: 0;
}

.coin-lightbox__zoom svg {
	width: 30px;
	height: 30px;
}

.coin-lightbox__zoom.is-active {
	border-color: rgba(255, 255, 255, 0.72);
	background: rgba(255, 255, 255, 0.22);
	color: #ffe2a5;
}

.psdv-not-found {
	position: relative;
	min-height: calc(100vh - 78px);
	overflow: hidden;
	background:
		linear-gradient(120deg, rgba(72, 6, 10, 0.96) 0%, rgba(45, 6, 7, 0.94) 46%, rgba(19, 9, 6, 0.98) 100%),
		var(--psdv-accent);
	color: #fff8ec;
}

.psdv-not-found::before {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
		linear-gradient(180deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
	background-size: 78px 78px;
	mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.7), transparent 70%);
	content: '';
}

.psdv-not-found__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.72fr);
	gap: clamp(28px, 6vw, 92px);
	align-items: center;
	min-height: calc(100vh - 78px);
	padding-top: clamp(42px, 7vw, 88px);
	padding-bottom: clamp(42px, 7vw, 88px);
}

.psdv-not-found__content {
	max-width: 760px;
}

.psdv-not-found__eyebrow {
	display: inline-flex;
	margin: 0 0 18px;
	padding: 8px 13px;
	border: 1px solid rgba(200, 155, 91, 0.46);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #f1d49a;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
}

.psdv-not-found h1 {
	max-width: 720px;
	margin: 0;
	font-family: var(--psdv-heading-font);
	font-size: clamp(50px, 8vw, 112px);
	font-weight: 700;
	line-height: 0.94;
	letter-spacing: 0;
}

.psdv-not-found__content > p:not(.psdv-not-found__eyebrow) {
	max-width: 620px;
	margin: 24px 0 0;
	color: rgba(255, 248, 236, 0.78);
	font-size: 18px;
	line-height: 1.65;
}

.psdv-not-found__search {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px 12px;
	align-items: end;
	width: min(100%, 610px);
	margin-top: 32px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.psdv-not-found__search-label {
	grid-column: 1 / -1;
	margin: 0;
	color: #f4dfb6;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}

.psdv-not-found__search-field {
	display: grid;
	grid-template-columns: 28px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	height: 44px;
	padding: 0 16px;
	border: 1px solid rgba(241, 214, 154, 0.42);
	border-radius: 999px;
	background: rgba(255, 253, 248, 0.14);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
}

.psdv-not-found__search-icon {
	width: 22px;
	height: 22px;
	color: #f1d49a;
}

.psdv-not-found__search input {
	min-width: 0;
	height: 36px;
	border: 0;
	background: transparent;
	color: #fff8ec;
	font: inherit;
	font-size: 16px;
	outline: 0;
}

.psdv-not-found__search input::placeholder {
	color: rgba(255, 248, 236, 0.62);
}

.psdv-not-found__search button,
.psdv-not-found__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	border: 0;
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.psdv-not-found__search button {
	padding: 0 28px;
	border: 1px solid var(--psdv-button-border);
	border-radius: 999px;
	background: var(--psdv-button-bg);
	box-shadow: var(--psdv-button-shadow);
	color: var(--psdv-button-color);
}

.psdv-not-found__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 18px;
}

.psdv-not-found__button {
	gap: 10px;
	padding: 0 22px;
	border-radius: 999px;
}

.psdv-not-found__button--primary {
	border: 1px solid var(--psdv-button-border);
	background: var(--psdv-button-bg);
	color: var(--psdv-button-color);
	box-shadow: var(--psdv-button-shadow);
}

.psdv-not-found__button--ghost {
	border: 1px solid rgba(241, 214, 154, 0.42);
	background: rgba(255, 255, 255, 0.08);
	color: #fff8ec;
}

.psdv-not-found__button .coin-icon {
	width: 22px;
	height: 22px;
	color: currentColor;
}

.psdv-not-found__artifact {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 520px;
	isolation: isolate;
}

.psdv-not-found__code {
	position: absolute;
	color: rgba(255, 248, 236, 0.06);
	font-family: var(--psdv-heading-font);
	font-size: clamp(138px, 20vw, 310px);
	font-weight: 700;
	line-height: 0.8;
}

.psdv-not-found__line {
	position: absolute;
	z-index: -1;
	width: min(42vw, 360px);
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(241, 214, 154, 0.72), transparent);
}

.psdv-not-found__line--top {
	top: 22%;
	right: 8%;
	transform: rotate(-18deg);
}

.psdv-not-found__line--bottom {
	right: 20%;
	bottom: 18%;
	transform: rotate(24deg);
}

@media (max-width: 860px) {
	.psdv-not-found__inner {
		grid-template-columns: 1fr;
		gap: 22px;
		min-height: auto;
	}

	.psdv-not-found__artifact {
		order: -1;
		min-height: 260px;
	}

	.psdv-not-found__content > p:not(.psdv-not-found__eyebrow) {
		font-size: 16px;
	}
}

@media (max-width: 560px) {
	.psdv-not-found {
		min-height: auto;
	}

	.psdv-not-found__search {
		grid-template-columns: 1fr;
		gap: 12px;
		margin-top: 26px;
	}

	.psdv-not-found__search-label {
		color: #f4dfb6;
		font-size: 15px;
		letter-spacing: 0;
		text-transform: none;
	}

	.psdv-not-found__search-field {
		grid-template-columns: 24px minmax(0, 1fr);
		height: 44px;
		padding: 0 16px;
		border: 2px solid rgba(244, 223, 182, 0.78);
		border-radius: 18px;
		background: #fff8ec;
		box-shadow: 0 20px 48px rgba(12, 2, 2, 0.34), 0 0 0 6px rgba(244, 223, 182, 0.12);
	}

	.psdv-not-found__search-icon {
		width: 24px;
		height: 24px;
		color: #6a0b10;
	}

	.psdv-not-found__search input {
		height: 38px;
		color: #3b0709;
		font-size: 18px;
		font-weight: 700;
	}

	.psdv-not-found__search input::placeholder {
		color: rgba(75, 6, 9, 0.62);
	}

	.psdv-not-found__search button {
		width: 100%;
		background: linear-gradient(135deg, #7b151a, #4b0609);
		color: #fff8ec;
		font-size: 17px;
		box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
	}

	.psdv-not-found__actions,
	.psdv-not-found__button {
		width: 100%;
	}
}

.header-search-modal {
	position: fixed;
	inset: 0;
	z-index: 130;
	display: grid;
	place-items: center;
	padding: 26px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.22s ease;
}

.header-search-modal.is-open {
	opacity: 1;
	pointer-events: auto;
}

.header-search-modal__backdrop {
	position: absolute;
	inset: 0;
	border: 0;
	background:
		radial-gradient(circle at top, rgba(200, 155, 91, 0.18), transparent 30%),
		rgba(8, 5, 4, 0.84);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	cursor: pointer;
}

.header-search-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 560px);
	padding: 34px 22px 22px;
	border: 1px solid rgba(200, 155, 91, 0.28);
	border-radius: 22px;
	background:
		linear-gradient(180deg, rgba(72, 6, 10, 0.94), rgba(18, 10, 8, 0.98)),
		radial-gradient(circle at top, rgba(255, 255, 255, 0.12), transparent 60%);
	box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
	color: #f3eadf;
}

.header-search-modal__text {
	max-width: 420px;
	margin: 0;
	color: rgba(243, 234, 223, 0.76);
	font-size: 15px;
	line-height: 1.5;
}

.header-search-modal__close {
	position: absolute;
	top: 6px;
	right: 6px;
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
}

.header-search-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 14px;
	margin-top: 0;
}

.header-search-form__input {
	min-width: 0;
	min-height: 62px;
	padding: 0 22px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	font: inherit;
	font-size: 17px;
}

.header-search-form__input::placeholder {
	color: rgba(243, 234, 223, 0.46);
}

.header-search-form__input:focus-visible,
.header-search-modal__close:focus-visible {
	outline: 1px solid rgba(255, 255, 255, 0.92);
	outline-offset: 0;
}

.header-search-form__submit {
	min-height: 62px;
	padding: 0 28px;
	border: 1px solid var(--psdv-button-border);
	border-radius: 999px;
	background: var(--psdv-button-bg);
	box-shadow: var(--psdv-button-shadow);
	color: var(--psdv-button-color);
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.header-search-form__submit:hover {
	border-color: var(--psdv-button-border-hover);
	background: var(--psdv-button-bg-hover);
	box-shadow: var(--psdv-button-shadow-hover);
	transform: translateY(-2px);
}

.header-search-modal__close:hover {
	filter: brightness(1.06);
}

.psdv-cookie-banner {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 140;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
	width: min(calc(100vw - 32px), 620px);
	padding: 16px 18px;
	border: 1px solid rgba(200, 155, 91, 0.38);
	border-radius: 8px;
	background: rgba(255, 253, 248, 0.98);
	box-shadow: 0 20px 60px rgba(31, 4, 5, 0.2);
	color: #1e1b18;
	animation: psdv-cookie-in 0.24s ease both;
}

.psdv-cookie-banner.is-hiding {
	animation: psdv-cookie-out 0.18s ease both;
}

.psdv-cookie-banner__content {
	min-width: 0;
}

.psdv-cookie-banner p {
	max-width: 560px;
	margin: 0;
	color: #5b5149;
	font-size: 14px;
	line-height: 1.5;
}

.psdv-cookie-banner__policy {
	color: #48060a;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.psdv-cookie-banner__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-content: start;
	gap: 8px;
}

.psdv-cookie-banner__button {
	min-height: 42px;
	min-width: 74px;
	border-radius: 999px;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.psdv-cookie-banner__button {
	padding: 0 16px;
	border: 1px solid var(--psdv-button-border);
	background: var(--psdv-button-bg);
	box-shadow: var(--psdv-button-shadow);
	color: var(--psdv-button-color);
}

.psdv-cookie-banner__button--primary {
	border-color: var(--psdv-button-border);
	background: var(--psdv-button-bg);
	box-shadow: var(--psdv-button-shadow);
	color: var(--psdv-button-color);
}

.psdv-cookie-banner__button:hover {
	border-color: var(--psdv-button-border-hover);
	background: var(--psdv-button-bg-hover);
	box-shadow: var(--psdv-button-shadow-hover);
	transform: translateY(-1px);
}

.psdv-cookie-banner__button--primary:hover,
.psdv-not-found__search button:hover,
.psdv-not-found__button--primary:hover {
	background: var(--psdv-button-bg-hover);
	box-shadow: var(--psdv-button-shadow-hover);
}

.psdv-cookie-banner__button:focus-visible,
.psdv-cookie-banner__policy:focus-visible {
	outline: 2px solid rgba(200, 155, 91, 0.72);
	outline-offset: 2px;
}

@keyframes psdv-cookie-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes psdv-cookie-out {
	from {
		opacity: 1;
		transform: translateY(0);
	}
	to {
		opacity: 0;
		transform: translateY(10px);
	}
}

@media (max-width: 680px) {
	.psdv-cookie-banner {
		right: 12px;
		bottom: 12px;
		grid-template-columns: 1fr;
		gap: 12px;
		width: calc(100vw - 24px);
		padding: 16px;
	}

	.psdv-cookie-banner__actions {
		display: grid;
		grid-template-columns: 1fr;
		min-width: 0;
	}

	.psdv-cookie-banner__button {
		width: 100%;
	}
}
