:root {
  --color-wood: #4a3b32;
  --color-wood-light: #8e735b;
  --color-green: #2c5545;
  --color-green-light: #4a7a64;
  --color-marble: #e8ebe9;
  --color-black: #1a1a1a;
  --color-white: #ffffff;
  --glass-bg: rgba(26, 26, 26, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Outfit', 'Segoe UI', Arial, sans-serif;
  --font-ui: 'Outfit', 'Segoe UI', Arial, sans-serif;
  --public-header-offset: 6.5rem;
}

html[lang='ko'] {
  --font-display: 'Batang', 'AppleMyungjo', 'Noto Serif KR', serif;
  --font-body: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --font-ui: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

html[lang^='zh'] {
  --font-display: 'SimSun', 'Songti SC', 'Noto Serif SC', 'Noto Serif TC', serif;
  --font-body: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', 'Noto Sans TC', sans-serif;
  --font-ui: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', 'Noto Sans TC', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-black);
  color: var(--color-marble);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  transition: background-color 0.3s;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
}

.navbar .logo {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--color-white);
  letter-spacing: 2px;
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--color-white);
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--color-wood-light);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  background: url('/static/images/luxury_villa_bg.png') no-repeat center
    center/cover;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10%;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(26, 26, 26, 0.9) 0%,
    rgba(26, 26, 26, 0.4) 50%,
    rgba(26, 26, 26, 0) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 500px;
}

.hero-content h1 {
  font-size: 64px;
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 18px;
  color: var(--color-marble);
  font-weight: 300;
}

/* Glassmorphism Form */
.booking-glass {
  position: relative;
  z-index: 2;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  padding: 34px;
  border-radius: 20px;
  width: 382px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.booking-glass h2 {
  font-size: 24px;
  color: var(--color-white);
  margin-bottom: 25px;
  text-align: center;
}

.input-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  gap: 15px;
}

.row .input-group {
  flex: 1;
}

label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-marble);
  margin-bottom: 8px;
  font-weight: 300;
}

input,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 15px;
  border-radius: 8px;
  color: var(--color-white);
  font-family: var(--font-ui);
  font-size: 15px;
  transition: all 0.3s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-wood-light);
  background: rgba(255, 255, 255, 0.1);
}

input[type='date']::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.7;
  cursor: pointer;
}

.btn-submit {
  width: 100%;
  padding: 15px;
  background-color: var(--color-green);
  color: var(--color-white);
  border: none;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition:
    background-color 0.3s,
    transform 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn-submit:hover {
  background-color: var(--color-green-light);
  transform: translateY(-2px);
}

.btn-submit:active {
  transform: translateY(0);
}

/* Spinner & Messages */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-message {
  margin-top: 15px;
  text-align: center;
  font-size: 14px;
  padding: 10px;
  border-radius: 8px;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(44, 85, 69, 0.8); /* Green */
  color: #fff;
  border: 1px solid var(--color-green-light);
}

.form-message.error {
  display: block;
  background: rgba(153, 27, 27, 0.8); /* Red */
  color: #fff;
  border: 1px solid #ef4444;
}

/* Responsive */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .hero-overlay {
    background: rgba(26, 26, 26, 0.7);
  }

  .hero-content {
    margin-bottom: 30px;
  }

  .hero-content h1 {
    font-size: 48px;
  }

  .booking-glass {
    width: 100%;
    max-width: 450px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 36px;
  }
  .hero-content p {
    font-size: 16px;
  }
  .booking-glass {
    padding: 20px;
  }
  .btn-submit {
    font-size: 13px;
    padding: 12px;
    white-space: normal;
  }
  .navbar {
    padding: 15px 15px;
  }
  .navbar .logo {
    font-size: 18px;
    letter-spacing: 1px;
  }
  .nav-links {
    gap: 15px;
  }
  .nav-links a {
    font-size: 12px;
    letter-spacing: 0px;
  }
  .ai-chat-box {
    margin-bottom: 1rem;
  }
}

/* New V2 Styles */
.hidden {
  display: none !important;
}
.step-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}
.step-header h2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-back {
  background: none;
  border: none;
  color: var(--color-marble);
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  margin-right: 15px;
  white-space: nowrap;
}
.btn-back:hover {
  color: var(--color-white);
}
.results-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 15px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 5px;
  overflow-x: hidden;
}
.results-list::-webkit-scrollbar {
  width: 5px;
}
.results-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}
.room-card {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  transition: 0.3s;
}
.room-card:hover {
  border-color: var(--color-green);
  transform: translateY(-2px);
}
.room-img {
  width: 120px;
  height: 100px;
  object-fit: cover;
}
.room-info {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.room-info h4 {
  font-family: 'Playfair Display', serif;
  color: #fff;
  font-size: 16px;
  margin-bottom: 5px;
}
.room-meta {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 8px;
}
.room-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.room-price {
  color: var(--color-green-light);
  font-weight: bold;
  font-size: 15px;
}
.btn-select {
  background: var(--color-wood-light);
  color: #fff;
  border: none;
  padding: 5px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  transition: 0.2s;
}
.btn-select:hover {
  background: var(--color-wood);
}
.summary-card {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}
.summary-card h3 {
  color: #fff;
  margin-bottom: 10px;
  font-size: 18px;
}
.summary-card p {
  font-size: 14px;
  margin-bottom: 15px;
}
.summary-card hr {
  border-color: rgba(255, 255, 255, 0.1);
  margin-bottom: 15px;
}
.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
}
.price-row.highlight {
  color: var(--color-green-light);
  font-size: 16px;
  font-weight: bold;
}

/* V3: Expanded Details Layout */
.booking-glass {
  transition: all 0.5s ease-in-out;
}
.booking-glass.expanded {
  width: 98%;
  max-width: 1600px;
  max-height: 90vh;
  overflow-y: auto;
}

/* Custom Scrollbar for Glass Modal */
.booking-glass::-webkit-scrollbar {
  width: 8px;
}
.booking-glass::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
.booking-glass::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.expanded-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
@media (min-width: 992px) {
  .expanded-layout {
    grid-template-columns: 1.5fr 1fr;
  }
}

/* Gallery Grid */
.gallery-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  max-height: 70vh;
  padding-right: 5px;
}
.gallery-section::-webkit-scrollbar {
  width: 5px;
}
.gallery-section::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

.gallery-group {
  margin-bottom: 5px;
}
.gallery-group-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-wood-light);
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  border-radius: 12px;
}
.gallery-img,
.gallery-video {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: 0.3s;
  border-radius: 8px;
}
.gallery-img {
  cursor: pointer;
}
.gallery-img:hover {
  filter: brightness(0.8);
}

.img-more-container {
  position: relative;
  grid-column: span 1;
  grid-row: span 1;
}
.overlay-more {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 10001;
}
.lightbox-nav {
  position: absolute;
  top: 0;
  height: 100%;
  width: 25%; /* Large clickable area for mobile */
  display: flex;
  align-items: center;
  cursor: pointer;
  z-index: 10000;
}
.lightbox-prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 20px;
}
.lightbox-next {
  right: 0;
  justify-content: flex-end;
  padding-right: 20px;
}
.lightbox-nav span {
  font-size: 50px;
  color: rgba(255, 255, 255, 0.5);
  transition: 0.3s;
  user-select: none;
}
.lightbox-nav:hover span {
  color: white;
}
@media (max-width: 768px) {
  .lightbox-nav {
    width: 35%;
  }
}

/* Footer */
.site-footer {
  background: #111;
  color: var(--color-marble);
  padding: 60px 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.footer-main h3 {
  font-size: 24px;
  color: var(--color-white);
  margin-bottom: 10px;
  font-family: 'Playfair Display', serif;
}

.footer-main p {
  font-size: 16px;
  color: #ccc;
}

.contact-intro {
  margin-top: 20px;
  font-weight: 600;
  color: var(--color-white);
}

.footer-contacts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 700px;
  margin: 0 auto;
}

.contact-box {
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 15px;
  min-width: 250px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s;
}

.contact-box:hover {
  transform: translateY(-5px);
}

.contact-box h4 {
  color: var(--color-wood-light);
  margin-bottom: 15px;
  font-size: 16px;
}

.qr-img {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  margin-bottom: 15px;
  border: 2px solid white;
}

.contact-box p {
  font-size: 14px;
  margin: 0;
}

/* --- PHASE 2 UI ENHANCEMENTS --- */

/* Range Slider */
.budget-slider-container {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px;
}
#budget-val {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: var(--color-green-light);
  margin-bottom: 10px;
}
.range-sliders {
  position: relative;
  height: 10px;
}
.range-sliders input[type='range'] {
  position: absolute;
  left: 0;
  bottom: 0;
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  outline: none;
  margin: 0;
  padding: 0;
  pointer-events: none;
}
.range-sliders input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: all;
  width: 20px;
  height: 20px;
  background: var(--color-green);
  border-radius: 50%;
  cursor: pointer;
}

/* Amenity Chips */
.amenity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-block;
  cursor: pointer;
}
.chip input {
  display: none;
}
.chip span {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 13px;
  color: var(--color-marble);
  transition: 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.chip input:checked + span {
  background: var(--color-green);
  border-color: var(--color-green);
  color: white;
}

/* Room Card Enhancements */
.room-card {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: 0.3s;
  position: relative;
}
.room-card:hover {
  border-color: var(--color-green-light);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}
.score-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffd700;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(5px);
}
.room-img {
  width: 130px;
  height: 120px;
  object-fit: cover;
}
.room-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.room-info h4 {
  font-family: 'Playfair Display', serif;
  color: #fff;
  font-size: 18px;
  margin-bottom: 4px;
}
.room-meta {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 6px;
}
.match-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.reason-tag {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #ddd;
}
.room-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
.room-price {
  color: var(--color-green-light);
  font-weight: bold;
  font-size: 16px;
}
.btn-select {
  background: var(--color-green);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: 0.2s;
}
.btn-select:hover {
  background: var(--color-green-light);
}

/* Detail Section */
.info-section {
  color: #fff;
}
.info-section h3 {
  font-size: 24px;
  margin-bottom: 5px;
}
.detail-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 16px;
}
.detail-desc {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 20px;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 5px;
}
.detail-desc::-webkit-scrollbar {
  width: 4px;
}
.detail-desc::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}
.detail-amenities {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 25px;
}
.detail-amenities li {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-amenities li::before {
  content: '✓';
  color: var(--color-green-light);
  font-weight: bold;
}
.detail-actions {
  display: flex;
  gap: 15px;
}
.btn-primary {
  flex: 1;
  padding: 12px;
  background: var(--color-green);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}
.btn-primary:hover {
  background: var(--color-green-light);
  transform: translateY(-2px);
}
.btn-secondary {
  flex: 1;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Hold Timer Box */
.hold-timer-box {
  background: rgba(153, 27, 27, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  padding: 10px;
  border-radius: 8px;
  margin-top: 15px;
  text-align: center;
  color: #fca5a5;
  font-size: 14px;
}
.hold-timer-box strong {
  font-size: 18px;
  color: #ef4444;
}

/* AI Chat Box */
.ai-chat-box {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 2rem auto;
  text-align: left;
}
.ai-chat-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 5px 15px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}
.ai-chat-form:focus-within {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
#ai-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  padding: 10px;
  outline: none;
}
#ai-chat-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
.btn-voice,
.btn-chat-submit {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn-voice:hover,
.btn-chat-submit:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}
.btn-voice.listening {
  color: white;
  background: #ff5252;
  box-shadow:
    0 0 15px rgba(255, 82, 82, 0.6),
    0 0 30px rgba(255, 82, 82, 0.4);
  animation: pulseGlow 1.5s infinite;
}
@keyframes pulseGlow {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 82, 82, 0.5);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 25px rgba(255, 82, 82, 0.8);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 82, 82, 0.5);
  }
}
.ai-response-box {
  margin-top: 15px;
  background: rgba(26, 26, 26, 0.7);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  gap: 15px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}
.ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--color-wood-light),
    var(--color-green-light)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-family: 'Playfair Display', serif;
}
.ai-message {
  flex: 1;
  font-size: 15px;
  line-height: 1.5;
  align-self: center;
}

/* Typing Indicator */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 0;
}
.typing-indicator span {
  width: 6px;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  display: inline-block;
  animation: typing 1.4s infinite ease-in-out both;
}
.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}
.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}
@keyframes typing {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Mobile-First Deep Optimizations */
@media (max-width: 600px) {
  /* Form Rows */
  .row {
    flex-direction: column;
    gap: 15px;
  }

  /* Room Card */
  .room-card {
    flex-direction: column;
  }
  .room-img {
    width: 100%;
    height: 200px;
    border-radius: 10px 10px 0 0;
  }
  .score-badge {
    top: 10px;
    right: 10px;
    left: auto;
  }

  /* Villa Detail Actions */
  .detail-actions {
    flex-direction: column;
    gap: 10px;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 14px;
  }

  /* Detail Amenities */
  .detail-amenities {
    grid-template-columns: 1fr;
  }

  /* Step Header */
  .step-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .btn-back {
    margin-right: 0;
    margin-bottom: 5px;
  }

  /* Footer Contacts */
  .footer-contacts {
    grid-template-columns: 1fr;
  }
}

#home,
#booking-container,
.site-footer,
#searchForm {
  scroll-margin-top: var(--public-header-offset);
}

/* R1 responsive sales-first availability entry. */
.sales-layout {
  position: relative;
  z-index: 2;
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
  padding: 7.5rem 0 4rem;
}

.desktop-availability-card {
  display: none;
}

.booking-glass.expanded,
.results-list,
.gallery-section,
.detail-desc {
  max-height: none;
  overflow: visible;
}

.detail-description-preview {
  margin-bottom: 1.25rem;
}

.detail-desc {
  margin-bottom: 0.75rem;
  padding-right: 0;
  white-space: pre-line;
}

.detail-desc.is-collapsed {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.detail-amenities.is-collapsed li:nth-child(n + 7) {
  display: none;
}

.detail-disclosure {
  min-height: 44px;
  padding: 0.55rem 0;
  color: var(--color-wood-light);
  font: inherit;
  font-weight: 700;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.detail-disclosure:hover,
.detail-disclosure:focus-visible {
  color: var(--color-white);
  text-decoration: underline;
  outline: none;
}

.room-image-unavailable {
  background:
    linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(255, 255, 255, 0.04)),
    var(--color-black);
}

.room-name {
  margin: 0;
  color: #ddd;
  font-size: 0.9rem;
}

.mobile-availability-cta {
  display: none;
}

.gallery-section[hidden],
.detail-description-preview[hidden],
.detail-amenities[hidden],
[data-i18n='detail_amenities'][hidden] {
  display: none !important;
}

.villa-detail-r3 [data-i18n='detail_amenities'] {
  display: none;
}

.detail-amenities-heading {
  margin-top: 1.5rem;
}

@media (min-width: 1024px) {
  .hero {
    display: block;
    min-height: 100vh;
    padding: 0;
  }

  .sales-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.46fr);
    grid-template-rows: auto auto;
    align-items: start;
    gap: 2.5rem 3.5rem;
    padding: 9rem 0 5rem;
  }

  .hero-content,
  .booking-glass {
    grid-column: 1;
    width: 100%;
    max-width: none;
  }

  .hero-content {
    align-self: end;
    max-width: 720px;
  }

  .booking-glass {
    margin: 0;
  }

  .booking-glass.is-search-step {
    display: none;
  }

  .booking-glass.expanded {
    width: 100%;
  }

  .booking-glass.expanded .expanded-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .desktop-availability-card {
    position: sticky;
    top: 6.5rem;
    grid-column: 2;
    grid-row: 1 / span 2;
    display: block;
    min-width: 0;
    max-height: none;
    padding: 1.2rem;
    overflow: visible;
    color: var(--color-white);
    background: rgba(17, 17, 17, 0.88);
    border: 1px solid rgba(212, 175, 55, 0.38);
    border-radius: 18px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
  }

  .availability-eyebrow {
    margin: 0 0 0.45rem;
    color: var(--color-wood-light);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .desktop-availability-card h2 {
    margin: 0;
    color: var(--color-white);
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    line-height: 1.15;
  }

  .availability-card-copy {
    margin: 0.55rem 0 0.8rem;
    color: var(--color-marble);
    font-size: 0.94rem;
  }

  .availability-card-form {
    display: grid;
    gap: 0.35rem;
  }

  .availability-card-form label {
    margin-top: 0.2rem;
    color: var(--color-marble);
    font-size: 0.84rem;
    font-weight: 700;
  }

  .availability-card-form input {
    width: 100%;
    min-height: 42px;
    padding: 0.55rem 0.7rem;
    color: var(--color-black);
    font: inherit;
    background: var(--color-white);
    border: 1px solid transparent;
    border-radius: 8px;
  }

  .availability-card-form input:focus-visible,
  .availability-card-submit:focus-visible {
    outline: 3px solid var(--color-wood-light);
    outline-offset: 3px;
  }

  .availability-card-submit {
    min-height: 44px;
    margin-top: 0.5rem;
    padding: 0.65rem 0.9rem;
    color: var(--color-black);
    font: inherit;
    font-weight: 800;
    background: var(--color-wood-light);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
  }

  .availability-card-submit:hover {
    background: var(--color-white);
  }

  .availability-card-status {
    min-height: 1.1rem;
    margin: 0.2rem 0 0;
    color: #ffd9d2;
    font-size: 0.85rem;
  }
}

@media (max-width: 1023px) {
  .hero {
    padding-inline: 0;
  }

  .sales-layout {
    padding-top: 7rem;
  }

  .desktop-availability-card {
    display: none;
  }
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom));
  }

  .navbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.75rem 0.9rem;
  }

  .navbar .logo {
    flex: 1 1 100%;
    font-size: 1.05rem;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 0.35rem;
  }

  .nav-links a {
    font-size: 0.68rem;
  }

  .step-header h2 {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .sales-layout {
    width: min(100% - 1.5rem, 680px);
    padding-top: 6.5rem;
    padding-bottom: 2rem;
  }

  .booking-glass {
    max-width: none;
  }

  .gallery-section,
  .gallery-group {
    min-width: 0;
  }

  .gallery-section {
    width: calc(100% + 4rem);
    margin-inline: -2rem;
  }

  .gallery-group-title {
    margin-inline: 2rem;
  }

  .gallery-group {
    width: 100%;
  }

  .gallery-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    width: 100%;
    padding: 0 0 0.55rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .gallery-grid::-webkit-scrollbar {
    display: none;
  }

  .gallery-grid .gallery-img,
  .gallery-grid .gallery-video {
    flex: 0 0 min(84vw, 340px);
    width: min(84vw, 340px);
    height: clamp(210px, 62vw, 280px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .mobile-availability-cta {
    position: fixed;
    right: 0.75rem;
    bottom: max(0.65rem, env(safe-area-inset-bottom));
    left: 0.75rem;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 54px;
    padding: 0.55rem 0.75rem;
    color: var(--color-white);
    font: inherit;
    text-align: left;
    background: rgba(17, 17, 17, 0.94);
    border: 1px solid rgba(212, 175, 55, 0.48);
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
    cursor: pointer;
  }

  .mobile-availability-cta span {
    color: var(--color-marble);
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .mobile-availability-cta strong {
    flex: 0 0 auto;
    max-width: 52%;
    padding: 0.55rem 0.65rem;
    color: var(--color-black);
    font-size: 0.83rem;
    line-height: 1.15;
    background: var(--color-wood-light);
    border-radius: 8px;
  }

  .mobile-availability-cta:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 3px;
  }
}

@media (min-width: 390px) and (max-width: 767px) {
  .sales-layout {
    width: min(100% - 2rem, 680px);
  }
}

button,
input,
textarea,
select,
.nav-links,
.availability-card-form,
.mobile-availability-cta,
.detail-disclosure,
.policy {
  font-family: var(--font-ui);
}

/* R3 local demo: villa-first detail hierarchy and review experience. */
.villa-detail-r3 #detail-room-name {
  display: none;
}

.villa-detail-r3 .expanded-layout,
.villa-detail-r3 .gallery-section,
.villa-detail-r3 .gallery-group,
.villa-detail-r3 .gallery-grid,
.villa-detail-r3 .info-section,
.villa-detail-r3 .detail-section {
  min-width: 0;
  max-width: 100%;
}

.villa-detail-r3 .sleeping-rail,
.villa-detail-r3 .review-state-tabs {
  width: 100%;
  max-width: 100%;
}

.villa-detail-header {
  align-items: flex-start;
}

.detail-eyebrow {
  margin: 0 0 0.35rem;
  color: var(--color-wood-light);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.detail-location {
  margin: 0.4rem 0 0;
  color: var(--color-marble);
}

.detail-location-section,
.detail-capacity-section,
.detail-description-preview {
  margin-top: 1.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--glass-border);
}

.detail-facts {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
}

.detail-fact {
  min-width: 112px;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
}

.detail-fact strong,
.detail-fact span {
  display: block;
}

.detail-fact strong {
  color: var(--color-white);
  font-size: 1.45rem;
}

.detail-fact span {
  margin-top: 0.2rem;
  color: var(--color-marble);
  font-size: 0.78rem;
}

.detail-section {
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--glass-border);
}

.detail-section-heading,
.review-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.rail-hint {
  color: var(--color-marble);
  font-size: 0.76rem;
}

.sleeping-rail {
  display: flex;
  gap: 1rem;
  padding: 0.4rem 0 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.sleeping-rail::-webkit-scrollbar {
  display: none;
}

.sleeping-card {
  flex: 0 0 min(78vw, 290px);
  overflow: hidden;
  color: var(--color-white);
  background: rgba(12, 12, 12, 0.62);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  scroll-snap-align: start;
}

.sleeping-card img,
.sleeping-card-placeholder {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.sleeping-card-placeholder {
  display: grid;
  place-items: center;
  color: var(--color-wood-light);
  font-family: var(--font-display);
  font-size: 2rem;
  background: linear-gradient(135deg, #24372d, #131313);
}

.sleeping-card > div:last-child {
  padding: 1rem;
}

.sleeping-card h4,
.sleeping-card p {
  margin: 0.2rem 0;
}

.detail-reviews-section .review-summary { margin: 1rem 0; }
.review-overall-score { color: var(--color-wood-light); font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.2rem); }
.rating-distribution { display: grid; gap: .45rem; max-width: 520px; margin-bottom: 1.2rem; }
.rating-distribution > div { display: grid; grid-template-columns: 52px 1fr 24px; align-items: center; gap: .7rem; color: var(--color-marble); font-size: .8rem; }
.rating-distribution progress { width: 100%; height: 7px; accent-color: var(--color-wood-light); }
.review-subratings-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin: 0 0 1.2rem; }
.review-subratings-summary > div { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .7rem .8rem; border: 1px solid rgba(214,181,136,.22); border-radius: 12px; color: var(--color-marble); background: rgba(255,255,255,.035); }
.review-subratings-summary span { color: var(--color-sand); font-size: .82rem; }
.review-subratings-summary strong { white-space: nowrap; }

@media (max-width: 640px) {
  .review-subratings-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.review-rail { display: flex; gap: 1rem; width: 100%; padding: .35rem 0 .8rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.review-rail::-webkit-scrollbar { display: none; }
.review-card { flex: 0 0 min(84vw, 360px); min-width: 0; padding: 1.15rem; border: 1px solid var(--glass-border); border-radius: 16px; color: var(--color-white); background: rgba(12,12,12,.62); scroll-snap-align: start; }
.review-card-header { display: flex; align-items: center; gap: .75rem; }
.review-avatar { display: grid; width: 44px; height: 44px; flex: none; place-items: center; border-radius: 50%; color: #161616; background: var(--color-wood-light); font-weight: 800; }
.review-card h4,
.review-card p { margin: .25rem 0; }
.review-card-header p,
.review-public-edited { color: var(--color-marble); font-size: .76rem; }
.review-card-stars { color: var(--color-wood-light); font-weight: 800; }
.review-card-content { display: -webkit-box; margin-top: .8rem !important; overflow: hidden; line-height: 1.55; white-space: pre-line; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.review-official-response { margin-top: 1rem; padding: .8rem; border-left: 2px solid var(--color-wood-light); background: rgba(255,255,255,.05); }
.review-official-response p { color: var(--color-marble); font-size: .82rem; }

@media (min-width: 900px) {
  .review-card { flex-basis: calc((100% - 2rem) / 3); }
}

@media (max-width: 767px) {
  .sales-layout {
    padding-top: 2rem;
  }

  .hero.is-villa-detail .sales-layout {
    width: min(100% - 1.5rem, 680px);
    padding-top: 4.9rem;
  }


  .hero.is-villa-detail .booking-glass.expanded {
    padding: 1.1rem;
    border-radius: 16px;
  }

  .hero.is-villa-detail .gallery-section {
    width: calc(100% + 2.2rem);
    margin-inline: -1.1rem;
  }

  .hero.is-villa-detail .gallery-group-title {
    margin-inline: 1.1rem;
  }

  .detail-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-fact {
    min-width: 0;
  }
}

@media (min-width: 390px) and (max-width: 767px) {
  .hero.is-villa-detail .sales-layout {
    width: min(100% - 2rem, 680px);
  }
}

@media (min-width: 1024px) {
  .villa-detail-r3 .expanded-layout {
    gap: 2rem;
  }

  .sleeping-card {
    flex-basis: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-availability-cta,
  .detail-disclosure,
  .availability-card-submit {
    transition: none;
  }
}

/* Villa content and pricing local-ready: production-shell read paths. */
.villa-discovery {
  min-width: 0;
  color: var(--color-white);
}

.villa-discovery[hidden] {
  display: none !important;
}

.villa-discovery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.villa-discovery-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.villa-discovery-rail {
  display: flex;
  gap: 1rem;
  width: 100%;
  padding: 0.15rem 0 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.villa-discovery-rail::-webkit-scrollbar {
  display: none;
}

.villa-discovery-card {
  flex: 0 0 min(82vw, 310px);
  overflow: hidden;
  color: var(--color-white);
  text-decoration: none;
  background: rgba(12, 12, 12, 0.68);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  scroll-snap-align: start;
}

.villa-discovery-card:focus-visible {
  outline: 3px solid var(--color-wood-light);
  outline-offset: 3px;
}

.villa-discovery-card > img,
.villa-discovery-placeholder {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.villa-discovery-placeholder {
  background: linear-gradient(135deg, #24372d, #131313);
}

.villa-discovery-card-body {
  padding: 0.9rem;
}

.villa-discovery-card h3,
.villa-discovery-card p {
  margin: 0;
}

.villa-discovery-location {
  margin-top: 0.35rem !important;
  overflow: hidden;
  color: var(--color-marble);
  font-size: 0.83rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.villa-discovery-facts {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.75rem;
  color: var(--color-marble);
  font-size: 0.8rem;
}

.villa-discovery-fact-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  min-width: 0;
}

.villa-discovery-fact-row {
  display: flex;
  align-items: baseline;
  gap: 0.38rem;
  max-width: 100%;
  white-space: nowrap;
}

.villa-discovery-fact,
.villa-discovery-fact-separator {
  flex: 0 0 auto;
  white-space: nowrap;
}

.villa-discovery-fact-separator {
  color: var(--color-wood-light);
  font-weight: 700;
}

.villa-discovery-facts strong,
.desktop-starting-price {
  color: var(--color-wood-light);
}

.desktop-starting-price {
  margin: 0 0 0.75rem;
  font-size: 1.12rem;
  font-weight: 800;
}

.detail-location p {
  margin: 0;
}

.detail-location ul {
  display: grid;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.detail-selling-points {
  display: grid;
  gap: 0.75rem;
}

.detail-selling-points article {
  display: flex;
  gap: 0.8rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
}

.selling-point-icon,
.amenity-icon {
  flex: 0 0 auto;
  width: 1.6rem;
  height: 1.6rem;
  border: 2px solid var(--color-wood-light);
  border-radius: 50%;
}

.detail-selling-points h4,
.detail-selling-points p {
  margin: 0;
}

.detail-selling-points p {
  margin-top: 0.2rem;
  color: var(--color-marble);
  font-size: 0.86rem;
}

.detail-amenities li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.detail-amenities li::before {
  content: none;
}

.amenity-icon {
  width: 1.1rem;
  height: 1.1rem;
  border-width: 1px;
  border-radius: 3px;
  transform: rotate(45deg);
}

.gallery-section {
  position: relative;
}

.villa-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.villa-detail-header .detail-eyebrow {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  margin: 0;
}

.villa-detail-header h2 {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  margin: 0;
  text-align: center;
}

.villa-detail-header .btn-back {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  margin: 0;
}

.hero-gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  height: clamp(330px, 44vw, 520px);
  overflow: hidden;
  border-radius: 18px;
}

.hero-gallery-item {
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: var(--color-black);
  border: 0;
  cursor: pointer;
}

.hero-gallery-item:first-child {
  grid-row: 1 / span 2;
}

.hero-gallery-item:nth-child(n + 6) {
  display: none;
}

.hero-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.hero-gallery-item:hover img {
  transform: scale(1.025);
}

.hero-gallery-item:focus-visible {
  z-index: 2;
  outline: 3px solid var(--color-wood-light);
  outline-offset: -3px;
}

.hero-gallery-all {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  color: var(--color-black);
  font: inherit;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.hero-gallery-indicator,
.hero-gallery-cue {
  display: none;
}

.lightbox-close,
.lightbox-nav {
  color: inherit;
  font: inherit;
  background-color: transparent;
  border: 0;
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 3px solid var(--color-wood-light);
  outline-offset: 3px;
}

@media (min-width: 1024px) {
  .villa-discovery,
  .booking-glass {
    grid-column: 1;
  }

  .desktop-availability-card {
    grid-row: 1 / span 3;
  }

  .villa-discovery-card {
    flex-basis: calc((100% - 2rem) / 3);
  }

  .detail-selling-points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .villa-discovery-card {
    flex-basis: 84%;
  }

  .villa-detail-header {
    gap: 0.5rem;
  }

  .villa-detail-header .detail-eyebrow {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .villa-detail-header h2 {
    max-width: 180px;
    font-size: clamp(1.35rem, 6vw, 1.8rem);
    overflow-wrap: normal;
  }

  .villa-detail-header .btn-back {
    min-width: 44px;
    min-height: 44px;
    padding-inline: 0.45rem;
    font-size: 0.76rem;
  }

  .hero-gallery-grid {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    height: auto;
    padding-bottom: 0.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .hero.is-villa-detail .gallery-section {
    width: 100%;
    margin-inline: auto;
    padding-inline: 0;
  }

  .hero-gallery-grid::-webkit-scrollbar {
    display: none;
  }

  .hero-gallery-item,
  .hero-gallery-item:first-child {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    height: clamp(235px, 68vw, 310px);
    border-radius: 12px;
    scroll-snap-align: center;
  }

  .hero-gallery-indicator,
  .hero-gallery-cue {
    position: absolute;
    bottom: 0.85rem;
    z-index: 2;
    display: block;
    padding: 0.28rem 0.5rem;
    color: var(--color-white);
    font-size: 0.76rem;
    background: rgba(0, 0, 0, 0.72);
    border-radius: 999px;
  }

  .hero-gallery-indicator {
    left: 50%;
    transform: translateX(-50%);
  }

  .hero-gallery-cue {
    right: 0.7rem;
  }

  .hero-gallery-all {
    top: 0.7rem;
    right: 0.7rem;
    bottom: auto;
    min-height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-gallery-item img {
    transition: none;
  }
}
