/*
Theme Name: RemateSpy Paraguay
Theme URI: https://example.com
Author: ChatGPT
Description: Premium mobile-first WordPress theme for Paraguay judicial auction listings.
Version: 1.0.0
License: GPL v2 or later
Text Domain: rematespy
*/

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #0f172a;
  --accent: #2563eb;
  --accent-2: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 16px 45px rgba(15, 23, 42, .08);
}

[data-theme="dark"] {
  --bg: #020617;
  --surface: #0f172a;
  --surface-2: #111c31;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: #1e293b;
  --primary: #e2e8f0;
  --accent: #60a5fa;
  --shadow: 0 16px 45px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  letter-spacing: -0.04em;
  font-size: 21px;
}
.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f172a, #2563eb);
  color: white;
  box-shadow: var(--shadow);
}
.nav-links { display: flex; align-items: center; gap: 18px; color: var(--muted); font-weight: 650; font-size: 14px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn, button.btn, input.btn {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 750;
  background: var(--primary);
  color: var(--bg);
  box-shadow: 0 12px 24px rgba(15,23,42,.12);
}
.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.accent { background: var(--accent); color: white; }
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.hero {
  padding: 48px 0 28px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 28px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
h1 {
  font-size: clamp(38px, 8vw, 72px);
  line-height: .94;
  letter-spacing: -0.07em;
  margin: 18px 0 18px;
}
.lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 620px;
}
.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.hero-card img {
  border-radius: 20px;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--surface-2);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  margin-top: 18px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.stat strong { display: block; font-size: 22px; letter-spacing: -0.04em; }
.stat span { color: var(--muted); font-size: 12px; font-weight: 700; }

.search-panel {
  margin-top: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 14px;
}
.search-form {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, .8fr) auto;
  gap: 10px;
}
.input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
}
.section { padding: 34px 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
h2 {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1;
  letter-spacing: -0.055em;
  margin: 0;
}
.muted { color: var(--muted); }

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.category-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform .2s ease;
}
.category-card:hover { transform: translateY(-3px); }
.category-icon { font-size: 32px; margin-bottom: 18px; }
.category-card h3 { margin: 0 0 6px; letter-spacing: -0.03em; }
.category-card p { color: var(--muted); margin: 0; font-size: 14px; }

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.listing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.listing-thumb {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--surface-2);
  overflow: hidden;
}
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  font-size: 12px;
  border: 1px solid var(--line);
}
.thumb-badge { position: absolute; top: 12px; left: 12px; }
.card-body { padding: 18px; }
.card-body h3 { margin: 0 0 10px; letter-spacing: -0.035em; font-size: 20px; }
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  margin: 12px 0;
}
.price {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.045em;
  margin: 10px 0;
}
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }

.page-title { padding: 34px 0 18px; }
.filters-wrap {
  position: sticky;
  top: 68px;
  z-index: 20;
  background: var(--bg);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}
.gallery-main {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface-2);
}
.gallery-main img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.info-card, .side-card, .admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.side-card { position: sticky; top: 92px; }
.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.fact {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.fact span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.fact strong { display: block; margin-top: 4px; letter-spacing: -0.02em; }
.map-box {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  min-height: 280px;
}
.map-box iframe { width: 100%; height: 300px; border: 0; display: block; }

.admin-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
  padding: 30px 0;
}
.admin-menu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.admin-menu a {
  display: block;
  padding: 12px;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 750;
}
.admin-menu a.active, .admin-menu a:hover { background: var(--bg); color: var(--text); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; border-bottom: 1px solid var(--line); padding: 13px 8px; }
.admin-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }

.footer {
  margin-top: 50px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-grid, .detail-grid, .admin-layout { grid-template-columns: 1fr; }
  .search-form { grid-template-columns: 1fr 1fr; }
  .search-form .btn { grid-column: 1 / -1; }
  .category-grid, .listing-grid { grid-template-columns: repeat(2, 1fr); }
  .side-card { position: static; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 22px, 1120px); }
  .nav-links { display: none; }
  .nav { height: 62px; }
  .hero { padding-top: 28px; }
  h1 { font-size: 44px; }
  .lead { font-size: 16px; }
  .stats { grid-template-columns: 1fr; }
  .search-form, .category-grid, .listing-grid, .detail-facts { grid-template-columns: 1fr; }
  .card-actions { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .btn { width: 100%; }
  .nav-actions .btn { display: none; }
}
