/* BaySpot App — Additional styles */

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}
.btn-accent {
  background: var(--accent);
  color: #0D0D0D;
}
.btn-accent:hover { background: #e09515; }
.btn-primary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-primary:hover { background: #222; border-color: #3a3a3a; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* APP LAYOUT */
.app-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
  min-height: 100vh;
}
.app-header {
  padding-top: 100px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.app-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.app-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* BROWSE LAYOUT */
.browse-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding-bottom: 80px;
}
.browse-filters {
  position: sticky;
  top: 80px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.filter-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.filter-select, .filter-input {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}
.filter-select:focus, .filter-input:focus {
  border-color: var(--accent);
}
.filter-btn { width: 100%; justify-content: center; }

/* RESULTS */
.results-count {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* LISTING CARD */
.listing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
  text-decoration: none;
  display: block;
}
.listing-card:hover { border-color: var(--accent); }
.listing-photo {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-alt);
}
.listing-photo-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 32px;
}
.listing-body { padding: 16px; }
.listing-type-badge {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.listing-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}
.listing-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.listing-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 8px;
}
.listing-price span {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}
.listing-availability {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 6px;
}
.availability-available { background: rgba(34,197,94,0.12); color: #22c55e; }
.availability-pending   { background: rgba(245,166,35,0.12); color: var(--accent); }
.availability-rented    { background: rgba(239,68,68,0.12); color: #ef4444; }

/* EMPTY / LOADING */
.listings-empty, .listings-loading {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
}
.empty-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.listings-loading { font-size: 14px; }

/* CREATE FORM */
.form-container { max-width: 640px; padding-bottom: 80px; }
.listing-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; }
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-input, .form-select {
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
}
.form-input:focus, .form-select:focus { border-color: var(--accent); }
.form-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  color: #ef4444;
}
.form-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  color: #22c55e;
}
.photo-upload-wrap { display: flex; flex-direction: column; gap: 8px; }
.photo-preview {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.photo-label { align-self: flex-start; cursor: pointer; }
.photo-hint { font-size: 12px; color: var(--text-dim); }

/* DETAIL PAGE */
.detail-back { padding-top: 100px; margin-bottom: 24px; }
.back-link {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  padding-bottom: 80px;
  align-items: start;
}
.detail-photo {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}
.detail-photo-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 48px;
  border-radius: 12px;
}
.detail-section { margin-top: 32px; }
.detail-section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.detail-description {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  position: sticky;
  top: 80px;
}
.detail-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 10px 0 8px;
  line-height: 1.3;
}
.detail-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.detail-price {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
}
.detail-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}
.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.detail-meta strong { color: var(--text); }
.detail-availability { margin-bottom: 20px; }
.detail-cta { width: 100%; justify-content: center; font-size: 15px; }
.detail-note {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 10px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .browse-layout { grid-template-columns: 1fr; }
  .browse-filters { position: static; }
  .form-row { grid-template-columns: 1fr; }
  .app-header-inner { flex-direction: column; align-items: flex-start; }
}