/*
 * BlackCat single item page. Builds on catalogue.css (paper band, 1440px container, cards,
 * buttons, brand link states).
 */
.bcmc-item__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

@media (min-width: 900px) {
	.bcmc-item__layout {
		grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
		gap: 48px;
		align-items: start;
	}

	/* The header is not sticky, so a small offset is enough. */
	.bcmc-gallery {
		position: sticky;
		top: 24px;
	}
}

/* ---------------------------------------------------------------- gallery */
.bcmc-gallery__main {
	display: block;
	position: relative;
	aspect-ratio: 4 / 5;
	border: 1px solid var(--bcmc-border);
	border-radius: 4px;
	background: var(--bcmc-parchment);
	overflow: hidden;
	cursor: zoom-in;
}

.bcmc-gallery__main--empty {
	cursor: default;
}

.bcmc-gallery .bcmc-gallery__img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0;
	object-fit: contain !important;
	object-position: center center !important;
}

.bcmc-gallery__main:focus-visible,
.bcmc-gallery__thumb:focus-visible {
	outline: 2px solid var(--bcmc-brass);
	outline-offset: 2px;
}

.bcmc-gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: 8px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.bcmc-catalogue .bcmc-gallery__thumb {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 1;
	margin: 0;
	padding: 0;
	border: 1px solid var(--bcmc-border);
	border-radius: 2px;
	background: var(--bcmc-parchment);
	overflow: hidden;
	cursor: pointer;
}

.bcmc-catalogue .bcmc-gallery__thumb,
.bcmc-catalogue .bcmc-gallery__thumb:active {
	color: var(--bcmc-ink);
	box-shadow: none;
}

.bcmc-catalogue .bcmc-gallery__thumb:hover,
.bcmc-catalogue .bcmc-gallery__thumb:focus,
.bcmc-catalogue .bcmc-gallery__thumb:active {
	border-color: var(--bcmc-brass);
	background: var(--bcmc-parchment);
	color: var(--bcmc-ink);
}

.bcmc-catalogue .bcmc-gallery__thumb[aria-current="true"] {
	border: 2px solid var(--bcmc-ink);
}

.bcmc-gallery__thumb img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	object-fit: contain !important;
}

/* ---------------------------------------------------------------- info column */
.bcmc-item__info > * + * {
	margin-top: 12px;
}

.bcmc-item__chip .bcmc-chip,
.bcmc-item__price--sold .bcmc-chip {
	margin: 0;
}

.bcmc-item__kicker {
	margin-bottom: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--bcmc-muted);
}

.bcmc-item__title {
	margin: 4px 0 0;
	font-family: var(--bcmc-serif);
	font-size: clamp(28px, 3.2vw, 40px);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--bcmc-ink);
}

.bcmc-item__price {
	margin-bottom: 0;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--bcmc-ink);
}

.bcmc-item__price .amount,
.bcmc-item__price bdi,
.bcmc-buybar__price .amount,
.bcmc-buybar__price bdi {
	color: inherit;
	font-weight: inherit;
}

.bcmc-item__ref {
	margin-bottom: 0;
	font-size: 14px;
	color: var(--bcmc-muted);
}

.bcmc-item__summary {
	font-size: 16px;
	line-height: 1.6;
}

.bcmc-item__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	margin-top: 24px !important;
}

.bcmc-item__cart {
	margin: 0;
	width: 100%;
}

.bcmc-catalogue .bcmc-item__buy {
	width: 100%;
	max-width: 360px;
	min-height: 52px;
	font-size: 16px;
}

.bcmc-item__sold {
	margin: 0;
	color: var(--bcmc-muted);
}

.bcmc-catalogue .bcmc-item__ask-link {
	font-size: 15px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Details: a quiet two-column list. */
.bcmc-details {
	margin: 28px 0 0 !important;
	padding: 0;
	border-top: 1px solid var(--bcmc-border);
}

.bcmc-details__row {
	display: grid;
	grid-template-columns: 9em minmax(0, 1fr);
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--bcmc-border);
	font-size: 15px;
	line-height: 1.5;
}

.bcmc-details dt {
	font-weight: 600;
	color: var(--bcmc-muted);
}

.bcmc-details dd {
	margin: 0;
	color: var(--bcmc-ink);
}

.bcmc-catalogue .bcmc-details a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bcmc-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 24px 0 0 !important;
	padding: 0;
	list-style: none;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--bcmc-muted);
}

.bcmc-trust li {
	display: flex;
	align-items: center;
	gap: 8px;
}

.bcmc-trust li::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--bcmc-brass);
}

/* ---------------------------------------------------------------- sections */
.bcmc-item__sections {
	max-width: 100%;
	margin-top: 56px;
}

.bcmc-section {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--bcmc-border);
}

.bcmc-section:first-child {
	margin-top: 0;
}

.bcmc-section__title {
	margin: 0 0 16px;
	font-family: var(--bcmc-serif);
	font-size: 28px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--bcmc-ink);
}

.bcmc-prose {
	max-width: 46em;
	font-size: 17px;
	line-height: 1.7;
	color: var(--bcmc-ink);
}

.bcmc-prose p {
	margin: 0 0 1em;
}

.bcmc-catalogue .bcmc-prose a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------------------------------------------------------------- mobile buy bar */
.bcmc-buybar {
	display: none;
}

@media (max-width: 899.98px) {
	.bcmc-buybar:not([hidden]) {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
		padding-left: calc(16px + env(safe-area-inset-left, 0px));
		padding-right: calc(16px + env(safe-area-inset-right, 0px));
		border-top: 1px solid var(--bcmc-border);
		background: var(--bcmc-paper);
		box-shadow: 0 -2px 8px rgba(17, 17, 15, 0.08);
	}

	.bcmc-buybar__inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
	}

	.bcmc-buybar__price {
		font-size: 20px;
		font-weight: 600;
		color: var(--bcmc-ink);
	}

	.bcmc-buybar .bcmc-chip {
		margin: 0;
	}

	.bcmc-buybar form {
		margin: 0;
	}
}

/* While the buy bar shows, the cookie settings button (CookieAdmin, bottom left) moves up above
   it instead of sitting on top of the price. */
@media (max-width: 899.98px) {
	.bcmc-buybar-open .cookieadmin_re_consent {
		bottom: calc(var(--bcmc-buybar-h, 72px) + 15px) !important;
	}
}

.bcmc-item__in-basket {
	margin: 0;
	font-weight: 600;
	color: var(--bcmc-ink);
}

/* ---------------------------------------------------------------- lightbox */
.bcmc-lightbox {
	width: 100vw;
	max-width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(17, 17, 15, 0.94);
	color: var(--bcmc-paper);
	overflow: hidden;
}

.bcmc-lightbox::backdrop {
	background: rgba(17, 17, 15, 0.94);
}

.bcmc-lightbox__frame {
	position: absolute;
	inset: 56px 64px 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: pan-y pinch-zoom;
}

.bcmc-lightbox .bcmc-lightbox__img {
	max-width: 100% !important;
	max-height: 100% !important;
	width: auto !important;
	height: auto !important;
	object-fit: contain;
}

.bcmc-lightbox__counter {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 16px;
	margin: 0;
	text-align: center;
	font-size: 14px;
	color: var(--bcmc-paper);
}

.bcmc-lightbox .bcmc-lightbox__close,
.bcmc-lightbox .bcmc-lightbox__nav {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(244, 240, 231, 0.4);
	border-radius: 50%;
	background: rgba(17, 17, 15, 0.6);
	color: var(--bcmc-paper);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.bcmc-lightbox .bcmc-lightbox__close:hover,
.bcmc-lightbox .bcmc-lightbox__close:focus,
.bcmc-lightbox .bcmc-lightbox__nav:hover,
.bcmc-lightbox .bcmc-lightbox__nav:focus {
	border-color: var(--bcmc-paper);
	background: var(--bcmc-ink);
	color: var(--bcmc-paper);
}

.bcmc-lightbox .bcmc-lightbox__close:focus-visible,
.bcmc-lightbox .bcmc-lightbox__nav:focus-visible {
	outline: 2px solid var(--bcmc-brass);
	outline-offset: 2px;
}

.bcmc-lightbox__close {
	top: 8px;
	right: 8px;
}

.bcmc-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
}

.bcmc-lightbox__nav--prev {
	left: 8px;
}

.bcmc-lightbox__nav--next {
	right: 8px;
}

@media (max-width: 599.98px) {
	.bcmc-lightbox__frame {
		inset: 56px 8px 56px;
	}

	.bcmc-lightbox__nav {
		top: auto;
		bottom: 4px;
		transform: none;
	}
}
