/* ========================================
   Salon de Eclat - Full Viewport Layout
   ======================================== */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --gold: #C5A55A;
  --gold-light: #d4ba7a;
  --dark: #2D2D2D;
  --ivory: #FAF6F0;
  --rose: #B76E79;
  --text: #333333;
  --white: #FFFFFF;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
  --radius: 6px;
  --radius-lg: 10px;
  --transition: 0.3s ease;
  --header-h: 50px;
  --hero-h: 25vh;
  --bar-h: 60px;
}

html {
  font-size: 16px;
  height: 100vh;
  overflow: hidden;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  color: var(--text);
  background-color: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border: none;
  border-radius: 50px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--white);
  box-shadow: 0 3px 12px rgba(197, 165, 90, 0.35);
}

.btn--gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(197, 165, 90, 0.5);
}

/* ==========================================
   HEADER (50px fixed)
   ========================================== */
.header {
  height: var(--header-h);
  flex-shrink: 0;
  background: rgba(45, 45, 45, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
}

.header__logo {
  display: flex;
  flex-direction: column;
}

.header__logo-main {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.header__logo-sub {
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.15em;
}

.header__tel {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
}

.header__tel svg {
  stroke: var(--gold);
}

.header__tel-number {
  letter-spacing: 0.05em;
}

/* ==========================================
   HERO (25vh)
   ========================================== */
.hero {
  position: relative;
  width: 100%;
  height: var(--hero-h);
  flex-shrink: 0;
  overflow: hidden;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(45, 45, 45, 0.35) 0%,
    rgba(45, 45, 45, 0.6) 100%
  );
}

.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
}

.hero__catch {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.15em;
  margin-bottom: 6px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.hero__sub {
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.1em;
}

/* ==========================================
   AVAILABILITY BAR (60px fixed)
   ========================================== */
.availability-bar {
  height: var(--bar-h);
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex;
  align-items: center;
}

.availability-bar__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  text-align: center;
}

.availability-bar__main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.availability-bar__icon {
  font-size: 1.1rem;
}

.availability-bar__date {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.03em;
}

.availability-bar__note {
  font-size: 0.65rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 1px;
  line-height: 1.3;
}

/* ==========================================
   MAIN CONTENT (remaining height)
   ========================================== */
.main-content {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* ---------- Chat Column (30%) ---------- */
.chat-column {
  width: 30%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e8e2d8;
  min-height: 0;
}

.chat-toggle {
  display: none;
}

.chat-window {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--white);
}

.chat-window__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--dark), #3a3a3a);
}

.chat-window__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.chat-window__messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

/* Chat messages */
.chat-msg {
  max-width: 90%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.6;
  animation: chatFadeIn 0.3s ease;
}

@keyframes chatFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg--ai {
  align-self: flex-start;
  background: var(--ivory);
  color: var(--text);
  border-bottom-left-radius: 2px;
}

.chat-msg--user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--white);
  border-bottom-right-radius: 2px;
}

.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  animation: chatFadeIn 0.3s ease;
}

.chat-option-btn {
  padding: 7px 14px;
  border: 1.5px solid var(--gold);
  border-radius: 20px;
  background: var(--white);
  color: var(--gold);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.chat-option-btn:hover {
  background: var(--gold);
  color: var(--white);
}

/* ---------- Treatment Column (70%) ---------- */
.treatment-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* Tab navigation */
.tab-nav {
  flex-shrink: 0;
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e8e2d8;
  background: var(--white);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-nav__btn {
  flex-shrink: 0;
  padding: 10px 18px;
  border: none;
  background: none;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #999;
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
  white-space: nowrap;
}

.tab-nav__btn::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.tab-nav__btn:hover {
  color: var(--dark);
}

.tab-nav__btn.is-active {
  color: var(--dark);
  font-weight: 700;
}

.tab-nav__btn.is-active::after {
  transform: scaleX(1);
}

/* Tab panels */
.tab-panel {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.tab-panel.is-active {
  display: flex;
  flex-direction: column;
}

.tab-panel__inner {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* Panel left: Before/After */
.panel-left {
  width: 45%;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ba-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ba-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ba-card__img {
  width: 100%;
  height: 0;
  padding-bottom: 35%;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.ba-card__img--before {
  background: linear-gradient(135deg, #c9b9a5, #b8a892);
}

.ba-card__img--after {
  background: linear-gradient(135deg, #faf3e8, #f0e5d5);
}

.ba-card__label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 14px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.ba-card__arrow {
  font-size: 0.7rem;
  color: var(--gold);
  line-height: 1;
}

.ba-review {
  background: var(--white);
  border-radius: var(--radius);
  padding: 10px 12px;
  box-shadow: var(--shadow);
}

.ba-review__comment {
  font-size: 0.75rem;
  font-weight: 300;
  color: #555;
  line-height: 1.7;
  margin-bottom: 4px;
}

.ba-review__meta {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--rose);
}

/* Panel right: Menu & Reserve */
.panel-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px;
  min-height: 0;
  overflow-y: auto;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 2px solid #e8e2d8;
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.menu-item:hover {
  border-color: var(--gold-light);
}

.menu-item input[type="radio"] {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.menu-item:has(input:checked) {
  border-color: var(--gold);
  background: linear-gradient(135deg, #fdfbf6, var(--ivory));
  box-shadow: 0 0 0 1px var(--gold);
}

.menu-item__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-item__name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark);
}

.menu-item__detail {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
}

/* Reserve button */
.reserve-btn {
  flex-shrink: 0;
  margin-top: 10px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 50px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  background: #ccc;
  cursor: not-allowed;
  transition: all var(--transition);
  letter-spacing: 0.05em;
}

.reserve-btn.is-active {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 3px 12px rgba(197, 165, 90, 0.35);
  cursor: pointer;
}

.reserve-btn.is-active:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(197, 165, 90, 0.5);
}

/* ==========================================
   RESERVATION MODAL
   ========================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  padding: 4px;
  transition: color var(--transition);
}

.modal__close:hover {
  color: var(--dark);
}

/* Selected menu display */
.modal__selected-menu {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

/* Date & Time selection */
.modal__dates {
  margin-bottom: 16px;
}

.modal__dates-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 8px;
}

.modal__date-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.modal__date-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--gold);
  border-radius: 20px;
  background: var(--white);
  color: var(--gold);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.modal__date-btn:hover {
  background: var(--gold);
  color: var(--white);
}

.modal__date-btn.is-active {
  background: var(--gold);
  color: var(--white);
}

.modal__time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal__time-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--gold);
  border-radius: 20px;
  background: var(--white);
  color: var(--gold);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.modal__time-btn:hover {
  background: var(--gold);
  color: var(--white);
}

.modal__time-btn.is-active {
  background: var(--gold);
  color: var(--white);
}

.modal__time-btn--booked {
  border-color: #ddd;
  color: #bbb;
  cursor: not-allowed;
  text-decoration: line-through;
}

.modal__time-btn--booked:hover {
  background: var(--white);
  color: #bbb;
}

.modal__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
  text-align: center;
}

.modal__course {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gold);
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.modal__selected-time {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
  text-align: center;
  margin-bottom: 16px;
  padding: 8px;
  background: var(--ivory);
  border-radius: var(--radius);
}

/* Calendar */
.calendar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar__day {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar__date {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dark);
}

.calendar__slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.calendar__slot {
  padding: 8px 16px;
  border: 1.5px solid var(--gold);
  border-radius: 20px;
  background: var(--white);
  color: var(--gold);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.calendar__slot:hover {
  background: var(--gold);
  color: var(--white);
}

.calendar__slot.is-selected {
  background: var(--gold);
  color: var(--white);
}

.calendar__slot--booked {
  border-color: #ddd;
  color: #bbb;
  cursor: not-allowed;
  text-decoration: line-through;
}

.calendar__slot--booked:hover {
  background: var(--white);
  color: #bbb;
}

/* Form */
.modal__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form__group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--dark);
}

.form__required {
  font-size: 0.65rem;
  color: var(--rose);
  font-weight: 700;
  margin-left: 4px;
}

.form__group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--ivory);
  transition: border-color var(--transition);
}

.form__group input:focus {
  outline: none;
  border-color: var(--gold);
}

.form__submit {
  width: 100%;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 700;
}

/* Complete */
.modal-complete {
  text-align: center;
  padding: 20px 0;
}

.modal-complete__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: var(--gold);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
}

.modal-complete__text {
  font-size: 0.82rem;
  color: #666;
  margin: 12px 0 20px;
  line-height: 1.7;
}

.modal-complete__btn {
  padding: 12px 40px;
}

/* ==========================================
   MOBILE BAR
   ========================================== */
.mobile-bar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 900;
  background: var(--white);
  border-top: 1px solid #e0d6c8;
  padding: 0;
  gap: 0;
}

.mobile-bar__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.mobile-bar__btn--line {
  background: var(--white);
  color: var(--text);
}

.mobile-bar__btn--tel {
  background: var(--dark);
  color: var(--white);
}

/* ==========================================
   RESPONSIVE - 768px (Mobile)
   ========================================== */
@media (max-width: 768px) {
  html {
    height: auto;
    overflow: auto;
  }

  body {
    height: auto;
    overflow: auto;
  }

  .header__tel-number {
    display: none;
  }

  .hero {
    height: 30vh;
  }

  .main-content {
    flex-direction: column;
    overflow: visible;
  }

  /* Chat column becomes collapsible */
  .chat-column {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e8e2d8;
  }

  .chat-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    border: none;
    background: linear-gradient(135deg, var(--dark), #3a3a3a);
    color: var(--gold);
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
  }

  .chat-toggle__arrow {
    transition: transform var(--transition);
    stroke: var(--gold);
  }

  .chat-column.is-open .chat-toggle__arrow {
    transform: rotate(180deg);
  }

  .chat-window {
    display: none;
  }

  .chat-column.is-open .chat-window {
    display: flex;
    max-height: 300px;
  }

  .chat-window__messages {
    max-height: 240px;
  }

  /* Treatment column */
  .treatment-column {
    overflow: visible;
  }

  .tab-panel.is-active {
    display: block;
  }

  .tab-panel__inner {
    flex-direction: column;
  }

  .panel-left {
    width: 100%;
    overflow: visible;
  }

  .panel-right {
    overflow: visible;
  }

  .ba-card__img {
    padding-bottom: 28%;
  }

  .tab-nav__btn {
    padding: 8px 12px;
    font-size: 0.73rem;
  }

  /* mobile-bar is always visible */

  .reserve-btn {
    margin-bottom: 60px;
  }
}

/* ==========================================
   RESPONSIVE - 480px
   ========================================== */
@media (max-width: 480px) {
  .hero {
    height: 22vh;
  }

  .hero__catch {
    letter-spacing: 0.08em;
  }

  .availability-bar__date {
    font-size: 0.85rem;
  }

  .availability-bar__note {
    font-size: 0.58rem;
  }

  .tab-nav__btn {
    padding: 8px 8px;
    font-size: 0.68rem;
  }

  .menu-item {
    padding: 10px 12px;
  }

  .menu-item__name {
    font-size: 0.78rem;
  }

  .menu-item__detail {
    font-size: 0.82rem;
  }

  .modal {
    padding: 24px 18px;
  }
}
