/* =================================================================
 * cart.css — 장바구니
 * ================================================================= */

/* ---- 장바구니 화면 (피그마 Cart 1920 · Cart-mobile 850, WBS 2.4.7) ----
   PC : 상품 목록 630 + 간격 66 + 합계 상자 615 (= 1311). 배너 아래 목록 153 · 합계 상자 143 */

.cart-layout {
	display: grid;
	grid-template-columns: 630fr 615fr;
	column-gap: 66px;
	align-items: start;
	max-width: 1311px;
	margin: 143px auto 0;
}
.cart-layout[hidden] { display: none; }

/* 상품 줄 : 높이 315, 위아래 구분선, 사진 245 (왼쪽 30 · 위 35) */
.cart-list { margin: 10px 0 0; padding: 0; list-style: none; border-top: 1px solid #c4c4c4; }
.cart-item {
	display: grid;
	grid-template-columns: 245px 1fr;
	column-gap: 26px;
	padding: 35px 21px 35px 30px;
	border-bottom: 1px solid #c4c4c4;
}
.cart-item.is-busy { opacity: .5; pointer-events: none; }
.cart-item--off { opacity: .55; }
.cart-item__media { width: 245px; aspect-ratio: 1; overflow: hidden; background: var(--surface); }
.cart-item__media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__info { display: flex; flex-direction: column; min-width: 0; }
.cart-item__title { max-width: 300px; font-family: var(--font-body); font-size: 20px; line-height: normal; color: var(--ink); text-transform: capitalize; }
.cart-item__stock { margin: 6px 0 0; font-family: var(--font-body); font-size: 13px; line-height: 1.4; }
.cart-item__stock:empty { display: none; }
.cart-item__stock.is-bad { color: var(--danger); }
.cart-item__stock.is-low { color: #8a6d1f; }

/* 수량 109×50 · 찜 50×50 (주황 테두리 · 모서리 26 · 간격 16) */
.cart-item__controls { display: flex; align-items: center; gap: 16px; margin-top: 43px; }
.cart-qty {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 109px;
	height: 50px;
	border: 1px solid var(--brand);
	border-radius: 26px;
	background: #fff;
}
.cart-qty button { width: 34px; height: 100%; padding: 0; border: 0; background: none; font-family: var(--font-body); font-size: 18px; color: var(--brand); cursor: pointer; }
.cart-qty input { width: 30px; border: 0; background: none; font-family: var(--font-body); font-size: 18px; color: var(--brand); text-align: center; -moz-appearance: textfield; }
.cart-qty input::-webkit-outer-spin-button, .cart-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-like {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	padding: 0;
	border: 1px solid var(--brand);
	border-radius: 26px;
	background: #fff;
	cursor: pointer;
}
.cart-like svg { width: 20px; height: 20px; fill: none; stroke: var(--brand); stroke-width: 1.8; }
.cart-like img { display: none; width: 20px; height: 20px; }
.cart-like.is-liked svg { display: none; }
.cart-like.is-liked img { display: block; }

/* 가격 : 오른쪽 아래, 할인 전 20 취소선 + 판매가 30 굵게 주황 */
.cart-item__price { margin: auto 0 0; padding-top: 16px; font-family: var(--font-body); font-size: 20px; line-height: normal; color: var(--ink); text-align: right; }
.cart-item__price b { font-weight: 700; font-size: 30px; color: var(--brand); }

/* 합계 상자 615×650 : 흰 바탕 · 주황 테두리 · 모서리 33, 안쪽 74 */
.cart-summary {
	display: flex;
	flex-direction: column;
	padding: 53px 73px 45px 74px;
	border: 1px solid var(--brand);
	border-radius: 33px;
	background: #fff;
	font-family: var(--font-body);
}
.cart-summary__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 20px; line-height: normal; color: var(--ink); text-transform: capitalize; }
.cart-summary__row + .cart-summary__row { margin-top: 26px; }
.cart-summary__row[hidden] { display: none; }
.cart-summary__line { width: calc(100% + 32px); margin: 60px -16px 0; border: 0; border-top: 1px solid #c4c4c4; }
.cart-summary__row--total { margin-top: 45px !important; }
.cart-summary__row--total span:last-child { font-weight: 700; font-size: 30px; color: var(--brand); }
.cart-summary__saved { margin: 48px 0 0; font-weight: 600; font-size: 20px; color: var(--brand); text-align: center; text-transform: capitalize; }
.cart-summary__saved[hidden] { display: none; }
.cart-summary__checkout,
.cart-summary__continue {
	display: flex;
	align-items: center;
	justify-content: center;
	width: calc(100% + 32px);
	height: 50px;
	margin-inline: -16px;
	border: 1px solid var(--brand);
	border-radius: 26px;
	font-size: 18px;
	transition: background-color .2s var(--ease), color .2s var(--ease);
}
.cart-summary__checkout { margin-top: 35px; background: var(--brand); color: #fff; }
.cart-summary__checkout:hover { background: var(--brand-hover); }
.cart-summary__checkout.is-disabled { pointer-events: none; opacity: .5; cursor: not-allowed; }
.cart-summary__continue { margin-top: 9px; background: #fff; color: var(--brand); }
.cart-summary__continue:hover { background: var(--brand); color: #fff; }
.cart-summary__free { margin: 22px 0 0; font-weight: 600; font-size: 20px; color: var(--brand); text-transform: capitalize; }
.cart-summary__free[hidden] { display: none; }
.cart-summary__note { margin: 16px 0 0; font-size: 15px; color: var(--fg-subtle); text-transform: capitalize; }

@media (max-width: 1199px) and (min-width: 900px) {
	.cart-layout { column-gap: 32px; }
	.cart-item { grid-template-columns: 160px 1fr; }
	.cart-item__media { width: 160px; }
	.cart-summary { padding-inline: 40px; }
}

/* 모바일 (기획안 Cart-mobile 850 폭) : 목록 아래 합계 상자 */
@media (max-width: 899px) {
	.cart-layout { display: block; margin-top: calc(120 * 100vw / 850); }
	.cart-list { margin: 0 calc(-16 * 100vw / 850); }
	.cart-item { grid-template-columns: calc(235 * 100vw / 850) 1fr; column-gap: calc(26 * 100vw / 850); padding: calc(30 * 100vw / 850) calc(20 * 100vw / 850); }
	.cart-item__media { width: 100%; }
	.cart-item__title { font-size: max(13px, calc(20 * 100vw / 850)); }
	.cart-item__controls { gap: 10px; margin-top: calc(30 * 100vw / 850); }
	.cart-qty { width: max(100px, calc(109 * 100vw / 850)); height: max(38px, calc(50 * 100vw / 850)); }
	.cart-like { width: max(36px, calc(50 * 100vw / 850)); height: max(36px, calc(50 * 100vw / 850)); }
	.cart-qty button, .cart-qty input { font-size: 14px; }
	.cart-item__price { font-size: max(12px, calc(20 * 100vw / 850)); }
	.cart-item__price b { font-size: max(18px, calc(30 * 100vw / 850)); }
	.cart-summary { margin-top: calc(80 * 100vw / 850); padding: 28px 24px 24px; border-radius: calc(33 * 100vw / 850); }
	.cart-summary__row { font-size: max(13px, calc(20 * 100vw / 850)); }
	.cart-summary__row + .cart-summary__row { margin-top: 14px; }
	.cart-summary__line { margin-top: 28px; }
	.cart-summary__row--total { margin-top: 24px !important; }
	.cart-summary__row--total span:last-child { font-size: max(20px, calc(30 * 100vw / 850)); }
	.cart-summary__saved { margin-top: 24px; font-size: max(13px, calc(20 * 100vw / 850)); }
	.cart-summary__checkout, .cart-summary__continue { height: max(38px, calc(50 * 100vw / 850)); font-size: 14px; }
	.cart-summary__checkout { margin-top: 18px; }
	.cart-summary__free { margin-top: 14px; font-size: max(13px, calc(20 * 100vw / 850)); }
	.cart-summary__note { font-size: 11px; }
}

/* ---- 주문서 ---- */

.checkout__section {
	font-family: var(--font-point);
	font-weight: 700;
	font-size: 28px;
	margin-block: 40px 22px;
}
@media (max-width: 899px) { .checkout__section { font-size: 20px; margin-block: 28px 14px; } }
.checkout__section:first-child { margin-block-start: 0; }

.checkout-hero { margin-bottom: 80px; }
@media (max-width: 899px) { .checkout-hero { margin-bottom: 36px; } }

.pay-methods { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }

.summary__title { margin: 0; font-family: var(--font-point); font-weight: 700; font-size: 28px; }
.summary__items { display: grid; gap: 10px; margin: 0; padding: 0 0 18px; list-style: none; border-bottom: 1px solid #c4c4c4; }
.summary__items li { display: flex; justify-content: space-between; gap: var(--sp-sm); font-size: 16px; color: var(--ink); }

/* ---- 주문 완료 (기획안에 없음 · 장바구니 합계 상자와 같은 줄 모양, WBS 2.4.11) ---- */
.order-done { display: grid; gap: 18px; font-family: var(--font-body); }
.order-done__items { margin-block: 6px; padding-block: 18px; border-top: 1px solid #dddddd; font-size: 14px; }
.order-done .summary__row > :first-child { color: #545454; }
.order-done .summary__row--total > :first-child { color: var(--ink); }

/* =================================================================
 * 장바구니 새 화면 (피그마 07 CART (PC) 1440, WBS 3.2.6) — 접두어 bag-
 * PC : 목록 781 + 간격 56 + 요약 상자 363 (= 1200). 위 결제 · 주문완료 화면 클래스는 그대로 둔다.
 * 모바일 시안이 없어 첫 화면 모바일과 같은 규칙(양옆 20 · 세로로 쌓기)으로 맞춘다.
 * ================================================================= */
.bag { padding-block: 32px 56px; }
.bag__title { margin: 0 0 20px; font-family: var(--font-point); font-weight: 700; font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; }

/* 무료배송 띠 (옅은 핑크 · 높이 52) */
.bag-free { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; min-height: 52px; padding: 12px 20px; background: #f4f1ea; }
.bag-free__text { margin: 0; font-size: 14px; color: var(--ink); }
.bag-free__bar { position: relative; flex: 1 1 160px; max-width: 400px; height: 6px; background: #fff; }
.bag-free__bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); transition: width .3s; }

.bag-layout { display: grid; gap: 32px; margin-block-start: 28px; }
.bag-main { min-width: 0; }

/* 표 머리 : Product / Quantity / Total */
.bag-head { display: none; }
.bag-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid #dddddd; }
.bag-item {
	display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; grid-template-areas: "media info info" "media qty total";
	gap: 12px 16px; align-items: center; padding-block: 20px; border-bottom: 1px solid #dddddd;
}
.bag-item.is-off .bag-item__media, .bag-item.is-off .bag-item__name { opacity: .5; }
.bag-item__media { grid-area: media; display: flex; align-items: center; justify-content: center; width: 90px; aspect-ratio: 1; background: var(--soft); align-self: start; }
.bag-item__media img { width: 86.7%; height: 86.7%; object-fit: contain; }
.bag-item__media--pink { background: var(--tone-pink-soft); }
.bag-item__media--mint { background: var(--tone-mint-soft); }
.bag-item__media--yellow { background: var(--tone-yellow-soft); }
.bag-item__info { grid-area: info; min-width: 0; }
.bag-item__name { display: block; font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.bag-item__unit { margin: 6px 0 0; font-size: 14px; color: #545454; }
.bag-item__note { margin: 6px 0 0; font-size: 13px; color: var(--danger, #c0392b); }
.bag-item__remove { margin-block-start: 10px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.bag-item__remove:hover { text-decoration: underline; }
.bag-item__total { grid-area: total; margin: 0; font-size: 16px; font-weight: 700; text-align: right; color: var(--ink); }

/* 수량 118×46 */
.bag-qty { grid-area: qty; display: inline-flex; align-items: center; justify-self: start; width: 118px; height: 46px; border: 1px solid #bdbdbd; background: #fff; }
.bag-qty button { flex: none; width: 38px; height: 100%; padding: 0; border: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); cursor: pointer; }
.bag-qty input { width: 100%; min-width: 0; border: 0; background: none; font: inherit; font-size: 15px; text-align: center; color: var(--ink); -moz-appearance: textfield; }
.bag-qty input::-webkit-outer-spin-button, .bag-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.bag-continue { display: inline-block; margin-block-start: 20px; font-size: 14px; color: var(--ink); }
.bag-continue:hover { text-decoration: underline; }

/* 함께 쓰면 좋은 마스크 594×124 */
.bag-upsell { display: flex; align-items: center; gap: 16px; max-width: 594px; margin-block-start: 28px; padding: 16px; border: 1px solid #dddddd; }
.bag-upsell[hidden] { display: none; }
.bag-upsell__media { flex: none; display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; background: var(--soft); }
.bag-upsell__media.bag-item__media--pink { background: var(--tone-pink-soft); }
.bag-upsell__media.bag-item__media--mint { background: var(--tone-mint-soft); }
.bag-upsell__media.bag-item__media--yellow { background: var(--tone-yellow-soft); }
.bag-upsell__media img { width: 86.7%; height: 86.7%; object-fit: contain; }
.bag-upsell__body { flex: 1; min-width: 0; }
.bag-upsell__name { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.bag-upsell__text { margin: 6px 0 0; font-size: 14px; color: #545454; }
.bag-upsell__add { flex: none; min-width: 59px; height: 44px; padding-inline: 14px; }

/* 주문 요약 363 (회색) */
.bag-sum { display: grid; gap: 16px; align-self: start; padding: 28px 24px; background: var(--soft); }
.bag-sum__title { margin: 0 0 4px; font-family: var(--font-body); font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: 0; }
.bag-sum__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink); }
.bag-sum__row[hidden] { display: none; }
.bag-sum__row span:last-child { text-align: right; }
.bag-sum__row--total { padding-block-start: 18px; border-top: 1px solid #dddddd; font-size: 16px; font-weight: 700; }
.bag-sum__checkout { width: 100%; height: 52px; }
.bag-sum__checkout.is-disabled { opacity: .5; pointer-events: none; }

.bag-promo { display: grid; gap: 8px; }
.bag-promo label { font-size: 14px; color: var(--ink); }
.bag-promo__row { display: flex; gap: 0; }
.bag-promo__row input { flex: 1; min-width: 0; height: 46px; padding-inline: 12px; border: 1px solid #bdbdbd; border-right: 0; border-radius: 0; background: #fff; font: inherit; font-size: 14px; text-transform: uppercase; }
.bag-promo__row input:focus { outline: none; border-color: var(--ink); }
.bag-promo__row button { flex: none; min-width: 69px; height: 46px; padding-inline: 12px; border: 1px solid var(--ink); background: #fff; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.bag-promo__msg { margin: 0; font-size: 13px; color: #2e7d32; }
.bag-promo__msg.is-bad { color: var(--danger, #c0392b); }

@media (min-width: 900px) {
	.bag { padding-block: 56px 96px; }
	.bag__title { margin-block-end: 28px; font-size: 44px; line-height: 1.15; }
	.bag-free { flex-wrap: nowrap; padding-inline: 24px; }
	.bag-free__bar { flex: 0 0 400px; }
	.bag-layout { grid-template-columns: minmax(0, 781px) minmax(0, 363px); justify-content: space-between; gap: 56px; margin-block-start: 40px; }
	.bag-head { display: grid; grid-template-columns: minmax(0, 1fr) 118px 122px; gap: 24px; padding-block-end: 14px; font-size: 13px; color: #545454; }
	.bag-head span:last-child { text-align: right; }
	.bag-item { grid-template-columns: 120px minmax(0, 1fr) 118px 122px; grid-template-areas: "media info qty total"; gap: 24px; padding-block: 24px; }
	.bag-item__media { width: 120px; }
	.bag-qty { align-self: center; }
	.bag-item__total { align-self: center; }
	.bag-continue { margin-block-start: 28px; }
	.bag-upsell { margin-block-start: 80px; padding: 16px; }
	.bag-upsell__media { width: 90px; height: 90px; }
	.bag-sum { gap: 18px; padding: 32px; }
}

/* =================================================================
 * 결제 새 화면 (피그마 08 CHECKOUT (PC) 1440, WBS 3.2.7) — 접두어 co-
 * PC : 왼쪽 양식 694 + 간격 64 + 오른쪽 요약 442 (= 1200). 머리는 로고 + Return to cart (높이 68)
 * 모바일 시안이 없어 요약을 위로 올리고 세로로 쌓는다.
 * ================================================================= */
.co-top { display: flex; align-items: center; justify-content: space-between; height: 56px; padding-inline: 20px; border-bottom: 1px solid #dddddd; }
.co-top__logo { display: block; width: 72px; line-height: 0; }
.co-top__logo img { display: block; width: 100%; height: auto; }
.co-top__back { font-size: 14px; color: var(--ink); }
.co-top__back:hover { text-decoration: underline; }

.co { display: grid; gap: 28px; padding-block: 24px 56px; }
.co-form { min-width: 0; }
.co-error { margin: 0 0 20px; }

.co-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.co-title { margin: 0 0 16px; font-family: var(--font-body); font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: 0; color: var(--ink); }
.co-title--gap { margin-block-start: 36px; }
.co-signin { font-size: 14px; color: var(--ink); }
.co-signin:hover { text-decoration: underline; }

.co-field { display: grid; gap: 8px; margin-block-end: 16px; }
.co-field[hidden] { display: none; }
.co-field label { font-size: 13px; color: var(--ink); }
.co-opt { color: #545454; }
.co-input { width: 100%; height: 48px; padding-inline: 14px; border: 1px solid #bdbdbd; border-radius: 0; background: #fff; font: inherit; font-size: 15px; color: var(--ink); }
.co-input:focus { outline: none; border-color: var(--ink); }
.co-select {
	appearance: none; -webkit-appearance: none; padding-inline-end: 34px; cursor: pointer;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0h8L4 5z' fill='%231d1d1f'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.co-grid { display: grid; gap: 0 12px; }
@media (min-width: 600px) { .co-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .co-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 배송 방법 : 694×58 상자, 고른 것은 2px 검은 테두리 */
.co-ship { display: grid; gap: 12px; }
.co-ship__opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 14px 16px; border: 1px solid #bdbdbd; font-size: 15px; color: var(--ink); cursor: pointer; }
.co-ship__opt:has(input:checked) { border: 2px solid var(--ink); padding: 13px 15px; }
.co-ship__opt input { position: absolute; opacity: 0; pointer-events: none; }
.co-ship__opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.co-ship__price { flex: none; }

/* 결제 : 카드 상자 (카드 번호는 Stripe 화면에서) */
.co-pay__lead { margin: -4px 0 12px; font-size: 14px; color: var(--ink); }
.co-pay { padding: 20px 24px; border: 1px solid #dddddd; background: #f7f7f5; }
.co-pay__title { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.co-pay__text { margin: 0; font-size: 14px; line-height: 1.65; color: #545454; }

.co-paynow { width: 100%; height: 56px; margin-block-start: 32px; font-size: 16px; }
.co-paynow:disabled { opacity: .55; cursor: not-allowed; }
.co-agree { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: #545454; }
.co-agree a { text-decoration: underline; }
.co-policy { display: flex; flex-wrap: wrap; gap: 4px 0; margin-block-start: 36px; font-size: 12px; }
.co-policy a { color: var(--ink); }
.co-policy a:hover { text-decoration: underline; }
.co-policy a + a::before { content: "\00b7"; display: inline-block; margin-inline: 6px; color: var(--ink); }

/* 주문 요약 442 (회색) */
.co-sum { order: -1; align-self: start; padding: 24px 20px; background: var(--soft); }
.co-sum__items { display: grid; gap: 16px; margin: 0; padding: 0 0 20px; list-style: none; border-bottom: 1px solid #dddddd; }
.co-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.co-item__media { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; background: #fff; }
.co-item__media img { width: 86%; height: 86%; object-fit: contain; }
.co-item__media.bag-item__media--pink { background: var(--tone-pink-soft); }
.co-item__media.bag-item__media--mint { background: var(--tone-mint-soft); }
.co-item__media.bag-item__media--yellow { background: var(--tone-yellow-soft); }
.co-item__name { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.co-item__qty { margin: 8px 0 0; font-size: 13px; color: var(--ink); }
.co-item__note { margin: 4px 0 0; font-size: 13px; color: var(--danger); }
.co-item__price { align-self: center; font-size: 14px; color: var(--ink); }
.co-sum__rows { display: grid; gap: 12px; padding-block: 20px; border-bottom: 1px solid #dddddd; }
.co-sum__row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink); }
.co-sum__row[hidden] { display: none; }
.co-sum__row span:last-child { text-align: right; }
.co-sum__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-block-start: 20px; font-size: 20px; font-weight: 700; color: var(--ink); }
.co-sum__total b { font-weight: 700; }
.co-sum__note { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: #545454; }
.co-sum__note.is-bad { color: var(--danger); }

@media (min-width: 900px) {
	.co-top { height: 68px; padding-inline: 40px; }
	.co-top__logo { width: 96px; }
	.co { grid-template-columns: minmax(0, 694px) minmax(0, 442px); justify-content: space-between; gap: 64px; padding-block: 48px 96px; }
	.co-title { font-size: 22px; }
	.co-title--gap { margin-block-start: 44px; }
	.co-sum { order: 0; padding: 32px; }
	.co-sum__total { font-size: 22px; }
}

/* =================================================================
 * 장바구니 (피그마 07 CART (PC) 1440, WBS 3.2.6) — cp-
 * 제목 40 · 무료배송 띠 1200 × 52 (Warm Ivory) · 목록 744 왼쪽 · 요약 400 오른쪽 (Soft White) · 상품 줄 사진 110
 * 모바일 시안이 없어 목록 → 요약 → 추천으로 쌓는다.
 * ================================================================= */
.cartp { color: var(--ink); padding-block: 40px 64px; }
.cartp ~ .footer { margin-block-start: 0; }
.cp-title { margin: 0; font-size: 30px; font-weight: 700; line-height: 36px; letter-spacing: -1.2px; }
.cp-empty { margin-block-start: 32px; padding: 48px 24px; background: var(--soft-white); text-align: center; }
.cp-empty p { margin: 0 0 20px; font-size: 15px; color: var(--dark-gray); }
.cp-empty[hidden], [data-cart][hidden] { display: none; }

.cp-free { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-block-start: 24px; padding: 16px 20px; background: var(--warm-ivory); }
.cp-free p { margin: 0; font-size: 14px; }
.cp-free__bar { flex: 1 1 160px; max-width: 240px; height: 4px; background: var(--light-gray); }
.cp-free__bar span { display: block; height: 100%; width: 0; background: var(--soft-black); transition: width .3s var(--ease); }

.cp-layout { display: grid; gap: 32px; margin-block-start: 32px; }
.cp-main { min-width: 0; }
.cp-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.cp-item { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: "media info total" "media qty qty"; gap: 10px 16px; align-items: start; padding-block: 24px; border-bottom: 1px solid var(--border); }
.cp-item.is-off { opacity: .6; }
.cp-item__media { grid-area: media; display: block; aspect-ratio: 1; background: var(--soft-white); }
.cp-item__media img { width: 100%; height: 100%; object-fit: cover; }
.cp-item__info { grid-area: info; display: grid; align-content: start; min-width: 0; }
.cp-item__name { font-size: 15px; font-weight: 500; }
.cp-item__opt { margin: 8px 0 0; font-size: 13px; line-height: 20.8px; color: var(--dark-gray); }
.cp-item__note { margin: 4px 0 0; font-size: 12px; color: var(--danger); }
.cp-item__remove { justify-self: start; margin-block-start: 6px; padding: 0; border: 0; background: none; font-size: 13px; line-height: 20.8px; color: var(--dark-gray); cursor: pointer; }
.cp-item__remove:hover { color: var(--ink); text-decoration: underline; }
.cp-qty { grid-area: qty; display: inline-flex; align-items: center; justify-self: start; width: 140px; height: 44px; border: 1px solid var(--border); }
.cp-qty button { width: 44px; height: 100%; padding: 0; border: 0; background: none; font-size: 16px; cursor: pointer; }
.cp-qty button:disabled { color: var(--mid-gray); cursor: default; }
.cp-qty span { flex: 1; text-align: center; font-size: 16px; }
.cp-item__total { grid-area: total; margin: 0; font-size: 16px; font-weight: 500; text-align: right; }

.cp-also { margin-block-start: 48px; }
.cp-also__title { margin: 0; font-size: 17px; font-weight: 700; line-height: 23.8px; letter-spacing: 0; }
.cp-also__list { margin-block-start: 20px; }
.cp-also .sp-card__media { aspect-ratio: 235 / 180; }
.cp-also .sp-card:nth-child(n+3) { display: none; }

.cp-sum { align-self: start; padding: 32px; background: var(--soft-white); }
.cp-sum__title { margin: 0; font-size: 20px; font-weight: 700; line-height: 28px; letter-spacing: 0; }
.cp-sum__rows { display: grid; gap: 15px; margin: 13px 0 0; padding-block-end: 16px; border-bottom: 1px solid var(--border); }   /* 줄 간격 37 (피그마 07 CART) */
.cp-sum__rows div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; line-height: 22px; }
.cp-sum__rows dd { margin: 0; }
.cp-sum__muted { color: var(--dark-gray); }
.cp-sum__total { display: flex; justify-content: space-between; margin: 14px 0 0; font-size: 18px; font-weight: 700; }
.cp-checkout { display: flex; align-items: center; justify-content: center; height: 52px; margin-block-start: 20px; background: var(--soft-black); color: #fff; font-size: 14px; font-weight: 500; letter-spacing: 1.4px; }
.cp-checkout:hover { background: var(--brand-hover); }
.cp-checkout.is-disabled { opacity: .5; cursor: default; }
.cp-sum__note { margin: 14px 0 0; font-size: 13px; line-height: 20.8px; color: var(--dark-gray); text-align: center; }

@media (min-width: 900px) {
	.cartp { padding-block: 64px 120px; }
	.cp-title { font-size: 40px; line-height: 47.2px; }
	.cp-free { margin-top: 32px; padding: 14px 20px; flex-wrap: nowrap; }
	.cp-layout { grid-template-columns: minmax(0, 744px) 400px; justify-content: space-between; gap: 56px; }
	.cp-item { grid-template-columns: 110px minmax(0, 1fr) 140px 116px; grid-template-areas: "media info qty total"; gap: 24px; align-items: center; }
	.cp-item__name { font-size: 16px; }
	.cp-item__total { align-self: center; }
	.cp-qty { align-self: center; }
	.cp-also .sp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
	.cp-also .sp-card:nth-child(n+3) { display: flex; }
	.cp-also .sp-card__name { font-size: 14px; }
}
/* 모바일 : 목록 → 주문 요약 → 추천 순서 */
@media (max-width: 899px) {
	.cp-main { display: contents; }
	.cp-list { order: 1; }
	.cp-sum { order: 2; }
	.cp-also { order: 3; margin-block-start: 16px; }
}

/* =================================================================
 * 결제 (피그마 08 CHECKOUT (PC) 1440, WBS 3.2.7) — 위 co- 규칙을 피그마 값으로 덮는다
 * 머리 80 · 가운데 로고 96 / 왼쪽 양식 488 (왼쪽 160) · 오른쪽 절반 Soft White + 왼쪽 선 / 칸 50 · 라벨 13 Medium
 * 모바일 : 주문 요약을 위에, 양식을 아래에 (기존 규칙)
 * ================================================================= */
.co-body { background: #fff; }
.co-top { justify-content: center; height: 56px; border-bottom: 1px solid var(--border); }
.co-top__logo { width: 72px; }
.co { padding: 0; }
.co-form { padding: 24px 20px 48px; }
.co-steps { margin: 0 0 24px; font-size: 13px; line-height: 20.8px; color: var(--dark-gray); }
.co-steps a { color: var(--dark-gray); text-decoration: underline; }
.co-steps b { font-weight: 500; color: var(--ink); }
.co-title { font-size: 17px; line-height: 23.8px; letter-spacing: 0; }
.co-title--gap { margin-block-start: 32px; }
.co-field label { font-size: 13px; font-weight: 500; }
.co-input { height: 50px; border-color: var(--border); font-size: 15px; }
.co-input::placeholder { color: #8a8a8a; }
.co-check { display: flex; align-items: center; gap: 12px; margin: -4px 0 0; font-size: 14px; color: var(--dark-gray); cursor: pointer; }
.co-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--soft-black); }
.co-ship__opt { border-color: var(--border); }
.co-ship__opt:has(input:checked) { border-color: var(--soft-black); }
.co-pay { border-color: var(--border); background: var(--soft-white); }
.co-actions { display: flex; flex-wrap: wrap-reverse; align-items: center; justify-content: space-between; gap: 16px; margin-block-start: 32px; }
.co-back { font-size: 13px; line-height: 20.8px; color: var(--dark-gray); }
.co-back:hover { color: var(--ink); text-decoration: underline; }
.co-paynow { width: 100%; height: 52px; margin: 0; padding-inline: 28px; border: 0; background: var(--soft-black); color: #fff; font-size: 14px; font-weight: 500; letter-spacing: 1.4px; cursor: pointer; }
.co-paynow:hover { background: var(--brand-hover); }
.co-sum { padding: 24px 20px; background: var(--soft-white); border-bottom: 1px solid var(--border); }
.co-item { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.co-item__media { width: 64px; height: 66px; border: 1px solid var(--border); background: #fff; }
.co-item__media img { width: 100%; height: 100%; object-fit: cover; }
.co-item__name { font-size: 14px; font-weight: 500; }
.co-item__qty { margin-top: 2px; font-size: 13px; color: var(--dark-gray); }
.co-sum__items { gap: 20px; border-bottom: 0; padding-block-end: 20px; }
.co-promo { display: flex; gap: 10px; }
.co-promo .co-input { flex: 1; min-width: 0; }
.co-promo__btn { flex: none; width: 72px; height: 50px; padding: 0; border: 1px solid var(--soft-black); background: #fff; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.co-promo__btn:hover { background: var(--soft-black); color: #fff; }
.co-promo__msg { margin-top: 8px; }
.co-sum__rows { gap: 22px; padding-block: 20px; border-bottom: 0; }
.co-sum__row { font-size: 14px; }
.co-sum__row:nth-child(n+2) span:first-child { color: var(--dark-gray); }
.co-sum__total { padding-block-start: 4px; font-size: 18px; font-weight: 700; }

@media (min-width: 990px) {
	.co-top { height: 80px; }
	.co-top__logo { width: 96px; }
	.co { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 80px); gap: 0; }
	.co-form { width: 100%; max-width: 648px; justify-self: end; padding: 48px 72px 80px 160px; }
	.co-steps { margin-bottom: 28px; }
	.co-sum { order: 0; position: static; align-self: stretch; padding: 48px 160px 80px 57px; border-left: 1px solid var(--border); border-bottom: 0; }
	.co-sum > * { max-width: 503px; }
	.co-actions { flex-wrap: nowrap; margin-top: 28px; }
	.co-paynow { width: 258px; }
}

/* =================================================================
 * 주문 완료 (피그마 08-1 ORDER COMPLETE (PC), WBS 3.2.8) — oc-
 * 가운데 정렬 · ✓ 원 64 · 요약 상자 800 (Soft White) · 버튼 두 개 394 × 52
 * ================================================================= */
.oc { width: min(800px, 100% - 40px); margin-inline: auto; padding-block: 48px 64px; text-align: center; color: var(--ink); }
.oc ~ .footer { margin-block-start: 0; }
.oc-check { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--soft-black); color: #fff; font-size: 28px; }
.oc-no { margin: 28px 0 0; font-size: 12px; font-weight: 500; letter-spacing: 2.4px; color: var(--dark-gray); }
.oc-title { margin: 16px 0 0; font-size: 30px; font-weight: 700; line-height: 36px; letter-spacing: -1.2px; }
.oc-text { max-width: 806px; margin: 20px auto 0; font-size: 15px; line-height: 26px; color: var(--dark-gray); }
.oc-text a { color: var(--ink); text-decoration: underline; }
.oc-box { margin-block-start: 32px; padding: 24px 20px; background: var(--soft-white); text-align: left; }
.oc-items { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.oc-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.oc-item__media { display: block; width: 64px; height: 64px; background: #fff; }
.oc-item__media img { width: 100%; height: 100%; object-fit: cover; }
.oc-item__info { display: grid; gap: 2px; min-width: 0; }
.oc-item__info b { font-size: 14px; font-weight: 500; }
.oc-item__info span { font-size: 13px; line-height: 20.8px; color: var(--dark-gray); }
.oc-item__price { font-size: 14px; }
.oc-rows p { display: flex; justify-content: space-between; margin: 12px 0 0; font-size: 14px; color: var(--dark-gray); }
.oc-rows p[hidden] { display: none; }
.oc-rows { margin-block-start: 16px; padding-block-start: 4px; border-top: 1px solid var(--border); }
.oc-total { display: flex; justify-content: space-between; margin: 15px 0 0; padding-block-start: 15px; border-top: 1px solid var(--border); font-size: 16px; font-weight: 700; }
.oc-btns { display: grid; gap: 12px; margin-block-start: 28px; }
.oc-help { margin: 28px 0 0; font-size: 13px; line-height: 20.8px; color: var(--dark-gray); }
.oc-help a:hover { color: var(--ink); text-decoration: underline; }
@media (min-width: 900px) {
	.oc { padding-block: 88px 120px; }
	.oc-no { margin-top: 28px; }
	.oc-title { margin-top: 32px; font-size: 40px; line-height: 47.2px; }
	.oc-text { margin-top: 28px; font-size: 16px; line-height: 28px; }
	.oc-box { padding: 28px; }
	.oc-btns { grid-template-columns: 1fr 1fr; }
}
