:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #ccfbf1;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f8fafc;
  --white: #fff;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: var(--white); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-danger:hover { background: #fecaca; }
.btn-sm { padding: 6px 12px; font-size: 14px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; color: var(--primary); }
.logo-icon {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary); color: var(--white); font-size: 20px;
}
.logo span { color: var(--accent); }
.nav { display: flex; gap: 28px; font-weight: 500; }
.nav a:hover { color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f766e 0%, #134e4a 60%, #1e3a3a 100%);
  color: var(--white); padding: 80px 0 110px;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; opacity: .15; background: var(--accent);
}
.hero::before { width: 420px; height: 420px; right: -120px; top: -120px; }
.hero::after { width: 260px; height: 260px; left: -80px; bottom: -120px; background: #5eead4; }
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); margin-bottom: 18px;
}
.hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.15; font-weight: 800; max-width: 720px; }
.hero h1 em { font-style: normal; color: #fdba74; }
.hero p { margin-top: 16px; font-size: 18px; max-width: 580px; opacity: .9; }

.search-box {
  margin-top: 36px; background: var(--white); border-radius: 16px; padding: 10px;
  display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; box-shadow: var(--shadow-lg);
  max-width: 900px;
}
.search-box .field { display: flex; flex-direction: column; padding: 6px 12px; border-radius: 10px; }
.search-box .field + .field { border-left: 1px solid var(--border); }
.search-box label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.search-box input, .search-box select { border: none; outline: none; background: transparent; color: var(--text); padding: 2px 0; }
.search-box .btn { padding-inline: 28px; }

.hero-stats { display: flex; gap: 48px; margin-top: 44px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 32px; font-weight: 800; }
.hero-stats span { opacity: .8; font-size: 15px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(26px, 3.5vw, 36px); font-weight: 800; }
.section-head p { color: var(--muted); margin-top: 8px; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Listing layout ---------- */
.listing { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.filters {
  background: var(--white); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  position: sticky; top: 88px;
}
.filters h3 { font-size: 18px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.filters h3 button { font-size: 13px; color: var(--primary); background: none; border: none; cursor: pointer; font-weight: 600; }
.filter-group { margin-bottom: 18px; }
.filter-group > label, .filter-group .group-title { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.input, .filters select, .filters input[type="text"], .filters input[type="number"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--white);
  outline: none; transition: border .2s;
}
.input:focus, .filters select:focus, .filters input:focus { border-color: var(--primary); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--white);
  font-size: 13px; cursor: pointer; transition: all .15s; user-select: none;
}
.chip:hover { border-color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 500; }
.toggle input { width: 18px; height: 18px; accent-color: var(--primary); }

.results-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.results-bar .count { color: var(--muted); }
.results-bar .count strong { color: var(--text); }
.results-bar select { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); }
.filter-toggle { display: none; }

/* ---------- Room cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { position: relative; aspect-ratio: 4 / 3; background: var(--primary-light); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.05); }
.badge {
  position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--accent); color: var(--white);
}
.badge.rented { background: #374151; }
.badge-type {
  position: absolute; bottom: 12px; left: 12px; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, .92); color: var(--primary-dark);
}
.img-count {
  position: absolute; bottom: 12px; right: 12px; padding: 3px 8px; border-radius: 8px; font-size: 12px;
  background: rgba(0, 0, 0, .55); color: var(--white);
}
.card.is-rented .card-img img { filter: grayscale(.7); opacity: .8; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-weight: 700; font-size: 16px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { color: var(--accent-dark); font-weight: 800; font-size: 19px; }
.card-price small { font-weight: 500; font-size: 13px; color: var(--muted); }
.card-meta { display: flex; gap: 14px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.tag { font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); }

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.pager-top { margin: 0 0 18px; }
.pager:empty { display: none; }
.pager button {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--white); font-weight: 600; cursor: pointer; transition: all .15s;
}
.pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager button.active { background: var(--primary); border-color: var(--primary); color: var(--white); cursor: default; }
.pager button:disabled:not(.active) { opacity: .4; cursor: not-allowed; }
.pager .gap { min-width: 24px; line-height: 40px; text-align: center; color: var(--muted); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); background: var(--white); border-radius: var(--radius); }
.empty .icon { font-size: 48px; margin-bottom: 8px; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature { background: var(--white); padding: 28px 22px; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.feature .icon {
  width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center;
  font-size: 26px; background: var(--primary-light);
}
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14px; }

/* ---------- Contact ---------- */
.contact { background: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.contact-info h2 { font-size: clamp(26px, 3.5vw, 36px); font-weight: 800; margin: 6px 0 12px; }
.contact-info p { color: var(--muted); }
.contact-list { list-style: none; margin-top: 24px; display: grid; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.contact-list a:hover { color: var(--primary); text-decoration: underline; }
.footer small a:hover { color: var(--white); text-decoration: underline; }
.contact-list .icon { flex-shrink: 0; }
.contact-list .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-light); }

.form { display: grid; gap: 14px; }
.form-card { background: var(--bg); padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); }
.form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-msg { font-size: 14px; font-weight: 500; }
.form-msg.ok { color: var(--primary); }
.form-msg.err { color: var(--danger); }

/* ---------- Footer ---------- */
.footer { background: #0f172a; color: #cbd5e1; padding: 40px 0 28px; }
.footer .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer .logo { color: var(--white); }
.footer small { opacity: .7; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, .6);
  display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.modal.open { display: flex; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--white); border-radius: 18px; width: min(920px, 100%); overflow: hidden; position: relative;
  box-shadow: var(--shadow-lg); animation: up .25s;
}
@keyframes up { from { transform: translateY(20px); } to { transform: none; } }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, .95); font-size: 22px; cursor: pointer; box-shadow: var(--shadow);
}
.gallery { position: relative; background: #0f172a; aspect-ratio: 16 / 9; }
.gallery img { width: 100%; height: 100%; object-fit: contain; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, .9); font-size: 20px; cursor: pointer;
}
.gallery-nav.prev { left: 14px; }
.gallery-nav.next { right: 14px; }
.thumbs { display: flex; gap: 8px; padding: 10px 24px 0; overflow-x: auto; }
.thumbs img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: .55; border: 2px solid transparent; }
.thumbs img.active { opacity: 1; border-color: var(--primary); }
.detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; padding: 24px; }
.detail h2 { font-size: 24px; line-height: 1.3; }
.detail .card-price { font-size: 26px; margin: 8px 0; }
.detail-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.detail-meta div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.detail-meta small { display: block; color: var(--muted); font-size: 12px; }
.detail-meta strong { font-size: 15px; }
.detail h4 { margin: 18px 0 8px; }
.detail .desc { color: #374151; white-space: pre-line; }
.amenities { display: flex; flex-wrap: wrap; gap: 8px; }
.amenities span { background: var(--primary-light); color: var(--primary-dark); padding: 5px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; }
.detail-side { display: flex; flex-direction: column; gap: 12px; }
.detail-side .form-card { padding: 20px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px); z-index: 200;
  background: #0f172a; color: var(--white); padding: 12px 20px; border-radius: 10px; font-weight: 500;
  transition: transform .3s; box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .listing { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.open { display: block; }
  .filter-toggle { display: inline-flex; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .contact-grid, .detail { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .search-box { grid-template-columns: 1fr; }
  .search-box .field + .field { border-left: none; border-top: 1px solid var(--border); }
  .hero { padding: 56px 0 72px; }
  .hero-stats { gap: 28px; }
  .features, .form-row { grid-template-columns: 1fr; }
  .detail-meta { grid-template-columns: 1fr 1fr; }
}

.config-notice {
  background: #fef3c7; color: #92400e; border-bottom: 1px solid #fcd34d;
  padding: 12px 16px; text-align: center; font-size: 14px; position: relative; z-index: 60;
}
.config-notice code { background: #fde68a; padding: 1px 6px; border-radius: 4px; }

/* Ô bẫy bot — người dùng thật không nhìn thấy */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
