/* Listing detail, legacy cards, search bar — harmonized with bakurentals tokens */
:root {
  --bina-text: #0f172a;
  --bina-muted: #64748b;
  --bina-line: #e5e7eb;
  --bina-chip: #f1f5f9;
  --bina-accent: #2563eb;
  --bina-danger: #dc2626;
  --bina-success: #16a34a;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
}

html,
body {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--bina-text);
}

/* Global containers */
.container {
  max-width: 1200px;
}

/* Cards */
.card-ghost {
  background: #fff;
  border: 1px solid var(--bina-line);
  border-radius: var(--radius);
  box-shadow: none;
}

/* Detail layout */
.detail-wrap {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 992px) {
  .detail-wrap {
    grid-template-columns: 1fr;
  }
}

.sticky-col {
  position: sticky;
  top: 88px;
  height: max-content;
}

/* Price box / agent / agency */
.box {
  background: #fff;
  border: 1px solid var(--bina-line);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  box-shadow: var(--shadow);
}

.price-big {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.price-m2 {
  color: var(--bina-muted);
  font-weight: 600;
}

.btn-red {
  background: var(--bina-danger);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  min-height: 2.65rem;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn-red:hover {
  filter: brightness(1.05);
  color: #fff;
}

.btn-red:focus-visible {
  outline: 2px solid var(--bina-danger);
  outline-offset: 2px;
}

.btn-green {
  background: var(--bina-success);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.65rem 1rem;
  font-weight: 700;
  min-height: 2.65rem;
  transition: filter 0.15s ease;
}

.btn-green:hover {
  filter: brightness(1.05);
  color: #fff;
}

.btn-green:focus-visible {
  outline: 2px solid var(--bina-success);
  outline-offset: 2px;
}

.btn-ghost {
  background: #fff;
  border: 1px solid var(--bina-line);
  color: var(--bina-text);
  border-radius: 12px;
  padding: 0.58rem 0.95rem;
  font-weight: 600;
  min-height: 2.65rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-ghost:hover {
  background: #f8fafc;
  border-color: rgba(37, 99, 235, 0.28);
}

.btn-ghost:focus-visible {
  outline: 2px solid var(--bina-accent);
  outline-offset: 2px;
}

/* Meta table */
.meta-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.65rem;
}

.meta-table td:first-child {
  width: min(200px, 38%);
  color: var(--bina-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

.meta-table td {
  vertical-align: top;
  font-size: 0.9375rem;
}

/* Chips */
.bina-chip {
  background: var(--bina-chip);
  border: 1px solid var(--bina-line);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--bina-text);
}

/* Swiper gallery */
.swiper {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}

.swiper img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .swiper img {
    height: 300px;
  }
}

.swiper-button-prev,
.swiper-button-next {
  color: #fff;
  width: 42px;
  height: 42px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
}

.swiper-button-prev:after,
.swiper-button-next:after {
  font-size: 18px;
  font-weight: 800;
}

.swiper-pagination {
  bottom: 12px !important;
}

.swiper-pagination-fraction {
  width: auto;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Typography helpers */
.h-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.text-muted-2 {
  color: var(--bina-muted);
}

/* Lists & actions */
.action-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-badge {
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-weight: 600;
}

/* Fix buttons full width on mobile */
@media (max-width: 576px) {
  .btn-red,
  .btn-green,
  .btn-ghost {
    width: 100%;
  }
}

/* Link reset for cards */
a.link-plain {
  color: var(--bina-accent);
  text-decoration: none;
  font-weight: 600;
}

a.link-plain:hover {
  text-decoration: underline;
}

/* Listings grid (fallback; prefer .listing-grid in bakurentals.css) */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

@media (min-width: 1200px) {
  .grid-3 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Listing Card */
.bina-card {
  background: #fff;
  border: 1px solid var(--bina-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bina-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.22);
}

.bina-card img {
  border-radius: 0;
  transition: transform 0.35s ease;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  height: auto;
  display: block;
}

.bina-card:hover img {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .bina-card,
  .bina-card img {
    transition: none;
  }

  .bina-card:hover {
    transform: none;
  }

  .bina-card:hover img {
    transform: none;
  }
}

/* Card Content */
.bina-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--bina-text);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.bina-meta {
  color: var(--bina-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.bina-meta i {
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* Minor spacing */
.mt-6 {
  margin-top: 2.5rem;
}

.mb-6 {
  margin-bottom: 2.5rem;
}

/* Search bar */
.bina-search-bar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--bina-line);
  padding: 0.85rem 0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.bina-search-bar .container-fluid {
  max-width: 1440px;
  padding-left: clamp(0.75rem, 2.5vw, 1.25rem);
  padding-right: clamp(0.75rem, 2.5vw, 1.25rem);
}

.bina-search-form {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: nowrap;
}

@media (max-width: 1200px) {
  .bina-search-form {
    flex-wrap: wrap;
  }
}

.bina-search-form .form-select,
.bina-search-form .form-control {
  border-radius: 12px;
  border-color: var(--bina-line);
  min-height: 2.65rem;
  font-size: 0.9rem;
}

.bina-search-form .form-select:focus,
.bina-search-form .form-control:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.bina-search-form .form-select {
  flex: 0 0 auto;
  width: auto;
  min-width: 120px;
  max-width: 180px;
}

.bina-search-form .form-control[type="number"] {
  flex: 0 0 140px;
  max-width: 160px;
}

.bina-search-form .btn {
  border-radius: 12px;
  font-weight: 700;
  min-height: 2.65rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.bina-search-form button {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 1400px) {
  .bina-search-form .form-select {
    min-width: 100px;
    max-width: 150px;
  }
}

@media (max-width: 768px) {
  .bina-search-form .form-select,
  .bina-search-form .form-control {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 120px;
    max-width: none;
  }

  .bina-search-form .btn {
    flex: 1 1 100%;
  }
}

/* Floating Action Button (FAB) for mobile */
.fab-add {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1060;
  border-radius: 999px;
}

.fab-add a.rounded-circle {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

@media (min-width: 768px) {
  .fab-add {
    display: none;
  }
}
