/* ── 대시보드 ────────────────────────────────────────────── */
#page-dashboard .card { max-width: 560px; }

.user-badge {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #eff6ff;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #171A20;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}
.user-info h2 { font-size: 16px; font-weight: 700; }
.user-info p  { font-size: 13px; color: var(--muted); margin-top: 2px; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.info-card {
  background: #f8fafc;
  border-radius: 8px;
  padding: 14px 16px;
}
.info-card .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.info-card .value { font-size: 14px; font-weight: 600; margin-top: 4px; }

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dcfce7;
  color: var(--success);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}
.badge-unverified {
  background: #fef9c3;
  color: var(--warn-text);
}

.token-box {
  background: #0f172a;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 24px;
}
.token-box .token-label {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.token-box .token-value {
  font-family: 'Consolas', monospace;
  font-size: 11px;
  color: #7dd3fc;
  word-break: break-all;
  line-height: 1.6;
}

/* ── 상품 카드 (당근마켓 스타일) ─────────────────────────── */
.item-card {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
  border-radius: 8px;
}
.item-card:hover { background: var(--subtle); }
.item-card:last-child { border-bottom: none; }
.item-thumb {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}
.item-thumb-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 10px;
  background: #e2e8f0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 28px;
}
.item-info { flex: 1; min-width: 0; }
.item-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub   { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.item-price { font-size: 14px; font-weight: 700; color: var(--primary); }
.item-status-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
}
.badge-available { background: #dcfce7; color: #16a34a; }
.badge-rented    { background: #fef9c3; color: var(--warn-text); }
.badge-completed { background: #e2e8f0; color: #64748b; }
.item-card.item-completed {
  opacity: .55; pointer-events: auto; position: relative;
}
.item-card.item-completed::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg, transparent, transparent 6px,
    rgba(100,116,139,.04) 6px, rgba(100,116,139,.04) 12px
  );
  pointer-events: none; border-radius: inherit;
}
.item-counters {
  cursor: default;
  user-select: none;
}

/* ── 해시태그/카테고리 pills ─────────────────────────────── */
.tag-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.tag-scroll::-webkit-scrollbar { display: none; }
.tag-pill {
  flex-shrink: 0;
  padding: 5px 14px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  background: var(--card);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  white-space: nowrap;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.tag-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── 상품 카드 하단 카운터 ───────────────────────────────── */
.item-counters {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* ── 사진 슬라이더 ────────────────────────────────────── */
.photo-slider-wrap {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
  aspect-ratio: 4/3;
  max-height: 280px;
}
.slider-track {
  display: flex;
  height: 100%;
  transition: transform .3s ease;
  will-change: transform;
}
.slider-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slider-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.45); color: #fff;
  border: none; font-size: 18px; cursor: pointer;
  padding: 4px 10px; border-radius: 4px;
  z-index: 5;
}
.slider-nav.prev { left: 6px; }
.slider-nav.next { right: 6px; }
.slider-dots { display: flex; justify-content: center; gap: 5px; margin-top: 6px; }
.slider-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border); cursor: pointer; transition: background .15s;
}
.slider-dot.active { background: var(--primary); }

/* ── 찜 버튼 ────────────────────────────────────────────── */
.wish-toggle-btn,
.chat-header-wish-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
  font-size: 18px;
  line-height: 1;
}
.wish-toggle-btn:hover,
.chat-header-wish-btn:hover {
  background: var(--subtle);
  border-color: #fda4af;
  color: #e11d48;
  transform: translateY(-1px);
}
.wish-toggle-btn.is-active,
.chat-header-wish-btn.is-active {
  color: #e11d48;
  border-color: #fda4af;
  background: #fff1f2;
}
.wish-toggle-btn:disabled,
.chat-header-wish-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}
.wish-toggle-btn.is-lg {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  font-size: 23px;
  flex: none;
}
.wishlist-menu-action.is-active {
  background: #fff1f2;
  color: #e11d48;
  font-weight: 700;
}
[data-theme="dark"] .wish-toggle-btn.is-active,
[data-theme="dark"] .chat-header-wish-btn.is-active,
[data-theme="dark"] .wishlist-menu-action.is-active {
  background: rgba(225,29,72,.14) !important;
  border-color: rgba(253,164,175,.45) !important;
  color: #fb7185 !important;
}

/* ── WIZ refresh: items ──────────────────────────────── */
#page-dashboard > div {
  max-width: 760px !important;
}
#page-dashboard h2#dash-username {
  font-size: 17px !important;
  font-weight: 800 !important;
}
#page-dashboard h2#dash-username::before {
  content: "안녕하세요, ";
  color: var(--muted);
  font-weight: 600;
}
#gps-location {
  display: none !important;
}
#page-dashboard h3 {
  font-size: 17px !important;
  font-weight: 810 !important;
}
#page-dashboard h3::after {
  content: "동네에서 바로 빌리는 프리미엄 아이템";
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}
#page-dashboard #filter-nearby,
#page-dashboard #filter-all,
#page-dashboard #filter-available {
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  font-size: 11.25px;
  line-height: 1;
  border-width: 1px;
}
.tag-scroll {
  margin: 12px -2px 14px;
  padding: 2px 2px 8px;
}
.listings-box {
  background: #fff !important;
  border: 1px solid var(--border);
  border-radius: 18px !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 2px 18px !important;
  overflow: hidden;
}
.item-card {
  gap: 16px;
  padding: 16px 0;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.item-card:hover {
  background: linear-gradient(90deg, rgba(242,183,5,.10), transparent);
}
.item-thumb,
.item-thumb-placeholder {
  width: 104px;
  height: 104px;
  border-radius: 14px;
  background: #FFF7CC;
  border: 1px solid var(--border);
}
.item-title {
  padding-right: 34px;
  font-size: 16px;
  font-weight: 780;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  min-height: 22px;
}
.item-title-row,
.item-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}
.item-title-row .item-title {
  flex: 1;
  min-width: 0;
  padding-right: 0;
  margin-bottom: 0;
}
.item-meta-row {
  justify-content: space-between;
  margin-top: 8px;
}
.item-meta-row .item-price,
.item-meta-row .item-counters {
  margin: 0;
  flex-shrink: 0;
}
.item-sub {
  margin: 5px 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.item-price {
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 850;
}
.item-counters {
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.item-status-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  vertical-align: 1px;
}
.badge-available { background: #E8F7EF; color: #039855; }
.badge-rented { background: #FFF7CC; color: #6A5200; }
.badge-completed { background: #F1F0EA; color: #6E716B; }
.item-info {
  padding-right: 32px;
}
.item-more-btn {
  top: 14px;
  right: -6px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

/* ── Upload page WIZ refresh ─────────────────────────── */
.upload-camera-trigger {
  border: 0;
  cursor: pointer;
  padding: 0;
  color: inherit;
  transition: transform .15s, box-shadow .15s;
}
.upload-camera-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(34,40,49,.16) !important;
}
.upload-camera-trigger:focus-visible {
  outline: 3px solid rgba(242,183,5,.42);
  outline-offset: 3px;
}
#photo-preview {
  justify-content: center;
}
.category-select-row {
  position: relative;
  display: block;
}
.category-select-row select {
  width: 100%;
  padding-right: 44px !important;
  background-image: none !important;
}
.category-select-btn {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: color .15s, transform .15s;
}
.category-select-btn:hover,
.category-select-btn:active,
.category-select-btn:focus,
.category-select-btn:focus-visible {
  background: transparent;
  border-color: transparent;
  color: var(--primary);
  transform: translateY(-50%) translateX(1px);
  outline: none;
  box-shadow: none;
}

[data-theme="dark"] .item-card { background: var(--card); }
