/* 색·카드 비율은 AMUTY 바이어 화면(OMS MyOrdersScreen)과 같게 맞췄다 */
:root {
  --brand: #FF6179; --brand-soft: #FFF7F8; --text: #171717; --text-2: #555; --text-3: #767676;
  --line: #ECECEC; --line-2: #C1C1C1; --bg: #fff; --bg-2: #F9F9F9;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); background: var(--bg); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
#app { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 20px 24px 48px; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 0 0 12px; }

.header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1440px; margin: 0 auto; height: 60px; padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.logo { font-size: 22px; font-weight: 800; color: var(--brand); letter-spacing: -.5px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--text-2); }
.cart-link { position: relative; display: flex; align-items: center; color: var(--text); }
.cart-count { position: absolute; top: -7px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--text-2); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.search { flex: 1; min-width: 180px; max-width: 360px; position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 12px; color: var(--text-3); }
.search input { width: 100%; height: 36px; padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: 4px; }
.sort { margin-left: auto; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }

.shop { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--bg); }
.card-img { display: block; aspect-ratio: 4 / 3; padding: 12px 12px 4px; background: #fff; }
.card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card-body { padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.brand { font-size: 12px; color: var(--text-3); }
.pname { font-size: 14px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.price-row { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.price { font-size: 16px; font-weight: 700; }

.btn { height: 44px; padding: 0 16px; border: 1px solid var(--brand); border-radius: 4px; background: var(--brand); color: #fff; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.line { background: var(--bg); color: var(--brand); }
.btn.gray { background: var(--bg); border-color: var(--line-2); color: var(--text); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; }
.stepper button { width: 32px; height: 32px; border: 0; background: var(--bg-2); }
.stepper span { min-width: 32px; text-align: center; font-weight: 600; }

.panel { position: sticky; top: 80px; border: 1px solid var(--line); border-radius: 4px; padding: 16px; }
.line-item { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-item img { width: 56px; height: 56px; object-fit: contain; }
.line-name { font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.line-foot { margin-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.remove { border: 0; background: none; color: var(--text-3); font-size: 12px; padding: 4px 0; text-decoration: underline; }
.sum { display: flex; justify-content: space-between; padding: 6px 0; color: var(--text-2); }
.sum.total { color: var(--text); font-size: 16px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.empty { padding: 32px 0; color: var(--text-3); text-align: center; }

.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.detail-img { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 4px; padding: 24px; }
.detail-img img { width: 100%; height: 100%; object-fit: contain; }
.detail h1 { margin: 4px 0 12px; }
.detail .price { font-size: 24px; }
.info { width: 100%; border-collapse: collapse; margin: 16px 0; }
.info th, .info td { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; vertical-align: top; }
.info th { width: 96px; color: var(--text-3); }
.actions { display: flex; gap: 8px; margin-top: 16px; }
.actions .btn { flex: 1; }

.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.section { border: 1px solid var(--line); border-radius: 4px; padding: 16px; margin-bottom: 16px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; margin-bottom: 4px; font-size: 13px; color: var(--text-2); }
.field input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 16px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; }
.row .btn { flex: none; }
.agree { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; }
.agree input { margin-top: 3px; }
.agree a { text-decoration: underline; }
.error { color: #EE5454; font-size: 13px; margin: 8px 0; }

.doc { max-width: 800px; margin: 0 auto; }
.doc h2 { margin-top: 28px; }
.doc p, .doc li { color: var(--text-2); line-height: 1.7; }
.doc table { width: 100%; border-collapse: collapse; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px; text-align: left; color: var(--text-2); font-weight: 400; }
.doc th { background: var(--bg-2); }
.result { max-width: 560px; margin: 32px auto; }
.result-icon { color: var(--brand); text-align: center; }
.result h1 { text-align: center; }

.footer { border-top: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); font-size: 12px; }
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; font-size: 13px; color: var(--text); }
.footer-links .strong { font-weight: 700; }
.footer dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2px 24px; }
.footer dl div { display: flex; gap: 8px; }
.footer dt { flex: none; color: var(--text-3); }
.footer dd { margin: 0; }
.copyright { margin-top: 12px; color: var(--text-3); }

.mobile-bar { display: none; }
@media (max-width: 960px) {
  .shop, .checkout { grid-template-columns: minmax(0, 1fr); }
  .shop .panel { display: none; }
  .panel { position: static; }
  .mobile-bar { display: flex; position: sticky; bottom: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--bg); border-top: 1px solid var(--line); z-index: 9; }
}
@media (max-width: 720px) {
  main { padding: 16px 16px 32px; }
  .header-inner { padding: 0 16px; }
  .footer-inner { padding: 20px 16px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .detail { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sort { margin-left: 0; }
  .search { max-width: none; flex-basis: 100%; }
  .price { font-size: 15px; }
  .price-row { flex-wrap: wrap; }
}
