:root {
  --bg-page: #f5f5f7;
  --bg-surface: #ffffff;
  --bg-muted: #f3f3f5;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #111111;
  --border: #e5e5ea;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --container: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-secondary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.logo {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text-primary);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.site-nav a:hover { color: var(--text-primary); }

.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.5rem 0 2.5rem;
  background: #2c2c2e center / cover no-repeat;
  box-shadow: var(--shadow-lg);
}

.hero--fallback {
  background-image: linear-gradient(
    145deg,
    #3a3a3c 0%,
    #1d1d1f 50%,
    #2c2c2e 100%
  );
}

.hero__overlay {
  width: 100%;
  padding: 2.5rem 2rem 2rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.15) 55%,
    transparent 100%
  );
  color: #fff;
}

.hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.hero__subtitle {
  margin: 0 0 1.75rem;
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 32rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn:hover { opacity: 0.92; }

.btn--primary {
  background: #fff;
  color: var(--accent);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn--dark {
  background: var(--accent);
  color: #fff;
}

.btn--full { width: 100%; }

.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.trust {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .trust { grid-template-columns: repeat(4, 1fr); }
}

.trust__item {
  padding: 1rem 1.125rem;
  background: var(--bg-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
}

.page-header {
  margin: 2rem 0 1.5rem;
}

.page-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.page-header p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
}

.card-grid {
  list-style: none;
  padding: 0;
  margin: 0 0 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.listing-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.listing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.listing-card__link {
  text-decoration: none;
  display: block;
}

.listing-card__media {
  aspect-ratio: 16 / 10;
  background: var(--bg-muted);
  overflow: hidden;
}

.listing-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-card__body {
  padding: 1rem 1.125rem 1.125rem;
}

.listing-card__title {
  margin: 0 0 0.25rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.listing-card__location {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.listing-card__price {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.detail-back {
  margin: 1.5rem 0 0.5rem;
  font-size: 0.9375rem;
}

.detail-back a {
  text-decoration: none;
  color: var(--text-secondary);
}

.detail-back a:hover { color: var(--text-primary); }

.detail-layout {
  display: grid;
  gap: 2rem;
  margin-bottom: 6rem;
}

@media (min-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}

.gallery {
  display: grid;
  gap: 0.5rem;
}

.gallery__main {
  aspect-ratio: 16 / 10;
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.gallery__thumbs img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-muted);
}

.detail__title {
  margin: 1.25rem 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.detail__facts {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.detail__description {
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.detail__description p { margin: 0 0 1rem; }

.contact-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

@media (min-width: 900px) {
  .contact-card {
    position: sticky;
    top: 88px;
  }
}

.contact-card__price {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-card__price-note {
  font-weight: 400;
  font-size: 0.9em;
}

.contact-card__note {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.contact-card__hint {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: center;
}

.mobile-cta {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

@media (min-width: 900px) {
  .mobile-cta { display: none; }
}

@media (max-width: 899px) {
  .contact-card--desktop-only .btn { display: none; }
}

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}

@media (max-width: 899px) {
  .site-footer {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }
}
