:root {
  --navy: #0f2942;
  --navy-dark: #081a2b;
  --orange: #e5732c;
  --orange-dark: #c85f1f;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1b2733;
  --text-muted: #5b6b7a;
  --border: #e1e6ec;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(15, 41, 66, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  white-space: nowrap;
}
.logo .mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
nav.main-nav a {
  color: #dbe6f0;
  font-size: 0.95rem;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:hover, nav.main-nav a.active {
  color: #fff;
  border-bottom-color: var(--orange);
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-secondary { background: var(--navy); color: #fff; }
.btn-secondary:hover { background: var(--navy-dark); }
.btn-block { width: 100%; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }

.lang-toggle {
  display: flex;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  overflow: hidden;
}
.lang-toggle button {
  background: transparent;
  border: none;
  color: #dbe6f0;
  padding: 6px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  font-weight: 600;
}
.lang-toggle button.active { background: var(--orange); color: #fff; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  padding: 60px 20px 70px;
  text-align: center;
}
.hero h1 { font-size: 2.2rem; margin: 0 0 12px; }
.hero p { color: #cfdcea; max-width: 640px; margin: 0 auto 28px; font-size: 1.05rem; }

.search-bar {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  display: flex;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  flex-wrap: wrap;
  gap: 6px;
}
.search-bar input, .search-bar select {
  border: none;
  padding: 12px 14px;
  font-size: 0.95rem;
  flex: 1;
  min-width: 140px;
  border-radius: 6px;
  color: var(--text);
}
.search-bar input:focus, .search-bar select:focus { outline: 2px solid var(--orange); }
.search-bar button { flex: 0 0 auto; }

/* Sections */
section { padding: 48px 0; }
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-title h2 { margin: 0; font-size: 1.5rem; }
.section-title a { color: var(--orange); font-weight: 600; font-size: 0.9rem; }

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.category-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 14px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.category-card .icon {
  width: 46px; height: 46px; margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(229,115,44,0.12);
  color: var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.category-card span { font-weight: 600; font-size: 0.92rem; }

/* Listing cards */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.listing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.listing-thumb {
  height: 160px;
  background: var(--navy);
  color: #cfdcea;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.listing-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.listing-body h3 { margin: 0; font-size: 1rem; }
.listing-price { color: var(--orange); font-weight: 700; font-size: 1.05rem; }
.listing-meta { font-size: 0.82rem; color: var(--text-muted); display: flex; justify-content: space-between; }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(15,41,66,0.08);
  color: var(--navy);
  width: fit-content;
}
.badge.new { background: rgba(46,160,67,0.12); color: #1e7e34; }
.badge.sold { background: rgba(192,57,43,0.12); color: #c0392b; }

/* Forms */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.form-card.wide { max-width: 760px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.alert-error { background: #fdecea; color: #c0392b; border: 1px solid #f6c4bd; }
.alert-success { background: #e9f7ee; color: #1e7e34; border: 1px solid #bfe6cb; }

/* Filters sidebar */
.filters-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.filters-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.filters-card h3 { margin-top: 0; font-size: 1rem; }
.filter-group { margin-bottom: 18px; }
.filter-group label { display: block; font-size: 0.85rem; margin-bottom: 6px; color: var(--text-muted); }

/* Table (dashboard) */
table.dash-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; }
table.dash-table th, table.dash-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.9rem; }
table.dash-table th { background: var(--navy); color: #fff; font-weight: 600; }
table.dash-table tr:last-child td { border-bottom: none; }

/* Detail page */
.detail-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
.detail-image { height: 320px; border-radius: var(--radius); background: var(--navy); color: #cfdcea; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.detail-info-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.detail-info-card .price { font-size: 1.6rem; font-weight: 800; color: var(--orange); margin: 6px 0 16px; }

footer.site-footer {
  background: var(--navy-dark);
  color: #b9c8d6;
  padding: 40px 0 24px;
  margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin-bottom: 24px; }
.footer-grid h4 { color: #fff; margin: 0 0 12px; font-size: 0.95rem; }
.footer-grid a { display: block; color: #b9c8d6; font-size: 0.88rem; margin-bottom: 8px; }
.footer-bottom { text-align: center; font-size: 0.8rem; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 18px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.pagination button {
  padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer;
}
.pagination button.active { background: var(--navy); color: #fff; border-color: var(--navy); }

@media (max-width: 800px) {
  .filters-layout, .detail-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  nav.main-nav { order: 3; width: 100%; justify-content: center; }
}
