@charset "utf-8";
/* 엘리팜 고객주문시스템 - 신규 디자인. 기존 PHP 화면용 CSS(basic/wizsale/cums.css)는 더 이상 불러오지 않는다. */

:root {
  --brand: #0e6032;
  --brand-dark: #0a4a26;
  --brand-600: #12753d;
  --brand-100: #dcefe3;
  --brand-50: #f0f8f3;
  --ink: #1b2430;
  --ink-2: #4a5565;
  --muted: #7b8794;
  --line: #e4e8ec;
  --line-strong: #cfd6dd;
  --bg: #f4f6f5;
  --surface: #ffffff;
  --danger: #d92d20;
  --danger-50: #fef3f2;
  --warn: #b54708;
  --warn-50: #fffaeb;
  --info: #175cd3;
  --info-50: #eff8ff;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 8px 24px -12px rgba(16, 24, 40, .12);
  --font: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ---------- 버튼 / 입력 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: #f7f9fa; border-color: #b9c2cc; }
.btn:focus-visible, .input:focus-visible, .qty-input:focus-visible, .school-input:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(14, 96, 50, .22); border-color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-danger { color: var(--danger); border-color: #f3c7c3; }
.btn-danger:hover { background: var(--danger-50); border-color: #ea9e98; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: #eef1f3; border-color: transparent; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: none; }

.input, .select, .textarea { height: 36px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; transition: border-color .12s, box-shadow .12s; min-width: 0; }
.input::placeholder { color: #a3adb8; }
.textarea { height: auto; min-height: 260px; padding: 10px 12px; width: 100%; resize: vertical; line-height: 1.6; }
.input-lg { height: 46px; font-size: 15px; border-radius: var(--radius); padding: 0 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.check { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); cursor: pointer; user-select: none; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; margin: 0; }

.badge { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: #eef1f3; color: var(--ink-2); }
.badge-green { background: var(--brand-100); color: var(--brand-dark); }
.badge-amber { background: var(--warn-50); color: var(--warn); }
.badge-blue { background: var(--info-50); color: var(--info); }
.badge-red { background: var(--danger-50); color: var(--danger); }

/* ---------- 상단 ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1560px; margin: 0 auto; padding: 0 24px; height: 62px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand img { height: 40px; width: auto; display: block; }
.brand span { font-size: 13px; font-weight: 600; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line-strong); letter-spacing: -.2px; }
.nav { display: flex; align-items: stretch; gap: 2px; height: 100%; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: flex; align-items: center; padding: 0 14px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .12s; }
.nav a:hover { color: var(--brand); }
.nav a.on { color: var(--brand); border-bottom-color: var(--brand); }
.nav a.show-sm { display: none; }
.user { display: flex; align-items: center; gap: 6px; flex: none; }
.user-name { font-weight: 600; font-size: 13.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user .select { height: 32px; font-size: 13px; max-width: 220px; }

/* 주문 현황 띠 */
.statusbar { background: var(--brand); color: #fff; }
.statusbar-in { max-width: 1560px; margin: 0 auto; padding: 10px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 30px; }
.stat { display: flex; align-items: baseline; gap: 9px; white-space: nowrap; }
.stat-label { font-size: 12px; color: rgba(255, 255, 255, .72); font-weight: 500; }
.stat-value { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.1px; }
.stat-timer .stat-value { font-size: 16px; min-width: 118px; }
.stat-timer.closed .stat-value { color: #ffd7d2; }
.stat-spacer { flex: 1; }

/* ---------- 본문 ---------- */
.page { max-width: 1560px; margin: 0 auto; padding: 22px 24px 40px; }
.page-narrow { max-width: 920px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-title { font-size: 21px; font-weight: 700; letter-spacing: -.4px; }
.page-title small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 10px; letter-spacing: 0; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-title { font-size: 15.5px; font-weight: 700; letter-spacing: -.2px; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px 18px; }

.filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fafbfb; border-radius: var(--radius) var(--radius) 0 0; }
.filters .range { display: flex; align-items: center; gap: 6px; }
.filters .grow { flex: 1; min-width: 160px; }
.filters .grow .input { width: 100%; }

/* ---------- 표 ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { position: sticky; top: 0; background: #f7f9f9; color: var(--ink-2); font-size: 12.5px; font-weight: 600; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid #eef1f3; vertical-align: middle; }
.table tbody tr:hover td { background: #fafcfb; }
.table th.num, .table td.num { text-align: right; }
.table th.center, .table td.center { text-align: center; }
.table tr.subtotal td { background: #fafbfb; color: var(--ink-2); font-weight: 600; }
.table tr.subtotal td.num { color: var(--danger); }
.table tr.total td { background: var(--brand-50); font-weight: 700; border-top: 1px solid var(--brand-100); border-bottom: 0; }
.table tr.carried td { background: #fafbfb; color: var(--ink-2); }
.table .empty { text-align: center; color: var(--muted); padding: 56px 12px; }
.table a.title-link { font-weight: 600; }
.table a.title-link:hover { color: var(--brand); text-decoration: underline; }
.t-in { color: #c4570a; font-weight: 600; }
.t-out { color: var(--info); font-weight: 600; }
.t-pending { color: var(--danger); font-weight: 600; }

/* ---------- 발주등록 ---------- */
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 620px); gap: 20px; align-items: start; }
.cart-col { position: sticky; top: 124px; }
@media (max-width: 1240px) {
  .order-grid { grid-template-columns: minmax(0, 1fr); }
  .cart-col { position: static; order: -1; }
}

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 13px; color: var(--ink-2); background: #eef1f3; }
.tab:hover { background: #e3e8eb; }
.tab.on { background: var(--brand); color: #fff; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 18px 0; }
.subtabs .tab { height: 28px; font-size: 12.5px; background: transparent; border: 1px solid var(--line-strong); }
.subtabs .tab.on { background: var(--brand-50); border-color: var(--brand); color: var(--brand-dark); }

.searchbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 16px 18px; }
.searchbar .grow { flex: 1; min-width: 220px; }
.search-input { position: relative; display: flex; gap: 8px; }
.search-input .input { flex: 1; height: 42px; font-size: 15px; padding-left: 38px; }
.search-input svg { position: absolute; left: 12px; top: 13px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search-input .btn { height: 42px; padding: 0 20px; }
.searchbar input[type="date"] { height: 42px; font-weight: 600; }

.item-table td { padding: 9px 12px; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: #f1f3f4; border: 1px solid var(--line); display: block; }
.item-name { font-weight: 600; line-height: 1.35; }
.item-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.price { font-weight: 700; font-size: 14.5px; }
.fav { width: 30px; height: 30px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; color: #c2cad2; display: inline-flex; align-items: center; justify-content: center; }
.fav:hover { background: #fff6e0; color: #f5a700; }
.fav.on { color: #f5a700; }
.fav svg { width: 18px; height: 18px; }
.placeholder { padding: 70px 20px; text-align: center; color: var(--muted); }
.placeholder svg { width: 38px; height: 38px; color: #c2cad2; margin-bottom: 10px; }
.placeholder strong { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }
.result-count { font-size: 13px; color: var(--muted); font-weight: 500; }

/* 장바구니 */
.cart-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 18px; font-size: 12.5px; color: var(--ink-2); background: #fafbfb; border-bottom: 1px solid var(--line); }
.cart-meta b { color: var(--ink); font-weight: 600; }
.cart-scroll { max-height: calc(100vh - 124px - 250px); min-height: 150px; overflow-y: auto; }
@media (max-width: 1240px) { .cart-scroll { max-height: 420px; } }
.cart-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cart-table th { position: sticky; top: 0; z-index: 1; background: #f7f9f9; color: var(--ink-2); font-size: 12px; font-weight: 600; padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.cart-table td { padding: 8px 8px; border-bottom: 1px solid #eef1f3; vertical-align: middle; }
.cart-table th:first-child, .cart-table td:first-child { padding-left: 16px; width: 34px; }
.cart-table th:last-child, .cart-table td:last-child { padding-right: 16px; }
.cart-table tr.is-new td { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--brand-100); } to { background: transparent; } }
.cart-name { font-weight: 600; line-height: 1.3; }
.cart-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.cart-pending { color: var(--danger); font-weight: 600; }
.cart-pending b { color: inherit; }
.pending-flag { display: none; margin-right: 6px; color: var(--danger); font-weight: 600; }
.cart-table tr.is-pending .pending-flag { display: inline; }
.qty-input { width: 74px; height: 34px; padding: 0 9px; text-align: right; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.qty-input[readonly], .school-input[readonly] { background: #f3f5f6; color: var(--muted); }
.school-input { width: 104px; height: 34px; padding: 0 9px; font-size: 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.line-tot { font-weight: 700; }
.line-vat { font-size: 11.5px; color: var(--muted); }
.cart-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fafbfb; border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.cart-total { display: flex; align-items: baseline; gap: 10px; }
.cart-total span { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.cart-total strong { font-size: 22px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; letter-spacing: -.4px; }
.cart-total em { font-style: normal; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.cart-msg { padding: 0 18px; font-size: 12.5px; color: var(--info); font-weight: 600; }
.cart-msg:not(:empty) { padding: 9px 18px; background: var(--info-50); border-top: 1px solid #d1e9ff; }
.cart-empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ---------- 게시판 / 폼 ---------- */
.form-grid { display: grid; gap: 16px; }
.form-grid .input { width: 100%; }
.post-body { padding: 22px 18px; min-height: 220px; line-height: 1.75; font-size: 14.5px; white-space: normal; }
.post-meta { font-size: 12.5px; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fafbfb; border-radius: 0 0 var(--radius) var(--radius); }
.form-actions form { display: inline; margin: 0; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 4px; padding: 16px; }
.pagination a, .pagination span { min-width: 32px; height: 32px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pagination a:hover { background: #eef1f3; }
.pagination .on { background: var(--brand); color: #fff; }
.pagination .off { color: #c2cad2; }

.notice-item { padding: 18px; border-bottom: 1px solid var(--line); }
.notice-item:last-child { border-bottom: 0; }
.notice-item h3 { font-size: 15.5px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.notice-item h3 time { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.notice-item .body { margin-top: 8px; color: var(--ink-2); line-height: 1.7; }

/* ---------- 로그인 (참고: clover.pubcode.kr 과 같은 구성, 색만 엘리팜 그린) ---------- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px;
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(126, 214, 160, .55) 0%, rgba(126, 214, 160, 0) 60%),
    radial-gradient(900px 600px at 95% 100%, rgba(9, 52, 58, .75) 0%, rgba(9, 52, 58, 0) 60%),
    linear-gradient(135deg, #2fa866 0%, #0e6032 52%, #0b4a3c 100%); }
.login-card { width: 100%; max-width: 368px; background: var(--surface); border-radius: 16px; box-shadow: 0 20px 50px -12px rgba(3, 30, 16, .45); padding: 30px 24px 22px; }
.login-logo { display: block; width: 100%; max-width: 250px; margin: 0 auto 8px; }
.login-sub { text-align: center; font-size: 24px; font-weight: 700; color: var(--brand); letter-spacing: -.6px; margin-bottom: 24px; }
.login-card .form-grid { gap: 16px; }
.login-card .field > label { font-size: 15px; font-weight: 500; color: var(--ink); }
.login-card .input-lg { height: 40px; font-size: 15px; border-radius: 6px; }
.login-card .check { font-size: 15px; color: var(--ink); }
.login-card .btn-lg { height: 48px; font-size: 19px; font-weight: 500; border-radius: 8px; margin-top: 2px; }
.login-foot { margin-top: 26px; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .85); line-height: 1.7; }
.login-foot b { color: #fff; font-weight: 500; }
.alert-box { margin-bottom: 16px; padding: 11px 13px; border-radius: var(--radius-sm); background: var(--danger-50); border: 1px solid #f7c9c5; color: #b42318; font-size: 13.5px; font-weight: 600; white-space: pre-line; }
.alert-box.ok { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-dark); }

/* ---------- 하단 ---------- */
.footer { border-top: 1px solid var(--line); background: #fff; }
.footer-in { max-width: 1560px; margin: 0 auto; padding: 18px 24px; font-size: 12px; color: var(--muted); line-height: 1.7; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer b { color: var(--ink-2); }

/* 테스트 사이트 안내 띠 (개발DB 연결 시에만) */
.test-banner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 10px; padding: 7px 16px; background: #f79009; color: #fff; font-size: 13.5px; line-height: 1.45; text-align: center;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .13) 0 12px, transparent 12px 24px); }
.test-banner strong { padding: 1px 9px; border-radius: 5px; background: #fff; color: #b54708; font-weight: 800; font-size: 12.5px; white-space: nowrap; }
.test-banner b { font-weight: 700; }
.test-banner a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.test-banner-fixed { position: fixed; top: 0; left: 0; right: 0; z-index: 60; }
/* 띠 높이만큼 고정 장바구니 위치를 내린다 */
.has-test-banner .cart-col { top: 160px; }
.has-test-banner .cart-scroll { max-height: calc(100vh - 160px - 250px); }
@media (max-width: 1240px) { .has-test-banner .cart-col { top: auto; } .has-test-banner .cart-scroll { max-height: 420px; } }
@media (max-width: 640px) { .test-banner { font-size: 12.5px; padding: 6px 10px; } .test-banner-sub { display: block; width: 100%; } }
@media print { .test-banner, .test-banner-fixed { display: none !important; } }

/* PWA 설치 버튼 / 개발DB 배지 */
.btn-install { height: 42px; margin-top: 14px; border-color: var(--brand); color: var(--brand); font-size: 14.5px; font-weight: 600; border-radius: 8px; }
.btn-install:hover { background: var(--brand-50); border-color: var(--brand); }
.btn-install img { border-radius: 5px; }
.btn-install[hidden] { display: none; }
.dev-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 6px; background: #f79009; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .5px; white-space: nowrap; flex: none; vertical-align: middle; }
.login-sub .dev-badge { margin-left: 8px; position: relative; top: -3px; }
.topbar .dev-badge { margin-left: -14px; }

/* 개발사(퍼블릭코드) 로고 */
.dev-credit { display: inline-flex; align-items: center; gap: 12px; padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); transition: box-shadow .12s, border-color .12s; }
.dev-credit:hover { border-color: #5EBF95; box-shadow: 0 2px 10px -4px rgba(94, 191, 149, .6); }
.dev-credit-label { font-size: 11px; font-weight: 600; color: var(--muted); padding-right: 12px; border-right: 1px solid var(--line); }
.dev-credit-logo { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.dev-credit-name { font-size: 12px; font-weight: 700; letter-spacing: .18em; color: #5EBF95; margin-bottom: 4px; }
.dev-credit-logo img { height: 18px; width: auto; display: block; }
.login-page .dev-credit { margin-top: 18px; border-color: transparent; box-shadow: 0 8px 24px -10px rgba(3, 30, 16, .5); }
.footer-in { align-items: center; }

/* ---------- 토스트 / 공지 모달 ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; max-width: 420px; padding: 12px 16px; border-radius: var(--radius); background: #1b2430; color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow); white-space: pre-line; animation: toast-in .18s ease-out; }
.toast.error { background: #b42318; }
.toast.ok { background: var(--brand); }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.modal-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(16, 24, 40, .45); display: flex; align-items: flex-start; justify-content: center; gap: 16px; flex-wrap: wrap; padding: 90px 20px 20px; overflow-y: auto; }
.modal-backdrop[hidden] { display: none; }
.modal { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 140px); }
.modal-head { padding: 14px 18px; background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; }
.modal-body { padding: 16px 18px; overflow-y: auto; line-height: 1.7; font-size: 13.5px; color: var(--ink-2); }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 10px 18px; border-top: 1px solid var(--line); background: #fafbfb; font-size: 12.5px; }

/* 상품 상세 모달 */
.modal-wide { max-width: 680px; }
.detail { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; }
.detail-image { display: flex; align-items: center; justify-content: center; min-height: 240px; background: #f6f8f8; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.detail-image img { max-width: 100%; max-height: 320px; object-fit: contain; }
.detail-info h3 { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.detail-price { margin: 10px 0 14px; font-size: 24px; font-weight: 800; color: var(--brand); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.detail-price em { font-style: normal; font-size: 14px; color: var(--ink-2); margin-right: 6px; }
.detail dl { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 7px 10px; margin: 0; font-size: 13.5px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; color: var(--ink); font-weight: 500; }
.detail-note { margin-top: 14px; padding: 10px 12px; background: var(--warn-50); border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-2); }
.detail-note b { display: block; color: var(--warn); margin-bottom: 3px; font-size: 12px; }
.thumb.is-link, .item-name a { cursor: pointer; }
.item-name a:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 640px) { .detail { grid-template-columns: minmax(0, 1fr); } .detail-image { min-height: 180px; } }

/* ---------- 반응형 / 인쇄 ---------- */
@media (max-width: 900px) {
  /* 모바일: 메뉴를 둘째 줄로 내려 전부 보이게 한다 (한 줄에 두면 뒤쪽 메뉴가 잘려서 안 보였다) */
  .topbar-in { padding: 0 14px; gap: 0 14px; height: auto; flex-wrap: wrap; }
  .brand, .user { height: 52px; }
  .user { margin-left: auto; }
  .nav { order: 3; flex: 0 0 100%; height: 42px; border-top: 1px solid var(--line); margin: 0 -14px; padding: 0 6px; width: calc(100% + 28px); flex-basis: calc(100% + 28px); }
  .nav a { padding: 0 11px; font-size: 14px; }
  .show-sm { display: flex !important; }
  .cart-col { top: auto; }
  .brand span, .user-name { display: none; }
  .brand img { height: 28px; }
  .statusbar-in, .page, .footer-in { padding-left: 14px; padding-right: 14px; }
  .statusbar-in { gap: 6px 18px; }
  .hide-sm { display: none !important; }
  .page-title small { display: block; margin: 4px 0 0; line-height: 1.5; word-break: keep-all; } /* 긴 안내문은 제목 아래 줄로 */
}
@media print {
  .topbar, .statusbar, .footer, .filters, .actions, .toasts, .modal-backdrop, .no-print { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .card { border: 0; box-shadow: none; }
  .table th { position: static; }
  .table { font-size: 11px; }
}
