/* Danek Objektid. Fondid ja värvid päritakse teemast; muuda muutujaid teema CSS-is. */
.dbo-listings,
.dbo-details,
.dbo-gallery {
	--dbo-gap: 1.25rem;
	--dbo-radius: 6px;
	--dbo-muted: color-mix(in srgb, currentColor 60%, transparent);
	--dbo-line: color-mix(in srgb, currentColor 15%, transparent);
	--dbo-badge-bg: #1d2b36;
	--dbo-badge-fg: #fff;
}

.dbo-filters {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	align-items: flex-end;
	margin: 0 0 var(--dbo-gap);
}
.dbo-filters label {
	display: flex;
	flex-direction: column;
	gap: .25rem;
	font-size: .875rem;
}
.dbo-filters select,
.dbo-filters button {
	font: inherit;
	padding: .55rem .75rem;
	border-radius: var(--dbo-radius);
	border: 1px solid var(--dbo-line);
	min-height: 2.75rem;
}
.dbo-filters button {
	cursor: pointer;
}

.dbo-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: var(--dbo-gap);
}
.dbo-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}
.dbo-card__link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}
.dbo-card__media {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: var(--dbo-radius);
	background: var(--dbo-line);
}
.dbo-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.dbo-card__status,
.dbo-status {
	display: inline-block;
	background: var(--dbo-badge-bg);
	color: var(--dbo-badge-fg);
	font-size: .8125rem;
	padding: .3rem .6rem;
	border-radius: 3px;
}
.dbo-card__status {
	position: absolute;
	left: .75rem;
	top: .75rem;
}
.dbo-card--sold .dbo-card__media img {
	filter: grayscale(.6);
}
.dbo-card__body {
	padding: .75rem 0 0;
}
.dbo-card__price {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
}
.dbo-card__title {
	margin: .25rem 0 0;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.35;
}
.dbo-card__meta {
	margin: .25rem 0 0;
	font-size: .875rem;
	color: var(--dbo-muted);
}

.dbo-gallery {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: .5rem;
	margin: 0 0 var(--dbo-gap);
}
.dbo-gallery__item {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--dbo-radius);
}
.dbo-gallery__item--main {
	grid-column: 1 / -1;
	aspect-ratio: 16 / 9;
}
.dbo-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.dbo-gallery__item:nth-child(n+6) {
	display: none;
}
.dbo-gallery__item:nth-child(5) {
	position: relative;
}
.dbo-gallery__more {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 14, 18, .55);
	color: #fff;
	font-size: 1.25rem;
	font-weight: 600;
}
@media (max-width: 600px) {
	.dbo-gallery__more { display: none; }
}

.dbo-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(10, 14, 18, .92);
	padding: 3rem 4rem;
}
.dbo-lightbox.is-open {
	display: flex;
}
.dbo-lightbox img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}
.dbo-lightbox button {
	position: absolute;
	background: none;
	border: 0;
	color: #fff;
	font-size: 2.5rem;
	line-height: 1;
	cursor: pointer;
	padding: .5rem 1rem;
}
.dbo-lightbox button:focus-visible {
	outline: 2px solid #fff;
}
.dbo-lightbox__close { top: .5rem; right: .5rem; }
.dbo-lightbox__prev { left: .25rem; top: 50%; transform: translateY(-50%); }
.dbo-lightbox__next { right: .25rem; top: 50%; transform: translateY(-50%); }
.dbo-lightbox__count {
	position: absolute;
	bottom: 1rem;
	left: 0;
	right: 0;
	text-align: center;
	color: #fff;
	margin: 0;
	font-size: .875rem;
}

.dbo-details {
	margin: 0 0 var(--dbo-gap);
}
.dbo-details dl {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
	gap: 0 var(--dbo-gap);
	margin: .75rem 0 0;
}
.dbo-details dl > div {
	padding: .6rem 0;
	border-bottom: 1px solid var(--dbo-line);
}
.dbo-details dt {
	font-size: .8125rem;
	color: var(--dbo-muted);
}
.dbo-details dd {
	margin: 0;
	font-weight: 600;
}

@media (max-width: 600px) {
	.dbo-gallery {
		grid-template-columns: repeat(2, 1fr);
	}
	.dbo-gallery__item:nth-child(n+4) {
		display: none;
	}
}
