* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', -apple-system, sans-serif; background: #eef2f5; margin: 0; padding: 0; }
:root {
  --blue-50: #F0F9FF; --blue-100: #E0F2FE; --blue-200: #BAE6FD; --blue-400: #38BDF8;
  --blue-600: #0284C7; --blue-800: #075985;
  --yellow-50: #FFF7ED; --yellow-100: #FFEDD5; --yellow-300: #FDBA74;
  --yellow-400: #FB923C; --yellow-600: #EA580C; --yellow-800: #9A3412;
  --text-primary: #0F172A; --text-secondary: #475569; --text-muted: #64748B;
  --border: #E2E8F0; --surface: #F8FAFC;
}
.wrap { max-width: 1024px; margin: 0 auto; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,0.04); position: relative; overflow-x: hidden; min-height: 100vh; min-height: calc(var(--vh, 1vh) * 100); min-height: 100dvh; }
.header { background: #fff; border-bottom: 1px solid var(--border); padding: 0 20px; display: flex; align-items: center; gap: 12px; height: 58px; }
.logo-area { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-seahorse { width: 44px; height: 44px; }
.logo-text-wrap { display: flex; flex-direction: column; }
.logo-name { font-size: 21px; font-weight: 700; color: var(--yellow-400); letter-spacing: -0.5px; line-height: 1.1; }
.logo-sub { font-size: 9.5px; color: var(--blue-600); letter-spacing: 1.5px; line-height: 1.2; }
.search-bar { flex: 1; display: flex; align-items: center; background: var(--blue-50); border: 1px solid var(--blue-200); border-radius: 10px; padding: 0 12px; height: 37px; gap: 8px; }
.search-bar input { border: none; background: transparent; font-size: 13px; color: var(--text-primary); outline: none; flex: 1; font-family: inherit; }
.search-bar input::placeholder { color: var(--text-muted); }
.header-nav { display: flex; align-items: center; gap: 14px; }
.header-nav a { font-size: 13px; color: var(--blue-800); text-decoration: none; white-space: nowrap; font-weight: 500; }
.btn-login { background: #fff; border: 1.5px solid var(--blue-400); color: var(--blue-800); border-radius: 8px; padding: 0 12px; font-size: 13px; cursor: pointer; font-family: inherit; font-weight: 600; transition: background .15s; height: 37px; min-width: 84px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.btn-login:hover { background: var(--blue-50); }
.btn-sell { background: var(--yellow-400); border: none; color: var(--yellow-800); border-radius: 8px; padding: 0 12px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .15s; height: 37px; min-width: 84px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.btn-sell:hover { background: var(--yellow-600); color: #fff; }
.top-nav-tabs { display: flex; background: #fff; border-bottom: 1px solid var(--border); }
.top-tab { flex: 1; text-align: center; padding: 14px 0; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer; position: relative; transition: color .15s; }
.top-tab.active { color: var(--text-primary); font-weight: 700; }
.top-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 10%; width: 80%; height: 3px; background: var(--text-primary); border-radius: 3px 3px 0 0; }
.cat-bar { background: var(--blue-50); border-bottom: 1px solid var(--border); padding: 0 20px; display: flex; overflow-x: auto; }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-item { padding: 10px 15px; font-size: 13px; color: var(--blue-600); white-space: nowrap; cursor: pointer; border-bottom: 2.5px solid transparent; font-weight: 500; transition: color .15s; }
.cat-item.active { color: var(--text-primary); border-bottom-color: var(--yellow-400); font-weight: 700; }
.cat-item:hover { color: var(--blue-800); }
.horizontal-scroll-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.horizontal-scroll-list::-webkit-scrollbar { display: none; }
.horizontal-scroll-list .product-card { min-width: 170px; max-width: 170px; flex-shrink: 0; margin-bottom: 4px; }
.filter-bar { background: #fff; border-bottom: none; padding: 10px 20px; display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-label { font-size: 12px; color: var(--text-muted); margin-right: 2px; }
.filter-chip { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 4px 13px; font-size: 12px; color: var(--blue-600); cursor: pointer; font-family: inherit; font-weight: 500; transition: all .15s; }
.filter-chip:hover { border-color: var(--blue-400); color: var(--blue-800); }
.filter-chip.on { background: var(--blue-100); border-color: var(--blue-600); color: var(--blue-800); font-weight: 700; }
.banner { background: var(--yellow-50); border-bottom: 1px solid var(--yellow-100); padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.banner-left { display: flex; align-items: center; gap: 8px; }
.banner-tag { background: var(--yellow-400); color: var(--yellow-800); font-size: 11px; border-radius: 5px; padding: 2px 8px; font-weight: 700; }
.banner-text { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.banner-btn { font-size: 12px; color: var(--blue-800); border: 1px solid var(--blue-400); border-radius: 7px; padding: 4px 11px; cursor: pointer; background: #fff; font-family: inherit; font-weight: 500; transition: background .15s; }
.banner-btn:hover { background: var(--blue-50); }
.main { padding: 16px 20px; background: var(--surface); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.section-more { font-size: 12px; color: var(--blue-600); cursor: pointer; font-weight: 500; }
.cat-grid { display: flex; width: 100%; gap: 6px; margin-bottom: 20px; padding-bottom: 5px; box-sizing: border-box; }
.cat-icon-item { flex: 1; min-width: 0; background: #fff; border: 0.5px solid var(--border); border-radius: 12px; padding: 10px 2px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; transition: border-color .15s; }
.cat-icon-item:hover { border-color: var(--blue-400); }
.cat-icon-box { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.cat-icon-label { font-size: 10px; color: var(--blue-800); text-align: center; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }

/* ✅ [개선1] 카드 hover 애니메이션 — transform + shadow 추가 */
.product-card { background: #fff; border: 0.5px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s; }
.product-card:hover { border-color: var(--blue-600); box-shadow: 0 4px 16px rgba(2, 132, 199, 0.15); }

/* ✅ [개선2] 이미지 배경 중립화 — var(--blue-50)=#F0FDF4(초록)에서 중립 슬레이트로 */
.product-img { width: 100%; aspect-ratio: 1; background: #F1F5F9; display: flex; align-items: center; justify-content: center; }

.product-body { padding: 12px; }
.product-title { font-size: 14px; color: var(--text-primary); font-weight: 600; margin-bottom: 4px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ✅ [개선3] 하드코딩 색상 제거 → CSS 변수 사용 */
.product-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }

.product-price { font-size: 16px; font-weight: 800; color: #111; letter-spacing: -0.5px; }
.product-tags { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.ptag { font-size: 10px; border-radius: 5px; padding: 2px 7px; font-weight: 600; }
.ptag-b { background: var(--blue-100); color: var(--blue-800); }
.ptag-y { background: var(--yellow-100); color: var(--yellow-800); }
.ptag-r { background: #FDECEA; color: #B71C1C; }
.auction-badge { background: var(--blue-600); color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 5px; font-weight: 700; }
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.tab-icon { width: 20px; height: 20px; }
.tab-label { font-size: 10px; color: var(--text-muted); font-weight: 500; }
.tab-item.active .tab-label { color: var(--yellow-600); font-weight: 700; }
.page-nav { display: flex; background: var(--blue-100); border-bottom: 1px solid var(--blue-200); padding: 10px 12px; gap: 6px; flex-wrap: wrap; }
.page-nav button { font-size: 12px; padding: 5px 14px; border-radius: 20px; border: 1px solid var(--blue-200); background: #fff; color: var(--blue-800); cursor: pointer; font-family: inherit; font-weight: 600; transition: all .15s; }
.page-nav button:hover { background: var(--blue-200); border-color: var(--blue-400); }
.page-nav button.on { background: var(--yellow-400); border-color: var(--yellow-600); color: var(--yellow-800); font-weight: 700; }
.page { display: none; }
.page.active { display: block; }
.sub-header { background: #fff; border-bottom: 1px solid var(--border); padding: 0 16px; padding-top: calc(10px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px; height: 52px; }
.back-btn { font-size: 20px; color: var(--blue-600); cursor: pointer; }
.sub-title { font-size: 16px; font-weight: 700; color: var(--text-primary); flex: 1; }
.sub-action { font-size: 13px; color: var(--blue-600); font-weight: 600; cursor: pointer; }
.sub-body { padding: 16px; background: var(--surface); min-height: 460px; }
.form-section { background: #fff; border-radius: 12px; border: 0.5px solid var(--border); padding: 16px; margin-bottom: 12px; }
.form-section-title { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.form-row { margin-bottom: 12px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.form-label { font-size: 12px; color: var(--blue-800); margin-bottom: 5px; display: block; font-weight: 600; }
.form-label span { color: #e53935; margin-left: 2px; }
.form-input { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--text-primary); background: #fff; outline: none; font-family: inherit; transition: border-color .15s; }
.form-input:focus { border-color: var(--blue-400); }
.form-input::placeholder { color: var(--text-muted); }
.form-select { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--text-primary); background: #fff; outline: none; font-family: inherit; }
.form-textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--text-primary); background: #fff; outline: none; resize: none; min-height: 80px; font-family: inherit; }
.photo-upload { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photo-box { aspect-ratio: 1; border: 1.5px dashed var(--border); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; background: var(--surface); }
.photo-box.main { border-color: var(--yellow-400); background: var(--yellow-50); }
.photo-plus { font-size: 22px; color: var(--text-muted); line-height: 1; }
.photo-label { font-size: 10px; color: var(--text-muted); }
.photo-main-label { font-size: 10px; color: var(--yellow-600); font-weight: 700; }
.condition-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cond-chip { border: 1px solid var(--border); border-radius: 20px; padding: 5px 14px; font-size: 12px; color: var(--blue-600); cursor: pointer; background: #fff; font-family: inherit; font-weight: 600; transition: all .15s; }
.cond-chip.on { background: var(--yellow-100); border-color: var(--yellow-400); color: var(--yellow-800); }
.trade-row { display: flex; gap: 8px; }
.trade-chip { border: 1px solid var(--border); border-radius: 8px; padding: 8px 16px; font-size: 12px; color: var(--blue-600); cursor: pointer; background: #fff; flex: 1; text-align: center; font-family: inherit; font-weight: 600; transition: all .15s; }
.trade-chip.on { background: var(--blue-100); border-color: var(--blue-600); color: var(--blue-800); }
.submit-btn { width: 100%; background: var(--yellow-400); color: var(--yellow-800); border: none; border-radius: 10px; padding: 13px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .15s; }
.submit-btn:hover { background: var(--yellow-600); color: #fff; }
.chat-list { background: #fff; }
.chat-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 0.5px solid var(--border); cursor: pointer; transition: background .15s; }
.chat-item:hover { background: var(--blue-50); }
.chat-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--blue-100); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--blue-800); flex-shrink: 0; }
.chat-avatar.yellow { background: var(--yellow-100); color: var(--yellow-800); }
.chat-info { flex: 1; min-width: 0; }
.chat-name-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.chat-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.chat-time { font-size: 11px; color: var(--text-muted); }
.chat-preview { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat-badge { background: var(--yellow-400); color: var(--yellow-800); font-size: 10px; border-radius: 10px; padding: 2px 7px; font-weight: 700; }
.chat-thumb { width: 36px; height: 36px; border-radius: 7px; background: var(--blue-100); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chatroom { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: calc(var(--vh, 1vh) * 100); height: 100dvh; z-index: 1000; background: #fff; display: flex; flex-direction: column; overflow: hidden; padding-bottom: env(safe-area-inset-bottom); }
.chatroom-header { background: #fff; border-bottom: 1px solid var(--border); padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.chatroom-product { background: var(--yellow-50); border-bottom: 1px solid var(--yellow-100); padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.cp-img { width: 40px; height: 40px; border-radius: 7px; background: var(--blue-100); display: flex; align-items: center; justify-content: center; }
.cp-title { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.cp-price { font-size: 12px; color: var(--blue-600); font-weight: 600; }
.cp-btn { margin-left: auto; background: var(--yellow-400); color: var(--yellow-800); border: none; border-radius: 7px; padding: 5px 12px; font-size: 12px; cursor: pointer; font-family: inherit; font-weight: 700; }
.chat-messages { flex: 1; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.msg { display: flex; gap: 8px; align-items: flex-end; }
.msg.mine { flex-direction: row-reverse; }
.msg-bubble { max-width: 70%; padding: 9px 13px; border-radius: 14px; font-size: 13px; line-height: 1.5; }
.msg-bubble.theirs { background: #fff; color: var(--text-primary); border: 0.5px solid var(--border); border-radius: 2px 14px 14px 14px; }
.msg-bubble.mine { background: var(--yellow-400); color: var(--yellow-800); border-radius: 14px 2px 14px 14px; font-weight: 700; }
.msg-time { font-size: 10px; color: var(--text-muted); }
.msg-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-100); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--blue-800); font-weight: 700; flex-shrink: 0; }
.chat-input-bar { background: #fff; border-top: 1px solid var(--border); padding: 10px 16px; display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.chat-input-bar input { flex: 1; border: 1px solid var(--border); border-radius: 20px; padding: 8px 14px; font-size: 13px; color: var(--text-primary); outline: none; background: var(--surface); font-family: inherit; }
.chat-input-bar input::placeholder { color: var(--text-muted); }
.chat-send { background: var(--yellow-400); border: none; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.my-profile { background: #fff; padding: 20px 16px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--border); }
.my-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--yellow-100); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: var(--yellow-800); flex-shrink: 0; border: 2px solid var(--yellow-300); }
.my-name { font-size: 17px; font-weight: 700; color: var(--text-primary); }
.my-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.my-badge { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-100); border-radius: 10px; padding: 2px 9px; font-size: 11px; color: var(--blue-800); margin-top: 4px; font-weight: 600; }
.my-edit-btn { margin-left: auto; border: 1.5px solid var(--border); border-radius: 8px; padding: 5px 12px; font-size: 12px; color: var(--blue-800); background: #fff; cursor: pointer; font-family: inherit; font-weight: 600; }
.my-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--yellow-50); border-bottom: 1px solid var(--yellow-100); }
.stat-item { padding: 14px 0; display: flex; flex-direction: column; align-items: center; gap: 3px; border-right: 0.5px solid var(--yellow-100); }
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.my-menu-section { background: #fff; margin-bottom: 8px; }
.my-menu-title { font-size: 11px; color: var(--text-muted); padding: 10px 16px 4px; letter-spacing: 0.5px; font-weight: 600; }
.my-menu-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 0.5px solid var(--border); cursor: pointer; transition: background .15s; }
.my-menu-item:last-child { border-bottom: none; }
.my-menu-item:hover { background: var(--blue-50); }
.menu-icon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.menu-text { flex: 1; font-size: 14px; color: var(--text-primary); font-weight: 500; }
.menu-arrow { font-size: 16px; color: var(--text-muted); }
.menu-badge-red { background: #FDECEA; color: #B71C1C; font-size: 10px; border-radius: 8px; padding: 1px 6px; font-weight: 700; }
.setting-section { background: #fff; margin-bottom: 8px; }
.setting-title { font-size: 11px; color: var(--text-muted); padding: 10px 16px 4px; letter-spacing: 0.5px; font-weight: 600; }
.setting-item { display: flex; align-items: center; padding: 13px 16px; border-bottom: 0.5px solid var(--border); cursor: pointer; transition: background .15s; }
.setting-item:last-child { border-bottom: none; }
.setting-item:hover { background: var(--blue-50); }
.setting-label { flex: 1; font-size: 14px; color: var(--text-primary); font-weight: 500; }
.setting-value { font-size: 13px; color: var(--text-muted); margin-right: 6px; }
.setting-arrow { font-size: 16px; color: var(--text-muted); }
.toggle { width: 40px; height: 22px; background: var(--border); border-radius: 11px; position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.toggle.on { background: var(--yellow-400); }
.toggle-knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; }
.toggle.on .toggle-knob { left: 21px; }
.logout-btn { width: calc(100% - 32px); margin: 8px 16px; background: #fff; border: 1px solid #FFCDD2; border-radius: 10px; padding: 12px; font-size: 14px; color: #C62828; cursor: pointer; text-align: center; font-family: inherit; font-weight: 600; }
.withdraw-btn { width: calc(100% - 32px); margin: 0 16px 16px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px; font-size: 13px; color: var(--text-muted); cursor: pointer; text-align: center; font-family: inherit; }
.filter-dropdown { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 12px; color: var(--text-secondary); cursor: pointer; font-family: inherit; font-weight: 600; display: flex; align-items: center; gap: 4px; transition: all .15s; }
.filter-dropdown:hover { background: var(--surface); color: var(--blue-800); }
.filter-dropdown.open { border-color: var(--blue-600); color: var(--blue-800); border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; }
.filter-dropdown.applied { background: var(--yellow-50); border-color: var(--yellow-600); color: var(--yellow-800); }
.filter-reset { font-size: 11px; color: var(--text-muted); cursor: pointer; margin-left: auto; text-decoration: underline; padding-left: 10px; font-weight: 500; }
.filter-panels { background: #fff; border-bottom: 1px solid var(--border); padding: 0; display: none; overflow: hidden; }
.filter-panels.show { display: block; }
.filter-panel { padding: 12px 20px; display: none; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--border); background: var(--surface); }
.filter-panel.show { display: flex; }
.f-sub-chip { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 5px 14px; font-size: 12px; color: var(--text-secondary); cursor: pointer; font-weight: 500; transition: all .15s; }
.f-sub-chip.on { background: var(--blue-100); border-color: var(--blue-600); color: var(--blue-800); font-weight: 700; }
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.8); z-index: 2000; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 10px; }
.loading-overlay.show { display: flex; }
.loading-spinner { border: 4px solid var(--blue-100); border-top: 4px solid var(--blue-600); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@media (max-width: 768px) {
  body { background: #fff; }
  .wrap { width: 100%; max-width: 100%; box-shadow: none; min-height: 100vh; min-height: calc(var(--vh, 1vh) * 100); min-height: 100dvh; }
  .bottom-tab-bar { max-width: 100%; }
}
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.modal-box { background: #fff; width: 90%; max-width: 400px; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.2); animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #eee; }
.modal-title { font-size: 16px; font-weight: 700; color: #1A2B4A; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #7A93B0; }
.modal-body { padding: 20px; }
.auction-bid-btn { width: 100%; padding: 14px; background: #1A2B4A; color: #fff; font-weight: bold; border: none; border-radius: 8px; cursor: pointer; margin-top: 20px; transition: 0.2s; }
.auction-bid-btn:active { background: #0A1730; transform: scale(0.98); }
.auction-info-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; }
.auction-info-label { color: #7A93B0; }
.auction-info-val { font-weight: 600; color: #1A2B4A; }
.auction-current-price { font-size: 24px; font-weight: 800; color: #D4960A; text-align: center; padding: 16px 0; }
.bottom-tab-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 1024px; height: 60px; background: white; border-top: 1px solid var(--border); display: flex; justify-content: space-around; align-items: center; z-index: 999; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
body { padding-bottom: 70px; }
.tab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 6px 12px; transition: all 0.2s; }
.tab-item svg { stroke: var(--text-muted); transition: all 0.2s; }
.tab-item.active { color: var(--blue-600); }
.tab-item.active svg { stroke: var(--blue-600); }
.tab-label { font-size: 11px; font-weight: 600; font-family: inherit; }
.fab-container { position: fixed; right: 16px; bottom: 76px; display: flex; flex-direction: column; gap: 12px; z-index: 998; }
.fab-btn { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.15); transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.fab-btn:hover { transform: scale(1.05); }
.fab-btn:active { transform: scale(0.95); }
.fab-top { background: white; border: 1px solid var(--border); width: 44px; height: 44px; align-self: flex-end; }
.fab-register { background: var(--blue-600); color: white; }
.login-container { padding: 20px 24px; flex: 1; }
.login-logo { text-align: center; margin-bottom: 40px; margin-top: 20px; }
.login-logo h2 { font-size: 20px; font-weight: 700; color: var(--blue-800); margin: 16px 0 6px; }
.login-logo p { font-size: 13px; color: var(--text-muted); }
.auth-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.auth-tab { flex: 1; text-align: center; padding: 12px 0; font-size: 15px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all 0.2s; position: relative; }
.auth-tab.active { color: var(--blue-800); }
.auth-tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 2px; background: var(--blue-800); }
.auth-error { color: #E53E3E; font-size: 12px; font-weight: 600; margin-top: 10px; min-height: 20px; text-align: center; }

/* ✅ [개선4] 하트 버튼 셀렉터 수정 — #modal-heart-btn 추가로 CSS 실제 적용 */
.heart-btn, #modal-heart-btn { transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.heart-btn:active, #modal-heart-btn:active { transform: scale(0.7); }

/* ✅ [개선5] 빈 화면 Empty State 공통 클래스 — mypage.js에서 class="empty-state" 로 사용 */
.empty-state { padding: 64px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty-state-icon { width: 56px; height: 56px; background: var(--surface); border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.empty-state-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.empty-state-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; max-width: 220px; }
.empty-state-btn { margin-top: 8px; background: var(--blue-800); color: #fff; border: none; border-radius: 10px; padding: 12px 24px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; transition: opacity 0.15s; }
.empty-state-btn:hover { opacity: 0.85; }
.empty-state-btn.secondary { background: #fff; color: var(--blue-800); border: 1.5px solid var(--blue-400); }

/* B2B 신뢰 뱃지 강화 */
.b2b-trust-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--blue-800); color: #fff; border-radius: 6px; padding: 3px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; }
.vendor-certified { border: 1.5px solid var(--blue-400); border-radius: 8px; padding: 2px 8px; font-size: 11px; font-weight: 700; color: var(--blue-800); background: var(--blue-100); display: inline-flex; align-items: center; gap: 4px; }
/* ============================================================================
   전역 로딩 스피너 (showLoading / hideLoading)
   ============================================================================ */
#global-spinner {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}
#global-spinner.is-active {
    display: flex;
}
#global-spinner .spinner-circle {
    width: 44px;
    height: 44px;
    border: 3px solid #EAEDF2;
    border-top-color: #0A0A0A;
    border-radius: 50%;
    animation: hm-spin 0.8s linear infinite;
}
#global-spinner .spinner-msg {
    font-size: 13px;
    font-weight: 600;
    color: #1A2B4A;
    letter-spacing: -0.2px;
    margin: 0;
}
@keyframes hm-spin {
    to { transform: rotate(360deg); }
}

/* ✅ Desktop UI defaults for header icons */
.h-icon { display: none; }
.h-text { display: inline; }

/* ✅ Mobile Header Responsiveness */
@media screen and (max-width: 500px) {
    .header { padding: 0 10px; gap: 6px; height: 52px; }
    .logo-text-wrap { display: none; }
    .logo-seahorse { width: 34px; height: 34px; }
    .search-bar { padding: 0 8px; gap: 4px; height: 34px; border-radius: 8px; }
    .search-bar input { font-size: 12px; }
    .search-bar svg { width: 13px; height: 13px; }
    .header-nav { gap: 6px; }
    
    /* Hide text & show icon for top buttons to save space */
    .h-text { display: none !important; }
    .h-icon { display: block !important; width: 18px; height: 18px; margin: auto; }
    .nav-btn-icon { min-width: 36px !important; width: 36px !important; height: 36px !important; border-radius: 8px !important; padding: 0 !important; display: flex !important; justify-content: center !important; align-items: center !important; gap: 0 !important; }
}

/* ============================================================================
   컴팩트 매물 뷰 (트랙 1-2)
   ============================================================================ */
.product-compact-card {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #F4F6F9;
    cursor: pointer;
    transition: background 0.15s;
}
.product-compact-card:active { background: #F4F6F9; }

.compact-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #F0F9FF;
    flex-shrink: 0;
}
.compact-thumb img, .compact-thumb svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compact-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.compact-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.compact-badge-condition {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #E6F4EA;
    color: #1E8E3E;
}

.compact-badge-trade {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #EAEDF2;
    color: #7A93B0;
}

.compact-badge-urgent-soft {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #FFF3E0;
    color: #E65100;
}

.compact-badge-urgent {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #FFEBEE;
    color: #C62828;
}

.compact-title {
    font-size: 14px;
    font-weight: 600;
    color: #1A2B4A;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-price {
    font-size: 16px;
    font-weight: 800;
    color: #1A2B4A;
    margin-top: 2px;
}

.compact-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #7A93B0;
    margin-top: 2px;
}

.compact-vendor {
    font-weight: 600;
    color: #1A5FA0;  /* B2B 필수: 판매자 회사명 강조 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}
