@charset "UTF-8";
:root {
    --bg: #f1f5f9;
    --card: #ffffff;
    --header: #0b1220;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --green: #16a34a;
    --orange: #ea580c;
    --copart: #0f4c81;
    --iaai: #b91c1c;
    --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Georgian", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
.container { max-width: 1320px; margin: 0 auto; padding: 0 16px; width: 100%; }

.site-header {
    background: var(--header);
    color: #fff;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 4px 16px rgba(2, 6, 23, 0.22);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo-svg { height: 30px; width: auto; display: block; }
.header-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-link { color: #cbd5e1; text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 8px; transition: background 0.15s, color 0.15s; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.12); color: #fff; }
.header-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-pill { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); padding: 5px 11px; border-radius: 999px; font-size: 12px; }
.stat-pill.upcoming strong { color: #93c5fd; }
.stat-pill.finished strong { color: #86efac; }

.hero-strip { padding: 20px 0 12px; }
.hero-strip h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.hero-strip p { color: var(--muted); font-size: 14px; }

.filters-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 18px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04); }
.filters-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px; align-items: end; }
.filter-group label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.filter-group input, .filter-group select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff; color: var(--text); }
.filter-group input:focus, .filter-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.year-inputs { display: flex; gap: 6px; }
.filter-actions { display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border-radius: 8px; border: none; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: #e2e8f0; color: #0f172a; }
.btn-secondary:hover { background: #cbd5e1; }
.results-meta { margin-bottom: 12px; font-size: 14px; color: var(--muted); font-weight: 500; }

.lots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.lot-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.16s ease, box-shadow 0.16s ease; text-decoration: none; color: inherit; }
.lot-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(15, 23, 42, 0.09); }
.card-img-wrap { position: relative; aspect-ratio: 4/3; background: #e2e8f0; overflow: hidden; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-badges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; gap: 6px; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #fff; }
.house-copart { background: var(--copart); }
.house-iaai { background: var(--iaai); }
.house-other { background: #475569; }
.status-upcoming { background: var(--primary); }
.status-finished { background: var(--green); }
.badge-warn { background: var(--orange); }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.card-meta { font-size: 12px; color: var(--muted); display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.card-footer { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-price { font-size: 18px; font-weight: 800; }
.card-price.sold { color: var(--green); }
.card-price-label { font-size: 11px; color: var(--muted); display: block; font-weight: 500; }

.pagination { display: flex; justify-content: center; gap: 6px; margin: 26px 0; flex-wrap: wrap; }
.page-btn { min-width: 38px; height: 38px; padding: 0 12px; border: 1px solid var(--border); background: #fff; border-radius: 8px; cursor: pointer; font-weight: 600; }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.detail-page { padding-top: 16px; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.breadcrumbs a { color: var(--primary); text-decoration: none; }
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.badges-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.detail-header h1 { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.sub-ids { color: var(--muted); font-size: 14px; }
.price-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; min-width: 240px; }
.price-label { font-size: 12px; color: var(--muted); }
.price-value { font-size: 28px; font-weight: 800; color: var(--primary); }
.price-value.sold { color: var(--green); }
.price-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.detail-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; margin-bottom: 24px; }
.gallery-card, .specs-card, .history-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }

.swipe-stage { position: relative; overflow: hidden; border-radius: 10px; background: #0b1220; aspect-ratio: 4/3; margin-bottom: 10px; touch-action: pan-y; user-select: none; cursor: grab; }
.swipe-stage:active { cursor: grabbing; }
.swipe-track { display: flex; height: 100%; will-change: transform; }
.swipe-slide { min-width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.swipe-slide img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(15, 23, 42, 0.72); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 5; }
.gallery-arrow:hover { background: rgba(15, 23, 42, 0.95); }
.gallery-arrow.prev { left: 10px; }
.gallery-arrow.next { right: 10px; }
.gallery-counter { position: absolute; bottom: 10px; right: 10px; background: rgba(15, 23, 42, 0.78); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }

.thumbs-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-behavior: smooth; }
.thumb-item { width: 78px; height: 58px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: 0.65; border: 2px solid transparent; flex-shrink: 0; }
.thumb-item.active, .thumb-item:hover { opacity: 1; border-color: var(--primary); }

.lightbox { position: fixed; inset: 0; background: rgba(2, 6, 23, 0.92); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 8px; }
.lightbox-close { position: absolute; top: 16px; right: 20px; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,0.16); color: #fff; font-size: 20px; cursor: pointer; }

.specs-card h2, .history-card h2 { font-size: 18px; margin-bottom: 12px; }
.specs-table, .history-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs-table th, .specs-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.specs-table th { color: var(--muted); font-weight: 500; width: 42%; }
.table-wrap { overflow-x: auto; }
.history-table th, .history-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.history-table tr.current-row { background: #eff6ff; }
.loading-box, .empty-box { grid-column: 1 / -1; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 20px; text-align: center; color: var(--muted); }

.site-footer { background: var(--header); color: #cbd5e1; margin-top: 40px; padding: 32px 0 18px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-logo { height: 26px; margin-bottom: 10px; }
.footer-brand p { font-size: 13px; color: #94a3b8; max-width: 360px; }
.footer-links h4 { color: #fff; font-size: 14px; margin-bottom: 10px; }
.footer-links a { display: block; color: #94a3b8; text-decoration: none; font-size: 13px; margin-bottom: 6px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { padding-top: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12px; color: #64748b; }

@media (max-width: 960px) {
    .filters-grid { grid-template-columns: 1fr 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .filters-grid { grid-template-columns: 1fr; }
    .hero-strip h1 { font-size: 20px; }
    .detail-header h1 { font-size: 21px; }
    .header-stats { display: none; }
}
