.item-detail-page {
  padding: var(--spacing-8) 0;
}

/* ── BREADCRUMBS ────────────────────────────── */
.item-breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-4) 0;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.item-breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.item-breadcrumbs a:hover {
  color: var(--color-text-secondary);
}

.item-breadcrumbs__sep {
  color: var(--color-text-muted);
  opacity: 0.5;
}

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

/* ── WEAR RANGE BAR ─────────────────────────── */
.wear-bar {
  margin-top: var(--spacing-4);
}

.wear-bar__label {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-2);
}

.wear-bar__track {
  position: relative;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-bg-tertiary);
  overflow: visible;
  display: flex;
}

.wear-bar__segment {
  height: 100%;
  position: relative;
}

.wear-bar__segment--fn { background: var(--color-success); width: 7%; }
.wear-bar__segment--mw { background: #4ade80; width: 8%; }
.wear-bar__segment--ft { background: #facc15; width: 23%; }
.wear-bar__segment--ww { background: #fb923c; width: 7%; }
.wear-bar__segment--bs { background: var(--color-error); width: 55%; }

.wear-bar__segment:first-child { border-radius: var(--radius-full) 0 0 var(--radius-full); }
.wear-bar__segment:last-child { border-radius: 0 var(--radius-full) var(--radius-full) 0; }

.wear-bar__range {
  position: absolute;
  top: -4px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.wear-bar__marker {
  position: absolute;
  top: 12px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 5px solid var(--color-text-muted);
  transform: translateX(-50%);
}

.wear-bar__values {
  display: flex;
  justify-content: space-between;
  margin-top: var(--spacing-2);
  font-size: 11px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

/* ── PROPERTIES GRID ────────────────────────── */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-3);
}

.property-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.property-item__label {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: capitalize;
}

.property-item__value {
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  font-family: var(--font-mono);
}

.property-item__value a {
  color: var(--color-primary);
  text-decoration: none;
}

.property-item__value a:hover {
  text-decoration: underline;
}

/* ── IMAGE LIGHTBOX TRIGGER ─────────────────── */
.item-detail-main-image {
  cursor: zoom-in;
}

/* ── PRICE TABLE BEST HIGHLIGHT ─────────────── */
.provider-row--best {
  background: rgba(0, 225, 133, 0.03);
  border-left: 3px solid var(--color-success);
}

.provider-row--best .provider-price .price-value {
  color: var(--color-success);
}

.provider-best-badge {
  display: inline-block;
  margin-left: var(--spacing-2);
  padding: 1px 6px;
  background: rgba(0, 225, 133, 0.1);
  color: var(--color-success);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

/* ── RARITY DISTRIBUTION BAR ────────────────── */
.rarity-bar {
  width: 100%;
  height: 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  background: var(--color-bg-tertiary);
}

.rarity-bar__segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  position: relative;
  transition: flex-grow 0.3s ease;
}

.rarity-bar__segment--consumer { background: var(--rarity-consumer); }
.rarity-bar__segment--industrial { background: var(--rarity-industrial); }
.rarity-bar__segment--milspec { background: var(--rarity-mil-spec); }
.rarity-bar__segment--restricted { background: var(--rarity-restricted); }
.rarity-bar__segment--classified { background: var(--rarity-classified); }
.rarity-bar__segment--covert { background: var(--rarity-covert); }
.rarity-bar__segment--gold { background: var(--rarity-gold); }

.rarity-bar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-3);
  margin-top: var(--spacing-3);
}

.rarity-bar__legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.rarity-bar__legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* ── RARITY FILTER TABS ─────────────────────── */
.rarity-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2);
  margin-bottom: var(--spacing-6);
  padding: 4px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  width: fit-content;
}

.rarity-tab {
  padding: var(--spacing-2) var(--spacing-3);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.rarity-tab.active {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

/* ── GOLD RARE SECTION ──────────────────────── */
.rare-section {
  background: rgba(255, 215, 0, 0.03);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: var(--radius-xl);
  padding: var(--spacing-6);
  margin-top: var(--spacing-8);
}

.rare-section__header {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  color: var(--rarity-gold);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-4);
}

/* ── DROP ODDS BADGE ────────────────────────── */
.drop-odds {
  position: absolute;
  top: var(--spacing-2);
  right: var(--spacing-2);
  padding: 2px 6px;
  background: rgba(10, 15, 23, 0.85);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  z-index: 2;
}

/* ── RELATED ITEMS TABS ─────────────────────── */
.related-tabs {
  display: flex;
  gap: var(--spacing-1);
  margin-bottom: var(--spacing-4);
  padding: 4px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  width: fit-content;
}

.related-tab {
  padding: var(--spacing-2) var(--spacing-3);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.related-tab.active {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.item-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-8);
}

@media (min-width: 1024px) {
  .item-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.item-detail-gallery {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.item-detail-gallery:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 30px var(--color-accent-glow);
}

.item-detail-main-image {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-8);
  background: var(--color-bg-tertiary);
}

.item-detail-main-image img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  transition: transform var(--transition-normal), filter var(--transition-normal);
}

.item-detail-gallery:hover .item-detail-main-image img {
  transform: scale(1.05);
  filter: drop-shadow(0 0 20px var(--color-accent-glow));
}

.item-detail-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-6);
}

.item-detail-header {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--spacing-6);
}

.item-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2);
  margin-bottom: var(--spacing-3);
}

.item-detail-name {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-2);
}

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

.item-detail-description {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

.item-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-4);
}

.item-stat {
  background: var(--color-bg-secondary);
  padding: var(--spacing-4);
  border-radius: var(--radius-md);
}

.item-stat-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: var(--spacing-1);
}

.item-stat-value {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-mono);
}

.item-detail-section {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-6);
}

.item-detail-section-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-4);
}

.wears-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2);
}

.wear-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-3);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
}

.wear-item-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.collections-list,
.crates-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

.collection-item,
.crate-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  padding: var(--spacing-3);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.collection-item:hover,
.crate-item:hover {
  background: var(--color-bg-card);
}

.collection-item-image,
.crate-item-image {
  width: 40px;
  height: 40px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.collection-item-image img,
.crate-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.collection-item-name,
.crate-item-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.item-detail-related {
  margin-top: var(--spacing-12);
  padding-top: var(--spacing-8);
  border-top: 1px solid var(--color-border);
}

.item-detail-related-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-6);
}

.providers-section {
  margin-top: var(--spacing-8);
}

.providers-list-header {
  display: flex;
  padding: var(--spacing-3) var(--spacing-4);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
}

.providers-list-header .provider-col-name {
  flex: 2;
}

.providers-list-header .provider-col-price {
  flex: 1;
  text-align: center;
}

.providers-list-header .provider-col-action {
  flex: 1;
  text-align: right;
}

.providers-list {
  background: var(--color-bg-secondary);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
}

.provider-row {
  display: flex;
  align-items: center;
  padding: var(--spacing-3) var(--spacing-4);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

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

.provider-row:hover {
  background: var(--color-bg-tertiary);
}

.provider-info {
  flex: 2;
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
}

.provider-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
}

.provider-logo.steam { background: #1b2838; }
.provider-logo.buff163 { background: #ff6b00; }
.provider-logo.youpin { background: #00b140; }
.provider-logo.csgoempire { background: #da2d43; }
.provider-logo.bitskins { background: #7b5b9e; }
.provider-logo.swapgg { background: #00d4aa; }
.provider-logo.cstrade { background: #f59e0b; }
.provider-logo.skinwallet { background: #ec4899; }
.provider-logo.lootfarm { background: #10b981; }
.provider-logo.csgotm { background: #3b82f6; }
.provider-logo.lisskins { background: #8b5cf6; }
.provider-logo.csfloat { background: #06b6d4; }

.provider-name {
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.provider-price {
  flex: 1;
  text-align: center;
}

.price-value {
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-mono);
  color: var(--color-text-primary);
}

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

.provider-action {
  flex: 1;
  text-align: right;
}

.btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2) var(--spacing-4);
  background: var(--color-accent);
  color: white;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-buy:hover:not(.disabled) {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.btn-buy.disabled {
  background: var(--color-bg-tertiary);
  color: var(--color-text-muted);
  cursor: not-allowed;
  pointer-events: none;
}

.no-price-data {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  text-align: center;
  padding: var(--spacing-6);
}

.chart-section {
  margin-top: var(--spacing-8);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-4);
}

.chart-controls {
  display: flex;
  gap: var(--spacing-2);
}

.chart-btn {
  padding: var(--spacing-1) var(--spacing-3);
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chart-btn:hover {
  background: var(--color-bg-card);
}

.chart-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.chart-container {
  height: 300px;
  position: relative;
}

/* ── ENHANCED PROVIDERS TABLE (Fee / Net / Updated columns) ─────────────────────────── */

.providers-subtitle {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-muted);
  margin-left: var(--spacing-2);
}

.providers-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.providers-list-header .provider-col-fee,
.providers-list-header .provider-col-net,
.providers-list-header .provider-col-updated {
  flex: 1;
  text-align: center;
}

.provider-fee,
.provider-net,
.provider-updated {
  flex: 1;
  text-align: center;
}

.fee-value {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.fee-value.fee-free {
  color: var(--color-profit);
}

.net-value {
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-mono);
  color: var(--color-text-primary);
}

.net-value.net-best {
  color: var(--color-profit);
}

.net-value.no-price {
  color: var(--color-text-muted);
}

.updated-value {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.provider-row--best .net-value.net-best {
  color: var(--color-profit);
}

.provider-row--best .provider-best-badge {
  display: inline-block;
  margin-left: var(--spacing-1);
  padding: 2px 6px;
  background: var(--color-profit-bg);
  color: var(--color-profit);
  font-size: 10px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Sticky header for scrolled table */
.providers-list-header {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Max height with scroll for many providers */
.providers-list {
  max-height: 520px;
  overflow-y: auto;
}

/* Scrollbar styling for providers list */
.providers-list::-webkit-scrollbar {
  width: 6px;
}

.providers-list::-webkit-scrollbar-track {
  background: var(--color-bg-secondary);
}

.providers-list::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 999px;
}

.providers-list::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* ── Detail page utility classes ─────────────────────────── */

.item-detail-section--spaced {
  margin-top: var(--spacing-8);
}

.section-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-4);
  margin-bottom: var(--spacing-6);
}

.section-title--no-margin {
  margin-bottom: 0;
}

.items-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.item-card--gold {
  border-color: rgba(255, 215, 0, 0.2);
}

.item-detail-description {
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-top: 8px;
}

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

.item-stat-value--small {
  font-size: 14px;
}

.case-type-badge {
  background: rgba(0, 212, 255, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.badge-stattrak {
  background: var(--color-accent);
  color: var(--color-bg-primary);
}

.badge-souvenir {
  background: var(--rarity-gold);
  color: var(--color-bg-primary);
}
