/* =============================================
   Listing Detail — Sahibinden Classified v1.35
   ============================================= */

body.mb-listing-detail-page {
	background: var(--mb-sb-bg);
}

.mb-listing-detail--sb {
	padding-bottom: 48px;
}

/* —— Breadcrumb —— */
.mb-sb-detail__crumb {
	padding: 12px 0 4px;
}

/* —— Premium / owner bars —— */
.mb-sb-detail__premium {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px 14px;
	margin-bottom: 12px;
	background: var(--mb-sb-gold-subtle);
	border: 1px solid var(--mb-sb-gold-muted);
	border-left: 4px solid var(--mb-sb-gold);
	border-radius: 4px;
	font-size: 13px;
	color: var(--mb-sb-text-secondary);
}

.mb-sb-detail__premium strong {
	color: var(--mb-sb-navy);
}

.mb-sb-detail__owner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	margin-bottom: 12px;
	background: #fff;
	border: 1px solid var(--mb-sb-border);
	border-radius: 4px;
}

.mb-sb-detail__owner-stats {
	display: flex;
	gap: 20px;
}

.mb-sb-detail__owner-stats div {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
}

.mb-sb-detail__owner-stats strong {
	font-size: 18px;
	color: var(--mb-sb-navy);
}

.mb-sb-detail__owner-stats span {
	font-size: 11px;
	color: var(--mb-sb-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.mb-sb-detail__owner-actions {
	display: flex;
	gap: 8px;
}

/* —— Header —— */
.mb-sb-detail {
	background: transparent;
}

.mb-sb-detail__head {
	background: #fff;
	border: 1px solid var(--mb-sb-border);
	border-radius: 4px 4px 0 0;
	padding: 16px 18px;
	border-bottom: 2px solid var(--mb-sb-gold);
}

.mb-sb-detail__badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.mb-sb-detail__badge {
	display: inline-block;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-radius: 3px;
	background: var(--mb-sb-navy);
	color: #fff;
}

.mb-sb-detail__badge--new { background: var(--mb-success); }
.mb-sb-detail__badge--urgent { background: var(--mb-danger); }
.mb-sb-detail__badge--featured { background: var(--mb-sb-gold); color: var(--mb-navy-950); }

.mb-sb-detail__cat {
	font-size: 12px;
	font-weight: 700;
	color: var(--mb-sb-navy);
	text-decoration: none;
	padding: 3px 10px;
	background: var(--mb-sb-navy-muted);
	border-radius: 3px;
}

.mb-sb-detail__cat:hover {
	background: var(--mb-sb-gold-subtle);
	color: var(--mb-sb-navy-dark);
}

.mb-sb-detail__title {
	margin: 0 0 10px;
	font-size: clamp(20px, 3vw, 26px);
	font-weight: 800;
	line-height: 1.25;
	color: var(--mb-sb-text);
}

.mb-sb-detail__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 12px;
	color: var(--mb-sb-muted);
}

.mb-sb-detail__meta strong {
	color: var(--mb-sb-text-secondary);
	font-weight: 600;
}

.mb-sb-detail__meta-loc {
	color: var(--mb-sb-navy);
	font-weight: 600;
}

/* —— Layout grid —— */
.mb-sb-detail__layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 0;
	background: #fff;
	border: 1px solid var(--mb-sb-border);
	border-top: none;
	border-radius: 0 0 4px 4px;
	overflow: hidden;
}

.mb-sb-detail__main {
	padding: 18px;
	border-right: 1px solid var(--mb-sb-border);
	min-width: 0;
}

.mb-sb-detail__aside {
	padding: 16px;
	background: var(--mb-neutral-50);
	position: sticky;
	top: 72px;
	align-self: start;
	max-height: calc(100vh - 88px);
	overflow-y: auto;
}

/* —— Gallery —— */
.mb-sb-gallery {
	margin-bottom: 18px;
}

.mb-sb-gallery__inner {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.mb-sb-gallery__thumbs {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 0 0 72px;
	max-height: 420px;
	overflow-y: auto;
	scrollbar-width: thin;
}

.mb-sb-gallery__thumbs .mb-listing-gallery__thumb {
	width: 72px;
	height: 54px;
	padding: 0;
	border: 2px solid var(--mb-sb-border);
	border-radius: 3px;
	overflow: hidden;
	cursor: pointer;
	background: #fff;
	flex-shrink: 0;
}

.mb-sb-gallery__thumbs .mb-listing-gallery__thumb.is-active {
	border-color: var(--mb-sb-navy);
	box-shadow: 0 0 0 1px var(--mb-sb-navy);
}

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

.mb-sb-gallery__main {
	flex: 1;
	position: relative;
	aspect-ratio: 4/3;
	background: var(--mb-neutral-100);
	border: 1px solid var(--mb-sb-border);
	border-radius: 4px;
	overflow: hidden;
	min-height: 280px;
}

.mb-sb-gallery__main img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #fff;
	transition: opacity 0.2s ease;
	cursor: zoom-in;
}

.mb-sb-gallery__doping {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 5px 10px;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	background: var(--mb-sb-navy);
	border-radius: 3px;
}

.mb-sb-gallery__zoom {
	position: absolute;
	bottom: 10px;
	right: 10px;
	z-index: 2;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid var(--mb-sb-border);
	border-radius: 4px;
	cursor: pointer;
	color: var(--mb-sb-navy);
}

.mb-listing-gallery--sb .mb-listing-gallery__counter {
	bottom: 10px;
	left: 10px;
	font-size: 11px;
	padding: 4px 8px;
	border-radius: 3px;
}

.mb-listing-gallery--sb .mb-listing-gallery__nav {
	width: 36px;
	height: 36px;
	font-size: 22px;
	border-radius: 4px;
}

.mb-listing-gallery--sb .mb-listing-gallery__nav--prev { left: 10px; }
.mb-listing-gallery--sb .mb-listing-gallery__nav--next { right: 10px; }

/* —— Panels —— */
.mb-sb-panel {
	margin-bottom: 16px;
	border: 1px solid var(--mb-sb-border);
	border-radius: 4px;
	overflow: hidden;
}

.mb-sb-panel__title {
	margin: 0;
	padding: 10px 14px;
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--mb-sb-navy);
	background: var(--mb-sb-gold-subtle);
	border-bottom: 1px solid var(--mb-sb-border);
}

.mb-sb-info-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.mb-sb-info-table th,
.mb-sb-info-table td {
	padding: 9px 14px;
	border-bottom: 1px solid var(--mb-sb-border);
	vertical-align: top;
}

.mb-sb-info-table tr:last-child th,
.mb-sb-info-table tr:last-child td {
	border-bottom: none;
}

.mb-sb-info-table th {
	width: 38%;
	font-weight: 600;
	color: var(--mb-sb-muted);
	background: var(--mb-neutral-50);
	text-align: left;
}

.mb-sb-info-table td {
	color: var(--mb-sb-text);
	font-weight: 500;
}

.mb-sb-info-table--specs tr:nth-child(even) td {
	background: var(--mb-neutral-50);
}

.mb-sb-detail__description {
	padding: 14px 16px;
	font-size: 14px;
	line-height: 1.65;
	color: var(--mb-sb-text-secondary);
}

.mb-sb-detail__description p {
	margin: 0 0 10px;
}

.mb-sb-detail__video {
	padding: 0;
	line-height: 0;
}

.mb-sb-detail__video iframe {
	display: block;
	border: none;
}

.mb-sb-panel--safety {
	background: var(--mb-sb-navy-muted);
}

.mb-sb-safety-list {
	margin: 0;
	padding: 12px 16px 12px 32px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--mb-sb-text-secondary);
}

.mb-sb-safety-list li {
	margin-bottom: 6px;
}

.mb-sb-safety-list li:last-child {
	margin-bottom: 0;
}

/* —— Price card sidebar —— */
.mb-sb-price-card {
	background: #fff;
	border: 1px solid var(--mb-sb-border);
	border-radius: 4px;
	padding: 16px;
	margin-bottom: 12px;
	box-shadow: var(--mb-shadow);
}

.mb-sb-price-card__old {
	font-size: 14px;
	color: var(--mb-sb-muted);
	text-decoration: line-through;
	margin-bottom: 2px;
}

.mb-sb-price-card__price {
	font-size: 28px;
	font-weight: 800;
	color: var(--mb-sb-navy);
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.mb-sb-price-card__hint {
	font-size: 12px;
	color: var(--mb-sb-muted);
	margin: 4px 0 14px;
}

.mb-sb-price-card__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* —— Buttons —— */
.mb-sb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 700;
	border-radius: 4px;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: filter 0.15s ease, background 0.15s ease;
	line-height: 1.2;
	font-family: inherit;
}

.mb-sb-btn--block { width: 100%; }
.mb-sb-btn--sm { padding: 8px 14px; font-size: 12px; }
.mb-sb-btn--icon { padding: 8px 12px; }

.mb-sb-btn--navy {
	background: var(--mb-sb-navy);
	color: #fff;
	border-color: var(--mb-sb-navy-dark);
}

.mb-sb-btn--navy:hover {
	filter: brightness(1.08);
	color: #fff;
}

.mb-sb-btn--gold {
	background: var(--mb-gradient-gold-btn);
	color: var(--mb-navy-950);
	border-color: var(--mb-sb-gold-dark);
}

.mb-sb-btn--outline {
	background: #fff;
	color: var(--mb-sb-navy);
	border-color: var(--mb-sb-navy);
}

.mb-sb-btn--outline:hover {
	background: var(--mb-sb-navy-muted);
}

.mb-sb-btn--ghost {
	background: transparent;
	color: var(--mb-sb-navy);
	border-color: var(--mb-sb-border);
}

.mb-sb-btn--ghost:hover {
	background: var(--mb-sb-gold-subtle);
	border-color: var(--mb-sb-gold-muted);
}

.mb-sb-btn--whatsapp {
	background: #25d366;
	color: #fff;
	border-color: #1da851;
}

.mb-sb-btn--fav {
	background: #fff;
	color: var(--mb-sb-navy);
	border-color: var(--mb-sb-border);
}

.mb-sb-btn--fav.is-active,
.mb-sb-btn--fav:hover {
	background: #fef2f2;
	border-color: #fca5a5;
	color: #dc3545;
}

.mb-sb-btn--danger {
	background: var(--mb-danger);
	color: #fff;
}

.mb-sb-btn.is-revealed {
	background: var(--mb-sb-gold-subtle);
	border-color: var(--mb-sb-gold);
	color: var(--mb-sb-navy);
	font-size: 16px;
	letter-spacing: 0.05em;
}

/* —— Seller card —— */
.mb-sb-seller {
	background: #fff;
	border: 1px solid var(--mb-sb-border);
	border-radius: 4px;
	padding: 14px;
	margin-bottom: 12px;
}

.mb-sb-seller__head {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-bottom: 12px;
}

.mb-sb-seller__avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--mb-sb-border);
	flex-shrink: 0;
}

.mb-sb-seller__name {
	font-size: 14px;
	font-weight: 700;
	color: var(--mb-sb-text);
	display: flex;
	align-items: center;
	gap: 4px;
}

.mb-sb-seller__verified {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	font-size: 10px;
	background: var(--mb-success);
	color: #fff;
	border-radius: 50%;
}

.mb-sb-seller__rating {
	font-size: 12px;
	color: var(--mb-sb-muted);
	margin-top: 2px;
}

.mb-sb-seller__stats {
	display: grid;
	gap: 6px;
	margin: 0 0 12px;
	font-size: 12px;
}

.mb-sb-seller__stats div {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 4px 0;
	border-bottom: 1px dashed var(--mb-sb-border);
}

.mb-sb-seller__stats div:last-child {
	border-bottom: none;
}

.mb-sb-seller__stats dt {
	color: var(--mb-sb-muted);
	font-weight: 500;
}

.mb-sb-seller__stats dd {
	margin: 0;
	font-weight: 600;
	color: var(--mb-sb-text);
}

/* —— Tools row —— */
.mb-sb-detail__tools {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.mb-sb-tool {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 10px;
	font-size: 11px;
	font-weight: 600;
	color: var(--mb-sb-muted);
	background: #fff;
	border: 1px solid var(--mb-sb-border);
	border-radius: 4px;
	cursor: pointer;
	font-family: inherit;
}

.mb-sb-tool:hover {
	color: var(--mb-sb-navy);
	border-color: var(--mb-sb-navy);
}

.mb-sb-tool--danger:hover {
	color: var(--mb-danger);
	border-color: var(--mb-danger);
}

/* —— Mobile price bar —— */
.mb-sb-mobile-bar {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 90;
	padding: 10px 16px;
	background: #fff;
	border-top: 2px solid var(--mb-sb-gold);
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.mb-sb-mobile-bar__price {
	font-size: 20px;
	font-weight: 800;
	color: var(--mb-sb-navy);
}

/* —— Sticky bar —— */
.mb-sb-sticky-bar {
	display: none;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 95;
	padding: 10px 20px;
	background: #fff;
	border-top: 2px solid var(--mb-sb-gold);
	box-shadow: 0 -4px 20px rgba(28, 35, 51, 0.12);
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.mb-sb-sticky-bar__price {
	font-size: 22px;
	font-weight: 800;
	color: var(--mb-sb-navy);
}

.mb-sticky-bar__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* —— Related listings —— */
.mb-sb-related {
	margin-top: 24px;
	padding: 20px 0 0;
	border-top: 3px solid var(--mb-sb-gold);
	background: var(--mb-sb-bg);
}

.mb-sb-related__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.mb-sb-related__title {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	color: var(--mb-sb-navy);
}

.mb-sb-related__more {
	font-size: 12px;
	font-weight: 700;
	color: var(--mb-sb-navy);
	text-decoration: none;
}

.mb-sb-related__more:hover {
	color: var(--mb-sb-gold-dark);
}

.mb-sb-related__list {
	background: #fff;
	border: 1px solid var(--mb-sb-border);
	border-radius: 4px;
	overflow: hidden;
}

.mb-sb-related__header-row {
	display: grid;
	grid-template-columns: 64px 1fr 110px 90px 100px;
	gap: 10px;
	padding: 8px 12px;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--mb-sb-navy);
	background: var(--mb-sb-navy-muted);
	border-bottom: 1px solid var(--mb-sb-border);
}

.mb-sb-related__header-row span:nth-child(n+3) {
	text-align: right;
}

.mb-sb-related .mb-listing-row--sb:last-child .mb-listing-row__link {
	border-bottom: none;
}

/* —— Modals on detail —— */
body.mb-listing-detail-page .mb-modal__dialog {
	border-radius: 6px;
	border-top: 3px solid var(--mb-sb-gold);
}

/* —— Responsive —— */
@media (max-width: 960px) {
	.mb-sb-detail__layout {
		grid-template-columns: 1fr;
	}

	.mb-sb-detail__main {
		border-right: none;
		border-bottom: 1px solid var(--mb-sb-border);
	}

	.mb-sb-detail__aside {
		position: static;
		max-height: none;
	}

	.mb-sb-related__header-row {
		display: none;
	}
}

@media (max-width: 768px) {
	.mb-sb-gallery__inner {
		flex-direction: column-reverse;
	}

	.mb-sb-gallery__thumbs {
		flex-direction: row;
		flex: none;
		width: 100%;
		max-height: none;
		overflow-x: auto;
		overflow-y: hidden;
		padding-bottom: 4px;
	}

	.mb-sb-gallery__thumbs .mb-listing-gallery__thumb {
		flex: 0 0 64px;
		width: 64px;
		height: 48px;
	}

	.mb-sb-gallery__main {
		min-height: 220px;
	}

	.mb-sb-detail__owner {
		flex-direction: column;
		align-items: stretch;
	}

	.mb-sb-mobile-bar {
		display: flex;
	}

	body.mb-listing-detail-page {
		padding-bottom: 64px;
	}

	.mb-sb-sticky-bar {
		display: none !important;
	}
}

@media (min-width: 769px) {
	.mb-sb-mobile-bar {
		display: none !important;
	}
}

@media print {
	.mb-sb-detail__aside,
	.mb-sb-mobile-bar,
	.mb-sb-sticky-bar,
	.mb-sb-detail__tools,
	.mb-sb-related {
		display: none !important;
	}

	.mb-sb-detail__layout {
		grid-template-columns: 1fr;
	}
}
