/* 예약 — 펜션·아고다식 검색바 + 캘린더 (UI 데모) */

.summary-fields {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.25rem;
}

.summary-fields .field input {
  background: var(--paper);
}

.book-banner {
  margin-top: var(--header-offset);
  padding: 0.5rem clamp(1.25rem, 5vw, 4.5rem);
  background: transparent;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: center;
  letter-spacing: 0.02em;
}

.book-hero {
  position: relative;
  min-height: 42svh;
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
}

.book-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 88% 32%;
  filter: saturate(0.9) contrast(1.05);
}

.book-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(28, 20, 16, 0.35) 0%, rgba(28, 20, 16, 0.15) 40%, rgba(28, 20, 16, 0.82) 100%),
    linear-gradient(90deg, rgba(28, 20, 16, 0.45), transparent 60%);
}

.book-hero__content {
  position: relative;
  z-index: 1;
  padding: 0 clamp(1.25rem, 5vw, 4.5rem) 3.25rem;
  max-width: 40rem;
}

.book-hero__content .breadcrumb {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  opacity: 0.78;
}

.book-hero__content .breadcrumb a:hover {
  text-decoration: underline;
}

.book-hero__content .eyebrow {
  color: #dfc39a;
  margin: 0;
}

.book-hero__content h1 {
  margin: 0.4rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: 0.06em;
  line-height: 1.15;
}

.book-hero__content p.lead {
  margin: 0.9rem 0 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: rgba(255, 248, 240, 0.82);
  max-width: 22rem;
}

/* Sticky search bar */
.book-search {
  position: sticky;
  top: var(--header-offset);
  z-index: 40;
  margin: -1.75rem clamp(1.25rem, 5vw, 4.5rem) 0;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(42, 33, 28, 0.08);
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.9fr 1.2fr auto;
  gap: 0.75rem;
  align-items: end;
}

@media (max-width: 960px) {
  .book-search {
    grid-template-columns: 1fr 1fr;
    margin-inline: 1rem;
  }
}

@media (max-width: 560px) {
  .book-search {
    grid-template-columns: 1fr;
  }
}

.book-search__field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--bronze);
  text-transform: uppercase;
}

.book-search__field button.trigger,
.book-search__field .value {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.book-search__field button.trigger:hover,
.book-search__field button.trigger:focus-visible {
  border-color: var(--wood);
  outline: none;
}

.book-search__field .hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--mute, var(--ink-soft));
}

.book-search__cta {
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  background: var(--wood-deep);
  color: #fff;
  border: 0;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s;
}

.book-search__cta:hover {
  background: var(--wood);
}

/* Layout */
.book-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 5vw, 4.5rem) clamp(4rem, 8vw, 6rem);
  align-items: start;
}

@media (max-width: 980px) {
  .book-layout {
    grid-template-columns: 1fr;
  }
}

.book-panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}

.book-panel + .book-panel {
  margin-top: 1rem;
}

.book-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.book-panel__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.book-panel__head p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* Calendar */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cal-nav h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.cal-nav button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
}

.cal-nav button:hover:not(:disabled) {
  border-color: var(--wood);
  color: var(--wood-deep);
}

.cal-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-dow {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 0.4rem 0 0.65rem;
}

.cal-dow.is-sun {
  color: var(--cinnabar);
}

.cal-dow.is-sat {
  color: #3d5c7a;
}

.cal-day {
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}

.cal-day:hover:not(:disabled):not(.is-empty) {
  background: rgba(166, 132, 74, 0.12);
}

.cal-day.is-empty {
  cursor: default;
  visibility: hidden;
  pointer-events: none;
}

.cal-day:disabled,
.cal-day.is-closed,
.cal-day.is-sold {
  color: rgba(42, 33, 28, 0.28);
  cursor: not-allowed;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.cal-day.is-today::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bronze);
}

.cal-day.is-in-range {
  background: rgba(166, 132, 74, 0.16);
  border-radius: 0;
}

.cal-day.is-start,
.cal-day.is-end {
  background: var(--wood-deep);
  color: #fff;
  border-radius: 2px;
  animation: pulseSoft 0.45s ease;
}

.cal-day.is-just-picked {
  animation: flashSelect 0.55s ease;
}

.cal-day.is-start.is-in-range {
  border-radius: 2px 0 0 2px;
}

.cal-day.is-end.is-in-range {
  border-radius: 0 2px 2px 0;
}

.book-summary.is-tick {
  animation: pulseSoft 0.35s ease;
}

.summary-total strong.is-tick {
  animation: pulseSoft 0.4s ease;
}

.book-search__field button.trigger:focus-visible,
.cal-day:focus-visible,
.room-card:focus-visible,
.stepper button:focus-visible {
  outline: 2px solid var(--focus, #a6844a);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .cal-day.is-start,
  .cal-day.is-end,
  .cal-day.is-just-picked,
  .room-card.is-selected,
  .book-summary.is-tick,
  .summary-total strong.is-tick {
    animation: none !important;
  }
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cal-legend i {
  width: 12px;
  height: 12px;
  display: inline-block;
  border: 1px solid var(--line);
}

.cal-legend .lg-avail {
  background: #fff;
}

.cal-legend .lg-range {
  background: rgba(166, 132, 74, 0.28);
}

.cal-legend .lg-pick {
  background: var(--wood-deep);
}

.cal-legend .lg-off {
  background: rgba(42, 33, 28, 0.08);
}

/* Room cards */
.room-list {
  display: grid;
  gap: 0.85rem;
}

.room-card {
  display: grid;
  grid-template-columns: 132px 1fr auto;
  gap: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: inherit;
  width: 100%;
  font: inherit;
}

.room-card:hover {
  border-color: rgba(92, 70, 56, 0.35);
}

.room-card.is-selected {
  border-color: var(--wood-deep);
  box-shadow: inset 0 0 0 1px var(--wood-deep);
  background: #fff;
  animation: pulseSoft 0.4s ease;
}

.room-card img {
  width: 100%;
  height: 96px;
  object-fit: cover;
}

.room-card__body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.room-card__body p {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.room-card__meta {
  margin-top: 0.55rem;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--bronze);
  font-weight: 700;
}

.room-card__price {
  text-align: right;
  align-self: center;
  white-space: nowrap;
}

.room-card__price strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--wood-deep);
}

.room-card__price span {
  font-size: 0.74rem;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .room-card {
    grid-template-columns: 96px 1fr;
  }

  .room-card__price {
    grid-column: 1 / -1;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
  }
}

/* Guests stepper */
.guest-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.guest-step:last-child {
  border-bottom: 0;
}

.guest-step p {
  margin: 0;
  font-weight: 700;
  font-size: 0.92rem;
}

.guest-step span {
  display: block;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.stepper button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.stepper button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stepper b {
  min-width: 1.25rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Summary */
.book-summary {
  position: sticky;
  top: calc(var(--header-offset) + 5.5rem);
}

.book-summary h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.summary-rows {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

.summary-rows dt {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--bronze);
  font-weight: 700;
  text-transform: uppercase;
}

.summary-rows dd {
  margin: 0.2rem 0 0;
  font-size: 0.98rem;
  font-weight: 600;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 1.25rem 0 0;
  padding-top: 0.25rem;
}

.summary-total span {
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.summary-total strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--wood-deep);
}

.summary-note {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.book-summary .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.book-summary .btn-outline {
  margin-top: 0.65rem;
}

/* Guest popover */
.guest-pop {
  display: none;
  position: absolute;
  z-index: 45;
  margin-top: 0.35rem;
  width: min(320px, calc(100vw - 2rem));
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(42, 33, 28, 0.12);
}

.guest-pop.is-open {
  display: block;
}

.book-search__field {
  position: relative;
}

/* Modal */
.book-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 1.25rem;
  background: rgba(28, 20, 16, 0.55);
}

.book-modal.is-open {
  display: grid;
}

.book-modal__card {
  width: min(420px, 100%);
  background: #fff;
  padding: 2rem 1.75rem;
  text-align: center;
  border: 1px solid var(--line);
}

.book-modal__card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.book-modal__card p {
  margin: 0.85rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.book-modal__card .btn {
  margin-top: 1.5rem;
  min-width: 8rem;
}

/* Compact embed on facility pages */
.book-strip {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(42, 33, 28, 0.06);
}

@media (max-width: 720px) {
  .book-strip {
    grid-template-columns: 1fr;
  }
}

.book-strip h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.book-strip p {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.book-strip .btn {
  white-space: nowrap;
}
