/* style.css — 딜판 (DealPan) UI v8: 토스(TDS) × 당근(SEED V3) 공식 시맨틱 컬러 배합 적용
 * [핵심 공식]
 * 1. Brand (일렉트릭 인디고 #4F46E5): 로고 · 활성 탭 · 선택된 카테고리 · 메인 버튼에만 사용 (브랜드 정체성)
 * 2. Hot / Discount (토스 시맨틱 레드 #F04452): 할인율% · '2곳 화제' · 댓글수 강조 (한국 커머스 본능적 시인성 1위!)
 * 3. Point / Benefit (시맨틱 에메랄드 #047857 / #ECFDF5): '+320P 적립' · '딜칩' 보상 (할인율과 시각적으로 즉시 구분!)
 * 4. Neutral High-Contrast (당근 SEED 명도 대비): 본문·보조 텍스트 명암비 대폭 상향 (#0f172a / #334155 / #475569)
 */
:root {
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-deep: #3730a3;
  --brand-soft: #eef2ff;
  --brand-border: #c7d2fe;
  --hot: #dc2626;
  --hot-dark: #991b1b;
  --hot-soft: #fff1f2;
  --hot-border: #fecdd3;
  --point: #047857;
  --point-soft: #ecfdf5;
  --point-border: #a7f3d0;
  --blue: #2563eb;
  --warn-text: #b45309;
  --bg-page: #f4f6f8;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #edf2f7;
  --border-strong: #cbd5e1;
  --text-strong: #0f172a;
  --text-body: #334155;
  --text-muted: #475569;
  --text-faint: #475569;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-page);
  color: var(--text-strong);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ==========================================================================
   1. 상단 고정 헤더 (군더더기 없는 1줄 글로벌바 + 깔끔한 밑줄 탭)
   ========================================================================== */
.dp-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  width: 100%;
}
.dp-header-inner {
  max-width: 1140px; margin: 0 auto;
  padding: 9px 16px;
  display: flex; align-items: center; gap: 12px;
}
.dp-logo {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0; cursor: pointer;
}
.dp-logo-symbol {
  display: inline-flex; align-items: center; justify-content: center;
}
.dp-logo-title {
  font-size: 19.5px; font-weight: 900; letter-spacing: -0.04em; color: var(--text-strong);
}

.dp-search-box {
  flex: 1; max-width: 380px; height: 36px;
  background: var(--bg-subtle); border: 1px solid transparent;
  border-radius: 10px;
  display: flex; align-items: center; padding: 0 11px; gap: 7px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.dp-search-box:focus-within {
  border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.dp-search-box input {
  border: 0; background: transparent; outline: none; flex: 1;
  font-size: 14px; color: var(--text-strong); min-width: 0;
}

.dp-header-actions {
  display: flex; align-items: center; gap: 5px; margin-left: auto; flex-shrink: 0;
}
.dp-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text-body);
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px; transition: all .12s; white-space: nowrap;
}
.dp-btn:hover { background: var(--bg-subtle); }
.dp-btn-ghost { border-color: transparent; background: transparent; color: var(--text-body); padding: 6px 9px; }
.dp-btn-ghost:hover { background: var(--bg-subtle); }
.dp-btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.dp-btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.dp-btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.dp-chip-pill {
  background: var(--point-soft); border-color: var(--point-border); color: var(--point); padding: 5px 11px; font-size: 12.5px;
}
.dp-chip-pill strong { font-weight: 900; color: var(--point); }
.dp-direct-go {
  margin-left: auto; border: 1px solid var(--border-strong); background: #fff; color: var(--text-strong);
  padding: 6px 11px; min-height: 32px; border-radius: 7px; font-size: 12px; font-weight: 700; flex-shrink: 0;
  display: inline-flex; align-items: center; transition: all .12s;
}
.dp-direct-go:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.dp-cashback-txt {
  font-size: 11.5px; font-weight: 800; color: var(--point); background: var(--point-soft);
  border: 1px solid var(--point-border); padding: 1px 6px; border-radius: 5px;
}
.dp-cond-warn {
  font-size: 12px; font-weight: 600; color: var(--warn-text);
}

/* 밑줄형 네비게이션 탭 (시그니처 인디고 액티브 라인) */
.dp-board-bar {
  max-width: 1140px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 18px; overflow-x: auto; scrollbar-width: none;
}
.dp-board-bar::-webkit-scrollbar { display: none; }
.dp-board-tab {
  border: 0; background: transparent; color: var(--text-muted);
  padding: 8px 2px 9px; font-size: 13.5px; font-weight: 600;
  border-bottom: 2.5px solid transparent; white-space: nowrap; transition: color .12s;
}
.dp-board-tab:hover { color: var(--text-strong); }
.dp-board-tab.active {
  color: var(--brand); font-weight: 800; border-bottom-color: var(--brand);
}
.dp-board-tab--add {
  color: var(--text-faint); font-size: 12.5px; margin-left: auto;
}

/* ==========================================================================
   2. 메인 레이아웃 & 슬림 컨트롤 바 (카테고리 + 필터 1줄 압축)
   ========================================================================== */
.dp-layout {
  max-width: 1140px; width: 100%; margin: 14px auto 24px; padding: 0 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; align-items: start;
}
.dp-footer {
  max-width: 1140px; margin: 0 auto 88px; padding: 18px 16px;
  border-top: 1px solid var(--border-light);
  font-size: 11.5px; color: #475569; font-weight: 500; line-height: 1.55; text-align: center;
}
.dp-footer-links {
  margin-top: 8px; display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap;
}
.dp-footer-link {
  border: 0; background: transparent; padding: 2px 4px; font-size: 11.5px; color: #334155; font-weight: 600;
}
.dp-footer-link:hover { color: var(--brand); text-decoration: underline; }

.dp-filter-strip {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px;
}
.dp-cat-row {
  display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none;
  padding-right: 16px;
  -webkit-mask-image: linear-gradient(to right, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, #000 92%, transparent 100%);
}
.dp-cat-row::-webkit-scrollbar { display: none; }
.dp-cat-chip {
  border: 1px solid transparent; background: transparent; color: var(--text-muted);
  padding: 5px 11px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.dp-cat-chip:hover { background: var(--bg-subtle); color: var(--text-strong); }
.dp-cat-chip.active { background: var(--brand); color: #fff; font-weight: 700; }

.dp-sub-controls {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 2px 2px 4px;
}
.dp-quick-toggles { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dp-toggle-pill {
  border: 1px solid var(--border); background: #fff; color: var(--text-body);
  padding: 4px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600;
  transition: all .12s;
}
.dp-toggle-pill.on {
  border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 800;
}

.dp-sort-view-group {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}
.dp-sort-links { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.dp-sort-btn {
  border: 0; background: transparent; padding: 2px 3px; color: var(--text-faint); font-weight: 600; font-size: 12.5px;
}
.dp-sort-btn.active { color: var(--brand); font-weight: 800; }

.dp-view-switch {
  display: inline-flex; border: 1px solid var(--border); background: #fff; border-radius: 7px; overflow: hidden;
}
.dp-view-btn {
  border: 0; background: transparent; padding: 4px 8px; font-size: 11.5px; font-weight: 700; color: var(--text-muted);
}
.dp-view-btn.active { background: var(--bg-subtle); color: var(--text-strong); }

/* ==========================================================================
   3. 초집중 클린 리스트 뷰 (무지개 배지 제거 · 상품명과 가격만 1초 스캔)
   ========================================================================== */
.dp-compact-list {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden;
}
.dp-compact-row {
  display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 14px;
  padding: 13px 16px; border-bottom: 1px solid var(--border-light); cursor: pointer; align-items: center;
  transition: background .1s;
}
.dp-compact-row:last-child { border-bottom: 0; }
.dp-compact-row:hover { background: #fafafa; }
.dp-compact-row.is-expired { opacity: 0.48; }

.dp-compact-thumb {
  position: relative; width: 80px; height: 80px; border-radius: 10px; overflow: hidden;
  background: #f8fafc; border: 1px solid var(--border-light); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.dp-compact-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.dp-thumb-fallback {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 13px; font-weight: 900; color: var(--brand); text-align: center; padding: 10px; line-height: 1.3;
}
.dp-thumb-fallback .fb-cat {
  font-size: 10.5px; font-weight: 700; color: #64748b; background: #fff;
  border: 1px solid var(--brand-border); padding: 2px 7px; border-radius: 99px;
}
.dp-ended-overlay {
  position: absolute; inset: 0; background: rgba(17, 24, 39, 0.58); color: #fff;
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

.dp-compact-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* 1행: 또렷한 명도 대비의 메타 라인 + 모바일 잘림 없는 '2곳 화제' 배지 */
.dp-meta-top {
  display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-muted);
  flex-wrap: wrap; min-width: 0;
}
.dp-meta-mall { font-weight: 800; color: var(--text-strong); }
.dp-meta-ship { font-weight: 600; color: var(--text-body); }
.dp-meta-dot { color: #94a3b8; }
.dp-meta-hot {
  background: var(--hot-soft); color: var(--hot-dark); border: 1px solid var(--hot-border);
  font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 4px; line-height: 1.3; flex-shrink: 0;
}

/* 2행: 선명한 상품 제목 */
.dp-compact-title {
  margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.38; color: var(--text-strong);
  letter-spacing: -0.015em; word-break: keep-all; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dp-comment-num { color: var(--hot); font-weight: 800; font-size: 13px; margin-left: 4px; }

/* 3행: 토스 시맨틱 레드 할인율 + 딥블랙 가격 + 또렷한 단위가격 */
.dp-compact-price-row {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 2px;
}
.dp-discount { color: var(--hot); font-weight: 900; font-size: 16.5px; letter-spacing: -0.02em; }
.dp-price { color: var(--text-strong); font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.dp-orig-price { color: var(--text-faint); font-size: 12px; text-decoration: line-through; }
.dp-unit-price {
  font-size: 12.5px; font-weight: 600; color: var(--text-body);
}
.dp-row-stat {
  margin-left: auto; font-size: 12px; color: var(--text-faint); font-weight: 500;
}

/* ==========================================================================
   4. 깔끔한 사진 그리드 뷰 (쿠팡·무신사식 미니멀 카드)
   ========================================================================== */
.dp-deal-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.dp-deal-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.dp-deal-card:hover { border-color: #94a3b8; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06); }
.dp-deal-card.is-expired { opacity: 0.5; }
.dp-deal-thumb {
  position: relative; aspect-ratio: 1 / 1; background: #fff; overflow: hidden;
  border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center;
}
.dp-deal-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.dp-card-float-hot {
  position: absolute; top: 8px; left: 8px;
  background: rgba(240, 68, 82, 0.94); color: #fff;
  font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 6px;
}
.dp-deal-body { padding: 11px 12px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.dp-deal-title {
  margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.36; color: var(--text-strong);
  word-break: keep-all; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dp-price-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.dp-meta-line {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: 11.5px; color: var(--text-muted); margin-top: auto; padding-top: 8px;
}
.dp-card-go {
  border: 1px solid var(--border-strong); background: #fff; color: var(--text-strong);
  padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.dp-card-go:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* 인피드 광고 슬롯 (눈을 해치지 않는 무채색 톤) */
.dp-ad-slot {
  background: #fafafa; border-bottom: 1px solid var(--border-light);
  padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; color: var(--text-muted);
}
.dp-ad-badge {
  border: 1px solid var(--border-strong); color: var(--text-faint);
  font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; flex-shrink: 0;
}

.dp-board-reward-strip {
  background: var(--point-soft); border: 1px solid var(--point-border); border-radius: 10px;
  padding: 9px 14px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 12.5px; color: var(--point); font-weight: 700;
}
.dp-board-prompt-row {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; padding-right: 16px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, #000 92%, transparent 100%);
}
.dp-board-prompt-row::-webkit-scrollbar { display: none; }
.dp-prompt-chip {
  border: 1px dashed var(--border-strong); background: #fff; color: var(--text-body);
  padding: 5px 11px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; white-space: nowrap;
}
.dp-prompt-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.dp-board-head {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.dp-dc-table-wrap {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.dp-dc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dp-dc-table th {
  background: #fafafa; border-bottom: 1px solid var(--border); padding: 9px 10px;
  font-size: 12px; color: var(--text-muted); font-weight: 700;
}
.dp-dc-table td { padding: 11px 10px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.dp-dc-table tr:last-child td { border-bottom: 0; }
.dp-dc-table tr:hover td { background: #fafafa; cursor: pointer; }
.dp-dc-tag {
  display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--text-muted); margin-right: 6px;
}
.dp-dc-comment-cnt { color: var(--hot); font-weight: 800; font-size: 12.5px; margin-left: 4px; }
.dp-ip { color: var(--text-faint); font-size: 11.5px; font-weight: 400; margin-left: 3px; }

.dp-side-box {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 15px; margin-bottom: 12px;
}
.dp-side-wallet-hero {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  border-color: #4338ca; color: #fff;
}
.dp-side-muted { background: #fff; }
.dp-side-ad { background: #fafafa; border-style: dashed; }
.dp-side-title {
  margin: 0 0 8px; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: space-between;
}
.dp-side-sub { font-size: 11px; color: var(--text-faint); font-weight: 600; }
.dp-best-item {
  padding: 7px 0; border-bottom: 1px solid var(--border-light); cursor: pointer;
  display: flex; align-items: baseline; gap: 7px;
}
.dp-best-item:last-child { border-bottom: 0; padding-bottom: 0; }
.dp-best-rank { font-size: 12px; font-weight: 800; color: var(--text-muted); width: 14px; flex-shrink: 0; }
.dp-best-rank.top { color: var(--hot); font-weight: 900; }
.dp-best-item-title {
  font-size: 13px; font-weight: 500; color: var(--text-body); line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.dp-best-item:hover .dp-best-item-title { color: var(--text-strong); text-decoration: underline; }

/* ==========================================================================
   6. 상세 페이지 (풍부한 여론 요약 · 가격흐름 · 다나와 비교표는 상세에 집중)
   ========================================================================== */
.dp-detail-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px;
}
.dp-detail-hero {
  display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: center; margin-top: 14px;
}
.dp-buy-cta-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 16px 0;
}
.dp-buy-sub-actions {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.dp-buy-go-btn {
  flex: 1; min-width: 210px; background: var(--brand); color: #fff; border: 0;
  padding: 13px 18px; border-radius: 10px; font-size: 15px; font-weight: 800; text-align: center;
}
.dp-buy-go-btn:hover { background: var(--brand-dark); }
.dp-vote-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 18px 0 8px; }
.dp-vote-btn {
  border: 1px solid var(--border); background: #fff; padding: 8px 14px; border-radius: 9px;
  font-size: 13px; font-weight: 700; color: var(--text-body); display: inline-flex; align-items: center; gap: 5px;
}
.dp-vote-btn.hot { border-color: var(--brand-border); color: var(--brand); background: var(--brand-soft); }
.dp-ai-detail-box {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin: 14px 0;
}
.dp-compare-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
.dp-compare-table th, .dp-compare-table td { padding: 8px 8px; border-bottom: 1px solid var(--border-light); text-align: left; }
.dp-compare-table th { color: var(--text-muted); font-weight: 600; }

.dp-chip-mall { font-size: 12px; font-weight: 700; color: var(--text-body); }
.dp-chip-cat { font-size: 12px; color: var(--text-muted); }
.dp-chip-best { background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }

/* 댓글 영역 */
.dp-comment-box {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; margin-top: 12px;
  scroll-margin-top: 96px;
}
.dp-comment-item { padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.dp-comment-item.is-reply { padding-left: 18px; background: #fafafa; border-radius: 8px; padding-right: 10px; }
.dp-sticker-bar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.dp-sticker-bar::-webkit-scrollbar { display: none; }
.dp-sticker-chip {
  border: 1px solid var(--border); background: #fff; border-radius: var(--radius-pill);
  padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--text-body); white-space: nowrap;
}
.dp-sticker-chip.selected { border-color: var(--brand); background: var(--brand); color: #fff; }

/* ==========================================================================
   7. 스마트폰 하단 5탭 바 (단색 선 아이콘 · 토스/당근 스타일)
   ========================================================================== */
.dp-mobile-tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 75;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + var(--safe-bottom));
  grid-template-columns: repeat(5, 1fr);
}
.dp-mob-tab {
  border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 3px 2px; color: #475569; font-size: 10.5px; font-weight: 700;
}
.dp-mob-tab .ico-svg { width: 20px; height: 20px; }
.dp-mob-tab.active { color: var(--brand); font-weight: 800; }
.dp-mob-tab .plus-pill {
  background: var(--brand); color: #fff; width: 32px; height: 22px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700;
}

/* 모달 공통 */
.dp-modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.48); z-index: 300;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.dp-modal-backdrop.open { display: flex; }
.dp-modal {
  background: #fff; border-radius: 16px; max-width: 520px; width: 100%; max-height: 88vh;
  overflow-y: auto; padding: 20px; box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}
.dp-modal-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px;
}
.dp-modal-head h2 { margin: 0; font-size: 17px; font-weight: 800; word-break: keep-all; }
.dp-field { margin-bottom: 11px; }
.dp-field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; color: var(--text-body); }
.dp-field input, .dp-field select, .dp-field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 16px; font-family: inherit;
}

.dp-toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 10px 18px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; z-index: 500; display: none;
  max-width: 90vw; text-align: center; pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}
.dp-toast.show { display: block; }
h1, h2, h3, button, .dp-board-tab, .dp-btn { word-break: keep-all; }

/* 소셜 간편로그인 공식 브랜드 버튼 규격 */
.dp-social-btn {
  width: 100%; border: 0; border-radius: 10px; padding: 12px 14px;
  font-size: 14px; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.1s ease, filter 0.12s ease;
}
.dp-social-btn:active { transform: scale(0.99); }
.dp-social-kakao { background: #FEE500; color: #191919; }
.dp-social-naver { background: #03C75A; color: #ffffff; }
.dp-social-google { background: #ffffff; color: #1f2937; border: 1px solid #cbd5e1; }
.dp-fixed-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-border);
  font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; margin-left: 3px;
}
.dp-auth-user-pill {
  background: var(--brand-soft) !important; color: var(--brand-dark) !important;
  border: 1px solid var(--brand-border) !important; font-weight: 800 !important;
}

/* ==========================================================================
   7-B. 재방문 유도 펄스 바 (지난 방문 이후 신규 +N건) & 실시간 대란 TOP 3 전광판
   ========================================================================== */
.dp-fresh-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(90deg, #eef2ff 0%, #f8fafc 100%);
  border: 1px solid var(--brand-border); border-radius: 11px;
  padding: 9px 13px; margin-bottom: 10px; font-size: 12.5px; color: var(--text-strong);
}
.dp-fresh-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--hot);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18); flex-shrink: 0;
}
.dp-new-badge {
  display: inline-flex; align-items: center;
  background: var(--hot); color: #ffffff;
  font-size: 10px; font-weight: 900; letter-spacing: 0.02em;
  padding: 1px 5px; border-radius: 4px; flex-shrink: 0;
}
.dp-spotlight-wrap {
  background: #ffffff; border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 12px; margin-bottom: 10px;
}
.dp-spotlight-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 12.5px; font-weight: 800; color: var(--text-strong);
}
.dp-spotlight-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.dp-spot-card {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 9px; border-radius: 10px; border: 1px solid var(--border-light);
  background: #f8fafc; cursor: pointer; transition: border-color .12s, background .12s;
  min-width: 0;
}
.dp-spot-card:hover { border-color: var(--brand-border); background: var(--brand-soft); }
.dp-spot-rank {
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--hot); color: #fff; font-size: 11px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dp-spot-info { min-width: 0; flex: 1; }
.dp-spot-title {
  font-size: 12.5px; font-weight: 700; color: var(--text-strong);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dp-spot-price {
  font-size: 12px; font-weight: 900; color: var(--hot); margin-top: 2px;
}

/* 판 탐색 허브 & 마이너 판 연동 특가 카드 */
.dp-board-hub-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px;
}
.dp-board-hub-card {
  border: 1px solid var(--border); background: #fff; border-radius: 10px;
  padding: 9px 10px; display: flex; align-items: center; gap: 8px;
  transition: border-color .12s, background .12s;
}
.dp-board-hub-card:hover { border-color: var(--brand-border); background: var(--brand-soft); }

.dp-minor-deals-strip {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 11px 13px; margin-bottom: 10px;
}
.dp-minor-deals-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; color: var(--text-strong); margin-bottom: 8px;
}
.dp-minor-deals-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}
.dp-minor-deal-card {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px;
  background: #f8fafc; border: 1px solid var(--border-light); border-radius: 9px;
  cursor: pointer; min-width: 0; transition: border-color .12s, background .12s;
}
.dp-minor-deal-card:hover { border-color: var(--brand-border); background: var(--brand-soft); }
.dp-minor-deal-thumb {
  width: 44px; height: 44px; border-radius: 7px; object-fit: cover; background: #fff;
  border: 1px solid var(--border-light); flex-shrink: 0;
}
.dp-minor-deal-fb {
  width: 44px; height: 44px; border-radius: 7px; background: var(--brand-soft); color: var(--brand);
  font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* 하단 페이지 번호 이동 바 (1 · 2 · 3 ... 다음 ›) */
.dp-pagination {
  margin: 18px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.dp-page-row {
  display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap;
}
.dp-page-btn {
  min-width: 34px; height: 34px; padding: 0 10px;
  border: 1px solid var(--border); background: #ffffff; color: var(--text-body);
  border-radius: 8px; font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; transition: all .12s;
}
.dp-page-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.dp-page-btn.active { background: var(--brand); border-color: var(--brand); color: #ffffff; font-weight: 800; }
.dp-page-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.dp-page-dots { color: #94a3b8; font-size: 13px; padding: 0 3px; font-weight: 700; }
.dp-page-info { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }

@media (max-width: 760px) {
  .dp-fresh-banner { margin: 0 12px 6px; padding: 7px 10px; font-size: 12px; }
  .dp-spotlight-wrap { margin: 0 12px 6px; padding: 8px 10px; }
  .dp-spotlight-head { margin-bottom: 6px; font-size: 12px; }
  .dp-spotlight-grid {
    display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none;
    scroll-snap-type: x proximity; padding-right: 10px;
  }
  .dp-spotlight-grid::-webkit-scrollbar { display: none; }
  .dp-spot-card {
    flex: 0 0 218px; scroll-snap-align: start; padding: 7px 9px;
  }
}

/* ==========================================================================
   8. 반응형 브레이크포인트 (모바일 첫 화면 상품 5개 즉시 노출!)
   ========================================================================== */
@media (max-width: 960px) {
  .dp-layout { grid-template-columns: minmax(0, 1fr); padding: 0 12px; gap: 16px; }
  #rightSidebar { display: none; }
}

@media (max-width: 760px) {
  .dp-mobile-tabbar { display: grid; }
  .dp-header-actions .hide-mob { display: none; }
  .dp-header-inner { padding: 7px 10px; gap: 6px; }
  .dp-logo-title { font-size: 16.5px; }
  .dp-search-box { height: 34px; max-width: none; min-width: 90px; padding: 0 8px; }
  .dp-search-box input { font-size: 14px; }
  .dp-header-actions { gap: 4px; }
  .dp-header-actions .dp-btn { padding: 5px 7px; font-size: 11.5px; }
  .dp-board-bar { padding: 0 12px; gap: 14px; }
  .dp-board-tab { padding: 6px 1px 7px; font-size: 13px; }
  .dp-layout { margin-top: 6px; padding: 0; }
  .dp-filter-strip { padding: 0 12px; gap: 5px; margin-bottom: 5px; }
  .dp-cat-chip { padding: 4px 10px; font-size: 12.5px; }
  .dp-sub-controls { gap: 6px; padding: 0 0 2px; }
  .dp-quick-toggles {
    width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    padding-right: 14px;
    -webkit-mask-image: linear-gradient(to right, #000 92%, transparent 100%);
    mask-image: linear-gradient(to right, #000 92%, transparent 100%);
  }
  .dp-quick-toggles::-webkit-scrollbar { display: none; }
  .dp-toggle-pill { white-space: nowrap; flex-shrink: 0; padding: 4px 9px; font-size: 11.5px; }
  .dp-sort-view-group { width: 100%; justify-content: space-between; margin-left: 0; }
  .dp-compact-list { border-radius: 0; border-left: 0; border-right: 0; }
  .dp-compact-row { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 11px 12px; }
  .dp-compact-thumb { width: 72px; height: 72px; }
  .dp-compact-title { font-size: 14.5px; }
  .dp-deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 10px; }
  .dp-detail-card, .dp-comment-box, .dp-board-head, .dp-dc-table-wrap, .dp-minor-deals-strip { border-radius: 0; border-left: 0; border-right: 0; }
  .dp-board-hub-grid, .dp-minor-deals-grid { grid-template-columns: 1fr; }
  .dp-detail-hero { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .dp-buy-cta-bar { flex-direction: column; align-items: stretch; gap: 7px; }
  .dp-buy-go-btn { width: 100%; min-width: 0; padding: 13px 14px; }
  .dp-buy-sub-actions { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .dp-buy-sub-actions .dp-btn { justify-content: center; padding: 8px 4px; font-size: 12px; }
  .dp-vote-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .dp-vote-btn { justify-content: center; padding: 9px 8px; font-size: 12.5px; }
  .dp-modal-backdrop { align-items: flex-end; padding: 0; }
  .dp-modal { border-radius: 18px 18px 0 0; max-width: 100%; max-height: 90vh; padding: 18px 16px calc(22px + var(--safe-bottom)); }
  .dp-dc-table .col-hide-mob { display: none; }
}
