/* Product page styles */

.woocommerce-breadcrumb {
	max-width: 1240px;
	margin: 0 auto;
	padding: 18px 28px 0;
	font-size: .78rem;
	letter-spacing: .04em;
	color: var(--muted);
}

.woocommerce-breadcrumb a {
	color: var(--muted);
	text-decoration: none;
	transition: color .3s;
}

.woocommerce-breadcrumb a:hover {
	color: var(--gold);
}

.woocommerce-breadcrumb .sep {
	margin: 0 8px;
	opacity: .6;
}

.woocommerce-breadcrumb .current {
	color: var(--fg);
}

.product-main {
	max-width: 1240px;
	margin: 0 auto;
	padding: 28px 28px 60px;
	display: grid;
	grid-template-columns: 58% 42%;
	gap: 40px;
}

/* Gallery */

.gallery-frame {
	position: relative;
	background: #100e0c;
	border: 1px solid var(--line);
	padding: 10px;
	transition: border-color .3s;
}

.gallery-frame::before,
.gallery-frame::after {
	content: "";
	position: absolute;
	width: 22px;
	height: 22px;
	border: 2px solid var(--gold);
	pointer-events: none;
	z-index: 2;
}

.gallery-frame::before {
	top: -1px;
	left: -1px;
	border-right: 0;
	border-bottom: 0;
}

.gallery-frame::after {
	bottom: -1px;
	right: -1px;
	border-left: 0;
	border-top: 0;
}

.gallery-main {
	aspect-ratio: 4 / 5;
	overflow: hidden;
	position: relative;
	cursor: zoom-in;
	outline: none;
}

.gallery-main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: opacity .2s ease, transform .35s ease, object-position .3s ease;
	transform-origin: 50% 50%;
	will-change: transform, object-position;
}

.gallery-thumbs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin-top: 12px;
}

.thumb {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border: 1px solid rgba(217, 165, 33, .12);
	background: #100e0c;
	padding: 0;
	cursor: pointer;
	transition: border-color .3s, box-shadow .3s;
}

.thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.thumb:hover {
	border-color: rgba(217, 165, 33, .45);
}

.thumb.active {
	border-color: var(--gold);
	box-shadow: 0 0 14px rgba(217, 165, 33, .2);
}

/* Info column */

.info {
	position: sticky;
	top: 90px;
	align-self: start;
}

.info .tag {
	font-size: .68rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--gold);
	display: block;
	margin-bottom: 8px;
}

.product-title {
	font-family: 'Cinzel', serif;
	font-weight: 500;
	font-size: 2.2rem;
	letter-spacing: .06em;
	line-height: 1.25;
	margin-bottom: 6px;
	color: var(--fg);
}

.fmt-line {
	font-size: .72rem;
	color: #c9bfae;
	letter-spacing: .08em;
	text-transform: uppercase;
	margin-bottom: 14px;
}

.gold-divider {
	width: 52px;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--gold), transparent);
	opacity: .95;
	margin-bottom: 18px;
}

.price-large {
	font-family: 'Inter', sans-serif;
	font-weight: 600;
	font-size: 2rem;
	color: var(--gold);
	letter-spacing: .02em;
	margin-bottom: 22px;
}

.single_add_to_cart_button.btn,
.castra_buy_now.btn {
	display: block;
	width: 100%;
	padding: 14px 20px;
	font-family: 'Cinzel', serif;
	font-weight: 600;
	font-size: .82rem;
	letter-spacing: .16em;
	text-transform: uppercase;
	text-align: center;
	transition: all .35s;
	border-radius: 0;
	margin-bottom: 10px;
}

.btn-gold {
	background: #d9a521;
	color: #0b0a09;
	border: 1px solid #d9a521;
}

.btn-gold:hover {
	background: #eec75a;
	border-color: #eec75a;
	box-shadow: 0 0 28px rgba(217, 165, 33, .35);
}

.btn-ghost {
	background: transparent;
	color: var(--gold);
	border: 1px solid var(--gold);
}

.btn-ghost:hover {
	background: rgba(217, 165, 33, .1);
	box-shadow: 0 0 20px rgba(217, 165, 33, .2);
}

.benefits {
	list-style: none;
	margin: 24px 0 20px;
	padding: 0;
}

.benefits li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
	font-size: .87rem;
	color: var(--fg);
	letter-spacing: .02em;
}

.benefits li svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	stroke: var(--gold);
	fill: none;
	stroke-width: 1.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.details-table {
	width: 100%;
	border-collapse: collapse;
	margin: 18px 0 20px;
	font-size: .84rem;
}

.details-table th,
.details-table td {
	padding: 9px 0;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.details-table th {
	color: var(--muted);
	font-weight: 500;
	letter-spacing: .08em;
	width: 38%;
	font-size: .76rem;
	text-transform: uppercase;
}

.details-table td {
	color: var(--fg);
}

/* Bottom sections */

.product-description {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 28px 40px;
}

.section-title {
	font-family: 'Cinzel', serif;
	font-weight: 500;
	font-size: 1.4rem;
	letter-spacing: .1em;
	color: var(--fg);
	margin-bottom: 20px;
	text-align: center;
}

.description-content {
	font-size: .92rem;
	color: #c9bfae;
	line-height: 1.7;
	letter-spacing: .015em;
}

.related {
	max-width: 1240px;
	margin: 0 auto;
	padding: 20px 28px 70px;
}

.related-title {
	margin-bottom: 20px;
}

.related .relic-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

/* Lightbox */

.castra-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(11, 10, 9, .92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s ease;
}

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

.castra-lightbox-inner {
	position: relative;
	max-width: 82vw;
	max-height: 82vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.castra-lightbox-inner img {
	max-width: 82vw;
	max-height: 82vh;
	object-fit: contain;
	border: 1px solid var(--line);
	background: #100e0c;
}

.castra-lightbox-close {
	position: absolute;
	top: -40px;
	right: 0;
	width: 36px;
	height: 36px;
	background: none;
	border: 1px solid var(--line);
	color: var(--gold);
	font-size: 1.2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .3s;
	cursor: pointer;
	line-height: 1;
	font-family: 'Inter', sans-serif;
	z-index: 2;
}

.castra-lightbox-close:hover {
	border-color: var(--gold);
	background: rgba(217, 165, 33, .1);
}

/* Mobile sticky bottom bar */

.mobile-sticky-bar {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 120;
	background: rgba(11, 10, 9, .92);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border-top: 1px solid var(--line);
	padding: 10px 16px;
	align-items: center;
	gap: 12px;
}

.mobile-sticky-bar .mobile-sticky-price {
	font-family: 'Inter', sans-serif;
	font-weight: 600;
	color: var(--gold);
	font-size: 1.2rem;
	white-space: nowrap;
}

.mobile-sticky-bar .btn {
	margin-bottom: 0;
	flex: 1;
}

/* Responsive */

@media (max-width: 899px) {
	.product-main {
		grid-template-columns: 1fr;
		gap: 24px;
		padding: 20px 16px 40px;
	}

	.info {
		position: static;
		top: auto;
	}

	.woocommerce-breadcrumb {
		padding: 14px 16px 0;
	}

	.related {
		padding: 10px 16px 50px;
	}

	.related .relic-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}
}

@media (max-width: 760px) {
	.mobile-sticky-bar {
		display: flex;
	}

	body {
		padding-bottom: 70px;
	}

	.product-main {
		padding-bottom: 20px;
	}
}

@media (max-width: 520px) {
	.related .relic-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 390px) {
	.product-title {
		font-size: 1.6rem;
	}

	.price-large {
		font-size: 1.6rem;
	}

	.single_add_to_cart_button.btn,
	.castra_buy_now.btn {
		font-size: .72rem;
		padding: 12px 16px;
	}

	.gallery-thumbs {
		gap: 6px;
	}
}

/* 01.11.2026: цялата снимка, без изрязване (основна и при отваряне) */
.gallery-main { background: #100e0c; }
.gallery-main img { object-fit: contain !important; object-position: center !important; transform: none !important; }
.castra-lightbox-inner img { width: auto; height: auto; object-fit: contain !important; object-position: center !important; transform: none !important; }
.gallery-thumbs.is-single { display: none; }
