/* ==========================================================================
   피카스토어 — 쇼핑몰 화면 컴포넌트
   base.css 다음에 로드한다.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 헤더
   -------------------------------------------------------------------------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.hdr-bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
}

/* 로고는 원본 한 장(img/logo.webp, 2000×667)을 배경으로 깔고 여백만 잘라 씁니다.
   원본에서 글자가 실제로 차지하는 영역
     가로  6.0% ~ 93.5%
     세로 22.4% ~ 67.2%  = 한글 워드마크 "피카스토어"
          71.6% ~ 79.1%  = 영문 "PIKA STORE"
   헤더 크기(20px 안팎)에서는 영문 줄이 3px 남짓이라 읽히지 않아 한글 줄만 씁니다.
   전체 로크업은 img/logo.webp 원본을 그대로 쓰면 됩니다. */
.brand-logo {
  display: block;
  width: 111px;
  height: 19px;
  background: url("../img/logo.webp") no-repeat;
  background-size: 127.2px 42.4px;
  background-position: -7.6px -9.5px;
}
@media (min-width: 720px) {
  .brand-logo {
    width: 129px;
    height: 22px;
    background-size: 147.3px 49.1px;
    background-position: -8.8px -11px;
  }
}

.hdr-spacer {
  flex: 1;
}

.hdr-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--ink);
  transition: background var(--dur-fast) var(--ease);
}
.icon-btn:active {
  background: var(--tile);
}
.icon-btn svg {
  width: 22px;
  height: 22px;
}
.icon-btn .dot {
  position: absolute;
  top: 7px;
  right: 6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--r-full);
  background: var(--sale);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* 데스크톱 상단 메뉴 */
.hdr-menu {
  display: none;
  gap: var(--s-6);
  margin-left: var(--s-8);
}
.hdr-menu a {
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: -0.02em;
  padding: 6px 0;
  transition: color var(--dur-fast) var(--ease);
}
.hdr-menu a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--ink);
}
@media (min-width: 720px) {
  .hdr-menu {
    display: flex;
  }
}

/* 모바일 카테고리 탭 */
.tabs {
  height: var(--tabs-h);
  display: flex;
  align-items: stretch;
  gap: var(--s-5);
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid var(--line);
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast) var(--ease);
}
.tabs a[aria-current="page"] {
  color: var(--ink);
  font-weight: 800;
  border-bottom-color: var(--ink);
}
@media (min-width: 720px) {
  .tabs {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   2. 하단 탭바 (모바일) — 5개 이하
   -------------------------------------------------------------------------- */
.bnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
}
.bnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: -0.02em;
}
.bnav a svg {
  width: 22px;
  height: 22px;
}
.bnav a[aria-current="page"] {
  color: var(--ink);
}
.bnav .bnav-badge {
  position: relative;
}
.bnav .bnav-badge span.dot {
  position: absolute;
  top: -3px;
  right: -8px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: var(--r-full);
  background: var(--sale);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
}
@media (min-width: 720px) {
  .bnav {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   3. 섹션
   -------------------------------------------------------------------------- */
.sec {
  padding: var(--s-8) 0;
}
.sec + .sec {
  padding-top: 0;
}
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.sec-head .sec-sub {
  margin-top: 3px;
  font-size: var(--fs-13);
  color: var(--ink-3);
}
.sec-more {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
  padding: 6px 0 6px 12px;
}

/* --------------------------------------------------------------------------
   4. 상품 카드 / 그리드
   -------------------------------------------------------------------------- */
.pgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-6) var(--s-3);
}
@media (min-width: 560px) {
  .pgrid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 900px) {
  .pgrid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-8) var(--s-5);
  }
}
@media (min-width: 1100px) {
  .pgrid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.pcard-wrap {
  position: relative;
}
.pcard {
  display: block;
  position: relative;
}
.pcard-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r);
  background: var(--tile);
  overflow: hidden;
  margin-bottom: 10px;
}
.pcard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8%;
  background: transparent;
  transition: transform 320ms var(--ease);
}
@media (hover: hover) {
  .pcard:hover .pcard-thumb img {
    transform: scale(1.035);
  }
}
.pcard-thumb .thumb-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  /* 찜 하트(우상단 34px + 여백)를 침범하지 않도록 폭을 제한한다 */
  max-width: calc(100% - 56px);
  overflow: hidden;
}
/* 랭킹 카드는 좌상단을 순위 번호가, 우상단을 찜 하트가 쓴다.
   뱃지를 우상단으로 보내면 하트에 가려 잘려 보이므로 좌하단으로 내린다. */
.pcard-wrap.rank-card .pcard-thumb .thumb-badges {
  top: auto;
  bottom: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
}
.pcard-thumb .soldout-veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
  font-size: var(--fs-13);
  font-weight: 800;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

.pcard-series {
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 3px;
}
.pcard-name {
  font-size: var(--fs-13);
  font-weight: 600;
  line-height: 1.42;
  color: var(--ink);
  min-height: 2.84em;
  margin-bottom: 7px;
}
.pcard-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: var(--fs-15);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.pcard-price .off {
  color: var(--sale);
  font-size: var(--fs-13);
  font-weight: 800;
}
.pcard-per {
  margin-top: 2px;
  font-size: var(--fs-11);
  color: var(--ink-3);
}
.pcard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

/* 랭킹 카드 (가로 레일) */
.rank-card {
  width: 136px;
}
@media (min-width: 720px) {
  .rank-card {
    width: 172px;
  }
}
/* 그리드 안에 놓이면 고정폭을 풀고 칸에 맞춘다 (인기순위 페이지) */
.pgrid .rank-card {
  width: auto;
}
.rank-card .pcard-thumb::before {
  content: attr(data-rank);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: var(--r) 0 var(--r) 0;
  background: var(--ink);
  color: #fff;
  font-size: var(--fs-13);
  font-weight: 800;
  line-height: 26px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.rank-card.top3 .pcard-thumb::before {
  background: var(--sale);
}

/* --------------------------------------------------------------------------
   5. 히어로 배너
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  margin-top: var(--s-4);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--tile);
}
.hero-track {
  display: flex;
  transition: transform 420ms var(--ease);
}
.hero-slide {
  flex: 0 0 100%;
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--s-5);
  color: #fff;
  background: var(--ink);
  isolation: isolate;
}
@media (min-width: 720px) {
  .hero-slide {
    aspect-ratio: 25 / 8;
    padding: var(--s-10);
  }
}
.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.62) 100%
  );
}
.hero-eyebrow {
  font-size: var(--fs-11);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 8px;
}
.hero-title {
  font-size: var(--fs-24);
  font-weight: 800;
  line-height: 1.26;
  letter-spacing: -0.035em;
}
.hero-desc {
  margin-top: 8px;
  font-size: var(--fs-13);
  opacity: 0.88;
  /* 우측 하단 인디케이터와 글자가 겹치지 않게 */
  max-width: calc(100% - 64px);
}
@media (min-width: 720px) {
  .hero-title {
    font-size: 34px;
  }
  .hero-desc {
    font-size: var(--fs-15);
  }
}
.hero-dots {
  position: absolute;
  right: var(--s-4);
  bottom: var(--s-4);
  display: flex;
  gap: 6px;
  z-index: 3;
}
.hero-dots button {
  width: 7px;
  height: 7px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.45);
  transition: width var(--dur) var(--ease), background var(--dur) var(--ease);
}
.hero-dots button[aria-current="true"] {
  width: 20px;
  background: #fff;
}

/* --------------------------------------------------------------------------
   6. 신뢰 스트립
   -------------------------------------------------------------------------- */
.trust {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: var(--s-6);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
@media (min-width: 720px) {
  .trust {
    grid-template-columns: repeat(4, 1fr);
  }
}
.trust div {
  background: #fff;
  padding: var(--s-4) var(--s-3);
  text-align: center;
}
.trust strong {
  display: block;
  font-size: var(--fs-13);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.trust span {
  display: block;
  margin-top: 3px;
  font-size: var(--fs-11);
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   7. 필터 바 (목록)
   -------------------------------------------------------------------------- */
.filter {
  position: sticky;
  top: calc(var(--header-h) + var(--tabs-h));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.filter::-webkit-scrollbar {
  display: none;
}
@media (min-width: 720px) {
  .filter {
    top: var(--header-h);
  }
}
.chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  background: #fff;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
  transition: all var(--dur-fast) var(--ease);
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.filter .count {
  margin-left: auto;
  padding-left: var(--s-3);
  font-size: var(--fs-12);
  color: var(--muted);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   8. 상품 상세
   -------------------------------------------------------------------------- */
.pd-gallery {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--tile);
  margin: 0 calc(var(--gutter) * -1);
}
@media (min-width: 720px) {
  .pd-gallery {
    margin: 0;
    border-radius: var(--r-lg);
    overflow: hidden;
  }
}
.pd-gallery img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 7%;
  background: transparent;
}

.pd-wrap {
  display: block;
}
@media (min-width: 900px) {
  .pd-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: var(--s-10);
    align-items: start;
  }
  .pd-side {
    position: sticky;
    top: calc(var(--header-h) + var(--s-5));
  }
}

.pd-head {
  padding: var(--s-5) 0 var(--s-4);
  border-bottom: 1px solid var(--line);
}
.pd-series {
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.pd-name {
  margin-top: 6px;
  font-size: var(--fs-20);
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.03em;
}
.pd-name-en {
  margin-top: 4px;
  font-size: var(--fs-12);
  color: var(--muted);
}
.pd-price {
  margin-top: var(--s-4);
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
}
.pd-price .amt {
  font-size: var(--fs-24);
  font-weight: 800;
  letter-spacing: -0.04em;
}
.pd-price .unit {
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--ink-3);
}
.pd-meta {
  margin-top: var(--s-3);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 옵션 카드 — "많이 살수록 싸진다"가 핵심 */
.opts {
  display: grid;
  gap: var(--s-2);
  margin: var(--s-5) 0;
}
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: 68px;
  padding: var(--s-3) var(--s-4);
  border: 1.5px solid var(--line-2);
  border-radius: var(--r);
  background: #fff;
  text-align: left;
  transition: border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
}
.opt[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--bg-soft);
}
.opt[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.opt-main {
  flex: 1;
  min-width: 0;
}
.opt-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-15);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.opt-per {
  margin-top: 3px;
  font-size: var(--fs-12);
  color: var(--ink-3);
}
.opt-right {
  text-align: right;
  flex: 0 0 auto;
}
.opt-amt {
  font-size: var(--fs-15);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.opt-off {
  margin-top: 2px;
  font-size: var(--fs-12);
  font-weight: 800;
  color: var(--sale);
}

/* 무료배송 게이지 */
.gauge {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r);
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.gauge-txt {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink-2);
}
.gauge-txt b {
  font-weight: 800;
  color: var(--accent-ink);
}
.gauge-txt.done b {
  color: var(--ok);
}
.gauge-bar {
  margin-top: 8px;
  height: 5px;
  border-radius: var(--r-full);
  background: var(--line-2);
  overflow: hidden;
}
.gauge-bar i {
  display: block;
  height: 100%;
  border-radius: var(--r-full);
  background: var(--accent);
  transition: width 320ms var(--ease);
}
.gauge-txt.done + .gauge-bar i {
  background: var(--ok);
}

/* 출고 원칙 블록 */
.pledge {
  margin-top: var(--s-5);
  padding: var(--s-5);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--bg-soft);
}
.pledge h3 {
  font-size: var(--fs-14);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-3);
}
.pledge ol {
  counter-reset: pl;
  display: grid;
  gap: 10px;
}
.pledge li {
  counter-increment: pl;
  position: relative;
  padding-left: 26px;
  font-size: var(--fs-13);
  line-height: 1.62;
  color: var(--ink-2);
}
.pledge li::before {
  content: counter(pl);
  position: absolute;
  left: 0;
  top: 1px;
  width: 18px;
  height: 18px;
  border-radius: var(--r-full);
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.pledge li b {
  color: var(--ink);
  font-weight: 800;
}

/* 데스크톱 전용 CTA — 하단 고정바가 사라지는 900px 을 기준으로 맞춘다.
   (인라인 style 로 display 를 주면 미디어쿼리를 덮어쓰므로 반드시 클래스로 쓴다) */
.cta-desk {
  display: none;
}
.pd-info-desk {
  display: none;
}
@media (min-width: 900px) {
  .cta-desk {
    display: block;
    margin-top: var(--s-6);
  }
  .cta-desk.row {
    display: flex;
    gap: var(--s-2);
  }
  .pd-info-desk {
    display: block;
  }
  .pd-info-mob {
    display: none;
  }
}

/* 하단 고정 구매 바 */
.buybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  display: flex;
  gap: var(--s-2);
  padding: 10px var(--gutter)
    calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.buybar .btn {
  flex: 1;
}
.buybar .btn-outline {
  flex: 0 0 96px;
}
body.has-buybar {
  padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
}
body.has-buybar .bnav {
  display: none;
}
@media (min-width: 900px) {
  .buybar {
    display: none;
  }
  body.has-buybar {
    padding-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   9. 장바구니 / 주문
   -------------------------------------------------------------------------- */
.cart-row {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--line);
}
.cart-row .thumb {
  flex: 0 0 76px;
  width: 76px;
  aspect-ratio: 1/1;
  border-radius: var(--r-sm);
  background: var(--tile);
  overflow: hidden;
}
.cart-row .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6%;
  background: transparent;
}
.cart-row .body {
  flex: 1;
  min-width: 0;
}
.cart-row .name {
  font-size: var(--fs-14);
  font-weight: 600;
  line-height: 1.4;
}
.cart-row .opt {
  all: unset;
  display: block;
  margin-top: 3px;
  font-size: var(--fs-12);
  color: var(--ink-3);
}
.cart-row .bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-3);
}
.cart-row .price {
  font-size: var(--fs-15);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.cart-row .del {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: 0 0 auto;
}

.sumline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  font-size: var(--fs-14);
  color: var(--ink-2);
}
.sumline b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sumline.total {
  padding-top: var(--s-4);
  margin-top: var(--s-2);
  border-top: 1px solid var(--line-2);
  font-size: var(--fs-15);
  font-weight: 800;
  color: var(--ink);
}
.sumline.total b {
  font-size: var(--fs-20);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.sumline .free {
  color: var(--ok);
  font-weight: 800;
}

/* 주문 상태 스텝 */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: var(--s-4) 0;
}
.steps.steps-3 {
  grid-template-columns: repeat(3, 1fr);
}
.steps div {
  text-align: center;
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--muted);
}
.steps div::before {
  content: "";
  display: block;
  height: 3px;
  border-radius: var(--r-full);
  background: var(--line-2);
  margin-bottom: 7px;
}
.steps div.on {
  color: var(--ink);
}
.steps div.on::before {
  background: var(--ink);
}

.order-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-4);
  margin-bottom: var(--s-3);
}
.order-card .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.order-card .no {
  font-size: var(--fs-12);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-xs);
  font-size: var(--fs-11);
  font-weight: 800;
}
.status-pending {
  background: var(--warn-soft);
  color: var(--warn);
}
.status-requested {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.status-preparing {
  background: var(--warn-soft);
  color: var(--warn);
}
.status-shipped {
  background: var(--ok-soft);
  color: var(--ok);
}
.status-cancelled,
.status-refunded {
  background: var(--sale-soft);
  color: var(--sale);
}

/* --------------------------------------------------------------------------
   10. 푸터
   -------------------------------------------------------------------------- */
.ftr {
  margin-top: var(--s-14);
  padding: var(--s-8) 0 var(--s-10);
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: var(--fs-12);
  color: var(--ink-3);
  line-height: 1.75;
}
.ftr-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
}
.ftr-links a {
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--ink-2);
}
.ftr-biz {
  margin-top: var(--s-4);
  font-size: var(--fs-11);
  color: var(--muted);
}
.ftr-biz span {
  display: inline-block;
  margin-right: 10px;
  white-space: nowrap;
}
.ftr-note {
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-2);
  font-size: var(--fs-11);
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   11. 페이지 헤딩 / 서브 페이지
   -------------------------------------------------------------------------- */
.page-head {
  padding: var(--s-6) 0 var(--s-4);
}
.page-head h1 {
  font-size: var(--fs-24);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.page-head p {
  margin-top: 6px;
  font-size: var(--fs-13);
  color: var(--ink-3);
}

.auth-wrap {
  max-width: 400px;
  margin: 0 auto;
  padding: var(--s-10) 0 var(--s-14);
}
.auth-wrap h1 {
  font-size: var(--fs-24);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: var(--s-2);
}
.auth-wrap .sub {
  font-size: var(--fs-13);
  color: var(--ink-3);
  margin-bottom: var(--s-6);
}
.auth-foot {
  margin-top: var(--s-5);
  text-align: center;
  font-size: var(--fs-13);
  color: var(--ink-3);
}
.auth-foot a {
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   검색
   -------------------------------------------------------------------------- */
.searchbar {
  position: sticky;
  top: calc(var(--header-h) + var(--tabs-h));
  z-index: 60;
  padding: var(--s-3) 0;
  background: var(--bg);
}
@media (min-width: 720px) {
  .searchbar {
    top: var(--header-h);
    padding: var(--s-5) 0 var(--s-3);
  }
}

.searchbox {
  position: relative;
  display: flex;
  align-items: center;
}
.searchbox-icon {
  position: absolute;
  left: 14px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  pointer-events: none;
}
.searchbox-icon svg {
  width: 19px;
  height: 19px;
}
.searchbox input {
  width: 100%;
  min-height: 48px;
  padding: 12px 44px 12px 42px;
  border: 1.5px solid var(--ink);
  border-radius: var(--r);
  background: #fff;
  font-size: var(--fs-15);
  appearance: none;
}
.searchbox input::-webkit-search-cancel-button {
  display: none;
}
.searchbox input::placeholder {
  color: var(--muted);
}
.searchbox input:focus {
  outline: none;
  border-color: var(--ink);
}
.searchbox input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.searchbox-clear {
  position: absolute;
  right: 6px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: var(--r-full);
}
.searchbox-clear svg {
  width: 17px;
  height: 17px;
}
.searchbox-clear:active {
  background: var(--tile);
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.keyword {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 6px 0 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-full);
  background: #fff;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink-2);
}
.keyword.plain {
  padding-right: 13px;
}
.keyword:active {
  background: var(--bg-soft);
}
.keyword .x {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: var(--r-full);
}
.keyword .x svg {
  width: 13px;
  height: 13px;
}

.search-count {
  padding: var(--s-2) 0 var(--s-4);
  font-size: var(--fs-13);
  color: var(--ink-3);
}
.search-count b {
  color: var(--ink);
  font-weight: 700;
}
.search-count mark {
  background: none;
  color: var(--ink);
  font-weight: 700;
}

/* 결과 안에서 일치한 글자 강조 */
.pcard-name mark {
  background: #fff3b0;
  color: inherit;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   찜
   -------------------------------------------------------------------------- */
.wish-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: #fff;
  color: var(--ink-3);
  font-size: var(--fs-13);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}
.wish-btn svg {
  width: 19px;
  height: 19px;
}
.wish-btn[aria-pressed="true"] {
  color: var(--sale);
  border-color: var(--sale);
}
.wish-btn[aria-pressed="true"] svg {
  fill: var(--sale);
  stroke: var(--sale);
}

/* 카드 위 찜 버튼 — 좌상단은 뱃지가 쓰므로 우상단에 둔다 */
.pcard-wrap .wish-mini {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink-3);
  z-index: 2;
  transition: color var(--dur-fast) var(--ease);
}
.pcard-wrap .wish-mini svg {
  width: 17px;
  height: 17px;
}
.pcard-wrap .wish-mini[aria-pressed="true"] {
  color: var(--sale);
}
.pcard-wrap .wish-mini[aria-pressed="true"] svg {
  fill: var(--sale);
  stroke: var(--sale);
}
.pcard-wrap .wish-mini:active {
  background: #fff;
}

/* 상세 — 찜 수는 의미 있는 수치가 쌓였을 때만 보인다 */
.pd-social {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-3);
  font-size: var(--fs-12);
  color: var(--ink-3);
}
.pd-social b {
  color: var(--ink-2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 약관·방침 문서 */
.doc {
  padding-bottom: var(--s-14);
  font-size: var(--fs-14);
  line-height: 1.8;
  color: var(--ink-2);
}
.doc h2 {
  margin: var(--s-8) 0 var(--s-3);
  font-size: var(--fs-17);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.doc h3 {
  margin: var(--s-5) 0 var(--s-2);
  font-size: var(--fs-14);
  font-weight: 800;
  color: var(--ink);
}
.doc p {
  margin-bottom: var(--s-3);
}
.doc ul,
.doc ol {
  margin: 0 0 var(--s-3);
  padding-left: 18px;
}
.doc li {
  margin-bottom: 6px;
  list-style: disc;
}
.doc ol li {
  list-style: decimal;
}
.doc table {
  margin: var(--s-3) 0 var(--s-5);
  font-size: var(--fs-13);
  border-top: 1.5px solid var(--ink);
}
.doc th,
.doc td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  text-align: left;
  vertical-align: top;
}
.doc th {
  background: var(--bg-soft);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.doc .updated {
  margin-top: var(--s-8);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-12);
  color: var(--muted);
}

/* 마이페이지 메뉴 */
.menu-list {
  border-top: 1px solid var(--line);
}
.menu-list a,
.menu-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-14);
  font-weight: 600;
  text-align: left;
}
.menu-list .arrow {
  width: 8px;
  height: 8px;
  border-right: 1.6px solid var(--line-3);
  border-top: 1.6px solid var(--line-3);
  transform: rotate(45deg);
  flex: 0 0 auto;
}
