/*
 * Komornik Auctions — Archive page styles
 *
 * Palette (same as single.css):
 *   Navy  #1a3a5c  (primary, headings, CTA button)
 *   Red   #c0392b  (opening bid, urgent status)
 *   Green #1a7a32  (upcoming status)
 *   Amber #7a5800  (active/today status)
 *   Light #f4f6f8  (card backgrounds)
 */

/* ==========================================================================
   Page wrapper
   ========================================================================== */

.ka-page-main {
	width: 100%;
}

.ka-archive-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 40px 24px 64px;
}

/* ==========================================================================
   Archive header
   ========================================================================== */

.ka-archive-header {
	margin-bottom: 36px;
}

.ka-archive-header__inner {
	display: flex;
	align-items: baseline;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.ka-archive-title {
	margin: 0;
	font-size: clamp(22px, 3.5vw, 34px);
	font-weight: 700;
	color: #1a3a5c;
	line-height: 1.2;
	display: flex;
	align-items: center;
	gap: 10px;
}
.ka-archive-title i {
	font-size: .8em;
	opacity: .65;
}

.ka-archive-count {
	font-size: 14px;
	color: #888;
	white-space: nowrap;
}

/* ==========================================================================
   Filter bar
   ========================================================================== */

.ka-filters {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ka-filters__group {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.ka-filters__label {
	font-size: 12px;
	font-weight: 700;
	color: #888;
	text-transform: uppercase;
	letter-spacing: .06em;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 4px;
}

.ka-filters__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ka-filter-pill {
	display: inline-block;
	padding: 4px 14px;
	font-size: 13px;
	font-weight: 500;
	border-radius: 20px;
	text-decoration: none;
	background: #eaecee;
	color: #3c434a;
	border: 1.5px solid transparent;
	transition: background .18s, color .18s, border-color .18s;
	line-height: 1.6;
}
.ka-filter-pill:hover {
	background: #d4dce7;
	color: #1a3a5c;
}
.ka-filter-pill.is-active {
	background: #1a3a5c;
	color: #fff;
	border-color: #1a3a5c;
}
.ka-filter-pill--city        { background: #edf7f4; color: #0d6e5a; }
.ka-filter-pill--city:hover  { background: #d0ede7; color: #0d6e5a; }
.ka-filter-pill--city.is-active { background: #0d6e5a; color: #fff; border-color: #0d6e5a; }

/* ==========================================================================
   Card grid — 3 → 2 → 1 columns
   ========================================================================== */

.ka-grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 28px;
}

@media ( max-width: 960px ) {
	.ka-grid { grid-template-columns: repeat( 2, 1fr ); gap: 20px; }
}
@media ( max-width: 580px ) {
	.ka-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ==========================================================================
   Card
   ========================================================================== */

.ka-card {
	position: relative;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0,0,0,.08);
	display: flex;
	flex-direction: column;
	transition: box-shadow .22s, transform .18s;
}
.ka-card:hover {
	box-shadow: 0 8px 30px rgba(0,0,0,.14);
	transform: translateY(-3px);
}

/* Past — muted */
.ka-card--past {
	opacity: .72;
}
.ka-card--past:hover {
	opacity: 1;
}

/* Urgent — red top border + warm glow */
.ka-card--urgent {
	border-top: 3px solid #c0392b;
	box-shadow: 0 2px 12px rgba(192,57,43,.12);
}
.ka-card--urgent:hover {
	box-shadow: 0 8px 30px rgba(192,57,43,.22);
}

/* Full-card invisible click target, sits below interactive children */
.ka-card__link {
	position: absolute;
	inset: 0;
	z-index: 0;
}

/* ── Image area ── */
.ka-card__img-wrap {
	position: relative;
	aspect-ratio: 4 / 3;
	background: #eaedf0;
	overflow: hidden;
	flex-shrink: 0;
	display: block;        /* <a> is inline by default */
	text-decoration: none; /* no underline when it's a link */
	cursor: pointer;
}

.ka-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}
.ka-card:hover .ka-card__img {
	transform: scale(1.04);
}

.ka-card__img-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #bbb;
	font-size: 52px;
}

/* ── Status badge — sits over the image (bottom-left) ── */
.ka-card__status {
	position: absolute;
	bottom: 10px;
	left: 12px;
	display: inline-flex;
	flex-direction: column;     /* stack label + sub-text */
	align-items: flex-start;
	gap: 2px;
	padding: 5px 11px;
	border-radius: 8px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	pointer-events: none;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	line-height: 1.3;
}

/* Row: icon + label text */
.ka-card__status > i,
.ka-card__status > span:first-of-type {
	display: inline;
}
.ka-card__status > i + span {
	display: inline;
}

/* Make icon + label sit on one line */
.ka-card__status {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
}

/* Sub-text (countdown, time) — drops to its own line */
.ka-card__status-sub {
	display: block;
	width: 100%;
	font-size: 10px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	opacity: .85;
	margin-top: 2px;
}

/* ── Status colour variants ── */

/* Nadchodząca — soft green */
.ka-card__status--upcoming {
	background: rgba(230,244,234,.92);
	color: #1a7a32;
}

/* Za X dni — blue-teal */
.ka-card__status--soon {
	background: rgba(230,240,255,.92);
	color: #1a4a8c;
}

/* Dziś! — amber, pulsing */
.ka-card__status--today {
	background: rgba(255,243,205,.95);
	color: #7a5800;
}

/* Trwa teraz — amber */
.ka-card__status--active {
	background: rgba(255,243,205,.92);
	color: #7a5800;
}

/* Ostatnie godziny / chwile — red, urgent */
.ka-card__status--urgent {
	background: rgba(255,235,235,.95);
	color: #c0392b;
}

/* Zakończona — dark semi-transparent */
.ka-card__status--past {
	background: rgba(0,0,0,.38);
	color: #e0e0e0;
}

/* Shared pulse animation */
@keyframes ka-pulse {
	0%, 100% { opacity: 1; }
	50%       { opacity: .3; }
}
.ka-pulse { animation: ka-pulse 1.6s ease infinite; }

/* ── Card body ── */
.ka-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 20px 20px;
	flex: 1;
	position: relative;
	z-index: 1;
}

/* Badges */
.ka-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ka-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 600;
	border-radius: 20px;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: .04em;
	transition: background .18s, color .18s;
	position: relative;
	z-index: 2;
}
.ka-badge--type            { background: #e8eef5; color: #1a3a5c; }
.ka-badge--type:hover      { background: #1a3a5c; color: #fff; }
.ka-badge--city            { background: #e6f4f1; color: #0d6e5a; }
.ka-badge--city:hover      { background: #0d6e5a; color: #fff; }

/* Title */
.ka-card__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	color: #1a3a5c;
}
.ka-card__title a {
	text-decoration: none;
	color: inherit;
	position: relative;
	z-index: 2;
}
.ka-card__title a:hover {
	color: #c0392b;
}

/* Date row */
.ka-card__date {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #555;
}
.ka-card__date i   { color: #1a3a5c; font-size: 12px; }
.ka-card__time     { font-weight: 600; color: #1a3a5c; }

/* Price block */
.ka-card__prices {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid #eaecee;
}

.ka-card__price {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
}

.ka-card__price-label {
	font-size: 11px;
	font-weight: 600;
	color: #888;
	text-transform: uppercase;
	letter-spacing: .05em;
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

.ka-card__price-value {
	font-size: 14px;
	font-weight: 700;
	color: #1a3a5c;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.ka-card__price--highlight .ka-card__price-label { color: #c0392b; }
.ka-card__price--highlight .ka-card__price-value  { font-size: 16px; color: #c0392b; }

/* CTA button */
.ka-card__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	margin-top: 4px;
	background: #1a3a5c;
	color: #fff;
	border-radius: 8px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	transition: background .18s, transform .15s;
	position: relative;
	z-index: 2;
}
.ka-card__btn:hover       { background: #122843; color: #fff; transform: translateY(-1px); }
.ka-card__btn i           { font-size: 12px; transition: transform .2s; }
.ka-card__btn:hover i     { transform: translateX(3px); }

/* Urgent card CTA — red */
.ka-card--urgent .ka-card__btn {
	background: #c0392b;
}
.ka-card--urgent .ka-card__btn:hover {
	background: #a93226;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.ka-pagination {
	margin-top: 48px;
	display: flex;
	justify-content: center;
}

.ka-pagination .nav-links {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

.ka-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	color: #3c434a;
	background: #f4f6f8;
	transition: background .18s, color .18s;
	border: 1.5px solid transparent;
}
.ka-pagination .page-numbers:hover   { background: #dde3ea; color: #1a3a5c; }
.ka-pagination .page-numbers.current { background: #1a3a5c; color: #fff; border-color: #1a3a5c; font-weight: 700; }
.ka-pagination .page-numbers.dots    { background: transparent; cursor: default; }
.ka-pagination .prev,
.ka-pagination .next                 { padding: 0 16px; gap: 6px; }

/* ==========================================================================
   Empty state
   ========================================================================== */

.ka-empty {
	text-align: center;
	padding: 80px 20px;
}
.ka-empty__icon  { font-size: 64px; color: #d0d5db; display: block; margin-bottom: 20px; }
.ka-empty__title { margin: 0 0 10px; font-size: 22px; font-weight: 700; color: #1a3a5c; }
.ka-empty__text  { font-size: 15px; color: #666; margin: 0; }
.ka-empty__text a { color: #1a3a5c; font-weight: 600; }

/* ==========================================================================
   Breadcrumbs
   Obsługuje: manual fallback (.ka-breadcrumb), Rank Math, Yoast SEO
   ========================================================================== */

.ka-breadcrumb-wrap {
	margin-bottom: 20px;
}

/* ── Manual fallback ── */
.ka-breadcrumb {
	font-size: 13px;
	color: #888;
}

.ka-breadcrumb__list {
	list-style: none;
	margin: 0;
	padding: 0;
	line-height: 1.6;
}

.ka-breadcrumb__item {
	display: inline;
	color: #888;
}

/* Separator — inline, łamie się naturalnie ze słowami */
.ka-breadcrumb__item:not(.ka-breadcrumb__item--current)::after {
	content: " ›";
	color: #bbb;
	margin: 0 5px 0 2px;
	font-size: 12px;
}
.ka-breadcrumb__item a:hover {
	color: #1a3a5c;
}

.ka-breadcrumb__item--current {
	color: #1a3a5c;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 320px;
}

/* ── Rank Math override — match visual style ── */
.rank-math-breadcrumb {
	font-size: 13px;
	color: #888;
	margin-bottom: 0;
}
.rank-math-breadcrumb p {
	margin: 0;
	}
.rank-math-breadcrumb a {
	color: #555;
	text-decoration: none;
	transition: color .15s;
}
.rank-math-breadcrumb a:hover {
	color: #1a3a5c;
}
.rank-math-breadcrumb .separator {
	color: #bbb;
	font-size: 10px;
	margin: 0 6px;
}

/* ── Yoast override ── */
.ka-breadcrumb-wrap .yoast-breadcrumb {
	font-size: 13px;
	color: #888;
}
.ka-breadcrumb-wrap .yoast-breadcrumb a {
	color: #555;
	text-decoration: none;
	transition: color .15s;
}
.ka-breadcrumb-wrap .yoast-breadcrumb a:hover {
	color: #1a3a5c;
}

