:root {
  --font-luxury: Arial, sans-serif;
}

/* ── Global Font-Family: var(--font-luxury, Arial, sans-serif) ── */
html,
body,
p,
div,
span,
h1,
h2,
h3,
h4,
h5,
h6,
a,
li,
ul,
ol,
small,
strong,
b,
em,
label,
input,
button,
select,
textarea,
table,
td,
th,
tr,
tbody,
thead,
header,
footer,
section,
article,
main,
nav,
aside,
figure,
figcaption,
blockquote,
.intro,
.paragraph,
.title,
.sub-title,
.main_title,
.hotel-name,
.hotel-address,
.room-title,
.sidebar-map,
.daterangepicker,
.nice-select,
.summary,
.booking-btn,
.selected-date,
.checkin-date {
  font-family: var(--font-luxury, Arial, sans-serif) !important;
}

/* Strictly preserve icon fonts */
i[class*="bi"],
i[class^="bi-"],
[class*="bi-"],
.bi {
  font-family: "bootstrap-icons" !important;
}

[class*="customicon-"],
[class^="customicon-"] {
  font-family: 'hotel icons' !important;
}

[class*="icon-hotel"] {
  font-family: hotel !important;
}

[class*="icon-spa"] {
  font-family: spa !important;
}

.services-script-subtitle {
  font-family: 'Dancing Script', cursive !important;
}

html {
  overflow-x: visible !important;
}
body {
  overflow-x: clip !important;
  width: 100% !important;
}

/* ── Font size scale-down ────────────────────────────────────────────────── */
html {
  font-size: 14px; /* base: giảm từ 16px xuống 14px (~12.5%) */
}

/* Body & paragraph text */
body, p, span, small, a, li, label, input, button, select, textarea {
  font-size: 0.875rem;  /* ~12.25px */
}

/* Headings */
h1 { font-size: 1.8rem;  }   /* ~25px  */
h2 { font-size: 1.5rem;  }   /* ~21px  */
h3 { font-size: 1.3rem;  }   /* ~18px  */
h4 { font-size: 1.1rem;  }   /* ~15px  */
h5 { font-size: 1rem;    }   /* ~14px  */
h6 { font-size: 0.9rem;  }   /* ~12.5px */

/* Navigation */
header nav a, header nav li {
  font-size: 0.85rem;
}

/* Section tabs */
.section-tabs button {
  font-size: 0.95rem;
}

@media (max-width: 767px) {
  .section-tabs {
    flex-wrap: nowrap !important;
  }
  .section-tabs button {
    font-size: clamp(11px, 3.1vw, 13px) !important;
  }
}

/* Intro / content blocks */
.intro p, .room-box p, .paragraph {
  font-size: 0.875rem;
  line-height: 1.7;
}

/* Booking & summary */
.summary, .summary * {
  font-size: 0.85rem;
}

/* Footer */
footer, footer a, footer li, footer p {
  font-size: 0.8rem;
}

/* Badges / labels / small texts */
small {
  font-size: 0.75rem;
}

/* Custom styles to fix image cropping and title size */
#section3 h2 {
  font-size: 28px !important;
}

.loop-item img {
  object-fit: contain !important;
  background-color: transparent !important;
}

.room-carousel img {
  object-fit: contain !important;
  background-color: #eee !important;
}

/* Fix hero container positioning and z-index overlap issues */
.hero {
  position: relative !important;
}

@media (max-width: 991px) {
  .hero.home-search {
    z-index: 1 !important;
  }
}

/* ===== TÁCH BIỆT HEADER VÀ HERO / BANNERS TOÀN TRANG ===== */
header {
  background-color: #000000 !important;
  height: 95px !important;
  display: flex !important;
  align-items: center !important;
  transition: all 0.3s ease !important;
}

header.reveal_header {
  height: 95px !important;
}

header.reveal_header .container-fluid,
header.reveal_header .container-fluid > .row {
  height: 100% !important;
  width: 100% !important;
  align-items: center !important;
}

/* Prevent mobile header list items wrapping and ensure vertical alignment */
header nav ul {
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

header nav ul li {
  display: flex !important;
  align-items: center !important;
  margin-left: clamp(8px, 2vw, 20px) !important;
}

.hamburger_2 {
  top: 0 !important;
  display: flex !important;
  align-items: center !important;
}

/* Hide off-screen mobile nav panel completely to prevent horizontal leakage */
.nav_panel {
  visibility: hidden !important;
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.5s !important;
}

.nav_panel.show {
  visibility: visible !important;
}

main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.hero, .hero_in {
  margin-top: 95px !important;
}

@media (max-width: 991px) {
  header, header.reveal_header {
    height: 70px !important;
  }

  .hero, .hero_in {
    margin-top: 70px !important;
  }

  /* Shrink header logo and heights to prevent horizontal overflow */
  header.reveal_header .logo_normal img,
  header.reveal_header .logo_sticky img {
    height: 50px !important;
    width: auto !important;
  }

  /* Compact spacing for buttons and selectors inside header */
  header nav ul li {
    margin-left: 8px !important;
  }

  header nav ul li a.btn_1 {
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
  }

  .dropbtn-lang {
    padding: 6px 10px !important;
    font-size: 0.8rem !important;
  }
}

/* ===== FIX TRUNCATED ROOM SPECS/FEATURES DETAILS ===== */
.room-meta {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px 10px !important;
  font-size: 13px !important;
  width: 100% !important;
  padding: 0 4px !important;
}

@media (max-width: 576px) {
  .room-meta {
    font-size: 11px !important;
    gap: 4px !important;
  }
  .room-meta span {
    gap: 3px !important;
  }
}

.room-meta span {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
}

/* ===== DYNAMIC VERTICAL STACKED GIAO DIỆN KHÁC (<=384px & >=769px) ===== */
@media (max-width: 384px), (min-width: 769px) {
  body .room-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
    width: 100% !important;
  }

  /* Căn giữa nhãn và giá tiền */
  body .room-price {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 2px !important;
    gap: 2px !important;
  }

  body .room-price .from {
    font-size: 12px !important;
    color: #777 !important;
    margin: 0 !important;
    display: block !important;
    text-align: center !important;
  }

  body .room-price .price-line {
    display: flex !important;
    justify-content: center !important;
    align-items: baseline !important;
    gap: 4px !important;
    width: 100% !important;
  }

  body .room-price strong {
    font-size: 19px !important;
    color: #ff6a00 !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
  }

  body .room-price .unit {
    font-size: 11px !important;
    color: #ff6a00 !important;
    white-space: nowrap !important;
  }

  /* Căn giữa nhãn phụ và nút bấm */
  body .room-action {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 6px !important;
    margin-top: 2px !important;
  }

  body .room-badge {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #ff3b3b !important;
    margin: 0 !important;
    margin-right: 0 !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  body .room-bottom .room-btn,
  body .room-bottom .btn_1 {
    flex-shrink: 0 !important;
    padding: 6px 20px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    margin: 0 !important;
    border-radius: 24px !important;
    display: inline-block !important;
    width: auto !important;
    text-align: center !important;
  }
}

/* Thiết lập Container Query cho thẻ card phòng */
.room-card {
  container-type: inline-size !important;
}

@container (max-width: 340px) {
  .room-meta {
    font-size: 11px !important;
    gap: 4px !important;
  }
  .room-meta span {
    gap: 2px !important;
  }
  .room-meta span img,
  .room-meta span div img {
    width: 15px !important;
    height: 15px !important;
  }
}

/* ===== OPTIMIZE ROOM CARD TITLE (DYNAMIC AUTO-FIT) ===== */
.room-card .room-title {
  text-align: center !important;
  font-size: clamp(16px, 7.5cqw, 24px) !important; /* Tự động fit cỡ chữ theo chiều ngang của card */
  font-weight: 700 !important;
  margin-bottom: 12px !important;
  display: block !important;
  width: 100% !important;
  white-space: nowrap !important; /* Đảm bảo luôn nằm trên 1 dòng */
  overflow: hidden !important;
  text-overflow: ellipsis !important; /* Cắt ngắn bằng dấu ... nếu tên quá dài vượt khung */
}

/* ===== CUSTOM ROOM LIGHTBOX POPUP SYSTEM ===== */
.custom-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 110000; /* Must overlay header, footer, page */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.lightbox-content {
  position: relative;
  width: 90%;
  max-width: 850px;
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  z-index: 10;
}

.custom-lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 36px;
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.lightbox-close:hover {
  color: #caa169;
}

.lightbox-main-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

.lightbox-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 20px;
}

.lightbox-nav-btn:active {
  background: #caa169;
  color: #ffffff;
  border-color: #caa169;
}

@media (hover: hover) {
  .lightbox-nav-btn:hover {
    background: #caa169;
    color: #ffffff;
    border-color: #caa169;
    transform: translateY(-50%) scale(1.05);
  }
}

.lightbox-nav-btn.prev-btn {
  left: 16px;
}

.lightbox-nav-btn.next-btn {
  right: 16px;
}

.lightbox-thumbs-wrapper {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  position: relative;
}

.lightbox-thumbs-track-container {
  flex-grow: 1;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

.lightbox-thumbs-track-container::-webkit-scrollbar {
  display: none; /* Safari/Chrome */
}

.lightbox-thumbs-track {
  display: flex;
  gap: 8px;
  transition: transform 0.3s ease;
}

.lightbox-thumb-item {
  width: 80px;
  height: 50px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.lightbox-thumb-item.active {
  border-color: #caa169;
  transform: scale(1.02);
}

.lightbox-thumb-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #555555;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.lightbox-thumb-nav:active {
  background: #caa169;
  color: #ffffff;
  border-color: #caa169;
}

@media (hover: hover) {
  .lightbox-thumb-nav:hover {
    background: #caa169;
    color: #000000;
    border-color: #caa169;
  }
}

.lightbox-title {
  font-family: var(--font-luxury, Arial, sans-serif);
  font-size: 20px;
  font-weight: 500;
  color: #11151a;
  margin-top: 16px;
  text-align: left;
}

.room-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.room-image:hover .room-main-img {
  transform: scale(1.05);
}

.room-image-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--font-luxury, Arial, sans-serif);
  z-index: 2;
  pointer-events: none;
}

@media (max-width: 575px) {
  .lightbox-content {
    width: 95%;
    padding: 12px;
  }
  
  .lightbox-main-wrapper {
    aspect-ratio: 16 / 11;
  }
  
  .lightbox-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .lightbox-thumb-item {
    width: 60px;
    height: 40px;
  }
  
  .lightbox-title {
    font-size: 16px;
    margin-top: 12px;
  }
  
  .lightbox-close {
    top: -40px;
    right: 5px;
    font-size: 32px;
  }
}