/* =====================================================
   HONG SEOUL 색 (무드보드 5가지 색 + 밝은 바탕)
   여기 숫자만 바꾸면 사이트 전체 색이 같이 바뀌어요
   ===================================================== */
:root {
  --charcoal: #252525;   /* 로고 · 글자 · 메인 */
  --ivory: #F1EDE5;      /* 웜 아이보리: 하단 · 띠 */
  --taupe: #9A8D7D;      /* 시즌 포인트 */
  --stone: #A5A29C;      /* 보조 · 테두리 */
  --burgundy: #542D32;   /* 포인트 (하트 · 공지 · 강조) */

  --bg: #FAF8F4;         /* 페이지 바탕: 아이보리보다 한 톤 밝게 */
  --paper: #FFFDF9;      /* 입력칸 */
  --sand: #ECE6DC;       /* 사진 뜨기 전 칸 · 눌린 버튼 */
  --line: #E3DCD1;       /* 얇은 선 */
  --muted: #6E665D;      /* 보조 글자 (읽기 쉬운 진한 토프) */
}

/* ===== 기본 ===== */
body {
  margin: 0;
  background: var(--bg);
  font-family: 'Hanken Grotesk', 'Noto Sans KR', sans-serif;
  color: var(--charcoal);
  -webkit-text-size-adjust: 100%;
}

/* 페이지를 세로로 쌓고, 내용이 짧아도 하단 정보는 화면 맨 아래에 */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body > * {
  width: 100%;
  box-sizing: border-box;
}

/* hidden 속성이 붙은 건 항상 숨겨요 (카테고리 필터에서 사용) */
[hidden] {
  display: none !important;
}

/* 키보드로 이동할 때 지금 위치가 보이게 */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--charcoal);
  outline-offset: 3px;
}

/* ===== 공지 띠 (맨 위 검은 줄) ===== */
.announcement {
  margin: 0;
  padding: 9px 16px;
  background: var(--burgundy);
  color: var(--ivory);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
}

.announcement:empty {
  display: none;
}

/* ===== 상단 메뉴: 왼쪽 상품 · 가운데 로고 · 오른쪽 계정 ===== */
.site-header {
  position: sticky;          /* 스크롤해도 메뉴가 위에 붙어 있어요 */
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "main logo right";
  align-items: center;
  gap: 0 24px;
  padding: 8px 24px;
  background: rgba(250, 248, 244, 0.94);
  border-bottom: 1px solid var(--line);
}

.logo {
  grid-area: logo;
  font-size: 22px;
  letter-spacing: 0.5em;
  padding-left: 0.5em;       /* 글자 간격 때문에 왼쪽으로 쏠리는 것 보정 */
  color: var(--charcoal);
  text-decoration: none;
}

.nav-main {
  grid-area: main;
  display: flex;
  gap: 28px;
}

.header-right {
  grid-area: right;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 28px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-main a,
.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 0;           /* 휴대폰에서 누르기 쉽게 */
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--charcoal);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.nav-main a.is-current,
.nav-item.is-current {
  background-position: 0 100%;    /* 지금 있는 메뉴 표시 (밑줄) */
  background-size: 100% 1px;
}

/* 컴퓨터에서는 글자, 휴대폰에서는 아이콘으로 보여요 */
.nav-icon {
  display: none;
}

.saved-count:not(:empty) {
  margin-left: -2px;
}

/* 언어 버튼 */
.lang-switch {
  display: flex;
  gap: 2px;
}

.lang-switch button {
  padding: 8px 6px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
}

.lang-switch button.is-active {
  color: var(--charcoal);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ===== 검색창 ===== */
.search-panel {
  grid-column: 1 / -1;
  padding: 4px 0 20px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
  border-bottom: 1px solid var(--charcoal);
}

.search-form:focus-within {
  box-shadow: 0 1px 0 var(--charcoal);
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 16px;
  color: var(--charcoal);
  -webkit-appearance: none;
  appearance: none;
}

.search-input:focus {
  outline: none;
}

.search-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--charcoal);
  cursor: pointer;
}

.search-results {
  max-width: 640px;
  margin: 0 auto;
}

.search-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  color: var(--charcoal);
  text-decoration: none;
}

.search-item img {
  flex: none;
  width: 48px;
  height: 60px;
  object-fit: cover;
  background: var(--sand);
}

.search-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-item-name {
  font-size: 14px;
}

.search-item-meta {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.search-all {
  display: inline-block;
  margin-top: 12px;
}

.search-empty {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* 홈페이지의 검색 결과 안내 줄 */
.search-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin: -8px 0 24px;
  font-size: 14px;
}

/* ===== 컬렉션 상품 목록 (collection.html) ===== */
.collection {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.collection-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  margin: 0;
}

.count {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 400;
}

/* 카테고리 필터 버튼 */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

.filter {
  padding: 12px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.filter.is-active {
  color: var(--charcoal);
  background-position: 0 100%;
  background-size: 100% 1px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 36px 20px;
}

.card {
  color: var(--charcoal);
}

/* 사진 틀: 사진들이 옆으로 한 줄로 서 있고, 한 장씩 넘겨요 */
.card-photo {
  position: relative;
  overflow: hidden;
  background: var(--sand);
}

.card-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.card-track::-webkit-scrollbar {
  display: none;
}

.card-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.card-slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* 좌우 화살표: 마우스를 올렸을 때만 보여요 */
.card-arrow {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 248, 244, 0.92);
  color: var(--charcoal);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card-prev {
  left: 8px;
}

.card-next {
  right: 8px;
}

.card-arrow:focus-visible {
  opacity: 1;
}

/* 몇 번째 사진인지 보여주는 점 */
.card-dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  transform: translateX(-50%);
  pointer-events: none;
}

.card-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(37, 37, 37, 0.25);
}

.card-dots span.is-active {
  background: var(--charcoal);
}

.card-info {
  display: block;
  color: var(--charcoal);
  text-decoration: none;
}

.card-name {
  margin: 12px 0 2px;
  font-size: 14px;
}

.card .code {
  margin: 0;
  font-size: 12px;
}

.code {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.05em;
}

/* ===== 상품 상세 페이지 (product.html) ===== */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 0;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  color: var(--muted);
}

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  gap: 56px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

/* 사진: 첫 장은 크게, 나머지는 2열 */
.gallery-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.gallery-item {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;           /* 누르면 크게 보여요 */
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--sand);
}

.gallery-item:first-child {
  grid-column: 1 / -1;
}

/* 사진이 2장뿐이면 나란히 */
.gallery-item:first-child:nth-last-child(2) {
  grid-column: auto;
}

.gallery-count {
  display: none;
}

/* 정보는 스크롤해도 옆에 붙어 있어요 */
.product-info {
  position: sticky;
  top: 96px;
}

.product-category {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

h1 {
  font-size: 26px;
  font-weight: 400;
  margin: 0 0 8px;
}

.details {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px 16px;
  margin: 20px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.details dt {
  color: var(--muted);
}

.details dd {
  margin: 0;
}

.button {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 28px;
  background: var(--charcoal);
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.05em;
  transition: background 0.2s ease;
}

.note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.not-found {
  display: block;
  padding: 80px 24px;
  text-align: center;
}

/* 이전 / 다음 상품 */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 64px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.pager-link {
  padding: 12px 0;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.pager-next {
  text-align: right;
}

/* ===== 마우스 효과 (마우스가 있는 기기에서만) ===== */
@media (hover: hover) {
  .nav-main a:hover,
  .nav-item:hover {
    background-position: 0 100%;
    background-size: 100% 1px;
  }

  .filter:hover,
  .crumbs a:hover,
  .pager-link:hover {
    color: var(--charcoal);
  }

  .button:hover {
    background: var(--burgundy);
  }

  .card-photo:hover .card-arrow {
    opacity: 1;
  }

  .card-info:hover .card-name {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

/* ===== 태블릿 이하 (폭 800px 이하): 상세 페이지를 한 줄로 ===== */
@media (max-width: 800px) {
  .product {
    display: block;
  }

  /* 사진은 옆으로 밀어서 넘겨요 */
  .gallery {
    position: relative;
    margin: 0 -24px;
  }

  .gallery-track {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .gallery-track::-webkit-scrollbar {
    display: none;
  }

  .gallery-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
  }

  .gallery-count {
    display: block;
    position: absolute;
    right: 16px;
    bottom: 12px;
    margin: 0;
    padding: 4px 10px;
    background: rgba(250, 248, 244, 0.92);
    font-size: 12px;
    letter-spacing: 0.05em;
  }

  .product-info {
    position: static;
    margin-top: 24px;
  }
}

/* ===== 휴대폰 화면 (폭 600px 이하) ===== */
@media (max-width: 600px) {
  .collection {
    padding: 24px 16px 48px;
  }

  /* 필터는 한 줄로 두고 옆으로 밀어서 봐요 */
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none;
  }

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

  .filter {
    flex: none;
  }

  /* 상품은 2열로 */
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 12px;
  }

  .card-name {
    font-size: 13px;
  }

  .crumbs {
    padding: 16px 16px 0;
  }

  .product {
    padding: 16px 16px 40px;
  }

  .gallery {
    margin: 0 -16px;
  }

  h1 {
    font-size: 22px;
  }

  .button {
    display: block;
    text-align: center;
  }

  .pager {
    padding: 20px 16px 48px;
  }
}

/* 터치 기기에서는 화살표 없이 손가락으로 넘겨요 */
@media (hover: none) {
  .card-arrow {
    display: none;
  }
}

/* 움직임 줄이기 설정을 켠 사람에게는 애니메이션 끄기 */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}


/* =====================================================
   추가 기능: 언어, 관심 상품, 상세 정보, 문의, 하단 정보
   ===================================================== */

/* 중국어일 때는 중국어 글꼴 */
html:lang(zh) body {
  font-family: 'Hanken Grotesk', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}

/* ===== 관심 상품 하트 (카드 오른쪽 위) ===== */
.card-save {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 248, 244, 0.88);
  color: var(--charcoal);
  cursor: pointer;
}

.card-save svg {
  fill: none;
}

.card-save[aria-pressed="true"] svg {
  fill: currentColor;
}

/* 글자만 있는 작은 버튼 (ID 복사, 목록 복사) */
.text-button {
  padding: 10px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--charcoal);
  font: inherit;
  font-size: 13px;
  color: var(--charcoal);
  cursor: pointer;
}

/* ===== 상세 페이지: 추가 정보 ===== */
.model-line {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.save-button {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 13px 20px;
  background: var(--paper);
  border: 1px solid var(--charcoal);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--charcoal);
  cursor: pointer;
  transition: background 0.2s ease;
}

.save-button[aria-pressed="true"] {
  background: var(--sand);
}

.inquiry,
.measure {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.info-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.inquiry-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.inquiry-label {
  color: var(--muted);
}

.inquiry .button {
  display: block;
  margin-top: 16px;
  text-align: center;
}

.table-scroll {
  overflow-x: auto;
}

.measure table {
  width: 100%;
  min-width: 300px;
  border-collapse: collapse;
  font-size: 13px;
  text-align: center;
}

.measure th,
.measure td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
}

.measure thead th {
  border-bottom-color: var(--charcoal);
  font-weight: 500;
}

.measure tbody th {
  text-align: left;
}

.measure-empty {
  margin: 0;
  font-size: 14px;
}

/* 같이 입은 상품 */
.related {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.related:empty {
  display: none;
}

.related .section-title {
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

/* ===== 관심 상품 페이지 ===== */
.saved-hint {
  margin: -8px 0 24px;
  font-size: 13px;
  color: var(--muted);
}

.empty {
  padding: 48px 0;
  text-align: center;
}

.empty p {
  margin: 0 0 20px;
  color: var(--muted);
}

/* ===== 하단 정보 ===== */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: auto;
  padding: 40px max(24px, calc((100% - 1200px) / 2 + 24px)) 32px;
  background: var(--ivory);
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.footer-logo {
  margin-bottom: 6px !important;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5em;
  color: var(--charcoal);
}

.footer-title {
  margin-bottom: 4px !important;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--charcoal);
}

.copyright {
  flex-basis: 100%;
  font-size: 12px;
}

@media (hover: hover) {
  .card-save:hover,
  .save-button:hover {
    background: var(--sand);
  }

  .text-button:hover,
  .site-footer a:hover {
    opacity: 0.7;
  }

  .lang-switch button:hover {
    color: var(--charcoal);
  }
}

@media (max-width: 600px) {
  .card-save {
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
  }

  .related {
    padding: 0 16px 40px;
  }

  .site-footer {
    padding: 32px 16px 28px;
  }
}


/* =====================================================
   계정 페이지 · 개인정보처리방침
   ===================================================== */
.account-page {
  max-width: 440px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.account-heading {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 400;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.field-label {
  color: var(--burgundy);
}

.field input {
  padding: 13px 14px;
  border: 1px solid var(--stone);
  border-radius: 0;
  background: var(--paper);
  font: inherit;
  font-size: 16px;            /* 16px 미만이면 아이폰이 화면을 확대해버려요 */
  color: var(--charcoal);
}

.field input:focus {
  outline: 2px solid var(--charcoal);
  outline-offset: -1px;
  border-color: var(--charcoal);
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--charcoal);
}

.policy-link {
  align-self: flex-start;
  margin-top: -6px;
  font-size: 12px;
  color: var(--muted);
}

.form-message {
  margin: 0;
  min-height: 1em;
  font-size: 13px;
  line-height: 1.5;
}

.form-message:empty {
  display: none;
}

.form-message.is-error {
  color: #a3261e;
}

.form-message.is-success {
  color: #1f6b3a;
}

.account-form .button,
.account-panel .button {
  display: block;
  margin-top: 4px;
  border: 0;
  font: inherit;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
}

.account-form .button:disabled {
  opacity: 0.5;
  cursor: default;
}

.account-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 8px;
}

.account-panel .details {
  grid-template-columns: 96px 1fr;
  margin: 0 0 12px;
}

.account-panel .note {
  margin: 0 0 20px;
}

.account-panel .account-links {
  margin-top: 32px;
}

.text-button.danger {
  color: #a3261e;
  border-bottom-color: #a3261e;
}

/* 개인정보처리방침 */
.policy {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--burgundy);
}

.policy h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 400;
  color: var(--charcoal);
}

.policy h2 {
  margin: 36px 0 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--charcoal);
}

.policy ul {
  margin: 0;
  padding-left: 20px;
}

.policy-note {
  margin: 0 0 24px;
  color: var(--muted);
}

.policy-note:empty {
  display: none;
}

.copyright a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 600px) {
  .account-page {
    padding: 36px 16px 56px;
  }

  .policy {
    padding: 32px 16px 56px;
  }
}


/* =====================================================
   상세 페이지 버튼 · 최근 본 상품 · 사진 크게 보기 · 맨 위로 · 404
   ===================================================== */

/* 관심 상품 + 공유 버튼 한 줄 */
.product-actions {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}

.product-actions .save-button {
  flex: 1;
  width: auto;
  margin-top: 0;
}

.share-button {
  padding: 13px 20px;
  background: var(--paper);
  border: 1px solid var(--charcoal);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--charcoal);
  cursor: pointer;
  transition: background 0.2s ease;
}

/* 최근 본 상품 */
.recent {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.recent:empty {
  display: none;
}

.recent .section-title {
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

/* 사진 크게 보기 */
html.no-scroll {
  overflow: hidden;
}

.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
}

.lightbox::backdrop {
  background: var(--paper);
}

.lightbox-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.lightbox-track::-webkit-scrollbar {
  display: none;
}

.lightbox-slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
}

.lightbox-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 248, 244, 0.92);
  color: var(--charcoal);
  cursor: pointer;
}

.lightbox-close {
  top: 12px;
  right: 12px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  margin-top: -22px;
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

.lightbox-count {
  position: absolute;
  left: 50%;
  bottom: 16px;
  margin: 0;
  padding: 4px 12px;
  background: rgba(250, 248, 244, 0.92);
  font-size: 13px;
  letter-spacing: 0.05em;
  transform: translateX(-50%);
}

/* 맨 위로 버튼 */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--charcoal);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

/* 404 */
.notfound {
  max-width: 560px;
  margin: 0 auto;
  padding: 96px 24px;
  text-align: center;
}

.notfound-code {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.notfound h1 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 400;
}

.notfound p {
  margin: 0 0 32px;
  color: var(--muted);
}

/* 회원가입 국가 선택, 내 계정 상호·국가 */
.field select {
  padding: 13px 14px;
  border: 1px solid var(--stone);
  border-radius: 0;
  background: var(--paper);
  font: inherit;
  font-size: 16px;
  color: var(--charcoal);
}

.field select:focus {
  outline: 2px solid var(--charcoal);
  outline-offset: -1px;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 28px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
}

.profile-form .text-button {
  align-self: flex-start;
}

@media (hover: hover) {
  .share-button:hover {
    background: var(--sand);
  }

  .to-top:hover,
  .lightbox-button:hover {
    background: var(--sand);
  }
}

/* ===== 태블릿·휴대폰 (폭 800px 이하): 메뉴는 아이콘으로 ===== */
@media (max-width: 800px) {
  .site-header {
    grid-template-areas:
      ".    logo user"
      "main main lang";
    gap: 0 8px;
    padding: 6px 16px 0;
  }

  /* 오른쪽 묶음을 풀어서 계정 아이콘은 위, 언어는 아래 줄로 */
  .header-right {
    display: contents;
  }

  .nav-user {
    grid-area: user;
    justify-content: flex-end;
    gap: 0;
  }

  .lang-switch {
    grid-area: lang;
    justify-content: flex-end;
  }

  .logo {
    font-size: 18px;
  }

  .nav-main {
    gap: 18px;
  }

  .nav-main a {
    font-size: 12px;
  }

  .nav-icon {
    display: block;
  }

  /* 아이콘 옆 글자는 숨기지만, 화면 읽기 프로그램은 읽을 수 있게 남겨요 */
  .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .nav-item {
    position: relative;
    justify-content: center;
    width: 36px;
    height: 40px;
    padding: 0;
    border-bottom: 0;
  }

  .nav-item.is-current::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 2px;
    border-bottom: 1px solid var(--charcoal);
  }

  /* 찜 개수는 하트 위 작은 숫자로 */
  .saved-count {
    position: absolute;
    top: 4px;
    right: 1px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 8px;
    background: var(--charcoal);
    color: var(--paper);
    font-size: 9px;
    line-height: 15px;
    letter-spacing: 0;
    text-align: center;
    box-sizing: border-box;
  }

  .saved-count:empty {
    display: none;
  }

  .saved-count:not(:empty) {
    margin-left: 0;
  }

  .product-info {
    top: auto;
  }

  .recent {
    padding: 0 16px 40px;
  }

  .to-top {
    right: 14px;
    bottom: 14px;
  }
}


/* =====================================================
   메인 페이지 (index.html): 큰 HONG + NEW IN + 카테고리
   ===================================================== */
.home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(70vh, 640px);
  padding: 56px 0;
  text-align: center;
}

.hero-logo {
  margin: 0;
  padding-left: 0.42em;      /* 글자 간격 때문에 왼쪽으로 쏠리는 것 보정 */
  font-size: clamp(56px, 12vw, 148px);
  font-weight: 400;
  letter-spacing: 0.42em;
  line-height: 1;
}

.hero-sub {
  margin: 28px 0 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.hero-link {
  margin-top: 36px;
  padding: 6px 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--charcoal);
  text-decoration: none;
}

.home-section {
  padding-top: 24px;
}

.home-section + .home-section {
  padding-top: 80px;
}

.home-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
}

.home-more {
  padding: 6px 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--charcoal);
  text-decoration: none;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.category-tile {
  display: block;
  color: var(--charcoal);
  text-decoration: none;
}

.category-photo {
  overflow: hidden;
}

.category-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 30%;
}

.category-label {
  display: flex;
  align-items: baseline;
  margin: 12px 0 0;
  font-size: 13px;
  letter-spacing: 0.12em;
}

.category-name {
  padding-bottom: 3px;
}

@media (max-width: 800px) {
  .home {
    padding: 0 16px 56px;
  }

  .hero {
    min-height: 56vh;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
  }

  .home-section + .home-section {
    padding-top: 56px;
  }
}


/* =====================================================
   사진 넘기기 감도 (숫자는 main.js의 SWIPE에서 바꿔요)
   ===================================================== */
/* 자바스크립트가 한 장씩 정확히 넘겨주니까, 브라우저가 직접 미끄러뜨리는 건 꺼요
   (그래서 사진 위에서 위아래로 스크롤해도 페이지가 잘 내려가요) */
.swipe-ready {
  overflow-x: hidden;
  scroll-snap-type: none;
  touch-action: pan-y pinch-zoom;   /* 위아래 스크롤·확대는 그대로 */
  overscroll-behavior-x: contain;
}


/* =====================================================
   사진 로딩 자리 표시: 사진이 뜨기 전엔 회색 칸이 은은하게 반짝여요
   ===================================================== */
.card-slide,
.gallery-item,
.category-photo {
  background-color: var(--sand);
}

.card-slide img,
.gallery-item img,
.category-photo img {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card-slide img.is-loaded,
.gallery-item img.is-loaded,
.category-photo img.is-loaded {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .card-slide:not(.img-done),
  .gallery-item:not(.img-done),
  .category-photo:not(.img-done) {
    background-image: linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.65) 50%, rgba(255, 255, 255, 0) 70%);
    background-size: 220% 100%;
    background-repeat: no-repeat;
    animation: shimmer 1.4s ease-in-out infinite;
  }
}

@keyframes shimmer {
  from { background-position: 130% 0; }
  to { background-position: -30% 0; }
}


/* =====================================================
   움직임: 스크롤하면 부드럽게 등장 · 페이지 전환 페이드
   (기기에서 '동작 줄이기'를 켠 사람에게는 안 움직여요)
   ===================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* 상품 카드·카테고리가 화면에 들어올 때 아래에서 살짝 떠올라요 (main.js의 reveal) */
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--reveal-delay, 0ms);
  }

  .reveal.is-in {
    opacity: 1;
    transform: none;
  }

  /* 메인의 큰 HONG과 문구가 차례로 떠올라요 */
  .hero > * {
    animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }

  .hero-sub {
    animation-delay: 0.15s;
  }

  .hero-link {
    animation-delay: 0.3s;
  }

  /* 페이지를 옮길 때 화면이 툭 바뀌지 않고 부드럽게 겹쳐 바뀌어요 (크롬·사파리) */
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.35s;
  }
}

/* 위 기능이 없는 브라우저(파이어폭스 등)는 들어올 때만 살짝 페이드 */
@supports not (view-transition-name: none) {
  @media (prefers-reduced-motion: no-preference) {
    body {
      animation: page-in 0.4s ease backwards;
    }
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes page-in {
  from { opacity: 0; }
}


/* =====================================================
   메뉴 밑줄 애니메이션: 마우스를 올리면 왼쪽에서 그어지고, 떼면 오른쪽으로 빠져요
   ===================================================== */
.nav-main a,
.nav-item,
.filter,
.hero-link,
.home-more,
.category-name {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 100% 100%;
  background-size: 0 1px;
  transition: background-size 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.2s ease;
}

.nav-main a.is-current,
.nav-item.is-current,
.filter.is-active {
  background-position: 0 100%;
  background-size: 100% 1px;
}

@media (hover: hover) {
  .nav-main a:hover,
  .nav-item:hover,
  .filter:hover,
  .hero-link:hover,
  .home-more:hover,
  .category-tile:hover .category-name {
    background-position: 0 100%;
    background-size: 100% 1px;
  }

  /* 카테고리 사진은 살짝 확대 */
  .category-tile:hover .category-photo img {
    transform: scale(1.03);
  }
}

/* 휴대폰 아이콘 메뉴는 밑줄 대신 원래 표시를 써요 */
@media (max-width: 800px) {
  .nav-item {
    background-image: none;
  }
}



/* =====================================================
   HONG SEOUL 디자인 (2026-10 무드보드)
   ===================================================== */
::selection {
  background: var(--burgundy);
  color: var(--ivory);
}

/* 로고: HONG 아래 작은 SEOUL */
.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-weight: 300;
}

.logo-sub {
  margin-top: 6px;
  padding-left: 0.6em;
  font-size: 8px;
  letter-spacing: 0.6em;
  color: var(--muted);
}

/* 사진 위 하트·숫자는 버건디 */
.card-save[aria-pressed="true"],
.save-button[aria-pressed="true"] svg {
  color: var(--burgundy);
}

.save-button[aria-pressed="true"] {
  border-color: var(--burgundy);
  color: var(--burgundy);
}

.button,
.saved-count:not(:empty) {
  transition: background 0.25s ease;
}

/* 메인 큰 로고 */
.hero {
  min-height: min(76vh, 700px);
}

.hero-logo {
  font-weight: 300;
}

.hero-city {
  margin: 18px 0 0;
  padding-left: 0.9em;
  font-size: 12px;
  letter-spacing: 0.9em;
  color: var(--muted);
}

.hero-tagline {
  margin: 44px 0 0;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--charcoal);
}

.hero-sub {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-city { animation-delay: 0.1s; }
  .hero-tagline { animation-delay: 0.2s; }
  .hero-sub { animation-delay: 0.28s; }
  .hero-link { animation-delay: 0.38s; }
}

/* 메인 아래 브랜드 띠 */
.brand-band {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px 48px;
  margin-top: 96px;
  padding: 48px 56px;
  background: var(--ivory);
}

.seal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--burgundy);
  color: var(--ivory);
  font-size: 11px;
  letter-spacing: 0.4em;
  padding-left: 0.4em;
  box-sizing: border-box;
  transform: rotate(-12deg);
}

.brand-mood {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--muted);
}

.brand-line {
  margin: 12px 0 0;
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.brand-place {
  margin: 12px 0 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.brand-dm {
  padding: 14px 22px;
  border: 1px solid var(--charcoal);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--charcoal);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

@media (hover: hover) {
  .button:hover {
    background: var(--burgundy);
  }

  .brand-dm:hover {
    background: var(--burgundy);
    border-color: var(--burgundy);
    color: var(--ivory);
  }

  .category-tile:hover .category-name,
  .card-info:hover .card-name {
    color: var(--burgundy);
  }
}

@media (max-width: 800px) {
  .brand-band {
    grid-template-columns: 1fr;
    justify-items: center;
    margin-top: 64px;
    padding: 40px 24px;
    text-align: center;
  }

  .logo-sub {
    margin-top: 4px;
    font-size: 7px;
  }

  .brand-mood {
    font-size: 11px;
    letter-spacing: 0.18em;
  }
}

/* 하단: 차콜 바탕 + 아이보리 글자 */
.site-footer {
  background: var(--charcoal);
  color: rgba(241, 237, 229, 0.7);
}

.footer-logo,
.footer-title {
  color: var(--ivory);
  font-weight: 300;
}

.footer-city {
  margin: -2px 0 10px !important;
  font-size: 9px;
  letter-spacing: 0.6em;
  color: rgba(241, 237, 229, 0.55);
}

.site-footer a {
  color: var(--ivory);
}

.site-footer .copyright,
.site-footer .copyright a {
  color: rgba(241, 237, 229, 0.55);
}

.to-top {
  background: var(--bg);
}

/* 사진 넘기기: 휴대폰(손가락)에서는 브라우저 기본 넘기기를 쓰되, 한 번에 한 장만 */
@media (pointer: coarse) {
  .swipe-ready {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    touch-action: auto;
  }

  .swipe-ready > * {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}
