/* ============================================================
   MU ONLINE MARKETPLACE — WHITE THEME
   Design System & Global Styles
   ============================================================ */

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --gold: #C8A44A;
  --gold-light: #E4C16F;
  --gold-dark: #9B7A2E;
  --gold-bg: #FBF5E6;

  /* White Theme Backgrounds */
  --bg-page: #F4F6FA;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFBFF;
  --bg-sidebar: #FFFFFF;
  --bg-header: #FFFFFF;
  --bg-footer: #1A1A2E;
  --bg-hero: #EEF1F8;
  --bg-input: #F8F9FC;
  --bg-tag: #F0F2F8;

  /* Text Colors */
  --text-primary: #1A1A2E;
  --text-secondary: #5A6070;
  --text-muted: #9AA0B0;
  --text-white: #FFFFFF;
  --text-gold: #C8A44A;
  --text-link: #4A6CF7;

  /* Item Rarity Colors */
  --rarity-epic: #8B5CF6;
  --rarity-rare: #F59E0B;
  --rarity-common: #10B981;
  --rarity-unique: #EF4444;

  /* Stat Colors */
  --stat-str: #EF4444;
  --stat-agi: #10B981;
  --stat-vit: #3B82F6;
  --stat-ene: #8B5CF6;
  --stat-cmd: #F59E0B;

  /* Tag Colors */
  --tag-exc: #C8A44A;
  --tag-anc: #10B981;
  --tag-skill: #8B5CF6;
  --tag-luck: #3B82F6;
  --tag-sock: #F59E0B;

  /* Borders */
  --border: #E2E8F0;
  --border-focus: #C8A44A;
  --border-card: #EDF0F7;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.06), 0 1px 2px rgba(26, 26, 46, 0.04);
  --shadow-md: 0 4px 16px rgba(26, 26, 46, 0.08), 0 2px 6px rgba(26, 26, 46, 0.04);
  --shadow-lg: 0 10px 40px rgba(26, 26, 46, 0.12), 0 4px 12px rgba(26, 26, 46, 0.06);
  --shadow-gold: 0 0 0 3px rgba(200, 164, 74, 0.2);
  --shadow-hover: 0 8px 32px rgba(26, 26, 46, 0.14);

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Transitions */
  --transition: all 0.2s ease;
  --transition-lg: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --container: 1280px;
  --header-h: 64px;
}

/* ── RESET & BASE ───────────────────────────────────────────── */
.market-body-wrapper {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.market-body-wrapper a {
  text-decoration: none;
  color: inherit;
}

.market-body-wrapper img {
  display: block;
  max-width: 100%;
}

.market-body-wrapper ul {
  list-style: none;
}

.market-body-wrapper button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

.market-body-wrapper input,
.market-body-wrapper select {
  font-family: inherit;
  outline: none;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
.font-cinzel {
  font-family: 'Cinzel', serif;
}

.market-body-wrapper h1,
.market-body-wrapper h2,
.market-body-wrapper h3,
.market-body-wrapper h4,
.market-body-wrapper h5 {
  line-height: 1.2;
  font-weight: 700;
}

.market-page-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.market-section-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

/* ── LAYOUT ─────────────────────────────────────────────────── */
.market-container-box {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.market-page-wrapper {
  min-height: calc(100vh - var(--header-h));
  padding: var(--space-2xl) 0;
}

/* ── HEADER ─────────────────────────────────────────────────── */
.market-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}

.market-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 950px;
}

.market-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.market-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(200, 164, 74, 0.35);
}

.market-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.market-logo-text strong {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.06em;
}

.market-logo-text span {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.market-header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.market-header-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.market-header-user-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  flex-shrink: 0;
}

.market-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.market-site-footer {
  background: var(--bg-footer);
  padding: var(--space-xl) 0;
  margin-top: auto;
}

.market-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.market-footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-white);
}

.market-footer-logo .market-logo-icon {
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
}

.market-footer-logo span {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-white);
}

.market-footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  letter-spacing: 0.02em;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--text-white);
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(200, 164, 74, 0.3);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  box-shadow: 0 4px 20px rgba(200, 164, 74, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-bg);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  padding: 8px 14px;
}

.btn-ghost:hover {
  background: var(--bg-tag);
  color: var(--text-primary);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--text-white);
  border-color: transparent;
}

.btn-primary:hover {
  background: #2D2D4E;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-full {
  width: auto;
}

.btn-icon {
  padding: 9px;
  border-radius: var(--radius-sm);
}

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-lg);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border);
  transform: translateY(-2px);
}

/* ── BADGES / TAGS ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-exc {
  background: rgba(200, 164, 74, 0.12);
  color: var(--gold);
  border: 1px solid rgba(200, 164, 74, 0.3);
}

.badge-anc {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-skill {
  background: rgba(139, 92, 246, 0.1);
  color: #7C3AED;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-luck {
  background: rgba(59, 130, 246, 0.1);
  color: #2563EB;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-sock {
  background: rgba(245, 158, 11, 0.1);
  color: #D97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-epic {
  background: rgba(139, 92, 246, 0.12);
  color: #7C3AED;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-featured {
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid rgba(200, 164, 74, 0.4);
}

.tag-class {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-tag);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ── FORMS ───────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: var(--transition);
  width: 100%;
}

.form-input:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: var(--shadow-gold);
}

.form-select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235A6070' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-select:focus {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.search-input {
  padding-left: 42px;
  height: 48px;
  font-size: 0.95rem;
  border-radius: var(--radius-lg);
}

/* ── RANGE SLIDER ────────────────────────────────────────────── */
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold) var(--progress, 50%), var(--border) var(--progress, 50%));
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 164, 74, 0.2);
  cursor: pointer;
}

/* ── CHECKBOXES ──────────────────────────────────────────────── */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 0;
  transition: var(--transition);
}

.checkbox-label:hover {
  color: var(--text-primary);
}

.checkbox-input {
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--gold);
}

/* ── PAGINATION ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-2xl);
}

.page-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(200, 164, 74, 0.3);
}

/* ── BREADCRUMB ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.breadcrumb a {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb-sep {
  color: var(--border);
}

/* ── STAT BAR ────────────────────────────────────────────────── */
.stat-bar-wrapper {
  margin-bottom: var(--space-md);
}

.stat-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.stat-bar-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-bar-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-bar-track {
  height: 8px;
  background: var(--bg-tag);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s ease;
}

/* ── ITEM IMAGE PLACEHOLDER ──────────────────────────────────── */
.item-img-box {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #F0F4FF 0%, #E8EDF8 100%);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #B8C0D4;
}

.item-img-box .icon-large {
  font-size: 3rem;
  opacity: 0.4;
}

/* ── CHARACTER AVATAR ────────────────────────────────────────── */
.char-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EEF1F8, #E2E8F0);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--border);
  color: var(--text-muted);
  font-size: 2rem;
  margin: 0 auto;
}

.char-avatar-lg {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EEF1F8, #E2E8F0);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--border);
  color: var(--text-muted);
  font-size: 3rem;
  margin: 0 auto;
}

/* ── STAR RATING ─────────────────────────────────────────────── */
.stars {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.85rem;
}

.star-fill {
  color: var(--gold);
}

.star-empty {
  color: var(--border);
}

/* ── GRID UTILITIES ──────────────────────────────────────────── */
.grid {
  display: grid;
}

.grid-1 {
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.grid-4 {
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-lg);
}

.grid-5 {
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-lg);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-center {
  align-items: center;
}

.flex-between {
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-xs {
  gap: var(--space-xs);
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

/* ── MISC ────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-md) 0;
}

.text-gold {
  color: var(--gold);
}

.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-sm {
  font-size: 0.8rem;
}

.text-xs {
  font-size: 0.72rem;
}

.text-center {
  text-align: center;
}

.fw-700 {
  font-weight: 700;
}

.fw-600 {
  font-weight: 600;
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.price-tag {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
}

.price-unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

.badge-featured-card {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid rgba(200, 164, 74, 0.3);
}

.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.favorite-btn:hover {
  color: #EF4444;
  border-color: #FCA5A5;
  background: #FEF2F2;
}

.favorite-btn.active {
  color: #EF4444;
  border-color: #FCA5A5;
  background: #FEF2F2;
}

/* ── ITEMS PAGE LAYOUT (sidebar + grid) ─────────────────────── */
.items-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-xl);
  align-items: start;
  margin-bottom: var(--space-2xl);
}

.items-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.items-controls {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

.search-input {
  padding-left: 36px !important;
}

.sort-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: nowrap;
}

.sort-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.items-header {
  margin-bottom: var(--space-xl);
}

.market-page-title {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

/* checkbox filter */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 0;
}

.checkbox-input {
  width: 15px;
  height: 15px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* ── ITEM CARD ───────────────────────────────────────────────── */
.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
  border-color: rgba(200, 164, 74, 0.3);
}

.item-card-img {
  background: linear-gradient(135deg, #EEF1F8 0%, #E8EBF5 100%);
  position: relative;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-card-img img {
  max-height: 90px;
  max-width: 80%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
}

.item-card-body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.item-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-meta,
.item-meta-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.item-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.item-bottom,
.item-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
}

.item-price-block,
.item-price {}

.item-price {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
}

.item-currency {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.item-seller-col .name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
}

.item-seller {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
}

/* ── CHAR CARD ───────────────────────────────────────────────── */
.char-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  box-shadow: var(--shadow-sm);
}

.char-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
  border-color: rgba(200, 164, 74, 0.25);
}

.char-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EEF1F8, #E2E8F0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--text-muted);
  margin: 0 auto;
  border: 2px solid var(--border);
}

.char-class-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid rgba(200, 164, 74, 0.3);
}

.char-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'Cinzel', serif;
}

.char-stats-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.char-stat-mini {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 4px;
}

.char-stat-mini .val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.char-stat-mini .lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.char-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

/* ── CHARACTER DETAILS VIEW STYLES ────────────────────────── */
.char-avatar-lg {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EEF1F8, #E2E8F0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: var(--text-muted);
  margin: 0 auto;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.char-class-label {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid rgba(200, 164, 74, 0.35);
}

.char-guild-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  background: var(--bg-tag);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}

.detail-block {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.detail-block-title {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1.5px solid var(--border);
}

/* Stat progress bars */
.stat-bar-wrapper {
  margin-bottom: 14px;
}

.stat-bar-wrapper:last-child {
  margin-bottom: 0;
}

.stat-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 5px;
}

.stat-bar-label {
  font-weight: 700;
}

.stat-bar-value {
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
}

.stat-bar-track {
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border);
}

.stat-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Play statistics */
.play-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.play-stat-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.play-stat-icon {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.play-stat-val {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.play-stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* ── SELL PAGE LAYOUT ────────────────────────────────────────── */

.sell-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-xl);
  align-items: start;
  margin-bottom: var(--space-2xl);
}

.sell-preview-panel {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.sell-form-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.price-preview {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-with-icon {
  position: relative;
}

/* ── PAGE HEADER / BREADCRUMB ────────────────────────────────── */
.page-header {
  margin-bottom: var(--space-xl);
}

.page-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 6px 0;
}

.page-subtitle {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.breadcrumb a {
  color: var(--gold);
  text-decoration: none;
}

.breadcrumb span::before {
  content: '›';
  margin-right: 6px;
}



/* ── SIDEBAR FILTER ──────────────────────────────────────────── */
.sidebar-filter {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.filter-section {
  margin-bottom: var(--space-lg);
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border);
}

/* ── VIEW TOGGLE ─────────────────────────────────────────────── */
.view-toggle {
  display: flex;
  background: var(--bg-tag);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.view-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  border: none;
  transition: var(--transition);
}

.view-toggle-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ── FILTER CHIPS (CHARACTERS) ───────────────────────────────── */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.filter-chip {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--gold-bg);
  border-color: var(--gold);
  color: var(--gold);
}

.filter-chip.all-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

/* ── STAT GRID (DETAIL CARDS) ────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.stat-cell {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
}

.stat-cell-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-cell-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── INFO CARD (DETAIL PAGE) ─────────────────────────────────── */
.info-table {
  width: 100%;
}

.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md) var(--space-xl);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-key {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.info-val {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 600;
}

.info-val.gold {
  color: var(--gold);
  font-family: 'Cinzel', serif;
}

.info-val.active {
  color: #10B981;
}

/* ── EQUIPMENT GRID ──────────────────────────────────────────── */
.equip-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-sm);
}

.equip-slot {
  aspect-ratio: 1;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
  min-height: 80px;
}

.equip-slot:hover {
  border-color: var(--gold);
  background: var(--gold-bg);
}

.equip-slot .icon {
  font-size: 1.4rem;
  color: var(--text-muted);
}

.equip-slot .slot-name {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── SECTION HEADER ──────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.section-header a {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.section-header a:hover {
  color: var(--gold-dark);
}

/* ── SELLER CARD ─────────────────────────────────────────────── */
.seller-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.seller-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.seller-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EEF1F8, #E2E8F0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.seller-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.seller-rating {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.seller-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 3px 0;
}

.seller-stat-key {
  color: var(--text-muted);
}

.seller-stat-val {
  font-weight: 600;
  color: var(--text-primary);
}

/* ── NOTICE BAR ──────────────────────────────────────────────── */
.notice-bar {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notice-bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  from {
    background-position: -200% center;
  }

  to {
    background-position: 200% center;
  }
}

.animate-in {
  animation: fadeIn 0.4s ease forwards;
}

.stagger-1 {
  animation-delay: 0.05s;
}

.stagger-2 {
  animation-delay: 0.1s;
}

.stagger-3 {
  animation-delay: 0.15s;
}

.stagger-4 {
  animation-delay: 0.2s;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .market-container-box {
    padding: 0 var(--space-lg);
  }

  .items-layout {
    grid-template-columns: 200px 1fr;
  }

  .sell-layout {
    grid-template-columns: 240px 1fr;
  }

  .stats-row .grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

}

@media (max-width: 768px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .equip-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .market-container-box {
    padding: 0 var(--space-md);
  }

  .market-footer-inner {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .market-footer-copy {
    text-align: center;
  }

  .items-layout {
    grid-template-columns: 1fr;
  }

  .sell-layout {
    grid-template-columns: 1fr;
  }

  .sell-preview-panel {
    position: static;
  }

  .sidebar-filter {
    position: static;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .char-stats-mini {
    grid-template-columns: repeat(3, 1fr);
  }
}