/* ===== Nut's Homestay - giao diện ===== */
:root {
  --bg: #fdf6e3;
  --bg2: #f8ebcb;
  --card: #fffdf6;
  --text: #3e2212;
  --muted: #7a5a45;
  --brand: #c2571a;
  --brand-d: #6b2f14;
  --accent: #ffd43b;
  --leaf: #6fa02b;
  --line: #ead9b5;
  --shadow: 0 10px 30px rgba(107, 47, 20, .12);
  --radius: 20px;
  --head: "Baloo 2", "Segoe UI", sans-serif;
  --body: "Be Vietnam Pro", "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  --bg: #1f130c;
  --bg2: #291a10;
  --card: #33200f;
  --text: #f8ebcb;
  --muted: #c9ae8e;
  --brand: #f08a3c;
  --line: #4a2f1b;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ----- Thanh menu ----- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--brand-d); color: #fdf6e3; box-shadow: 0 2px 0 var(--accent); }
.bar { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 1.3rem; }
.logo img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); background: #fdf6e3; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; font-weight: 500; }
.nav a:hover { background: rgba(255, 255, 255, .12); }
.nav a.active { background: var(--accent); color: var(--brand-d); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: inherit; font-size: 1.1rem; }
#menuBtn { display: none; }
@media (max-width: 760px) {
  #menuBtn { display: block; }
  .bar-actions { margin-left: auto; display: flex; gap: 8px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: var(--brand-d); padding: 10px 16px 16px; margin: 0; }
  .nav.open { display: flex; }
  .logo span { font-size: 1.1rem; }
}

/* ----- Nút ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 999px; border: 2px solid transparent; font-weight: 600; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-accent { background: var(--accent); color: var(--brand-d); }
.btn-ghost { border-color: currentColor; background: transparent; color: inherit; }
.btn-block { width: 100%; }

/* ----- Ảnh bìa ----- */
.hero { position: relative; min-height: min(86vh, 720px); display: grid; place-items: center; text-align: center; color: #fff; overflow: hidden;
  background: radial-gradient(circle at 20% 20%, #e8a04c 0, transparent 45%), radial-gradient(circle at 85% 80%, #6fa02b 0, transparent 40%), linear-gradient(135deg, #c2571a, #6b2f14); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s; }
.hero-slide.on { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1); transition: transform 7s linear; }
.hero-slide.on img { transform: scale(1.1); }
.hero-nav { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(40, 20, 8, .45); color: #fff; font-size: 1.5rem; }
.hero-nav:hover { background: rgba(40, 20, 8, .75); }
.hero-nav.prev { left: 18px; }
.hero-nav.next { right: 18px; }
.hero-dots { position: absolute; z-index: 3; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .5); transition: width .3s; }
.hero-dots button.on { width: 30px; background: var(--accent); }
@media (max-width: 760px) { .hero-nav { display: none; } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(62, 34, 18, .35), rgba(62, 34, 18, .6)); }
.hero-inner { position: relative; z-index: 2; padding: 60px 16px; max-width: 860px; }
.hero .eyebrow { color: var(--accent); }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); text-shadow: 0 3px 16px rgba(0, 0, 0, .35); }
.hero p { font-size: 1.15rem; margin: 14px 0 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.page-hero { background: var(--bg2); text-align: center; padding: 56px 0 44px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--brand-d); }
:root[data-theme="dark"] .page-hero h1 { color: var(--accent); }
.page-hero p { color: var(--muted); max-width: 640px; margin: 10px auto 0; }

/* ----- Khối nội dung ----- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg2); }
.sec-head { text-align: center; margin-bottom: 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: .28em; font-size: .78rem; font-weight: 600; color: var(--brand); }
.sec-head h2 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); margin-top: 6px; }
.divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.divider::before, .divider::after { content: ""; width: 56px; height: 2px; background: var(--line); }
.lead { max-width: 720px; margin: 0 auto; text-align: center; font-size: 1.08rem; color: var(--muted); }
.quote { font-family: var(--head); font-size: 1.5rem; text-align: center; color: var(--brand); margin-top: 24px; }
.center { text-align: center; margin-top: 36px; }

/* ----- Thẻ ----- */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s; }
a.card:hover { transform: translateY(-5px); }
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
a.card:hover .card-img img { transform: scale(1.06); }
.card-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 12px; color: #fff; background: linear-gradient(transparent, rgba(40, 20, 8, .85)); }
.card-cap h3 { font-size: 1.45rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-cap small { opacity: .9; }
.badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { background: rgba(40, 20, 8, .75); color: #fff; font-size: .74rem; padding: 4px 10px; border-radius: 999px; }
.badge-promo { background: var(--leaf); }
.badge-star { background: var(--accent); color: var(--brand-d); font-weight: 600; margin-left: auto; }
.pill { font-family: var(--body); font-size: .72rem; font-weight: 500; background: rgba(255, 255, 255, .25); padding: 2px 9px; border-radius: 999px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.card-foot .area { color: var(--muted); font-size: .9rem; }
.prices { display: flex; gap: 16px; text-align: right; }
.prices b { font-family: var(--head); font-size: 1.15rem; display: block; line-height: 1.1; }
.prices div:first-child b { color: var(--brand); }
.prices small { color: var(--muted); font-size: .75rem; }
.card-body { padding: 18px; }
.card-body h3 { font-size: 1.35rem; margin-bottom: 4px; }
.card-body .hl-quote { font-style: italic; color: var(--brand); margin-bottom: 6px; }
.card-body p { color: var(--muted); margin: 0; }
.hl-icon { position: absolute; left: 14px; bottom: 12px; font-size: 1.7rem; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4)); }
.loc-list { display: grid; gap: 10px; max-width: 860px; margin: 0 auto; }
.loc-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.loc-row:hover { border-color: var(--brand); }
.loc-num { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-family: var(--head); font-weight: 700; }
.loc-row small { color: var(--muted); display: block; }
.loc-row .arrow { margin-left: auto; color: var(--muted); }
.testi { padding: 26px; }
.testi p { font-family: var(--head); font-size: 1.15rem; }
.testi small { color: var(--muted); }

/* ----- Băng chuyền ----- */
.carousel { position: relative; }
.scroller { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 22px; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { flex: 0 0 min(340px, 82vw); scroll-snap-align: start; }
.cbtn { position: absolute; top: 42%; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 1.3rem; box-shadow: var(--shadow); }
.cbtn.prev { left: -10px; }
.cbtn.next { right: -10px; }
@media (max-width: 760px) { .cbtn { display: none; } }

/* ----- Lời kêu gọi ----- */
.cta { background: linear-gradient(135deg, var(--brand), #6b2f14); color: #fff; text-align: center; padding: 72px 0; }
.cta h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
.cta p { max-width: 600px; margin: 12px auto 26px; opacity: .92; }

/* ----- Bộ lọc phòng ----- */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.filters input, .filters select, .form input, .form textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; }
.filters input { flex: 1 1 220px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; grid-column: 1 / -1; }

/* ----- Chi tiết phòng ----- */
.back { display: inline-block; margin: 22px 0 14px; color: var(--muted); }
.gallery-main { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 8; border: 0; padding: 0; width: 100%; background: var(--bg2); display: block; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main span { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); background: rgba(40, 20, 8, .7); color: #fff; padding: 5px 14px; border-radius: 999px; font-size: .85rem; }
.thumbs { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.thumbs button { width: 84px; height: 60px; border-radius: 12px; overflow: hidden; padding: 0; border: 2px solid transparent; opacity: .7; }
.thumbs button.on { border-color: var(--brand); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail { display: grid; grid-template-columns: 1fr 340px; gap: 36px; padding: 36px 0 60px; align-items: start; }
.detail h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 10px 0; }
.detail .badges { position: static; }
.meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 26px; }
.chips span { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .92rem; }
.detail h2 { font-size: 1.35rem; }
.desc p { color: var(--muted); }
.price-box { position: sticky; top: 90px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.price-box .prices { justify-content: space-between; text-align: left; margin-bottom: 6px; }
.price-box .prices b { font-size: 1.7rem; }
.price-box .note { font-size: .82rem; color: var(--muted); text-align: center; margin: 0; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } .price-box { position: static; } .gallery-main { aspect-ratio: 4 / 3; } }

/* ----- Xem ảnh lớn ----- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(20, 10, 4, .93); display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 12px; }
.lightbox button { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 1.5rem; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 14px; top: 50%; }
.lb-next { right: 14px; top: 50%; }

/* ----- Liên hệ ----- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { display: grid; gap: 16px; }
.info-list div { display: flex; gap: 14px; }
.info-list .ic { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; font-size: 1.2rem; }
.info-list small { text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-size: .72rem; display: block; }
.info-list a { color: var(--brand); font-weight: 600; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.socials a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 500; }
.form { display: grid; gap: 12px; }
.form textarea { min-height: 130px; resize: vertical; }
.form-msg { color: var(--leaf); font-weight: 600; margin: 0; }
.form-msg.err { color: #c0392b; }
.book-form { gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.book-form label { display: grid; gap: 4px; font-size: .82rem; color: var(--muted); }
.book-form input, .book-form textarea { width: 100%; }
.book-form textarea { min-height: 70px; }
.book-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.book-form button:disabled { opacity: .6; cursor: wait; }
.or { text-align: center; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }

/* ----- Chân trang ----- */
.site-footer { background: var(--brand-d); color: #f8ebcb; padding: 48px 0 24px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h3 { color: var(--accent); font-size: 1.15rem; margin-bottom: 10px; }
.site-footer p, .site-footer li { opacity: .88; font-size: .94rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a:hover { color: var(--accent); }
.copy { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 32px; padding-top: 18px; text-align: center; font-size: .85rem; opacity: .75; }

/* ----- Nút nổi ----- */
.floaters { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: grid; gap: 10px; }
.floaters a, .floaters button { width: 50px; height: 50px; border-radius: 50%; border: 0; display: grid; place-items: center; font-size: 1.25rem; font-weight: 700; color: #fff; background: var(--brand); box-shadow: var(--shadow); }
.floaters .f-zalo { background: #0068ff; font-size: .8rem; }
.floaters { justify-items: end; }
.floaters .f-mess { width: auto; padding: 0 18px 0 14px; border-radius: 999px; display: flex; gap: 8px; font-size: .92rem; font-weight: 600; background: linear-gradient(45deg, #0a7cff, #a033ff 60%, #ff5c87); }
.btn-mess { color: #fff; background: linear-gradient(45deg, #0a7cff, #a033ff 60%, #ff5c87); }
.info-list a.btn-mess { color: #fff; }
.floaters .f-call { background: var(--leaf); }
#topBtn { display: none; }
#topBtn.show { display: grid; }

/* ----- Thông báo nổi ----- */
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(20, 10, 4, .6); display: grid; place-items: center; padding: 16px; }
.modal-box { background: var(--card); border-radius: var(--radius); max-width: 460px; width: 100%; overflow: hidden; box-shadow: var(--shadow); }
.modal-box h3 { background: var(--brand); color: #fff; padding: 16px 22px; font-size: 1.3rem; }
.modal-box .modal-body { padding: 20px 22px; white-space: pre-line; }
.modal-box .btn { margin: 0 22px 22px; width: calc(100% - 44px); }
