/* CARO VILLAGE — nhịp khoảng cách & phân tầng thông tin (bản 2)
   Thang: 8 / 12 / 16 / 24 / 32 / 48 px
   - Giữa các khối: 48 + 48 = 96px (máy tính), 32 + 32 = 64px (điện thoại)
   - Đầu khối xếp dọc trên MỘT trục trái: nhãn nhỏ → (8) tiêu đề → (12) mô tả → (32) nội dung
   - Trong thẻ: 16–24px
*/
:root { --cv-sec: 48px; --cv-head: 32px; color-scheme: only light; } /* không để trình duyệt điện thoại tự đảo sang nền tối làm lệch màu */
@media (max-width: 767px) { :root { --cv-sec: 32px; --cv-head: 24px; } }

/* Mọi khối nội dung dưới thanh tìm phòng dùng cùng một nhịp */
section.max-w-7xl:not(#booking-dock), section.max-w-4xl {
  padding-top: var(--cv-sec) !important;
  padding-bottom: var(--cv-sec) !important;
}
#booking-dock + section { padding-top: calc(var(--cv-sec) + 16px) !important; }

/* Đầu khối: bỏ chia hai cột trái/phải, xếp dọc để tiêu đề và mô tả đọc liền một mạch */
section > div.justify-between:first-child {
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  margin-bottom: var(--cv-head) !important;
}
section > .cv-sec-head { margin-bottom: var(--cv-head) !important; }
section .font-label-caps + .font-headline-lg { margin-top: 8px !important; }
section > div:first-child > p.font-body-sm, .cv-sec-head p {
  font-size: 15px !important; line-height: 1.65 !important; color: #4d453f;
  max-width: 36rem; margin-top: 0 !important;
}
.cv-sec-head p { margin-top: 12px !important; }
/* Nút lọc hạng phòng nằm dưới tiêu đề, cách 4px */
section > div.justify-between:first-child > .flex-wrap { margin-top: 4px; }

/* Thẻ phòng: chip tiện nghi trên một dòng, không gãy chữ */
.villa-card .bg-surface-container-low.rounded-xl { flex-wrap: wrap; gap: 6px 14px !important; padding: 10px 14px !important; }
.villa-card .bg-surface-container-low.rounded-xl > span { white-space: nowrap; }
.villa-card .p-6 { gap: 16px !important; }

/* Bảng giá: dòng số phòng là thông tin phụ, tách nhẹ khỏi bảng */
#bang-gia table + p { padding-top: 12px; border-top: 1px dashed #d0c4bc; margin-top: 12px !important; font-size: 13px; }
#bang-gia .grid { gap: 16px !important; }
#bang-gia > .mt-6 { margin-top: 16px !important; }

/* Ghi nguồn ảnh: nhỏ, lùi xuống, không tranh với nội dung */
.cv-credit { display: block; margin-top: 6px; font-size: 11px; line-height: 1.5; color: #5c534c; max-width: 60rem; }

/* Header: mục menu và nút trên một dòng */
header nav a, header .flex.items-center.gap-3 > a { white-space: nowrap; }
header nav { gap: 2px !important; }

/* Bản đồ + thẻ địa chỉ xếp dọc: thẻ không đè lên bản đồ */
.cv-map { display: flex; flex-direction: column; gap: 12px; height: auto !important; overflow: visible !important; }
.cv-map > iframe, .cv-map > a { height: 340px; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 6px rgba(48,40,33,.08); }
.cv-map > .absolute { position: static !important; inset: auto !important; max-width: none !important;
  box-shadow: none !important; background: #f6f3ed !important; backdrop-filter: none !important; }
@media (max-width: 767px) { .cv-map > iframe, .cv-map > a { height: 260px; } }
/* Dòng khoảng cách: nhãn bên trái co giãn, thời gian bên phải tự xuống dòng gọn */
.cv-dist { gap: 12px; }
.cv-dist > span:first-child { flex: 1 1 auto; min-width: 0; }
.cv-dist > span:last-child { flex: 0 1 auto; text-align: right; max-width: 45%; }

/* ===== Rà soát xuống dòng & đè chữ ===== */
/* Dải thông tin hero: chip nền mờ, biểu tượng rõ, đọc được trên ảnh */
.cv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 10px; border-radius: 999px;
  background: rgba(27,20,14,.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fcf9f3; font: 500 13px/1.2 'Be Vietnam Pro', system-ui, sans-serif; white-space: nowrap;
  border: 1px solid rgba(252,249,243,.18); }
.cv-chip .material-symbols-outlined { font-size: 17px; color: #fdc978; }
.cv-chip.hidden { display: none; }
@media (min-width: 640px) { .cv-chip.sm\:inline-flex { display: inline-flex; } }
@media (min-width: 768px) { .cv-chip.md\:inline-flex { display: inline-flex; } }
/* Số điện thoại, giá, nhãn ngắn: không tách dòng */
a[href^="tel:"], td.text-right, .tabular-nums, span.rounded-full.font-label-caps, .cv-trust > span { white-space: nowrap; }
.cv-trust > span:not(.flex) { display: none; }
header .font-headline-sm { white-space: nowrap; }
/* Header điện thoại: nút "Kiểm tra phòng trống" chỉ còn biểu tượng để không tràn */
@media (max-width: 640px) {
  header a.rounded-xl[href*="phong.html"] { font-size: 0 !important; padding: 0 !important; width: 44px; height: 44px; justify-content: center; }
  header a.rounded-xl[href*="phong.html"] .material-symbols-outlined { font-size: 22px !important; margin: 0 !important; }
  header .font-headline-sm { font-size: 17px !important; }
}

/* Nút & chip: chữ một dòng; hàng chứa chúng được phép xuống hàng */
button, a.rounded-xl, a.rounded-full, label.rounded-lg > span { white-space: nowrap; }
.flex:has(> button.rounded-xl), .flex:has(> a.rounded-xl), .flex:has(> button.rounded-lg) { flex-wrap: wrap; }
/* Ô giá trang Tour 360°: nhãn trạng thái không đẩy tràn màn hình */
.flex:has(> .flex.flex-col.items-end) { flex-wrap: wrap; gap: 8px; }
.flex.flex-col.items-end { min-width: 0; }
#drawer-availability-badge { white-space: normal; }
/* Form hỏi đặt tour/xe: ô chọn có tên dài không đẩy tràn màn hình */
#cvTourForm > *, #cvTourForm label, #cvTourForm select, #cvTourForm input, #cvTourForm textarea { min-width: 0; max-width: 100%; }
#cvTourForm select, #cvTourForm input, #cvTourForm textarea { width: 100%; }
#cvTourForm select { text-overflow: ellipsis; }
/* Thẻ trải nghiệm: nhãn nhỏ nằm TRÊN tiêu đề, không chen ngang bên phải */
.flex.items-center.justify-between:has(> h4 + .font-label-caps) { flex-direction: column-reverse; align-items: flex-start; gap: 4px; }
/* Dòng chip (Mì Quảng, Hải sản tươi…): mỗi chip một dòng chữ, hàng được xuống hàng */
.flex.items-center.gap-4.pt-2 { flex-wrap: wrap; gap: 8px 16px; }
.flex.items-center.gap-4.pt-2 > span { white-space: nowrap; }
/* Thẻ phòng trong mô hình 3D: tên loại phòng và giá tách 2 dòng, không tràn thẻ */
#cvRooms > button { min-width: 0; overflow: hidden; }
#cvRooms > button > span { white-space: normal; overflow-wrap: anywhere; }
/* Trang đại lý */
.cv-step { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 16px; background: #fff; box-shadow: 0 1px 6px rgba(48,40,33,.06);
  font: 400 13px/1.55 'Be Vietnam Pro', system-ui, sans-serif; color: #4d453f; }
.cv-step strong { font: 600 16px/1.3 'Playfair Display', serif; color: #1b140e; }
.cv-step .material-symbols-outlined { color: #7d570f; font-size: 26px; }
.cv-lab { font: 500 12px/18px 'Be Vietnam Pro', system-ui, sans-serif; color: #4d453f; }
.cv-in { min-height: 48px; padding: 0 16px; border-radius: 12px; background: #f0eee8; color: #1b140e; border: 1px solid transparent; width: 100%; min-width: 0; }
.cv-in:focus { outline: 2px solid #7d570f; outline-offset: 1px; }
.cv-in[aria-invalid="true"], input[aria-invalid="true"] { border-color: #ba1a1a; background: #fff6f5; }
#cvAffForm label, #cvAffLook label { min-width: 0; }
/* Liên kết "Xem chi tiết" trên thẻ */
.cv-more { display: inline-flex; align-items: center; gap: 6px; font: 500 14px/20px 'Be Vietnam Pro', system-ui, sans-serif; color: #7d570f; min-height: 40px; text-decoration: none; }
.cv-more:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Trang chi tiết tour / vé */
.cv-crumb { display: flex; flex-wrap: wrap; gap: 6px; font: 400 13px/1.5 'Be Vietnam Pro', system-ui, sans-serif; color: #7f756e; margin-bottom: 16px; }
.cv-crumb a { color: #4d453f; } .cv-crumb a:hover { color: #7d570f; }
.cv-hero-img { border-radius: 24px; overflow: hidden; aspect-ratio: 21/9; background: #f0eee8; }
.cv-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 767px) { .cv-hero-img { aspect-ratio: 4/3; border-radius: 16px; } }
.cv-chip-l { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #f6f3ed; color: #4d453f; font: 500 13px/1.2 'Be Vietnam Pro', system-ui, sans-serif; white-space: nowrap; }
.cv-chip-l .material-symbols-outlined { font-size: 17px; color: #7d570f; }
.cv-article { font: 400 16px/1.75 'Be Vietnam Pro', system-ui, sans-serif; color: #33291f; }
.cv-lead p + p { margin-top: 14px; }
.cv-lead p:first-child { font-size: 18px; line-height: 1.7; color: #1b140e; }
.cv-art-sec { margin-top: 40px; padding-top: 32px; border-top: 1px solid #e5e0d8; }
.cv-art-sec h2 { font: 500 26px/1.3 'Playfair Display', serif; color: #1b140e; margin-bottom: 16px; }
.cv-art-sec h3 { font: 600 16px/1.4 'Be Vietnam Pro', sans-serif; color: #1b140e; margin-bottom: 10px; }
.cv-hl, .cv-tips, .cv-list { display: grid; gap: 10px; }
.cv-hl li, .cv-tips li, .cv-list li { display: flex; gap: 10px; align-items: flex-start; }
.cv-hl .material-symbols-outlined, .cv-tips .material-symbols-outlined { color: #7d570f; font-size: 20px; margin-top: 3px; }
.cv-list .material-symbols-outlined { font-size: 19px; margin-top: 3px; } .cv-list .ok { color: #2f6b2a; } .cv-list .no { color: #9a8f86; }
.cv-timeline { position: relative; display: grid; gap: 18px; padding-left: 4px; }
.cv-timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; position: relative; }
.cv-timeline .tm { font: 600 15px/1.75 'Be Vietnam Pro', sans-serif; color: #7d570f; font-variant-numeric: tabular-nums; }
.cv-timeline li::before { content: ""; position: absolute; left: 72px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: #fdc978; box-shadow: 0 0 0 3px #fff3dc; }
.cv-timeline li > span:last-child { padding-left: 16px; }
.cv-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cv-table td { padding: 12px 8px; border-bottom: 1px solid #ebe5dc; vertical-align: top; }
.cv-faq { border-bottom: 1px solid #ebe5dc; }
.cv-faq summary { cursor: pointer; padding: 14px 0; font-weight: 500; color: #1b140e; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.cv-faq summary::after { content: "+"; color: #7d570f; font-size: 22px; line-height: 1; }
.cv-faq[open] summary::after { content: "–"; }
.cv-faq p { padding: 0 0 16px; color: #4d453f; }
.cv-buy { position: sticky; top: 100px; background: #fff; border-radius: 20px; padding: 24px; box-shadow: 0 2px 14px rgba(48,40,33,.08); display: grid; gap: 10px; }
.cv-price { font: 600 30px/1.2 'Be Vietnam Pro', sans-serif; color: #1b140e; }
.cv-buy-btn { margin-top: 8px; min-height: 52px; border-radius: 12px; background: #302821; color: #fcf9f3; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 15px 'Be Vietnam Pro', sans-serif; text-decoration: none; }
.cv-buy-btn:hover { background: #1b140e; }
.cv-buy-alt { min-height: 44px; border-radius: 12px; border: 1px solid #d0c4bc; color: #1b140e; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 14px 'Be Vietnam Pro', sans-serif; text-decoration: none; }
.cv-buy-ul { display: grid; gap: 8px; margin-top: 8px; font: 400 13px/1.5 'Be Vietnam Pro', sans-serif; color: #4d453f; }
.cv-buy-ul li { display: flex; gap: 8px; } .cv-buy-ul .material-symbols-outlined { font-size: 18px; color: #2f6b2a; }
.cv-rel { display: grid; gap: 10px; text-decoration: none; color: #1b140e; font: 600 16px/1.35 'Playfair Display', serif; }
.cv-rel img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 16px; transition: transform .25s ease; }
@media (hover: hover) { .cv-rel:hover img { transform: scale(1.02); } }
@media (max-width: 1023px) { .cv-buy { position: static; } }
/* Kênh liên hệ theo ngôn ngữ: khách Việt dùng Zalo/Messenger, khách nước ngoài dùng Telegram/WhatsApp */
html:not([lang="vi"]) .cv-vi-only { display: none !important; }
html[lang="vi"] .cv-intl-only { display: none !important; }
/* Thẻ thuê xe */
.cv-rent { display: flex; gap: 14px; align-items: flex-start; }
.cv-rent-ico { flex: 0 0 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #f6ecdc; color: #7a5520; }
.cv-rent-ico .material-symbols-outlined { font-size: 26px; }
@media (max-width: 640px) {
  #pano-current-text, #panorama-box .text-\[11px\] { display: none; }
  .font-headline-md.text-headline-md + .text-\[12px\] { display: block; }
  section .font-label-sm, section .font-label-md { word-break: normal; overflow-wrap: anywhere; }
  .text-right .font-headline-lg, .text-right .font-display-hero { white-space: nowrap; }
}

/* Máy chiếu phim trong phòng */
.cv-proj { margin: 16px 0 0; display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 16px; background: #f6f3ed; }
.cv-proj img { width: 140px; height: 120px; object-fit: cover; object-position: center 30%; border-radius: 12px; display: block; }
.cv-proj figcaption { display: grid; gap: 4px; font: 400 13px/1.55 'Be Vietnam Pro', system-ui, sans-serif; color: #4d453f; }
.cv-proj strong { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: #1b140e; }
.cv-proj strong .material-symbols-outlined { font-size: 19px; color: #7d570f; }
@media (max-width: 480px) { .cv-proj { grid-template-columns: 96px 1fr; } .cv-proj img { width: 96px; height: 96px; } }

/* Ô chọn ngày: ẩn hẳn khi đóng (style display:grid không được ghi đè thuộc tính hidden) */
.cv-datepop[hidden] { display: none !important; }

/* ===== Đồng bộ chữ & chống xuống dòng vô nghĩa (23/11) ===== */
/* Tiêu đề: chia dòng cân đối; đoạn văn: không để 1 từ mồ côi ở dòng cuối */
body * { text-wrap: pretty; }
h1, h2, h3, h4, [class*="font-headline"], [class*="font-display"] { text-wrap: balance; }
/* Ô nhập, nút: cùng font với web */
input, select, textarea, button { font-family: 'Be Vietnam Pro', system-ui, sans-serif; }
/* Chip / nhãn ngắn: luôn một dòng; hàng chứa chip được xuống hàng */
.rounded-full, .rounded-full > span, [class*="font-label-caps"], .cv-chip-l { white-space: nowrap; }
.flex:has(> .rounded-full) { flex-wrap: wrap; }
/* Ô tiện nghi trong trang phòng (Wifi, Máy chiếu phim…): chữ một dòng, gọn trên điện thoại */
.flex.items-center.p-3.rounded-xl.bg-surface-container > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 480px) { .flex.items-center.p-3.rounded-xl.bg-surface-container { padding: 10px !important; gap: 8px !important; font-size: 13px; } }
/* Nhãn ô nhập trong form: chữ hoa nhưng giãn ít, không gãy */
form label[class*="font-label-caps"] { letter-spacing: .08em; white-space: normal; }
.cv-opt { text-transform: none; letter-spacing: 0; font-weight: 400; color: #7f756e; }
/* Số điện thoại trong câu không bị tách đôi */
.cv-phone-nb { white-space: nowrap; }
/* Nhãn nhỏ trên ảnh gallery, nút Chat Zalo: một dòng */
.absolute.bottom-2.left-2 { white-space: nowrap; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; }
a.rounded-lg { white-space: nowrap; }

/* ===== Thanh tìm phòng trang chủ: không đè chữ trên iPhone (ô ngày iOS hiện dạng dài) ===== */
#resort-booking-form input[type="date"] { -webkit-appearance: none; appearance: none; min-width: 0; width: 100%; display: block; text-align: left; line-height: 1.4; min-height: 24px; }
#resort-booking-form input[type="date"]::-webkit-date-and-time-value { text-align: left; }
#resort-booking-form select { min-width: 0; }
@media (max-width: 640px) {
  /* Nhận phòng / Trả phòng xếp dọc, mỗi ô một dòng */
  #resort-booking-form .flex-1.grid.grid-cols-2 { grid-template-columns: 1fr; gap: 10px; }
  #resort-booking-form .flex-1.grid.grid-cols-2 > .pl-2 { padding-left: 0; }
  #resort-booking-form input[type="date"] { font-size: 15px; }
}
/* Dòng tiện ích dưới thanh tìm phòng: xếp gọn, mỗi mục một dòng chữ */
#booking-feedback { gap: 8px 24px; }
#booking-feedback > div { flex-wrap: wrap; gap: 8px 20px !important; }
#booking-feedback span { white-space: nowrap; }
@media (max-width: 640px) { #booking-feedback { flex-direction: column; align-items: flex-start; } }
/* Tiêu đề Playfair có dấu tiếng Việt: đủ khoảng dòng để dấu không chạm dòng trên */
.leading-tight[class*="font-display"], .leading-tight[class*="font-headline"], h1.leading-tight { line-height: 1.22 !important; }
/* Dòng khoảng cách (sân bay, cầu Rồng…): trên điện thoại xếp 2 tầng, không chồng chữ */
.cv-dist > span:first-child { white-space: normal; }
@media (max-width: 640px) {
  .cv-dist { flex-direction: column; align-items: flex-start !important; gap: 4px !important; }
  .cv-dist > span:last-child { text-align: left; max-width: none; padding-left: 30px; color: #7d570f; }
}

/* ===== Chân trang (thiết kế lại 23/11): gọn, 4 cột, không khoảng trống thừa ===== */
.cv-foot { background: #1b140e; color: #d8cbbf; font: 400 14px/1.6 'Be Vietnam Pro', system-ui, sans-serif; margin-top: 48px; }
.cv-foot-in { max-width: 80rem; margin: 0 auto; padding: 40px 20px 0; }
@media (min-width: 1024px) { .cv-foot-in { padding: 48px 48px 0; } }
.cv-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 32px 40px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1); }
@media (max-width: 1023px) { .cv-foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cv-foot-grid { grid-template-columns: 1fr; gap: 28px; } }
.cv-foot a { color: #efe0d5; text-decoration: none; }
.cv-foot a:hover { color: #fdc978; }
.cv-foot-logo { display: inline-flex; align-items: center; gap: 12px; }
.cv-foot-logo img { width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.cv-foot-logo b { display: block; font: 600 18px/1.2 'Playfair Display', serif; color: #fcf9f3; letter-spacing: .02em; }
.cv-foot-logo small { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #fdc978; }
.cv-foot-brand p { margin: 14px 0 16px; max-width: 34ch; color: #b7a99c; }
.cv-foot-social { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-foot-social a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 13px; white-space: nowrap; }
.cv-foot-social a:hover { background: rgba(253,201,120,.15); }
.cv-foot-col { display: flex; flex-direction: column; gap: 10px; }
.cv-foot-col h3 { font: 600 12px/1.4 'Be Vietnam Pro', sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #fdc978; margin: 0 0 4px; }
.cv-foot-ic { display: flex; align-items: flex-start; gap: 10px; }
.cv-foot-ic .material-symbols-outlined { font-size: 18px; color: #fdc978; margin-top: 2px; }
.cv-foot-ic b { color: #fcf9f3; font-weight: 600; white-space: nowrap; }
.cv-foot-pay { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-foot-pay img { height: 30px; width: auto; background: #fff; border-radius: 6px; padding: 4px 8px; }
.cv-foot-small { color: #9d8f83; font-size: 13px; margin: 0; }
.cv-foot-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 16px 0 20px; font-size: 13px; color: #9d8f83; }
.cv-foot-bar b { color: #d8cbbf; font-weight: 600; }
.cv-foot-credit summary { cursor: pointer; list-style: none; color: #9d8f83; }
.cv-foot-credit summary::-webkit-details-marker { display: none; }
.cv-foot-credit summary::after { content: " ▾"; }
.cv-foot-credit p { max-width: 60ch; margin: 8px 0 0; font-size: 12px; }
/* Thanh "Đặt phòng" cố định ở đáy trên điện thoại không che dòng cuối chân trang */
@media (max-width: 767px) { .cv-foot-bar { padding-bottom: 96px; } }

/* Ghi chú VAT dưới giá */
.cv-vat { display: block; font: 400 12px/1.5 'Be Vietnam Pro', system-ui, sans-serif; color: #7f756e; margin-top: 2px; white-space: nowrap; }
.cv-vat-total { font: 400 13px/1.5 'Be Vietnam Pro', system-ui, sans-serif; color: #4d453f; margin-top: 6px; text-align: right; }
.cv-vat-total strong { color: #1b140e; }
