/* ==========================================================================
   ROOMS - Single Room Page
   Casale Isidoro
   ========================================================================== */

/* --------------------------------------------------------------------------
   Room Detail Layout
   -------------------------------------------------------------------------- */

.room-detail {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.room-detail__header {
  text-align: center;
  margin-bottom: var(--space-xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Room detail labels use shared .section__label from main.css */

.room-detail__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h1);
  font-weight: var(--fw-light);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.room-detail__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: var(--fw-light);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   Room Meta Info (Guests, Size, Beds)
   -------------------------------------------------------------------------- */

.room-detail__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  margin-bottom: var(--space-xl);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.room-detail__meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

.room-detail__meta-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.room-detail__meta-value {
  font-weight: var(--fw-regular);
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Room Gallery (Image Grid / Carousel)
   -------------------------------------------------------------------------- */

.room-detail__gallery {
  margin-bottom: var(--space-xl);
}

.room-detail__gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xs);
  border-radius: var(--radius-md);
  overflow: hidden;
}

@media (min-width: 768px) {
  .room-detail__gallery-grid {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--space-xs);
    max-height: 500px;
  }

  .room-detail__gallery-grid .gallery__item:first-child {
    grid-row: 1 / 3;
  }
}

@media (min-width: 1024px) {
  .room-detail__gallery-grid {
    max-height: 550px;
  }
}

/* --------------------------------------------------------------------------
   Room Description
   -------------------------------------------------------------------------- */

.room-detail__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.room-detail__description {
  /* text content */
}

.room-detail__description p {
  font-size: 1rem;
  font-weight: var(--fw-light);
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 1.2em;
}

.room-detail__sidebar {
  /* sidebar with booking/info widget */
}

@media (min-width: 1024px) {
  .room-detail__body {
    grid-template-columns: 1.5fr 1fr;
  }
}

/* --------------------------------------------------------------------------
   Room Sidebar / Booking Widget
   -------------------------------------------------------------------------- */

.room-widget {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  position: sticky;
  top: calc(var(--header-height) + var(--space-md));
}

.room-widget__price {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: var(--fw-regular);
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.room-widget__price-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: var(--fw-light);
  color: var(--text-muted);
}

.room-widget__divider {
  width: 100%;
  height: 1px;
  background-color: var(--border-light);
  border: none;
  margin: var(--space-md) 0;
}

.room-widget__details {
  list-style: none;
  margin-bottom: var(--space-md);
}

.room-widget__detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6em 0;
  font-size: var(--fs-small);
  border-bottom: 1px solid var(--border-light);
}

.room-widget__detail:last-child {
  border-bottom: none;
}

.room-widget__detail-label {
  color: var(--text-muted);
  font-weight: var(--fw-light);
}

.room-widget__detail-value {
  color: var(--text-primary);
  font-weight: var(--fw-regular);
}

.room-widget__cta {
  width: 100%;
  margin-top: var(--space-sm);
}

.room-widget__note {
  font-size: 0.75rem;
  font-weight: var(--fw-light);
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-sm);
}

/* --------------------------------------------------------------------------
   Amenities Icon Grid
   -------------------------------------------------------------------------- */

.amenities {
  margin-bottom: var(--space-xl);
}

.amenities__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.amenities__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.amenities__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75em 0;
}

.amenities__icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex-shrink: 0;
  opacity: 0.8;
}

.amenities__label {
  font-size: var(--fs-small);
  font-weight: var(--fw-light);
  color: var(--text-secondary);
}

/* Amenities Category */
.amenities__category {
  margin-bottom: var(--space-lg);
}

.amenities__category-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-light);
}

@media (min-width: 768px) {
  .amenities__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .amenities__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Amenity Cards (Room Page)
   -------------------------------------------------------------------------- */

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.amenity-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base);
}

.amenity-card:hover {
  border-color: var(--accent);
}

.amenity-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--accent);
}

.amenity-card__icon svg,
.amenity-card__icon i {
  width: 24px;
  height: 24px;
}

.amenity-card__label {
  font-size: 0.8rem;
  font-weight: var(--fw-regular);
  color: var(--text-secondary);
  line-height: 1.4;
}

@media (min-width: 768px) {
  .amenities-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .amenities-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Other Rooms Section
   -------------------------------------------------------------------------- */

.other-rooms {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
  background-color: var(--bg-secondary);
}

.other-rooms__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.other-rooms__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
}

.other-rooms__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .other-rooms__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .other-rooms__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Room Showcase — Split Layout (Info Left + Gallery Right)
   ========================================================================== */

.room-showcase__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* --- Room Header (full-width, above the split grid) --- */

.room-showcase__header {
  margin-bottom: var(--space-lg);
}

.room-showcase__header .section__label {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: var(--fw-regular);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
}

.room-showcase__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h1);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.room-showcase__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: var(--fw-light);
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.room-showcase__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
}

/* --- Info Column --- */

.room-showcase__info {
  order: 1;
}

.room-showcase__meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

.room-showcase__meta-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.room-showcase__description p {
  font-size: 1.1rem;
  font-weight: var(--fw-light);
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 1em;
}

.room-showcase__highlights {
  list-style: none;
  margin: var(--space-md) 0 var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.room-showcase__highlight {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5em 0;
  font-size: 1rem;
  font-weight: var(--fw-light);
  color: var(--text-secondary);
}

.room-showcase__highlight-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.room-showcase__cta {
  margin-top: var(--space-md);
}

/* --- Gallery Column — CSS Grid (no JS dependencies) --- */

.room-showcase__gallery {
  order: 2;
}

/* Gallery Grid: 1 large hero + 4 thumbnails */
.room-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 6px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* First image spans full width */
.room-gallery__item:first-child {
  grid-column: 1 / -1;
}

.room-gallery__item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  margin: 0;
}

.room-gallery__item--hidden {
  display: none;
}

.room-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-base);
}

/* Hero image aspect ratio */
.room-gallery__item:first-child .room-gallery__img {
  aspect-ratio: 3 / 2;
}

/* Thumbnail aspect ratio */
.room-gallery__item:not(:first-child) .room-gallery__img {
  aspect-ratio: 4 / 3;
}

.room-gallery__item:hover .room-gallery__img {
  transform: scale(1.03);
}

/* "+N more" badge on last visible thumbnail */
.room-gallery__more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.05em;
  pointer-events: none;
}

/* --- Responsive --- */

@media (min-width: 768px) {
  .room-showcase__grid {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-2xl);
  }

  .room-showcase__info {
    position: sticky;
    top: calc(var(--header-height) + var(--space-lg));
  }

  /* Hero image taller on desktop */
  .room-gallery__item:first-child .room-gallery__img {
    aspect-ratio: 16 / 10;
  }
}
