/* ─────────────────────────────────────────────
   property-gallery.css — Property Gallery Page
   Sourri AI · Dark executive theme
───────────────────────────────────────────── */

/* ── Layout ── */
body { background-color: var(--bg-base); color: var(--text-primary); }

main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2.5rem 2rem 3rem;
}

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.page-greeting {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0;
}

.page-greeting .accent { color: var(--accent); }

.page-subtitle {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-top: 5px;
  letter-spacing: 0.05em;
}

.page-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-bar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Filter pill */
.filter-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.5;
  white-space: nowrap;
}

.filter-pill:hover {
  color: var(--text-secondary);
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.03);
}

.filter-pill.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--border-accent);
}

/* Saved toggle */
.saved-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.saved-toggle.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--border-accent);
}

/* Sort select */
.sort-select {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 4px 26px 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%2352566a'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  line-height: 1.5;
}

.sort-select:hover,
.sort-select:focus {
  color: var(--text-secondary);
  border-color: var(--border-medium);
}

.sort-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Settings button */
.settings-btn {
  padding: 4px 8px;
  font-size: 13px;
}

/* ── Gallery grid ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

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

/* ── Property card ── */
.prop-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Subtle top-left gloss */
.prop-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.025) 0%, transparent 55%);
  pointer-events: none;
  z-index: 1;
}

/* Top accent line — hidden until hover */
.prop-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
  z-index: 6;
}

.prop-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 0 0.5px rgba(156, 220, 240, 0.08);
}

.prop-card:hover::after { opacity: 1; }

/* ── Image zone ── */
.prop-card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-surface);
  flex-shrink: 0;
  z-index: 2;
}

.prop-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s var(--ease);
}

.prop-card:hover .prop-card-img {
  transform: scale(1.025);
}

/* No-image placeholder */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
}

.img-placeholder i    { font-size: 28px; }

.img-placeholder span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* Image counter badge */
.img-counter {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.58);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  pointer-events: none;
  z-index: 3;
  letter-spacing: 0.04em;
}

/* Prev / next nav buttons */
.img-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.18s var(--ease), background 0.15s;
  padding: 0;
}

.img-nav-btn:hover       { background: rgba(0, 0, 0, 0.75); }
.img-nav-prev            { left: 8px; }
.img-nav-next            { right: 8px; }

.prop-card-image:hover .img-nav-btn { opacity: 1; }

/* Bookmark button */
.bookmark-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: rgba(255, 255, 255, 0.65);
  padding: 0;
  font-size: 13px;
}

.bookmark-btn:hover {
  background: rgba(0, 0, 0, 0.72);
  color: var(--accent);
  border-color: var(--border-accent);
}

.bookmark-btn.saved {
  color: var(--accent);
  background: rgba(156, 220, 240, 0.18);
  border-color: var(--border-accent);
}

.bookmark-btn i { transition: all 0.18s var(--ease); }

/* Status badge — top-left overlay; uses .prop-status classes from global.css */
.status-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
}

/* ── Card body ── */
.prop-card-body {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.prop-card-price {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  line-height: 1.2;
  /* add a min height - help keep shape when div is empty */
  min-height: 1.26rem; 
}

.prop-card-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  margin: 0;
}

.prop-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  min-height: 36px;
}

.prop-card-address {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 18px;
}

.prop-card-address i { font-size: 10px; flex-shrink: 0; }

/* ── Spec strip ── */
.spec-strip {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-height: 22px;
}

.spec-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.spec-pill i { font-size: 9px; }

/* ── Agent row ── */
.agent-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
}

.agent-row--filled {
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
}

.agent-logo-img {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.agent-initials {
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  flex-shrink: 0;
}

.agent-info {
  flex: 1;
  min-width: 0;
}

.agent-name {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-name {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Action row ── */
.action-row {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.65rem;
}

/* View Flyer — ghost style (extends .btn-ghost from global.css) */
.btn-view-flyer {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-subtle);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  line-height: 1.4;
}

.btn-view-flyer:hover {
  color: var(--accent);
  border-color: var(--border-accent);
  background: var(--accent-glow);
}

.btn-view-flyer.disabled {
  opacity: 0.38;
  pointer-events: none;
  cursor: not-allowed;
}

/* View Details — accent-outlined variant */
.btn-view-details {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  line-height: 1.4;
}

.btn-view-details:hover {
  background: rgba(156, 220, 240, 0.18);
  border-color: rgba(156, 220, 240, 0.35);
  color: var(--accent);
}

/* Accent button — used in modal footer (same visual as btn-view-details but non-stretched) */
.btn-accent {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.4;
}

.btn-accent:hover {
  background: rgba(156, 220, 240, 0.18);
  border-color: rgba(156, 220, 240, 0.35);
  color: var(--accent);
}

/* Stretch both action buttons equally inside the card action row */
.action-row .btn-view-flyer,
.action-row .btn-view-details {
  flex: 1;
}

/* ── Skeleton card ── */
.prop-card-skeleton {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-image {
  height: 220px;
}

.skeleton-image .placeholder {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.skeleton-body {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

/* ── Empty / error states ── */
.gallery-empty,
.gallery-error {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 4.5rem 2rem;
  text-align: center;
}

.gallery-empty i,
.gallery-error i {
  font-size: 2rem;
  color: var(--text-muted);
}

.gallery-state-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.gallery-state-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.gallery-error i             { color: var(--danger); }
.gallery-error .gallery-state-title { color: var(--danger); }

/* ── Spec settings modal ── */
.gallery-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
  overflow: hidden;
}

.gallery-modal-header {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.modal-title-inner i { font-size: 13px; color: var(--text-secondary); }

.modal-close-btn { padding: 3px 6px; font-size: 15px; }

.gallery-modal-body { padding: 1.25rem; }

.modal-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.spec-check-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.spec-check-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  margin: 0;
}

.spec-check-item:hover {
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.025);
}

.spec-check-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 13px;
  height: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

.spec-check-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  flex: 1;
}

.gallery-modal-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.75rem 2rem;
  margin-top: 1rem;
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.footer-icon {
  width: 22px;
  height: 22px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--accent);
}

.footer-brand-text {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.footer-brand-text strong {
  color: var(--text-secondary);
  font-weight: 400;
}

.footer-links { display: flex; gap: 1.25rem; }

.footer-link {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
  letter-spacing: 0.02em;
}

.footer-link:hover { color: var(--accent); }

.footer-copy {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
