﻿/* ============================================================================
 * 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 32px 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.is-busy { opacity: 0.4; }
.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; }

/* ── 전체선택 줄 ── */
.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); }
.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: 17px; font-weight: 700;
}
.ee-ct-order2 {
  height: 48px; border-radius: 4px; border: 0; cursor: pointer;
  background: var(--wds-fill); color: var(--wds-text); font-family: var(--font-core); font-size: 16px; font-weight: 700;
}
.ee-ct-order:disabled, .ee-ct-order2: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; }

  /* ★ aria-label 없는 버튼들 — global.css 의 14px 을 되돌린다(위 주석 참고) */
  .ee-ct-sum-acts button.ee-ct-order { font-size: 17px; }
  .ee-ct-sum-acts button.ee-ct-order2 { 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; }
}
