:root {
  --text: #222;
  --muted: #8a8a8a;
  --line: #ececec;
  --photo-bg: #f5f4f1;
  /* Everything sits in one centred column: at most --max wide, with at least --side of
     white space on each side (16px on a phone). */
  --max: 1000px;
  --side: clamp(16px, 4vw, 32px);
  --page: min(var(--max), 100% - 2 * var(--side));
  --serif: 'Gowun Batang', 'Nanum Myeongjo', 'Batang', Georgia, serif;
  --sans: 'Helvetica Neue', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 400; }

.site-header,
main,
.site-footer {
  width: var(--page);
  margin-inline: auto;
}

/* ---------- Header: country picker, logo, inquiry, category menu ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 0 0;
  background: #fff;
  text-align: center;
}

/* Country picker on the left, inquiry link on the right, on the logo's line */
.utility {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-align: left;
}
.inquiry { color: var(--text); }
.inquiry[href]:hover { text-decoration: underline; text-underline-offset: 3px; }

.flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}
.country { position: relative; z-index: 2; }
.country-button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.caret { font-size: 9px; color: var(--muted); }
.country-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 4px 0 0;
  padding: 6px 0;
  min-width: 140px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}
.country-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 14px;
  border: 0;
  background: none;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: left;
  color: #555;
  cursor: pointer;
}
.country-menu button:hover { background: var(--photo-bg); color: var(--text); }
.country-menu button[aria-current="true"] { color: var(--text); font-weight: 600; }

.brand {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 44px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.menu {
  position: relative;
  margin-top: 8px;
}
.menu-list {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu-list a {
  display: block;
  padding: 10px 0 12px;
  font-size: 13px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
/* Only "모두 보기 / ALL" is underlined, always: a thin line as wide as the text,
   a little below it. The other menu items never are. */
.menu-list a.menu-all {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 10px;
}

/* 2차 categories of the hovered (or tapped) 1차 category */
.menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 18px 0 22px;
  background: #fff;
  border-block: 1px solid var(--line);
}
.menu-panel ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin: 0 auto;
  padding: 0;
  max-width: 900px;
  list-style: none;
}
.menu-panel a { font-size: 13px; color: #555; }
.menu-panel a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.menu-panel li:first-child a { color: var(--text); }

/* ---------- Banner: every photo in one strip, edge to edge, drifting left ----------
   The photos already have their faded film look (lib/banner.js) and are shown whole,
   at the banner's height. The strip moves via transform (home.js); the banner clips it
   to the 1000px column. */

.banner {
  position: relative;
  margin-top: 28px;
  overflow: hidden;
  background: #ebe6de;
}
.banner-track {
  display: flex;
  gap: 0;
  width: max-content;
  height: clamp(320px, 48svh, 440px);
  touch-action: pan-y; /* sideways drags move the strip, up/down still scrolls the page */
  user-select: none;
  will-change: transform;
}
.banner-track img {
  flex: none;
  height: 100%;
  width: auto;
}
/* ---------- Homepage sections ---------- */

/* Small centred title right under the banner */
.section-title {
  margin: 18px 0 18px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.16em;
}

/* SHOP THE LOOK: near-square scene photos, two per row (one on a phone), 8px apart,
   each followed by the products seen in it. */
.look-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 8px;
}
.look-photo { width: 100%; aspect-ratio: 24 / 25; object-fit: cover; background: var(--photo-bg); }
.look-heading {
  margin: 16px 0 14px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.look .card-row { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 8px; overflow: visible; }

/* A row of product cards; scrolls sideways when it doesn't fit */
.card-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 210px);
  justify-content: center;
  gap: 18px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.card-row::-webkit-scrollbar { display: none; }

.featured-category + .featured-category { margin-top: 64px; }
.featured .section-title { margin-bottom: 28px; }
.featured-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.featured-head h3 { margin: 0; font-family: var(--serif); font-size: 18px; letter-spacing: 0.06em; }
.featured-head a { font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.featured-head a:hover { color: var(--text); }
.featured .card-row { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }

/* ---------- Category page ---------- */

.page-title {
  margin: 40px 0 14px;
  text-align: center;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: 0.08em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin: 0 auto 32px;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.chips a { color: var(--muted); border-bottom: 1px solid transparent; }
.chips a:hover { color: var(--text); }
.chips a[aria-current="page"] { color: var(--text); border-bottom-color: currentColor; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 12px;
  padding-bottom: 96px;
}

/* ---------- Product card ---------- */

.card { display: block; text-align: center; }
.card-photo { aspect-ratio: 4 / 5; overflow: hidden; background: var(--photo-bg); }
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease, opacity .3s;
}
.card:hover .card-photo img { transform: scale(1.03); }
.card-title { margin: 12px 0 0; font-size: 13px; line-height: 1.45; }
.card-meta { margin: 3px 0 0; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.card.sold-out .card-photo img { opacity: .55; }
.card.sold-out .card-meta { color: var(--text); letter-spacing: 0.14em; }

.status { padding: 60px 16px; text-align: center; color: var(--muted); }

/* ---------- Product page ---------- */

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
  margin-top: 32px;
  padding-bottom: 96px;
}

.back {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}
.back:hover { color: var(--text); }

.gallery { position: relative; min-width: 0; }

.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: var(--photo-bg);
}
.slides::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 100%;
  aspect-ratio: 1;
  scroll-snap-align: center;
}
.slide img { width: 100%; height: 100%; object-fit: contain; }

.arrow {
  position: absolute;
  top: calc(50% - 60px);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
  font: 22px/1 system-ui, sans-serif;
  cursor: pointer;
}
.arrow:disabled { opacity: .3; cursor: default; }
.arrow.prev { left: 12px; }
.arrow.next { right: 12px; }

.counter {
  margin: 8px 0 0;
  font-size: 12px;
  text-align: center;
  color: var(--muted);
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.thumbs button {
  padding: 0;
  border: 1px solid transparent;
  background: var(--photo-bg);
  aspect-ratio: 1;
  cursor: pointer;
  opacity: .65;
  transition: opacity .15s, border-color .15s;
}
.thumbs button:hover { opacity: 1; }
.thumbs button[aria-current="true"] { opacity: 1; border-color: var(--text); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.info { position: sticky; top: 150px; align-self: start; padding-top: 24px; }
.info h1 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: 0.04em;
}
.info .category { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.info .category a:hover { color: var(--text); }
.info .price { margin: 0 0 18px; font-size: 16px; letter-spacing: 0.04em; }
.info .price.sold-out { letter-spacing: 0.14em; }
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  margin: 0 0 22px;
  padding: 14px 0;
  border-block: 1px solid var(--line);
  font-size: 13px;
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.info .description { margin: 0; line-height: 1.9; color: #444; white-space: pre-line; }

/* ---------- Footer ---------- */

/* Plenty of white space above, small centred text, no line */
.site-footer {
  margin-top: clamp(48px, 7vw, 72px);
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text);
}
.site-footer p { margin: 0; }
.site-footer p + p { margin-top: 18px; }
.site-footer span { margin: 0 8px; color: var(--muted); }
.site-footer a[href]:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Floating buttons: back to top, then the inquiry pill ---------- */

.floating {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.to-top {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e9e9e9;
  cursor: pointer;
}
.to-top svg,
.inquiry-pill svg { fill: none; stroke: #444; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.to-top svg { width: 16px; height: 16px; }
.inquiry-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px 9px 13px;
  border-radius: 999px;
  background: #f0f0f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
  font-size: 12px;
  color: #333;
}
.inquiry-pill svg { width: 15px; height: 15px; }
.inquiry-pill[href]:hover { background: #e6e6e6; }

[hidden] { display: none !important; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .menu-list { gap: 24px; }
}

/* The menu no longer fits on one line: it wraps onto 2–3 centred lines,
   so every category is visible without scrolling sideways. */
@media (max-width: 900px) {
  .menu-list {
    flex-wrap: wrap;
    gap: 0 20px;
    padding: 2px 0 6px;
  }
  .menu-list a { padding: 7px 0 6px; }
}

@media (max-width: 760px) {
  /* Flag and link get their own line above the logo */
  .site-header { padding-top: 34px; }
  .utility { top: 6px; height: 28px; }
  .brand { font-size: 20px; line-height: 36px; letter-spacing: 0.18em; }
  .menu { margin-top: 2px; }
  .menu-list { gap: 0 16px; }
  .menu-panel { padding: 14px 0 16px; }
  .menu-panel ul { gap: 10px 18px; }

  .banner { margin-top: 16px; }
  .banner-track { height: 280px; }

  .look-list { grid-template-columns: 1fr; gap: 40px; }
  .look .card-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .card-row { grid-auto-columns: 42vw; justify-content: start; }
  .featured .card-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 10px; }
  .featured-category + .featured-category { margin-top: 48px; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 10px; }
  .card-title { margin-top: 10px; font-size: 12.5px; }
  .page-title { margin-top: 28px; font-size: 20px; }

  .product { grid-template-columns: 1fr; gap: 20px; margin-top: 0; }
  .slide { aspect-ratio: 4 / 5; }
  .thumbs {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 64px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .thumbs::-webkit-scrollbar { display: none; }
  .arrow { display: none; }
  .info { position: static; padding-top: 0; }
  .info h1 { font-size: 21px; }
}
