/* /css/layout.css */

/* ────────── 공통 layout CSS ────────── */
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, "NotoSansKRVar", "Noto Sans KR", sans-serif;
  font-weight: 400;
  letter-spacing: -0.2px;
  margin: 0;
  padding: 0;
  width: 100%;
  /*height: 100%;*/
  
  /* 모바일 UX 개선 */
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  overscroll-behavior: auto;
  touch-action: manipulation;
  box-sizing: border-box;

  overflow-x: hidden !important;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* 슬라이딩 메인 화면 */
.page-header,
.product-info-header,
.main-content.page-slide {
  animation: slideIn 0.4s ease-out;
  transition: background-color 0.2s ease;
}
.page-slide {
  animation: slideIn 0.4s ease-out;
  transition: background-color 0.2s ease;
}
@keyframes slideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

/* ================================
   Layout
   ================================ */

/* ────────── 공통 헤더 ────────── */
.page-header {
  position: sticky;
  top: 0;
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background-color: #fff;

  /* 🔥 background 제거 완료
     background-color: var(--chat-header-bg-color) !important; 은 chat.css에서 처리 */
  
  transition: transform 0.3s ease;
  transition: all 0.25s ea;
}

/* ────────── 3등분 구조 ────────── */
.page-header .header-left,
.page-header .header-right {
  flex: 1;
  display: flex;
}
.page-header .header-center {
  flex: 1 1 auto;
  justify-content: center;
  text-align: center;
}
.page-header .header-right {
  justify-content: flex-end;
}

/* ────────── 타이틀/아이콘 ────────── */
.page-header .header-left span,
.page-header .header-left i {
  font-size: 1.4rem;
}
.page-header .header-left span {
  color: #000;
}
.page-header .header-left .icon-large {
  font-size: 1.4rem;
  font-weight: 900 !important;
}
.page-header .header-right .icon-large {
  font-size: 1.4rem;
  line-height: 1;
  text-shadow: 0 0 0.5px #000;
}

.page-header .page-title,
.page-header span,
.page-header a,
.page-header button {
  line-height: 1.2;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}

/* ────────── 푸터 ────────── */
footer {
  flex: 0 0 auto;
  width: 100%;
}

/* ────────── 기본 유틸리티 ────────── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* ────────── 공통 헤더 스크롤 숨김 효과 ────────── */
.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  transition: transform 0.4s ease;
  will-change: transform;
}

/* 페이지 여백 확보 */
body {
  padding-top: 56px;
}
