/* [애니팜] 장바구니 · 주문서 · 주문 완료 2판 (2026-11-03). shop.css · anipharm.css 위에 얹는다 */
.ap-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 12px 0 28px; }
.ap-page-head h1 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.035em; color: #191f28; }
.ap-page-head h1 small { font-size: 20px; font-weight: 700; color: var(--shp-brand); }
.ap-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: #b0b8c1; }
.ap-steps li { display: flex; align-items: center; gap: 6px; }
.ap-steps li + li::before { content: ''; width: 16px; height: 1px; background: #d1d6db; }
.ap-steps li.is-on { color: #191f28; font-weight: 700; }

/* 두 칸: 목록 + 오른쪽 결제 칸 (붙어 다님) */
.ap-cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.ap-cart-aside { position: sticky; top: calc(var(--ap-sticky-top, 0px) + 20px); }

/* 무료배송까지 */
.ap-freeship { margin-bottom: 16px; padding: 16px 20px; border-radius: 16px; background: #f2f8fd; }
.ap-freeship p { margin: 0 0 10px; font-size: 14.5px; color: #333d4b; }
.ap-freeship b { color: #0270b0; font-weight: 800; }
.ap-freeship-bar { display: block; height: 6px; border-radius: 999px; background: #dbe9f5; overflow: hidden; }
.ap-freeship-bar i { display: block; height: 100%; border-radius: inherit; background: var(--shp-brand); transition: width .4s; }
.ap-freeship.is-done { background: #edf8f2; }
.ap-freeship.is-done b { color: #0a8a5f; }
.ap-freeship.is-done .ap-freeship-bar { display: none; }
.ap-freeship.is-done p { margin: 0; }

/* 상품 줄 */
.ap-cart-list { margin: 0; padding: 0; list-style: none; border-top: 2px solid #191f28; }
.ap-cart-row { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px 44px 20px 0; border-bottom: 1px solid #eceef1; }
.ap-cart-row.is-busy { opacity: .5; pointer-events: none; }
.ap-cart-row.is-blocked .ap-cart-thumb, .ap-cart-row.is-blocked .ap-cart-name { opacity: .45; }
.ap-cart-thumb { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 14px; background: #f5f6f8; overflow: hidden; }
.ap-cart-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.ap-cart-thumb img.is-noimg { width: 40%; height: auto; opacity: .15; filter: grayscale(1); mix-blend-mode: normal; }
.ap-cart-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ap-cart-name { font-size: 16px; font-weight: 600; line-height: 1.4; color: #191f28; }
.ap-cart-name:hover { text-decoration: underline; }
.ap-cart-opt { font-size: 13.5px; color: #6b7684; }
.ap-cart-warn { align-self: flex-start; padding: 3px 8px; border-radius: 6px; background: #fdeeee; color: #d22030; font-size: 12.5px; font-weight: 600; }
.ap-cart-unit { font-size: 14px; color: #8b95a1; }
.ap-cart-unit s { margin-left: 4px; color: #b0b8c1; }
.ap-cart-ctrl { display: flex; align-items: center; gap: 28px; }
.ap-cart-sub { min-width: 96px; text-align: right; font-size: 17px; font-weight: 800; color: #191f28; }
.ap-cart .shp-stepper { border-color: #e5e8eb; border-radius: 10px; }
.ap-cart .shp-stepper .shp-step { width: 36px; height: 36px; }
.ap-cart .shp-stepper .shp-step:disabled { color: #d1d6db; cursor: default; background: none; }
.ap-cart-del { position: absolute; top: 18px; right: 0; }
.ap-cart-del button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: #b0b8c1; cursor: pointer; }
.ap-cart-del button:hover { background: #f2f4f6; color: #4e5968; }
.ap-cart-del svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ap-cart-more { display: inline-block; margin-top: 16px; font-size: 14.5px; font-weight: 600; color: #4e5968; }
.ap-cart-more:hover { color: var(--shp-brand); }

/* 결제 칸 */
.ap-paybox { padding: 26px 24px 22px; border-radius: 20px; background: #f7f8fa; }
.ap-paybox h2 { margin: 0 0 16px; font-size: 18px; font-weight: 800; color: #191f28; }
.ap-paybox dl { margin: 0; }
.ap-paybox dl > div { display: flex; justify-content: space-between; padding: 5px 0; font-size: 15px; color: #4e5968; }
.ap-paybox dd { margin: 0; color: #191f28; font-weight: 600; }
.ap-paybox-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 16px; border-top: 1px solid #e5e8eb; }
.ap-paybox-total span { font-size: 16px; font-weight: 700; color: #191f28; }
.ap-paybox-total strong { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--shp-brand); }
.ap-paybox-notes { margin: 14px 0 0; padding: 0; list-style: none; font-size: 13px; color: #8b95a1; }
.ap-paybox-notes li { position: relative; padding-left: 10px; line-height: 1.7; }
.ap-paybox-notes li::before { content: ''; position: absolute; left: 0; top: .78em; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.ap-paybox-notes li.is-warn { color: #d22030; }
.ap-paybox .shp-btn, .ap-orderbar .shp-btn { width: 100%; height: 58px; margin-top: 18px; border-radius: 14px !important; font-size: 17px; }
.ap-paybox-go span { margin-left: 6px; font-weight: 600; opacity: .8; }

/* 비었을 때 */
.ap-cart-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 60px 20px 80px; text-align: center; }
.ap-cart-empty img { width: 120px; margin-bottom: 10px; }
.ap-cart-empty p { margin: 0; font-size: 20px; font-weight: 800; color: #191f28; }
.ap-cart-empty span { font-size: 15px; color: #8b95a1; }
.ap-cart-empty-btns { display: flex; gap: 8px; margin-top: 22px; }
.ap-cart-empty-btns .shp-btn { flex: 0 0 auto; height: 50px; padding: 0 24px; border-radius: 14px !important; }

.ap-orderbar { display: none; }

@media (max-width: 1080px) {
	.ap-cart-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
	.ap-cart-ctrl { flex-direction: column; align-items: flex-end; gap: 10px; }
}

@media (max-width: 860px) {
	.ap-page-head { margin: 4px 0 18px; }
	.ap-page-head h1 { font-size: 22px; }
	.ap-page-head h1 small { font-size: 16px; }
	.ap-steps { display: none; }
	.ap-cart-grid { display: block; }
	.ap-cart-aside { position: static; margin-top: 28px; }
	.ap-freeship { padding: 14px 16px; border-radius: 14px; }
	.ap-freeship p { font-size: 13.5px; }
	.ap-cart-list { border-top-width: 1px; border-top-color: #eceef1; }
	.ap-cart-row { grid-template-columns: 76px minmax(0, 1fr); gap: 12px 14px; align-items: start; padding: 16px 36px 16px 0; }
	.ap-cart-thumb { width: 76px; height: 76px; border-radius: 12px; }
	.ap-cart-name { font-size: 15px; }
	.ap-cart-ctrl { grid-column: 2; flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; }
	.ap-cart-sub { min-width: 0; font-size: 16px; }
	.ap-cart-del { top: 12px; }
	.ap-paybox { padding: 20px 18px; border-radius: 18px; }
	.ap-paybox .ap-paybox-go { display: none; }
	.ap-cart-empty { padding: 40px 16px 60px; }

	.ap-orderbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .98); border-top: 1px solid #eceef1; box-shadow: 0 -6px 20px rgba(0, 0, 0, .05); }
	.ap-orderbar-sum { display: flex; flex-direction: column; line-height: 1.25; }
	.ap-orderbar-sum span { font-size: 12px; color: #8b95a1; }
	.ap-orderbar-sum strong { font-size: 19px; font-weight: 800; color: #191f28; }
	.ap-orderbar .shp-btn { height: 52px; margin-top: 0; font-size: 16px; }
	body:has(.ap-orderbar) .ap-tabbar { display: none !important; }
	/* [애니팜 2026-11-10] 상담 고양이(50px) = 주문 줄 오른쪽 빈칸 안에 앉힘. 전엔 줄 위 86px 에 떠서 스크롤하면 결제 칸 금액 등 오른쪽 내용을 가렸다 (화면 점검 11/10).
	   위젯이 뜬 때만(data-icon-ready — layouts/anipharm/js/cs-chat.js) 줄 오른쪽을 비움. '문의하기' 말풍선은 줄 위로 몇 px 나옴 (그림자 DOM 이라 못 줄임) */
	body:has(.ap-orderbar) pq-chat-widget { --ap-cs-bottom: calc(11px + env(safe-area-inset-bottom)); }
	body:has(pq-chat-widget[data-icon-ready]) .ap-orderbar { padding-right: 76px; }
	body:has(.ap-orderbar) .ap-toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
}

/* ---------- 주문서 ---------- */
.ap-checkout .shp-2col { grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; }
.ap-checkout .shp-2col-aside { top: calc(var(--ap-sticky-top, 0px) + 20px); }
.ap-checkout .shp-box { margin: 0; padding: 28px 0 32px; border: 0; border-top: 1px solid #eceef1; border-radius: 0; background: none; }
.ap-checkout .shp-2col-main > .shp-box:first-child { border-top: 2px solid #191f28; }
.ap-checkout .shp-box h3 { display: flex; align-items: baseline; gap: 6px; margin: 0 0 18px; font-size: 19px; font-weight: 800; letter-spacing: -0.03em; color: #191f28; }
.ap-checkout .shp-box h3 small { font-size: 15px; font-weight: 700; color: var(--shp-brand); }
.ap-checkout .shp-form-grid { gap: 14px 12px; }
.ap-checkout .shp-row { margin: 0; }
.ap-checkout .shp-row label { margin-bottom: 7px; font-size: 13.5px; font-weight: 600; color: #4e5968; }
.ap-checkout .shp-row input[type="text"], .ap-checkout .shp-row input[type="tel"], .ap-checkout .shp-row input[type="email"], .ap-checkout .shp-row input[type="number"], .ap-checkout .shp-row select, .ap-checkout .shp-row textarea { height: 50px; padding: 0 14px; border: 1px solid #e5e8eb; border-radius: 12px; background-color: #fff; font-size: 15px; color: #191f28; box-sizing: border-box; }
.ap-checkout .shp-row textarea { height: auto; padding: 12px 14px; }
.ap-checkout .shp-row input:focus, .ap-checkout .shp-row select:focus { outline: none; border-color: var(--shp-brand); box-shadow: 0 0 0 3px var(--shp-brand-soft); }
.ap-checkout .shp-row input[readonly] { background: #f7f8fa !important; color: #4e5968; }
.ap-note { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: #f2f8fd; color: #0270b0; font-size: 13.5px; line-height: 1.6; }
.ap-checkout .shp-save-addr, .ap-checkout .shp-check { font-size: 13.5px; color: #6b7684; }
.ap-checkout input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--shp-brand); }

/* 주문 상품 */
.ap-co-items .shp-cart-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 0; border: 0; }
.ap-co-items .shp-cart-item + .shp-cart-item { border-top: 1px solid #f2f4f6; }
.ap-co-items .shp-cart-thumb { width: 64px; height: 64px; border: 0; border-radius: 12px; background-color: #f5f6f8; background-size: contain; background-blend-mode: multiply; }
.ap-co-items .shp-cart-name { font-size: 15px; font-weight: 600; color: #191f28; }
.ap-co-items .shp-cart-option { font-size: 13px; color: #8b95a1; }
.ap-co-items .shp-cart-price { font-size: 16px; font-weight: 800; }

/* 결제 칸 (오른쪽, 붙어 다님) */
.ap-checkout .shp-paybox { padding: 26px 24px 22px; border: 0; border-radius: 20px; background: #f7f8fa; }
.ap-checkout .shp-paybox h3 { font-size: 18px; margin-bottom: 14px; }
.ap-checkout .shp-paybox .shp-summary-row { padding: 5px 0; font-size: 15px; color: #4e5968; }
.ap-checkout .shp-paybox .shp-summary-row span:last-child { color: #191f28; font-weight: 600; }
.ap-checkout .shp-paybox .shp-summary-row .shp-minus, .ap-checkout .shp-paybox .shp-summary-row .shp-minus em { color: #f04452; }
.ap-checkout .shp-summary-row[hidden] { display: none; }
.ap-checkout .shp-paybox .shp-summary-row.is-total { align-items: baseline; margin-top: 14px; padding-top: 16px; border-top: 1px solid #e5e8eb; font-size: 16px; color: #191f28; }
.ap-checkout .shp-paybox .shp-summary-row.is-total span:last-child { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--shp-brand); }
.ap-checkout .shp-paybox .shp-check { margin-top: 18px !important; align-items: center; color: #333d4b; font-weight: 600; }
.ap-checkout .shp-privacy { max-height: none; margin-top: 8px; padding: 0 0 0 26px; background: none; font-size: 12.5px; color: #8b95a1; }
.ap-checkout #shpPayBtn { height: 58px; margin-top: 18px !important; border-radius: 14px !important; font-size: 17px; }

/* 결제 대기 주문 안내 */
.ap-checkout .shp-pending-box { margin-bottom: 20px; padding: 16px 18px; border-radius: 14px; background: #fff7e6; }

@media (max-width: 1080px) {
	.ap-checkout .shp-2col { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
}
@media (max-width: 860px) {
	.ap-checkout .shp-2col { display: block; }
	.ap-checkout .shp-2col-aside { position: static; margin-top: 8px; }
	.ap-checkout .shp-box { padding: 22px 0 24px; }
	.ap-checkout .shp-2col-main > .shp-box:first-child { border-top-width: 1px; border-top-color: #eceef1; }
	.ap-checkout .shp-box h3 { font-size: 17px; margin-bottom: 14px; }
	.ap-checkout .shp-form-grid { grid-template-columns: minmax(0, 1fr); }
	.ap-checkout .shp-row[style*="grid-column"] { grid-column: auto !important; }
	.ap-checkout .shp-paybox { padding: 20px 18px; }
	.ap-checkout #shpPayBtn { display: none; }
}

/* ---------- 주문 상세 · 완료 ---------- */
.ap-result.shp-narrow { max-width: 760px; }
.ap-result-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 24px; padding: 32px 20px 28px; border-radius: 20px; background: #f2f8fd; text-align: center; }
.ap-result-ic { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 50%; background: var(--shp-brand); color: #fff; }
.ap-result-ic svg { width: 28px; height: 28px; fill: none; stroke: #fff !important; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ap-result-hero strong { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; color: #191f28; }
.ap-result-hero > span { font-size: 14px; color: #6b7684; }
.ap-result-hero b { color: #333d4b; font-weight: 700; }
.ap-result-hero.is-wait { background: #fff7e8; }
.ap-result-hero.is-wait .ap-result-ic { background: #f59f00; }
.ap-result-hero.is-off { background: #f4f5f7; }
.ap-result-hero.is-off .ap-result-ic { background: #8b95a1; }
.ap-result .shp-pending-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; padding: 16px 18px; border: 0; border-radius: 16px; background: #fffaf0; }
.ap-result .shp-pending-msg { margin: 0; font-size: 14.5px; color: #8a5a00; }
.ap-result .shp-pending-box .shp-btn { flex: 0 0 auto; height: 46px; padding: 0 20px; border-radius: 12px !important; }
.ap-result .shp-steps { margin: 4px 0 24px; }
.ap-result .shp-detail-list { grid-template-columns: 110px 1fr; gap: 12px 16px; padding: 22px 24px; border: 0; border-radius: 18px; background: #f7f8fa; }
.ap-result .shp-detail-list dt { font-size: 14px; color: #8b95a1; font-weight: 500; }
.ap-result .shp-detail-list dd { font-size: 15px; color: #191f28; }
.ap-result .shp-table { border: 0; border-radius: 0; border-top: 2px solid #191f28; }
.ap-result .shp-table th { background: none; font-size: 13.5px; color: #8b95a1; font-weight: 600; border-bottom: 1px solid #eceef1; }
.ap-result .shp-table td { font-size: 15px; border-bottom: 1px solid #f2f4f6; }
.ap-result form .shp-row input { height: 48px; padding: 0 14px; border: 1px solid #e5e8eb; border-radius: 12px; }
.ap-result form .shp-btn-ghost { height: 48px; border-radius: 12px !important; }
.ap-result-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 32px; }
.ap-result-btns .shp-btn { height: 54px; border-radius: 14px !important; font-size: 16px; }
@media (max-width: 860px) {
	.ap-result-hero { padding: 26px 16px 22px; }
	.ap-result-hero strong { font-size: 19px; }
	.ap-result .shp-detail-list { grid-template-columns: 92px 1fr; padding: 18px; }
	.ap-result .shp-pending-box .shp-btn { width: 100%; }
}
/* [11/10] 주문 상세 — 접수 · 처리 중인 취소 · 반품 신청 안내 (신청 버튼 대신) */
.ap-claim-open { margin: 8px 0 0; padding: 12px 14px; border-radius: 12px; background: #fff7ec; color: #6b3d0a; font-size: 14px; line-height: 1.55; }
.ap-claim-open b { color: #b2580c; }

/* [애니팜 2026-11-10] 주문서: 결제 전 주문 = 작은 회색 한 줄 (전엔 큰 노란 상자가 새 주문을 가로막음) · 바로 구매 표시 · 고정 약국 주소 글 · 결제 수단 안내 */
.ap-co-pending { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: -12px 0 20px; font-size: 13px; line-height: 1.6; color: #6b7684; }
.ap-co-pending a { color: #4e5968; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ap-co-pending a:hover { color: var(--shp-brand); }
.ap-co-buynow { margin: -6px 0 12px; padding: 10px 12px; border-radius: 10px; background: #f2f8fd; color: #0270b0; font-size: 13.5px; }
.ap-co-fixed-addr { margin: 0; padding: 14px 16px; border-radius: 12px; background: #f7f8fa; font-size: 15px; line-height: 1.6; color: #191f28; }
.ap-co-fixed-addr span { color: #6b7684; }
.ap-co-paynote { margin: 10px 0 0; font-size: 12.5px; color: #8b95a1; text-align: center; }
.ap-co-paynote[hidden] { display: none; }
/* [11/10] 장바구니: 최소 · 최대 수량 안내 (막히지 않은 줄은 회색 글) */
.ap-cart-rule { font-size: 12.5px; color: #8b95a1; }
@media (max-width: 860px) {
	.ap-co-pending { margin-top: -4px; font-size: 12.5px; }
}
