/* R108_CCC_ROOM_DETAIL_PAGE_V25_ACTIVE */
.room-detail-page {
  min-height: 100vh;
  background: var(--landing-background, #f4f5f7);
  color: var(--landing-text, #374151);
}

.room-detail-page .room-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
}

.room-detail-page .room-detail-nav {
  min-height: 78px;
}

.room-detail-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.room-detail-main {
  overflow: clip;
}

.room-detail-hero {
  padding: 34px 0 28px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, transparent), transparent 55%),
    var(--landing-surface, #fff);
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 14%, #e5e7eb);
}

.room-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: color-mix(in srgb, var(--landing-text) 74%, transparent);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.room-breadcrumb::-webkit-scrollbar { display: none; }
.room-breadcrumb a { color: var(--primary); text-decoration: none; }
.room-breadcrumb strong { color: var(--landing-heading); font-weight: 600; }

.room-detail-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.room-detail-heading h1 {
  max-width: 900px;
  margin: 3px 0 12px;
  color: var(--landing-heading);
  font-size: clamp(32px, 4.4vw, 54px) !important;
  line-height: 1.1 !important;
  letter-spacing: -.025em;
}

.room-heading-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.room-heading-meta span {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  padding: 5px 11px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 8%, #fff);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
}

.room-detail-stars {
  display: flex;
  gap: 2px;
  padding-bottom: 7px;
  color: #d1d5db;
  font-size: 20px;
  white-space: nowrap;
}
.room-detail-stars .on { color: #f5b301; }

.room-detail-content {
  padding: 34px 0 64px;
}

.room-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 350px);
  align-items: start;
  gap: 28px;
}

.room-detail-primary {
  display: grid;
  min-width: 0;
  gap: 24px;
}

.room-gallery-card,
.room-detail-card,
.room-booking-card {
  border: 1px solid color-mix(in srgb, var(--primary) 10%, #e6e9ed);
  border-radius: var(--landing-card-radius, 24px);
  background: var(--landing-surface, #fff);
  box-shadow: 0 14px 38px rgba(15, 23, 42, .075);
}

.landing-shadow-none .room-gallery-card,
.landing-shadow-none .room-detail-card,
.landing-shadow-none .room-booking-card { box-shadow: none; }
.landing-shadow-strong .room-gallery-card,
.landing-shadow-strong .room-detail-card,
.landing-shadow-strong .room-booking-card { box-shadow: 0 18px 46px rgba(15, 23, 42, .14); }

.room-gallery-card {
  overflow: hidden;
}

.room-gallery-main {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  background: #e8ecef;
  cursor: zoom-in;
  overflow: hidden;
}

.room-gallery-main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, opacity .18s ease;
}
.room-gallery-main:hover img { transform: scale(1.018); }

.room-gallery-count {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(7px);
}

.room-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  background: color-mix(in srgb, var(--primary) 4%, var(--landing-surface));
}

.room-gallery-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: max(8px, calc(var(--landing-card-radius, 24px) * .45));
  background: #edf0f2;
  cursor: pointer;
}
.room-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.room-gallery-thumb.is-active { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 22%, transparent); }
.room-gallery-thumb:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }

.room-gallery-empty {
  display: grid;
  min-height: 360px;
  place-items: center;
  padding: 24px;
  color: #64748b;
  background: linear-gradient(135deg, #edf1f4, #f8fafc);
}

.room-detail-card {
  padding: clamp(22px, 3vw, 34px);
}

.room-detail-card h2 {
  margin: 3px 0 14px;
  color: var(--landing-heading);
  font-size: clamp(23px, 3vw, 31px) !important;
  line-height: 1.25 !important;
}

.room-description-text {
  margin: 0;
  color: var(--landing-text);
  font-size: 14px !important;
  line-height: 1.9 !important;
}

.room-capacity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 25px;
}

.room-capacity-grid > div {
  display: flex;
  min-height: 92px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 13px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--primary) 7%, var(--landing-surface));
  text-align: center;
}
.room-capacity-grid strong { color: var(--primary); font-size: 23px; line-height: 1.1; }
.room-capacity-grid span { color: var(--landing-text); font-size: 11.5px; line-height: 1.4; }

.room-detail-amenities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.room-detail-amenity {
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, #e5e7eb);
  border-radius: 13px;
  background: color-mix(in srgb, var(--primary) 4%, #fff);
}
.room-detail-amenity > span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
}
.room-detail-amenity svg { width: 18px; height: 18px; }
.room-detail-amenity strong { min-width: 0; color: var(--landing-heading); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.room-muted { color: #64748b; }

.room-detail-sidebar {
  position: sticky;
  top: 104px;
}

.room-booking-card {
  padding: 25px;
  overflow: hidden;
}
.room-booking-card::before {
  content: "";
  display: block;
  height: 7px;
  margin: -25px -25px 22px;
  background: var(--primary);
}

.room-price-main {
  display: grid;
  gap: 2px;
  margin: 8px 0 18px;
}
.room-price-main span { color: #64748b; font-size: 12px; }
.room-price-main strong { color: var(--landing-heading); font-size: clamp(27px, 3vw, 35px); line-height: 1.15; }
.room-price-main small { color: #64748b; font-size: 11.5px; }

.room-price-list {
  display: grid;
  gap: 0;
  margin: 0 0 17px;
}
.room-price-list > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 0;
  border-top: 1px solid #e9edf0;
  font-size: 12px;
}
.room-price-list dt { color: #64748b; }
.room-price-list dd { margin: 0; color: var(--landing-heading); font-weight: 600; text-align: right; }
.room-booking-note { margin: 0 0 15px; color: #64748b; font-size: 11.5px; line-height: 1.6; }

.room-detail-book-button,
.room-line-button,
.room-phone-link {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  text-align: center;
  text-decoration: none;
}
.room-detail-book-button { background: var(--primary) !important; color: #fff !important; }
.room-line-button {
  border-radius: 6px;
  background: #06c755;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.room-phone-link {
  min-height: 38px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.room-detail-error { min-height: 60vh; }
.room-detail-error .panel { max-width: 760px; }
.room-detail-footer { margin-top: 0; }

.room-lightbox[hidden] { display: none !important; }
.room-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 30px 74px;
  background: rgba(3, 7, 18, .94);
  backdrop-filter: blur(8px);
}
.room-lightbox figure {
  display: grid;
  max-width: min(1180px, 100%);
  max-height: 92vh;
  gap: 10px;
  margin: 0;
  justify-items: center;
}
.room-lightbox figure img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 36px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 70px rgba(0,0,0,.5);
}
.room-lightbox figcaption { color: rgba(255,255,255,.78); font-size: 12px; }
.room-lightbox-close,
.room-lightbox-nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(5px);
}
.room-lightbox-close { top: 20px; right: 22px; width: 42px; height: 42px; font-size: 30px; }
.room-lightbox-nav { top: 50%; width: 48px; height: 48px; font-size: 38px; transform: translateY(-50%); }
.room-lightbox-nav.prev { left: 18px; }
.room-lightbox-nav.next { right: 18px; }
.room-lightbox-close:hover,
.room-lightbox-nav:hover { background: var(--primary); }
.room-lightbox-open { overflow: hidden; }

/* รูปในการ์ด Rooms เป็นลิงก์ไปหน้ารายละเอียด */
.room-card .room-detail-link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.room-card .room-detail-link::after {
  content: "ดูรายละเอียดและรูปทั้งหมด";
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 8;
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  background: rgba(15,23,42,.72);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
  backdrop-filter: blur(5px);
}
.room-card .room-detail-link:hover::after,
.room-card .room-detail-link:focus-visible::after { opacity: 1; transform: translateY(0); }
.room-card .room-detail-link:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

@media (max-width: 980px) {
  .room-detail-layout { grid-template-columns: 1fr; }
  .room-detail-sidebar { position: static; }
  .room-booking-card { max-width: none; }
  .room-detail-amenities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .room-detail-page .room-detail-nav { min-height: 66px; gap: 8px; }
  .room-detail-page .brand-text span { display: none; }
  .room-detail-page .brand-mark { width: 44px; height: 44px; }
  .room-detail-nav-actions { gap: 6px; }
  .room-detail-nav-actions .button { min-height: 38px; padding: 8px 10px; font-size: 11px; }
  .room-detail-nav-actions .button.light { display: none; }

  .room-detail-hero { padding: 22px 0 21px; }
  .room-breadcrumb { margin-bottom: 15px; font-size: 11px; }
  .room-detail-heading { align-items: flex-start; }
  .room-detail-heading h1 { margin-bottom: 10px; font-size: 29px !important; }
  .room-detail-stars { padding-top: 7px; font-size: 14px; }
  .room-heading-meta { gap: 5px; }
  .room-heading-meta span { min-height: 27px; padding: 4px 8px; font-size: 10.5px; }

  .room-detail-content { padding: 18px 0 40px; }
  .room-detail-layout,
  .room-detail-primary { gap: 16px; }
  .room-gallery-card,
  .room-detail-card,
  .room-booking-card { border-radius: max(12px, var(--landing-card-radius, 24px)); }
  .room-gallery-main { aspect-ratio: 4 / 3; }
  .room-gallery-count { right: 9px; bottom: 9px; min-height: 30px; padding: 5px 9px; font-size: 10px; }
  .room-gallery-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 8px; }
  .room-gallery-thumb { border-radius: 7px; }
  .room-detail-card { padding: 19px; }
  .room-detail-card h2 { font-size: 21px !important; }
  .room-description-text { font-size: 12.5px !important; line-height: 1.8 !important; }
  .room-capacity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 18px; }
  .room-capacity-grid > div { min-height: 76px; }
  .room-capacity-grid strong { font-size: 20px; }
  .room-detail-amenities { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .room-detail-amenity { min-height: 52px; gap: 8px; padding: 8px; }
  .room-detail-amenity > span { width: 30px; height: 30px; flex-basis: 30px; }
  .room-detail-amenity strong { font-size: 10.5px; }
  .room-booking-card { padding: 20px; }
  .room-booking-card::before { margin: -20px -20px 18px; }

  .room-lightbox { padding: 60px 10px 48px; }
  .room-lightbox-close { top: 10px; right: 10px; width: 38px; height: 38px; }
  .room-lightbox-nav { top: auto; bottom: 8px; width: 40px; height: 40px; font-size: 31px; transform: none; }
  .room-lightbox-nav.prev { left: calc(50% - 49px); }
  .room-lightbox-nav.next { right: calc(50% - 49px); }
  .room-lightbox figure img { max-height: calc(100vh - 130px); }

  /* R108_CCC_ROOM_DETAIL_BADGE_MOBILE_HIDDEN_V32_ACTIVE:
     มือถือซ่อนป้าย แต่คงลิงก์รูปไปหน้ารายละเอียดไว้ */
  .room-card .room-detail-link::after {
    display: none !important;
    content: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .room-gallery-main img,
  .room-card .room-detail-link::after { transition: none !important; }
}
