* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #e0f2fe;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --radius: 8px;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  letter-spacing: 0.5px;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.host-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f1f5f9;
  padding: 6px 14px;
  border-radius: var(--radius);
}

.host-avatar {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.host-info {
  display: flex;
  flex-direction: column;
}

.host-name {
  font-size: 0.85rem;
  font-weight: 700;
}

.host-status {
  font-size: 0.75rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
}

/* Hero Section */
.hero-section {
  background: #0f172a;
  color: #ffffff;
  padding: 40px 0;
}

.hero-tag {
  display: inline-block;
  background: #0284c7;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.3;
}

.hero-desc {
  color: #94a3b8;
  font-size: 0.95rem;
  max-width: 750px;
  margin-bottom: 20px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.meta-item svg {
  color: #38bdf8;
}

/* Filter Bar */
.filter-container {
  margin-top: -24px;
  position: relative;
  z-index: 10;
}

.filter-bar {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.date-input, .select-input, .form-control-custom {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  background: #ffffff;
  width: 100%;
}

.date-input:focus, .select-input:focus, .form-control-custom:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.btn-secondary-custom {
  height: 42px;
  padding: 0 18px;
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary-custom:hover {
  background: #e2e8f0;
}

/* Main Content */
.main-content {
  padding: 36px 20px 60px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.badge-count {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius);
}

/* Apartment Grid */
.apartment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.apt-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.apt-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

.apt-media {
  position: relative;
  height: 220px;
  background: #0f172a;
  cursor: pointer;
  overflow: hidden;
}

.apt-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.apt-media:hover img {
  transform: scale(1.03);
}

.apt-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.photo-count-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.apt-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.apt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.apt-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.apt-room-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
}

.apt-view {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.apt-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.feat-tag {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.price-table-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.price-row:last-child {
  margin-bottom: 0;
}

.price-row .val {
  font-weight: 700;
  color: #0f172a;
}

.price-row.weekend .val {
  color: #0284c7;
}

.apt-status-box {
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.apt-status-box.free {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.apt-status-box.booked {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.apt-footer-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
}

.btn-view-album {
  height: 40px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #0f172a;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-view-album:hover {
  background: #f1f5f9;
}

.btn-book-zalo {
  height: 40px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
}

.btn-book-zalo:hover {
  background: #0369a1;
}

.btn-book-zalo:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-lg {
  max-width: 900px;
}

.modal-md {
  max-width: 500px;
}

.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-close-modal {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  font-size: 1rem;
  color: var(--text-main);
  cursor: pointer;
}

.gallery-main-view {
  height: 420px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-main-view img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  padding: 16px;
  overflow-x: auto;
  background: #f8fafc;
  border-top: 1px solid var(--border);
}

.thumb-item {
  width: 80px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.thumb-item.active {
  border-color: var(--primary);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Booking Form */
.booking-form-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #0f172a;
}

.booking-summary-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.status-pill {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-pill.available {
  background: #dcfce7;
  color: #15803d;
}

.status-pill.busy {
  background: #fee2e2;
  color: #b91c1c;
}

.summary-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}

.btn-zalo-direct {
  width: 100%;
  height: 48px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-zalo-direct:hover {
  background: #0369a1;
}

/* Footer */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 30px 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-contact {
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .apartment-grid {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-title {
    font-size: 1.4rem;
  }
}
