/* ============================================================
   SleekCard Property Portfolio — Archive / Listing
   ============================================================ */

/* Scope box-sizing to plugin elements only — do NOT use * globally */
.scpp-archive-page *,
.scpp-archive-grid *,
.scpp-stacked-list *,
.scpp-property-card *,
.scpp-stacked-card * {
	box-sizing: border-box;
}

/* ── Page wrapper ───────────────────────────────────────────── */
.scpp-archive-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.5rem 4rem;
}

/* ── Archive header ─────────────────────────────────────────── */
.scpp-archive-header {
	padding: 2.5rem 0 1.75rem;
	border-bottom: 1px solid #e5e7eb;
	margin-bottom: 2.5rem;
}
.scpp-archive-header__inner {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	margin-bottom: 1.25rem;
}
.scpp-archive-title {
	font-size: 2rem;
	font-weight: 700;
	color: #111827;
	margin: 0;
}
.scpp-archive-count {
	color: #6b7280;
	font-size: 0.9rem;
	margin: 0;
}

/* ── Filter buttons ─────────────────────────────────────────── */
.scpp-archive-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.scpp-filter-btn {
	display: inline-block;
	padding: 0.4rem 1rem;
	border: 1.5px solid #d1d5db;
	border-radius: 20px;
	background: #fff;
	color: #374151;
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.18s;
	white-space: nowrap;
}
.scpp-filter-btn:hover,
.scpp-filter-btn.active {
	background: #111827;
	border-color: #111827;
	color: #fff;
}

/* ── Grid ───────────────────────────────────────────────────── */
.scpp-archive-grid {
	display: grid;
	gap: 1.75rem;
}
.scpp-cols-2 { grid-template-columns: repeat(2, 1fr); }
.scpp-cols-3 { grid-template-columns: repeat(3, 1fr); }
.scpp-cols-4 { grid-template-columns: repeat(4, 1fr); }
.scpp-archive-grid > * { min-width: 0; }

/* ── Property card (grid layout) ───────────────────────────── */
.scpp-property-card {
	background: #fff;
	border-radius: 10px;
	border: 1px solid #e5e7eb;
	box-shadow: 0 2px 8px rgba(0,0,0,.06);
	transition: box-shadow 0.22s, transform 0.22s;
	display: flex;
	flex-direction: column;
	/* NO overflow:hidden here — it clips text in tall grid rows */
}
.scpp-property-card:hover {
	box-shadow: 0 6px 24px rgba(0,0,0,.11);
	transform: translateY(-3px);
}
.scpp-property-card__link {
	display: flex;
	flex-direction: column;
	flex: 1;
	text-decoration: none;
	color: inherit;
	border-radius: 10px;
}

/* Image: overflow:hidden is HERE so hover scale is clipped correctly */
.scpp-property-card__image {
	position: relative;
	aspect-ratio: 16/10;
	overflow: hidden;
	background: #f3f4f6;
	border-radius: 10px 10px 0 0;
	flex-shrink: 0;
}
.scpp-property-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}
.scpp-property-card:hover .scpp-property-card__image img {
	transform: scale(1.04);
}
.scpp-property-card__no-image {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
}

/* ── Badges ─────────────────────────────────────────────────── */
.scpp-badge {
	position: absolute;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 3px 8px;
	border-radius: 3px;
	line-height: 1.5;
}
.scpp-badge--type {
	top: 10px;
	left: 10px;
	background: rgba(17,24,39,0.82);
	color: #fff;
	backdrop-filter: blur(4px);
}
.scpp-badge--status {
	top: 10px;
	right: 10px;
}
.scpp-status--available   { background: #d1fae5; color: #065f46; }
.scpp-status--under_offer { background: #ffedd5; color: #9a3412; }
.scpp-status--sold        { background: #fee2e2; color: #991b1b; }
.scpp-status--let         { background: #d1fae5; color: #065f46; }
.scpp-status--let_agreed  { background: #ffedd5; color: #9a3412; }

/* ── Card body ──────────────────────────────────────────────── */
.scpp-property-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 1rem 1.2rem 1.2rem;
	gap: 0.3rem;
}
.scpp-property-card__price {
	font-size: 1.1rem;
	font-weight: 700;
	color: #111827;
	margin: 0;
	line-height: 1.3;
}
.scpp-property-card__title {
	font-size: 0.92rem;
	font-weight: 600;
	color: #1f2937;
	margin: 0;
	line-height: 1.45;
	/* Clamp to 2 lines with ellipsis */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	max-height: calc(0.92rem * 1.45 * 2 + 2px); /* fallback for browsers that ignore -webkit-line-clamp */
}
.scpp-property-card__location {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.78rem;
	color: #6b7280;
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.scpp-property-card__stats {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-top: auto;
	padding-top: 0.7rem;
	border-top: 1px solid #f0f1f3;
}
.scpp-card-stat {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.78rem;
	color: #374151;
	font-weight: 500;
}
.scpp-card-stat svg { color: #9ca3af; flex-shrink: 0; }

/* ── Pagination ─────────────────────────────────────────────── */
.scpp-pagination {
	display: flex;
	justify-content: center;
	gap: 0.4rem;
	padding: 3rem 0 0;
}
.scpp-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1.5px solid #d1d5db;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.88rem;
	color: #374151;
	font-weight: 500;
	transition: all 0.18s;
}
.scpp-pagination .page-numbers.current,
.scpp-pagination .page-numbers:hover {
	background: #111827;
	border-color: #111827;
	color: #fff;
}
.scpp-pagination .prev,
.scpp-pagination .next {
	width: auto;
	padding: 0 1rem;
}

/* ── Empty state ─────────────────────────────────────────────── */
.scpp-archive-empty {
	text-align: center;
	padding: 4rem 0;
	color: #6b7280;
}
.scpp-archive-empty .scpp-btn {
	display: inline-block;
	margin-top: 1rem;
	padding: 0.65rem 1.5rem;
	background: #111827;
	color: #fff;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 600;
}
.scpp-no-results {
	text-align: center;
	padding: 2rem;
	color: #6b7280;
}

/* ── Stacked layout ─────────────────────────────────────────── */
.scpp-stacked-list {
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
}
.scpp-stacked-card {
	border-radius: 10px;
	border: 1px solid #e5e7eb;
	box-shadow: 0 2px 8px rgba(0,0,0,.07);
	overflow: hidden; /* safe here — clips image scale only, body text is within bounds */
	transition: box-shadow 0.22s, transform 0.22s;
}
.scpp-stacked-card:hover {
	box-shadow: 0 6px 24px rgba(0,0,0,.11);
	transform: translateY(-2px);
}
.scpp-stacked-card__link {
	display: flex;
	align-items: stretch;
	text-decoration: none;
	color: inherit;
	min-height: 220px;
}
.scpp-stacked-card:nth-child(odd)  .scpp-stacked-card__link { flex-direction: row; }
.scpp-stacked-card:nth-child(even) .scpp-stacked-card__link { flex-direction: row-reverse; }

.scpp-stacked-card__image {
	position: relative;
	flex: 0 0 45%;
	overflow: hidden;
	background: #f3f4f6;
}
.scpp-stacked-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}
.scpp-stacked-card:hover .scpp-stacked-card__image img {
	transform: scale(1.04);
}
.scpp-stacked-card__no-image {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
}

/* Status badge */
.scpp-stacked-card .scpp-badge--status {
	top: 12px;
	right: 12px;
}

/* Text panel — no negative margins (they cause scrollbar) */
.scpp-stacked-card__body {
	flex: 1 1 auto;
	background: #1f2937;
	color: #fff;
	padding: 2rem 2rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.5rem;
}
.scpp-stacked-card__title {
	font-size: 1.2rem;
	font-weight: 700;
	color: #fff;
	margin: 0;
	line-height: 1.35;
	word-break: break-word;
	overflow-wrap: break-word;
}
.scpp-stacked-card__excerpt {
	font-size: 0.82rem;
	color: #9ca3af;
	margin: 0;
	line-height: 1.6;
}
.scpp-stacked-card__more {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 700;
	color: #f59e0b;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: 0.5rem;
	transition: color 0.18s;
}
.scpp-stacked-card:hover .scpp-stacked-card__more { color: #fbbf24; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.scpp-cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
	.scpp-cols-3,
	.scpp-cols-4 { grid-template-columns: repeat(2, 1fr); }
	.scpp-archive-title { font-size: 1.5rem; }

	.scpp-stacked-card__link,
	.scpp-stacked-card:nth-child(even) .scpp-stacked-card__link {
		flex-direction: column;
	}
	.scpp-stacked-card__image {
		flex: 0 0 200px;
		height: 200px;
	}
}
@media (max-width: 500px) {
	.scpp-cols-2,
	.scpp-cols-3,
	.scpp-cols-4 { grid-template-columns: 1fr; }
}
