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

:root {
  --black: #111;
  --grey: #767676;
  --line: #e8e8e8;
  --bg: #fff;
  --accent: #c8102e;
}

body {
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
  color: var(--black);
  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; }

/* ── 공지 배너 ─────────────────────────── */
.notice-bar {
  background: var(--black);
  color: #fff;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  padding: 9px 16px;
}

/* ── 헤더 ──────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
}
.logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}
.gnb { display: flex; align-items: center; gap: 26px; }
.gnb--right { justify-content: flex-end; gap: 16px; }
.gnb-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s;
}
.gnb-link:hover, .gnb-link--active { border-color: var(--black); }
.gnb-link--active { color: var(--accent); border-color: var(--accent); }

.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;
  border-top: 0 solid var(--line);
}
.search-bar--open { max-height: 70px; border-top-width: 1px; }
.search-bar input {
  width: min(560px, 90%);
  display: block;
  margin: 14px auto;
  padding: 11px 18px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--black);
  border-radius: 999px;
  outline: none;
}

/* ── 히어로 ────────────────────────────── */
.hero {
  position: relative;
  height: min(78vh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #191919;
  color: #fff;
}
.hero-media {
  position: absolute;
  inset: 0;
  background-image: url('https://pub-d299de678d4f45f18e8b75dcfea7f543.r2.dev/elcorp/hero_raive.webp'), linear-gradient(115deg, #17171a 0%, #2e2e33 55%, #55555c 100%);
  /* 이미지를 키우고 왼쪽 정렬 → 중앙의 인물이 화면 우측으로 이동 (좌측 타이포와 안 겹침) */
  background-size: 140% auto, cover;
  background-position: left top, center;
  animation: heroZoom 14s ease-out forwards;
  filter: brightness(0.78);
}
@media (max-width: 820px) {
  .hero-media { background-size: cover; background-position: center top; }
}
@keyframes heroZoom { from { transform: scale(1.04); } to { transform: scale(1); } }
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 48px;
}
.hero-eyebrow { font-size: 13px; letter-spacing: 0.35em; color: #ddd; margin-bottom: 18px; }
.hero-title {
  font-size: clamp(52px, 9vw, 118px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.hero-sub { font-size: 15px; color: #ccc; margin-bottom: 34px; letter-spacing: 0.02em; }
.hero-btn {
  display: inline-block;
  background: #fff;
  color: var(--black);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  padding: 16px 42px;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }

/* ── 가격 티어 / 툴바 ─────────────────── */
.tiers { max-width: 1440px; margin: 0 auto; padding: 72px 32px 8px; }
.section-title {
  text-align: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin-bottom: 30px;
}
.cat-tabs {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.cat-tab {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--grey);
  padding: 10px 4px 14px;
  border-bottom: 2px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
.cat-tab:hover { color: var(--black); }
.cat-tab--on { color: var(--black); border-color: var(--black); }

.tier-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}
.tier-tab {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 11px 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--grey);
  transition: all 0.25s ease;
}
.tier-tab:hover { border-color: var(--black); color: var(--black); }
.tier-tab--on { background: var(--black); border-color: var(--black); color: #fff; }

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

/* ── 상품 그리드 ───────────────────────── */
.grid-wrap { max-width: 1440px; margin: 0 auto; padding: 28px 32px 90px; }
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 22px;
}
.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;
  border-radius: 14px;
  background: #f3f3f1;
  cursor: pointer;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.card:hover .card-media img { transform: scale(1.06); }

.badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}
.badge--soldout { background: #555; }

.wish-btn {
  position: absolute;
  top: 10px; right: 10px;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.9);
  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(--black); stroke-width: 1.7; }
.wish-btn--on svg { fill: var(--accent); stroke: var(--accent); }

.quick-add {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  background: rgba(17,17,17,0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 12px 0;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(6px);
}
.card:hover .quick-add { opacity: 1; transform: none; }
.quick-add:disabled { background: rgba(120,120,120,0.85); cursor: not-allowed; }

.card-info { padding: 13px 4px 0; }
.card-name {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-code { font-size: 11px; color: #aaa; margin-bottom: 7px; letter-spacing: 0.03em; }
.card-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-original { font-size: 12px; color: #b5b5b5; text-decoration: line-through; }
.price-sale { font-size: 15px; font-weight: 700; }
.price-rate { font-size: 13px; font-weight: 700; color: var(--accent); }

/* ── 장바구니 드로어 ───────────────────── */
.drawer-dim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  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: #fff;
  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(0,0,0,0.18);
}
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: 15px; letter-spacing: 0.25em; 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; border-radius: 8px; background: #f3f3f1; }
.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);
  border-radius: 6px;
  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: #aaa; 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(--black);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 16px 0;
  border-radius: 12px;
  transition: opacity 0.2s;
}
.drawer-checkout:hover { opacity: 0.85; }

/* ── 토스트 ────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 20px);
  background: var(--black);
  color: #fff;
  font-size: 13px;
  padding: 13px 26px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s ease;
  z-index: 300;
  letter-spacing: 0.03em;
}
.toast--show { opacity: 1; transform: translate(-50%, 0); }

/* ── 푸터 ──────────────────────────────── */
.footer { border-top: 1px solid var(--line); }
.footer-inner {
  max-width: 1440px;
  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: 18px; font-weight: 800; letter-spacing: 0.3em; 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(--black); }

/* ── 반응형 ────────────────────────────── */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .header-inner { grid-template-columns: auto 1fr auto; padding: 0 18px; }
  .gnb--left { display: none; }
  .logo { justify-self: start; font-size: 20px; }
  .hero-content { padding: 0 24px; }
  .tiers, .grid-wrap { padding-left: 18px; padding-right: 18px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
}
