/*============================================================================================*/
/* Starbazar – detail inzerátu – dizajn 2027 (nadväzuje na listing-2027.css)                   */
/*============================================================================================*/
.sb-detail-page {
	padding: 18px 0 64px;
}

.sb-detail-crumbs {
	margin: 0 0 16px;
}

.sb-detail-crumbs [aria-current] {
	max-width: 40ch;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.sb-detail {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	grid-template-areas:
		"gallery summary"
		"content summary";
	gap: 20px 24px;
	align-items: start;
}

.sb-detail__gallery {
	grid-area: gallery;
	min-width: 0;
}

.sb-detail__summary {
	grid-area: summary;
	position: sticky;
	top: 96px;
	min-width: 0;
}

.sb-detail__content {
	grid-area: content;
	min-width: 0;
}

/* ---------- Galéria ---------- */
.sb-gallery {
	background: #fff;
	border: 1px solid var(--sb-card-border);
	border-radius: var(--sb-radius);
	padding: 10px;
}

.sb-gallery__main {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 12px;
	background:
		radial-gradient(circle at 50% 40%, #f7fbfe 0%, #eaf2f8 100%);
	aspect-ratio: 4 / 3;
	cursor: zoom-in;
}

.sb-gallery__main img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

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

.sb-gallery__main--empty img {
	object-fit: cover;
	opacity: 0.7;
}

.sb-gallery__zoom,
.sb-gallery__count {
	position: absolute;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 12px;
	border-radius: 10px;
	background: rgba(15, 34, 48, 0.72);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	backdrop-filter: blur(4px);
}

.sb-gallery__zoom {
	right: 12px;
	bottom: 12px;
	width: 34px;
	padding: 0;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.sb-gallery__main:hover .sb-gallery__zoom {
	opacity: 1;
}

.sb-gallery__count {
	left: 12px;
	bottom: 12px;
}

.sb-gallery__zoom svg,
.sb-gallery__count svg {
	width: 16px;
	height: 16px;
}

.sb-gallery__thumbs {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	overflow-x: auto;
	scrollbar-width: thin;
}

.sb-gallery__thumb {
	flex: 0 0 auto;
	width: 96px;
	height: 72px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 10px;
	overflow: hidden;
	background: var(--sb-soft);
	cursor: pointer;
	opacity: 0.75;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}

.sb-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sb-gallery__thumb:hover,
.sb-gallery__thumb.is-active {
	opacity: 1;
}

.sb-gallery__thumb.is-active {
	border-color: var(--sb-accent, #1495d6);
}

/* ---------- Súhrn ---------- */
.sb-summary__badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
}

.sb-summary__badges .sb-badge {
	box-shadow: none;
	background: var(--sb-soft);
}

.sb-summary__badges .sb-badge--top {
	background: linear-gradient(135deg, #ffd84d, #f5a300);
}

.sb-badge--demand {
	color: #fff !important;
	background: var(--sb-ink, #0f2230) !important;
}

.sb-summary__cat {
	font-size: 13px;
	font-weight: 600;
	color: var(--sb-accent-dark, #0b6f9e);
	margin-left: 2px;
}

.sb-summary__title {
	margin: 0 0 10px;
	font-size: 26px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--sb-ink, #0f2230);
	overflow-wrap: anywhere;
}

.sb-summary__meta {
	margin-bottom: 16px;
}

.sb-summary__price {
	font-size: 34px;
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--sb-ink, #0f2230);
	padding-top: 16px;
	border-top: 1px dashed var(--sb-card-border);
}

.sb-summary__price small {
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0;
	color: var(--sb-muted, #6d7d89);
	margin-left: 4px;
}

.sb-summary__price.is-special {
	font-size: 26px;
	color: var(--sb-accent-dark, #0b6f9e);
}

.sb-summary__vat {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--sb-muted, #6d7d89);
}

.sb-summary__stats {
	justify-content: flex-start;
	margin-top: 14px;
}

/* predajca */
.sb-seller__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 16px;
}

.sb-seller__avatar {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: linear-gradient(135deg, #1495d6, #0b6f9e);
	color: #fff;
	font-size: 22px;
	font-weight: 700;
}

.sb-seller__label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sb-muted, #6d7d89);
}

.sb-seller__name {
	display: block;
	font-size: 17px;
	color: var(--sb-ink, #0f2230);
}

.sb-seller__all {
	font-size: 13px;
	font-weight: 500;
}

.sb-seller__actions {
	display: grid;
	gap: 8px;
}

.sb-seller__actions .sb-btn {
	min-height: 50px;
	font-size: 16px;
}

/* akcie */
.sb-actions {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 4px;
	padding: 10px;
}

.sb-action {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 10px 4px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--sb-ink, #0f2230);
	font-size: 12px;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.sb-action svg {
	width: 20px;
	height: 20px;
	color: var(--sb-accent, #1495d6);
}

.sb-action:hover {
	background: var(--sb-soft);
	color: var(--sb-accent-dark, #0b6f9e);
}

.sb-detail__minor {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: -4px 0 16px;
	font-size: 13px;
	color: var(--sb-muted, #6d7d89);
}

.sb-detail__minor button,
.sb-detail__minor a {
	padding: 0;
	border: 0;
	background: none;
	color: var(--sb-muted, #6d7d89);
	font-family: inherit;
	font-size: 13px;
	text-decoration: underline;
	cursor: pointer;
}

.sb-detail__minor button:hover,
.sb-detail__minor a:hover {
	color: var(--sb-accent-dark, #0b6f9e);
}

.sb-safety {
	display: flex;
	gap: 12px;
	padding: 14px 16px;
	border-radius: 14px;
	background: #eef8f2;
	color: #1d5a3a;
	font-size: 13px;
	line-height: 1.5;
}

.sb-safety svg {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	color: #16a34a;
}

.sb-safety p {
	margin: 0;
}

/* ---------- Obsah ---------- */
.sb-section {
	padding: 24px;
}

.sb-section h2 {
	margin: 0 0 14px;
	font-size: 20px;
	font-weight: 700;
	color: var(--sb-ink, #0f2230);
}

.sb-section h3 {
	margin: 20px 0 8px;
	font-size: 16px;
	font-weight: 700;
}

.sb-section__lead {
	margin: -6px 0 16px;
	color: var(--sb-muted, #6d7d89);
	font-size: 14px;
}

.sb-section--soft {
	background: linear-gradient(135deg, #f3f9fd, #fff);
}

.sb-description {
	font-size: 16px;
	line-height: 1.7;
	color: #24394a;
	overflow-wrap: anywhere;
}

.sb-description p {
	margin: 0 0 12px;
}

.sb-description img {
	max-width: 100%;
	height: auto;
}

.sb-description__link {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 16px 0 0;
	font-size: 14px;
}

.sb-description__link svg {
	width: 16px;
	height: 16px;
	color: var(--sb-muted, #6d7d89);
}

.sb-params {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 24px;
	margin: 0;
}

.sb-params > div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid #edf2f6;
	font-size: 14px;
}

.sb-params dt {
	font-weight: 500;
	color: var(--sb-muted, #6d7d89);
}

.sb-params dd {
	margin: 0;
	font-weight: 600;
	color: var(--sb-ink, #0f2230);
	text-align: right;
}

.sb-route {
	display: flex;
	gap: 8px;
	margin-top: 18px;
}

.sb-route input {
	flex: 1 1 auto;
	min-width: 0;
}

/* formuláre */
.sb-form__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

.sb-field {
	display: block;
	margin: 0;
}

.sb-field--full {
	grid-column: 1 / -1;
}

.sb-field > span {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--sb-ink, #0f2230);
}

.sb-field input,
.sb-field select,
.sb-field textarea,
.sb-route input {
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid var(--sb-card-border);
	border-radius: 12px;
	background: #fff;
	font-family: inherit;
	font-size: 15px;
	color: var(--sb-ink, #0f2230);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sb-field textarea {
	min-height: 110px;
	resize: vertical;
	line-height: 1.5;
}

.sb-field input:focus,
.sb-field select:focus,
.sb-field textarea:focus,
.sb-route input:focus {
	outline: 0;
	border-color: var(--sb-accent, #1495d6);
	box-shadow: 0 0 0 3px rgba(20, 149, 214, 0.15);
}

.sb-form--inline {
	display: grid;
	grid-template-columns: 1fr 1.4fr auto;
	gap: 12px;
	align-items: end;
}

/* podobné */
.sb-similar {
	margin-top: 40px;
}

.sb-similar h2 {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 16px;
}

.sb-results--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* dialógy */
.sb-dialog {
	width: min(520px, calc(100vw - 32px));
	padding: 0;
	border: 0;
	border-radius: 20px;
	box-shadow: 0 30px 80px rgba(15, 34, 48, 0.3);
	color: var(--sb-ink, #0f2230);
}

.sb-dialog::backdrop {
	background: rgba(15, 34, 48, 0.55);
	backdrop-filter: blur(3px);
}

.sb-dialog .sb-form {
	padding: 22px;
	display: grid;
	gap: 14px;
}

.sb-dialog__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.sb-dialog__head h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
}

.sb-dialog__close {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: var(--sb-soft, #f4f8fb);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.sb-dialog__foot {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

.sb-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 10000;
	transform: translate(-50%, 20px);
	padding: 12px 18px;
	border-radius: 12px;
	background: var(--sb-ink, #0f2230);
	color: #fff;
	font-size: 14px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.sb-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ---------- Responzívnosť ---------- */
@media (max-width: 1199.98px) {
	.sb-detail {
		grid-template-columns: minmax(0, 1fr) 340px;
	}

	.sb-results--4 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 991.98px) {
	.sb-detail {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"gallery"
			"summary"
			"content";
		gap: 16px;
	}

	.sb-detail__summary {
		position: static;
	}

	.sb-form__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sb-results--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767.98px) {
	.sb-detail-page {
		padding-top: 12px;
	}

	.sb-gallery {
		padding: 0;
		border: 0;
		background: transparent;
	}

	.sb-gallery__thumb {
		width: 72px;
		height: 54px;
	}

	.sb-summary__title {
		font-size: 22px;
	}

	.sb-summary__price {
		font-size: 28px;
	}

	.sb-section {
		padding: 18px;
	}

	.sb-params,
	.sb-form__grid,
	.sb-form--inline {
		grid-template-columns: minmax(0, 1fr);
	}

	.sb-route {
		flex-direction: column;
	}

	.sb-action span {
		font-size: 11px;
	}
}

@media print {
	#results,
	header,
	footer,
	.sb-actions,
	.sb-detail__minor,
	.sb-safety,
	#sb-contact,
	.sb-section--soft,
	.sb-similar,
	.sb-route,
	.sb-gallery__thumbs {
		display: none !important;
	}

	.sb-detail {
		display: block;
	}
}

/* ---------- Informačné stránky ---------- */
.sb-info-page .sb-infonav ul {
	max-height: none;
	min-height: 0;
}

.sb-info-page .sb-infonav a {
	padding: 10px 12px;
	font-weight: 500;
}

.sb-info-cta {
	background: linear-gradient(135deg, #eef7fd, #fff);
}

.sb-info-cta strong {
	display: block;
	font-size: 16px;
	color: var(--sb-ink, #0f2230);
}

.sb-info-cta p {
	margin: 4px 0 14px;
	font-size: 14px;
	color: var(--sb-muted, #6d7d89);
}

.sb-prose {
	padding: 32px 36px;
	font-size: 16px;
	line-height: 1.75;
	color: #24394a;
	overflow-wrap: anywhere;
}

.sb-prose__title {
	margin: 0 0 18px;
	font-size: 32px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--sb-ink, #0f2230);
}

.sb-prose h1:not(.sb-prose__title),
.sb-prose h2,
.sb-prose h3,
.sb-prose h4 {
	margin: 26px 0 10px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--sb-ink, #0f2230);
}

.sb-prose h2 { font-size: 22px; }
.sb-prose h3 { font-size: 19px; }
.sb-prose h4 { font-size: 17px; }

.sb-prose p,
.sb-prose ul,
.sb-prose ol {
	margin: 0 0 14px;
}

.sb-prose img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

.sb-prose a {
	color: var(--sb-accent-dark, #0b6f9e);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sb-prose .container,
.sb-prose [class*="margin_"] {
	width: auto;
	max-width: none;
	padding-left: 0;
	padding-right: 0;
	margin-top: 0;
	margin-bottom: 0;
}

@media (max-width: 767.98px) {
	.sb-prose {
		padding: 22px 18px;
		font-size: 15px;
	}

	.sb-prose__title {
		font-size: 25px;
	}

	.sb-info-page .sb-sidebar {
		order: 2;
	}
}
