* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #2b2620;
  --grey: #8a8378;
  --line: #e3ddd2;
  --bg: #f7f4ee;
  --card: #efeae1;
  --accent: #6b5842;
}

body {
  font-family: 'Archivo', 'Noto Sans KR', sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; background: none; border: none; cursor: pointer; color: inherit; }

/* ── 마퀴 ──────────────────────────────── */
.marquee {
  overflow: hidden;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
  font-size: 11px;
  letter-spacing: 0.18em;
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── 헤더 ──────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,244,238,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  height: 66px;
}
.logo {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.gnb { display: flex; gap: 28px; }
.gnb-link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 6px 0;
  color: var(--grey);
  transition: color 0.25s;
}
.gnb-link:hover, .gnb-link--active { color: var(--ink); }

.header-icons { display: flex; gap: 14px; }
.icon-btn { position: relative; width: 34px; height: 34px; display: grid; place-items: center; }
.icon-btn svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute;
  top: 0; right: -2px;
  min-width: 16px; height: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.search-bar { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.search-bar--open { max-height: 70px; }
.search-bar input {
  width: min(560px, 90%);
  display: block;
  margin: 14px auto;
  padding: 11px 18px;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  border: 1px solid var(--ink);
  outline: none;
}

/* ── 스플릿 히어로 ─────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  max-width: 1400px;
  margin: 0 auto;
  min-height: min(74vh, 680px);
  border-bottom: 1px solid var(--line);
}
.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px;
}
.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(40px, 5.6vw, 76px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.hero-sub {
  font-size: 15px;
  color: var(--grey);
  line-height: 1.7;
  margin-bottom: 38px;
  max-width: 380px;
}
.hero-btn {
  align-self: flex-start;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--bg);
  background: var(--ink);
  padding: 17px 36px;
  transition: background 0.25s;
}
.hero-btn:hover { background: var(--accent); }

.hero-media {
  background-image: url('https://pub-d299de678d4f45f18e8b75dcfea7f543.r2.dev/elcorp/hero_matin.webp'), linear-gradient(150deg, #d8cfc0 0%, #b8ac99 55%, #8f8371 100%);
  background-size: cover;
  background-position: center 25%;
}

/* ── 샵 헤드 ───────────────────────────── */
.shop-head {
  max-width: 1400px;
  margin: 0 auto;
  padding: 58px 32px 6px;
}
.cat-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.cat-tab {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 11px 26px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--grey);
  transition: all 0.25s;
}
.cat-tab:hover { border-color: var(--ink); color: var(--ink); }
.cat-tab--on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.result-count { font-size: 12.5px; color: var(--grey); letter-spacing: 0.06em; }
.sort-select {
  font-family: inherit;
  font-size: 12.5px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: transparent;
  outline: none;
  cursor: pointer;
}

/* ── 상품 그리드 ───────────────────────── */
.grid-wrap { max-width: 1400px; margin: 0 auto; padding: 26px 32px 80px; }
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 18px;
}
.empty { text-align: center; color: var(--grey); padding: 80px 0; font-size: 14px; }

.card { position: relative; animation: fadeUp 0.5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 기본: 흰 배경 제품컷 → 호버: 모델 착용컷 크로스페이드 */
.card-media .img-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.45s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover .img-hover { opacity: 1; transform: scale(1); }

.badge {
  position: absolute;
  top: 0; left: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 7px 14px;
  background: var(--ink);
  color: var(--bg);
}
.badge--best { background: var(--accent); }
.badge--soldout { background: #a49b8d; }

.wish-btn {
  position: absolute;
  top: 10px; right: 10px;
  width: 36px; height: 36px;
  background: rgba(247,244,238,0.92);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}
.wish-btn:hover { transform: scale(1.12); }
.wish-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.6; }
.wish-btn--on svg { fill: var(--accent); stroke: var(--accent); }

.quick-add {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(43,38,32,0.94);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  padding: 14px 0;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.card:hover .quick-add { opacity: 1; transform: none; }
.quick-add:disabled { background: rgba(140,132,120,0.9); cursor: not-allowed; }

.card-info { padding: 14px 2px 0; text-align: center; }
.card-name { font-size: 13.5px; font-weight: 500; line-height: 1.45; margin-bottom: 5px; }
.card-code { font-size: 10.5px; color: #b3aca0; letter-spacing: 0.08em; margin-bottom: 7px; }
.card-price { display: flex; justify-content: center; align-items: baseline; gap: 8px; }
.price-original { font-size: 12px; color: #b3aca0; text-decoration: line-through; }
.price-sale { font-size: 14.5px; font-weight: 700; }
.price-rate { font-size: 12.5px; font-weight: 700; color: var(--accent); }

/* ── 스테이트먼트 ──────────────────────── */
.statement {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 90px 24px;
}
.statement p {
  font-size: clamp(22px, 3.4vw, 36px);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}
.statement span {
  font-size: 11.5px;
  letter-spacing: 0.3em;
  color: var(--grey);
}

/* ── 드로어 / 토스트 ───────────────────── */
.drawer-dim {
  position: fixed; inset: 0;
  background: rgba(43,38,32,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 200;
}
.drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(400px, 92vw);
  height: 100%;
  background: var(--bg);
  z-index: 201;
  transform: translateX(105%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(43,38,32,0.2);
}
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-dim { opacity: 1; pointer-events: auto; }

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-size: 14px; letter-spacing: 0.2em; font-weight: 800; }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px 22px; }
.drawer-empty { text-align: center; color: var(--grey); font-size: 13px; padding: 60px 0; }

.cart-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 64px; height: 84px; object-fit: cover; background: var(--card); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 12.5px; font-weight: 500; line-height: 1.35; margin-bottom: 6px; }
.cart-item-price { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.qty-row { display: flex; align-items: center; gap: 10px; }
.qty-btn { width: 24px; height: 24px; border: 1px solid var(--line); font-size: 13px; display: grid; place-items: center; }
.qty-num { font-size: 13px; min-width: 16px; text-align: center; }
.cart-item-remove { font-size: 11px; color: #b3aca0; margin-left: auto; text-decoration: underline; }

.drawer-foot { border-top: 1px solid var(--line); padding: 18px 22px 24px; }
.drawer-total { display: flex; justify-content: space-between; font-size: 13px; letter-spacing: 0.1em; margin-bottom: 14px; }
.drawer-total strong { font-size: 17px; }
.drawer-checkout {
  width: 100%;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 16px 0;
  transition: background 0.25s;
}
.drawer-checkout:hover { background: var(--accent); }

.toast {
  position: fixed;
  left: 50%; bottom: 34px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  padding: 13px 26px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s ease;
  z-index: 300;
}
.toast--show { opacity: 1; transform: translate(-50%, 0); }

/* ── 푸터 ──────────────────────────────── */
.footer { border-top: 1px solid var(--line); }
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-logo { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.footer-copy { font-size: 11.5px; color: var(--grey); }
.footer-links { display: flex; gap: 20px; font-size: 12px; color: var(--grey); }
.footer-links a:hover { color: var(--ink); }

/* ── 반응형 ────────────────────────────── */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { min-height: 320px; order: -1; }
  .hero-text { padding: 40px 24px 50px; }
}
@media (max-width: 820px) {
  .header-inner { padding: 0 18px; }
  .gnb { display: none; }
  .shop-head, .grid-wrap { padding-left: 18px; padding-right: 18px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
  .toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
}
