﻿/* ============================================================================
 * endedit 장바구니 — 탈React 정적 프로토타입 CSS
 * 원본 2개 파일을 그대로 합친 것 (내용 변경 없음, 순서만 토큰→화면):
 *   src/styles/tokens.css   (디자인 토큰 --wds-*)
 *   src/shop/cart/cart.css  (Cart 화면 클래스, 모바일 미디어쿼리 포함)
 * + 맨 아래에 이 프로토타입 전용 헤더/푸터 placeholder 스타일만 추가
 *   (order-static-prototype.css 와 동일한 자리지킴 패턴 재사용).
 * ========================================================================= */

/* ── tokens.css ── */
:root {
  --wds-primary: #ff5c28;
  --wds-primary-strong: #f04d1a;
  --wds-primary-heavy: #d63f10;
  --wds-primary-tint: #fff4f0;

  --wds-text: rgb(23, 23, 23);
  --wds-text-neutral: rgba(46, 47, 51, 0.88);
  --wds-text-alt: rgba(55, 56, 60, 0.61);
  --wds-text-assistive: rgba(55, 56, 60, 0.28);
  --wds-inactive: rgba(55, 56, 60, 0.61);

  --wds-fill: rgba(112, 115, 124, 0.05);
  --wds-fill-strong: rgba(112, 115, 124, 0.16);
  --wds-line: rgba(112, 115, 124, 0.16);
  --wds-line-alt: rgba(112, 115, 124, 0.08);
  --wds-line-neutral: rgba(112, 115, 124, 0.16);

  --wds-surface: #fff;
  --wds-surface-alt: rgb(247, 247, 248);
  --wds-surface-inverse: rgb(23, 23, 25);

  --wds-cautionary: rgb(255, 146, 0);
  --wds-destructive: rgb(255, 66, 66);

  --wds-elev-inset-line: inset 0 0 0 1px rgba(112, 115, 124, 0.08);
  --wds-elev-popover: 0 0 60px rgba(23, 23, 23, 0.1);

  --wds-ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font-core: 'Pretendard JP', 'Pretendard Variable', Pretendard, -apple-system,
    BlinkMacSystemFont, system-ui, 'Malgun Gothic', sans-serif;

  --layout-header-max: 1440px;
  --layout-body-max: 1200px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--wds-surface); font-family: var(--font-core); color: var(--wds-text); }
button { font-family: var(--font-core); }
a { color: inherit; }

.ee.sh-page { width: 100%; min-width: 320px; background: var(--wds-surface); display: flex; flex-direction: column; }
.sh-wrap { max-width: var(--layout-body-max); margin: 0 auto; width: 100%; box-sizing: border-box; }
.sh-pad-my { padding: 40px 20px 64px; }
@media (max-width: 768px) { .sh-pad-my { padding: 20px 16px 48px; } }

/* ── cart.css (원본 그대로, 값 변경 없음) ── */
/* endedit 장바구니 — 인라인 스타일에서 옮겨온 것. 값은 옮기기 전과 1:1 이다.
 *
 * ★ 모바일 글자크기를 «다시 적을» 때가 있다. global.css 에
 *   @media(max-width:768px){ button:not([aria-label]){ font-size:14px } }
 *   가 있어서, 인라인이던 값이 클래스로 바뀌는 순간 그 규칙에 진다
 *   (`button:not(...)` 은 (0,1,1) 이고 그냥 클래스는 (0,1,0)).
 *   그래서 aria-label 없는 버튼의 글자크기는 부모 클래스까지 붙여 (0,2,1) 로 올린다.
 *   높이는 그 규칙이 `!important` 라 예전에도 40px 이었다 — 건드리지 않는다.
 */
@media (max-width: 768px) {
  button:not([aria-label]) { font-size: 14px; }
}

/* ── 체크박스 ── */
.ee-ct-chk {
  flex: none; width: 22px; height: 22px; border-radius: 4px; border: 0; padding: 0;
  cursor: pointer; display: grid; place-items: center; color: #fff;
  background: var(--wds-surface); box-shadow: inset 0 0 0 1px var(--wds-line);
}
.ee-ct-chk.is-on { background: var(--wds-text); box-shadow: none; }

/* ── 수량 스테퍼 ── */
.ee-ct-qty { display: inline-flex; align-items: center; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--wds-line); opacity: 1; }
.ee-ct-qty-b {
  width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--wds-text-neutral);
}
.ee-ct-qty-s { font-size: 16px; line-height: 1; }
.ee-ct-qty-n { min-width: 30px; text-align: center; font-size: 15px; font-weight: 600; }

/* ── 제목줄 ── */
.ee-ct-hd { display: flex; align-items: baseline; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--wds-text); }
.ee-ct-h1 { margin: 0; font-size: 28px; line-height: 38px; letter-spacing: -0.0236em; font-weight: 800; }
.ee-ct-cnt { font-size: 15px; color: var(--wds-text-alt); }

/* 데이터가 오기 전 자리 — 이게 없으면 푸터가 위로 올라왔다 내려간다 */
.ee-ct-skel { min-height: 300px; }

/* ── 빈 장바구니 ── */
.ee-ct-empty { display: grid; place-items: center; gap: 10px; padding: 80px 0; color: var(--wds-text-alt); }
.ee-ct-empty-t { font-size: 16px; font-weight: 600; color: var(--wds-text-neutral); }
.ee-ct-empty-a {
  margin-top: 8px; height: 48px; padding: 0 20px; border-radius: 4px;
  display: grid; place-items: center; box-sizing: border-box;
  background: var(--wds-primary); color: #fff; font-size: 16px; font-weight: 700; text-decoration: none;
}

/* ── 본문 2단 ── */
.ee-ct-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; padding-top: 24px; }
.ee-ct-side { position: sticky; top: 24px; }
/* 레거시 스킨의 .sub_contents 가 overflow:hidden(css/commonTotal.css) 이라 스크롤 컨테이너가 되고,
   그러면 위 sticky 는 뷰포트가 아니라 그 상자를 기준 삼아 아무 일도 하지 않는다.
   clip 은 똑같이 잘라내되 스크롤 컨테이너를 만들지 않고, flow-root 로 플로트 감싸기(BFC)는 유지한다. */
.sub_contents:has(#ee-ct-root) { overflow: clip; display: flow-root; }

/* ── 전체선택 줄 ── */
.ee-ct-all { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; box-shadow: inset 0 -1px 0 var(--wds-line-neutral); }
.ee-ct-all-t { font-size: 14px; color: var(--wds-text-neutral); }
.ee-ct-clear {
  margin-left: auto; border: 0; background: transparent; padding: 0; cursor: pointer;
  font-family: var(--font-core); font-size: 14px; color: var(--wds-text-alt);
}

/* ── 상품 줄 ── */
.ee-ct-it { display: flex; gap: 12px; padding: 20px 0; box-shadow: inset 0 -1px 0 var(--wds-line-alt); }
.ee-ct-it-chk { padding-top: 2px; }
.ee-ct-it-img {
  flex: none; position: relative; width: 104px; aspect-ratio: 3 / 4; border-radius: 2px;
  overflow: hidden; display: block; background: var(--wds-fill); box-shadow: var(--wds-elev-inset-line);
}
.ee-ct-it-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ee-ct-it-bd { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ee-ct-it-top { display: flex; align-items: flex-start; gap: 8px; }
.ee-ct-it-t {
  flex: 1; min-width: 0; font-size: 15px; line-height: 22px; color: var(--wds-text); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ee-ct-it-x {
  flex: none; width: 28px; height: 28px; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--wds-text-assistive);
}
.ee-ct-it-sub { font-size: 13px; color: var(--wds-text-alt); }

/* ── 옵션 드롭다운(2026-08-26 3차개정 — 디자인시스템 정합) — 조합 하나(«블랙 / S») =
 * 항목 하나인 커스텀 드롭다운. 네이티브 <select> 는 옵션 목록을 OS 가 그려 폰트·간격·
 * hover 를 못 맞추므로 버튼(트리거)+절대배치 패널로 직접 그린다.
 * ★ 값 출처 — 새 부품이 아니라 이 사이트가 이미 쓰는 두 컴포넌트에서 그대로 가져왔다.
 *   트리거 : 바로 옆 수량 스테퍼(.ee-ct-qty-b, 34px·라운딩 4px·inset 1px 보더)와
 *            «같은 줄에 나란히 있는 입력형 컨트롤» 이라 그 규격을 그대로 맞춘다
 *            (기존엔 32px·라운딩 7px 로 임의로 다른 값을 썼던 것을 바로잡음).
 *   패널·항목 : /static/shop-list 상품목록의 정렬 드롭다운(.ee-ls-sort-pop/-i)이 이
 *            사이트의 «떠있는 선택목록» 정본이다 — 패널 라운딩 12px, 항목 라운딩 8px·
 *            높이 40px·15px 을 그대로 옮겼다(기존엔 10px/6px/36px/13px 로 따로 놀았음). */
/* PC = 고정폭(카드마다 라벨 길이가 달라도 줄이 들쭉날쭉하지 않게), 모바일(≤768px)은
 * 아래 미디어쿼리에서 100% 로 늘려 카드 폭에 맞춘다(사용자 지시 2026-08-26). */
.ee-ct-opt { position: relative; display: inline-flex; width: 200px; max-width: 100%; }
.ee-ct-opt-trigger {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 12px;
  border: 0; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--wds-line);
  background: var(--wds-surface); cursor: pointer; width: 100%; max-width: 100%;
  transition: background .15s var(--wds-ease);
}
.ee-ct-opt-trigger:hover:not(:disabled) { background: var(--wds-fill); }
.ee-ct-opt-trigger:disabled { cursor: default; opacity: .6; }
.ee-ct-opt.is-open .ee-ct-opt-trigger { background: var(--wds-fill); }
.ee-ct-opt-label {
  flex: 1; min-width: 0; text-align: left;
  font-family: var(--font-core); font-size: 14px; font-weight: 600; color: var(--wds-text-neutral);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ee-ct-opt-chev { flex: none; color: var(--wds-text-alt); transition: transform .18s var(--wds-ease); }
.ee-ct-opt.is-open .ee-ct-opt-chev { transform: rotate(180deg); color: var(--wds-text); }
.ee-ct-opt.is-busy { opacity: .6; }

.ee-ct-opt-panel {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 200px; max-width: 300px;
  max-height: 264px; overflow-y: auto; padding: 6px; border-radius: 12px;
  background: var(--wds-surface); box-shadow: var(--wds-elev-popover);
  animation: eeCtOptIn .14s var(--wds-ease);
}
@keyframes eeCtOptIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.ee-ct-opt-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font-family: var(--font-core); font-size: 15px; font-weight: 500; color: var(--wds-text-neutral); text-align: left;
}
.ee-ct-opt-item:hover:not(:disabled) { background: var(--wds-fill); }
.ee-ct-opt-item.is-sel { background: var(--wds-fill); color: var(--wds-text); font-weight: 700; }
.ee-ct-opt-item.is-sel svg { color: var(--wds-primary); flex: none; }
.ee-ct-opt-item-t em { font-style: normal; font-size: 13px; color: var(--wds-text-alt); font-weight: 500; }
.ee-ct-opt-item.is-oos { color: var(--wds-text-assistive); cursor: default; }
.ee-ct-opt-item.is-oos:hover { background: transparent; }
.ee-ct-opt-oos {
  flex: none; font-size: 11px; font-weight: 700; color: var(--wds-destructive);
  padding: 2px 6px; border-radius: 4px; background: rgba(255, 66, 66, 0.08);
}
.ee-ct-it-qr { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 6px; }
.ee-ct-it-p { margin-left: auto; font-size: 17px; font-weight: 800; letter-spacing: -0.012em; }

/* ── 요약 패널 ── */
.ee-ct-sum { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 4px; background: var(--wds-surface-alt); }
.ee-ct-sum-row { display: flex; align-items: baseline; font-size: 15px; }
.ee-ct-sum-k { flex: 1; color: var(--wds-text-alt); }
.ee-ct-sum-v { font-weight: 600; color: var(--wds-text-neutral); }
.ee-ct-sum-tot { display: flex; align-items: baseline; padding-top: 12px; box-shadow: inset 0 1px 0 var(--wds-line); }
.ee-ct-sum-tot-k { flex: 1; font-size: 15px; font-weight: 700; }
.ee-ct-sum-tot-v { font-size: 24px; font-weight: 800; letter-spacing: -0.0194em; }
.ee-ct-sum-pt { font-size: 13px; color: var(--wds-text-alt); text-align: right; }
.ee-ct-sum-acts { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.ee-ct-order {
  height: 52px; border-radius: 4px; border: 0; cursor: pointer;
  background: var(--wds-primary); color: #fff; font-family: var(--font-core); font-size: 16px; font-weight: 700;
}
.ee-ct-order:disabled { opacity: .5; cursor: default; }

/* ── 삭제 확인 (시안 모달 규격) ── */
.ee-ct-cf-dim {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 16px; background: rgba(23, 23, 25, 0.52);
}
.ee-ct-cf {
  width: 100%; max-width: 420px; background: var(--wds-surface); border-radius: 12px; padding: 24px;
  display: flex; flex-direction: column; gap: 18px;
}
.ee-ct-cf-t { font-size: 16px; line-height: 24px; font-weight: 600; text-align: center; }
.ee-ct-cf-acts { display: flex; gap: 8px; }
.ee-ct-cf-no,
.ee-ct-cf-yes {
  flex: 1; height: 44px; border-radius: 4px; border: 0; cursor: pointer;
  font-family: var(--font-core); font-size: 15px; font-weight: 700;
}
.ee-ct-cf-no { background: var(--wds-fill); color: var(--wds-text); }
.ee-ct-cf-yes { background: var(--wds-destructive); color: #fff; }

/* 주문 검증용 숨김 폼/프레임 */
.ee-ct-hidden { display: none; }

@media (max-width: 768px) {
  .ee-ct-h1 { font-size: 22px; line-height: 30px; }
  .ee-ct-empty { padding: 56px 0; }
  .ee-ct-empty-a { height: 44px; }
  .ee-ct-grid { grid-template-columns: 1fr; gap: 20px; padding-top: 12px; }
  .ee-ct-side { position: static; }
  .ee-ct-it { padding: 16px 0; }
  .ee-ct-it-img { width: 84px; }
  .ee-ct-it-t { font-size: 14px; }
  .ee-ct-it-p { font-size: 16px; }
  /* 옵션 드롭다운 — PC 는 고정폭(200px), 모바일은 카드 폭 그대로 100% (사용자 지시 2026-08-26) */
  .ee-ct-opt { width: 100%; }
  .ee-ct-opt-panel { left: 0; right: 0; min-width: 0; max-width: none; }

  /* ★ aria-label 없는 버튼들 — global.css 의 14px 을 되돌린다(위 주석 참고) */
  .ee-ct-sum-acts button.ee-ct-order { font-size: 16px; }
  .ee-ct-cf-acts button.ee-ct-cf-no,
  .ee-ct-cf-acts button.ee-ct-cf-yes { font-size: 15px; }
}

/* ── 이 프로토타입 전용: 헤더/푸터 placeholder ──────────────────────────
 * order-static-prototype.css 와 동일한 자리지킴 패턴. 실배포판은 이 자리에
 * "공용 셸"(헤더 메가메뉴·검색·장바구니뱃지·모바일 드로어)을 넣어야 함 —
 * 페이지 전용이 아니라 전 페이지 공통 인프라라 별도 작업으로 한 번만 만들고
 * 여기서는 재사용만 하면 됨. 지금은 레이아웃 검증용 최소 형태만 둠. */
.proto-hdr { max-width: var(--layout-header-max); margin: 0 auto; padding: 20px 32px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--wds-line); }
.proto-hdr .logo { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.proto-hdr .note { font-size: 12px; color: var(--wds-text-alt); }
.proto-ftr { max-width: var(--layout-header-max); margin: 0 auto; padding: 32px; border-top: 1px solid var(--wds-line); font-size: 12px; color: var(--wds-text-alt); }
@media (max-width: 768px) {
  .proto-hdr { padding: 14px 16px; }
  .proto-ftr { padding: 20px 16px; }
}
