/* ==========================================================================
   ÔM HOMESTAY ĐÀ NẴNG - ROOMS & ROOM DETAIL STYLES
   UI/UX PRO MAX - 100% VANILLA CSS
   ========================================================================== */

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #ffffff;
  padding: 60px 0 50px;
  text-align: center;
  margin-bottom: 40px;
}

.page-header-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-header-desc {
  font-size: 1.05rem;
  color: #d1dedb;
  max-width: 600px;
  margin: 0 auto;
}

/* Rooms Catalog Layout */
.rooms-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  margin-bottom: 80px;
}

/* Filter Sidebar */
.filter-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 100px;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.filter-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-title svg {
  width: 18px;
  height: 18px;
}

.filter-reset {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
}

.filter-group {
  margin-bottom: 22px;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
  display: block;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  cursor: pointer;
}

.filter-checkbox input {
  accent-color: var(--color-primary);
  width: 16px;
  height: 16px;
}

.filter-checkbox:hover {
  color: var(--color-primary);
}

.filter-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

/* Room Detail Page */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 20px;
  margin-bottom: 24px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 6px;
  max-width: 100%;
}

.breadcrumb::-webkit-scrollbar {
  display: none;
}

.breadcrumb a,
.breadcrumb span {
  flex-shrink: 0;
  white-space: nowrap;
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb-separator {
  color: var(--color-text-light);
  user-select: none;
}

.room-detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  margin-bottom: 80px;
  min-width: 0;
  max-width: 100%;
}

.room-detail-main {
  min-width: 0;
  max-width: 100%;
}

/* Gallery Slider */
.room-gallery {
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.room-gallery-main {
  position: relative;
  height: 480px;
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  background-color: #1e293b;
  user-select: none;
  touch-action: pan-y;
}

.room-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 250ms ease, transform 300ms ease;
  pointer-events: none;
}

.room-gallery-main img.fade-in {
  animation: galleryFadeIn 300ms ease forwards;
}

@keyframes galleryFadeIn {
  from { opacity: 0.6; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

.gallery-counter-badge {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background-color: rgba(14, 36, 32, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-fast);
  z-index: 10;
}

.gallery-nav-btn:hover {
  background-color: #ffffff;
  color: var(--color-accent);
  transform: translateY(-50%) scale(1.08);
}

.gallery-nav-btn.prev {
  left: 20px;
}

.gallery-nav-btn.next {
  right: 20px;
}

.gallery-nav-btn svg {
  width: 22px;
  height: 22px;
}

/* Thumbnail Slider */
.gallery-thumbs-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.gallery-thumbs-slider {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

.gallery-thumbs-slider::-webkit-scrollbar {
  display: none;
}

.gallery-thumb-item {
  width: 110px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  opacity: 0.65;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  background-color: #e2e8f0;
}

.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb-item:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

.gallery-thumb-item.active {
  border-color: var(--color-accent);
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.thumb-scroll-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.thumb-scroll-btn:hover {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.thumb-scroll-btn svg {
  width: 18px;
  height: 18px;
}

/* Detail Content */
.detail-header {
  margin-bottom: 28px;
}

.detail-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.detail-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 16px;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Key Specs Row */
.detail-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spec-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spec-icon svg {
  width: 20px;
  height: 20px;
}

.spec-text {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.spec-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

/* Section inside detail */
.detail-section {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.detail-section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-section-title svg {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
}

.detail-desc-text {
  font-size: 1rem;
  line-height: 1.8;
  color: #334155;
}

/* Amenities Grid */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 8px 12px;
  background-color: var(--color-bg);
  border-radius: var(--radius-sm);
}

.amenity-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* Sticky Booking Box */
.booking-box-sticky {
  position: sticky;
  top: 100px;
  background-color: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
}

.booking-box-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.booking-price-amount {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-terracotta);
}

.booking-price-period {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.booking-summary-calc {
  background-color: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 20px;
  margin-bottom: 24px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.calc-row.calc-total {
  border-top: 1px dashed var(--color-border);
  padding-top: 10px;
  margin-top: 10px;
  margin-bottom: 0;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-primary);
}

/* ==========================================================
   Comprehensive Responsive Grid System (PC, iPad, Mobile)
   ========================================================== */

/* Tablet & iPad Landscape (<= 1024px) */
@media (max-width: 1024px) {
  .room-gallery-main {
    height: 400px;
  }
  .rooms-grid-catalog {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet & iPad Portrait (<= 992px) */
@media (max-width: 992px) {
  .rooms-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .filter-card {
    position: static;
  }
  .room-detail-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .booking-box-sticky {
    position: static;
  }
  .detail-specs {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Mobile & Small Tablets (<= 768px) */
@media (max-width: 768px) {
  .rooms-catalog-header {
    margin-bottom: 24px;
  }
  .rooms-catalog-title {
    font-size: 1.75rem;
  }
  .rooms-grid-catalog {
    grid-template-columns: 1fr;
  }
  .room-gallery-main {
    height: 320px;
  }
  .detail-specs {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Standard Mobile (<= 640px) */
@media (max-width: 640px) {
  .breadcrumb {
    margin-top: 14px;
    margin-bottom: 18px;
    padding-bottom: 6px;
  }
  .room-detail-grid {
    gap: 24px;
    margin-bottom: 40px;
  }
  .room-gallery {
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
  }
  .room-gallery-main {
    height: 260px;
    border-radius: var(--radius-lg);
  }
  .gallery-nav-btn {
    width: 38px;
    height: 38px;
  }
  .gallery-nav-btn.prev {
    left: 10px;
  }
  .gallery-nav-btn.next {
    right: 10px;
  }
  .gallery-nav-btn svg {
    width: 18px;
    height: 18px;
  }
  .gallery-counter-badge {
    bottom: 12px;
    right: 12px;
    font-size: 0.75rem;
    padding: 4px 10px;
  }
  .thumb-scroll-btn {
    display: none; /* Hide desktop arrow buttons on mobile in favor of native touch swipe */
  }
  .gallery-thumbs-wrapper {
    width: 100%;
    gap: 0;
  }
  .gallery-thumbs-slider {
    gap: 10px;
    padding: 4px 2px;
    width: 100%;
  }
  .gallery-thumb-item {
    width: 86px;
    height: 62px;
    border-width: 2px;
    border-radius: var(--radius-sm);
  }
  .detail-header {
    margin-bottom: 20px;
  }
  .detail-badge-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .detail-title {
    font-size: 1.55rem;
    line-height: 1.25;
  }
  .detail-specs {
    grid-template-columns: 1fr 1fr;
    padding: 14px;
    gap: 12px;
  }
  .spec-icon {
    width: 38px;
    height: 38px;
  }
  .spec-icon svg {
    width: 18px;
    height: 18px;
  }
  .spec-label {
    font-size: 0.72rem;
  }
  .spec-val {
    font-size: 0.88rem;
  }
  .amenities-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .booking-price-amount {
    font-size: 1.7rem;
  }
}

/* Extra Small Mobile (<= 380px) */
@media (max-width: 380px) {
  .room-gallery-main {
    height: 220px;
  }
  .gallery-thumb-item {
    width: 70px;
    height: 50px;
  }
  .detail-title {
    font-size: 1.4rem;
  }
}

