/* =============================================================================
   KURRENT.MARKET — Premium Layer  v2
   This file is additive only. It does not modify any existing file.
   Version 2 goes significantly further: editorial scale, physical card feel,
   metallic gold system, re-enabled glass, deeper atmosphere.
   ============================================================================= */

/* ---------------------------------------------------------------------------
   FONTS
   --------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');


/* ---------------------------------------------------------------------------
   DESIGN TOKENS
   --------------------------------------------------------------------------- */
:root {
  /* Animated metallic gold — sweeps on hover via background-position */
  --gold-metal: linear-gradient(
    112deg,
    #faeabb  0%,
    #c8923a 16%,
    #edcf84 34%,
    #f8e9b6 50%,
    #b5802e 66%,
    #e8ca82 82%,
    #faeabb 100%
  );
  --gold-glow:   0 0 20px rgba(228,201,143,0.32);
  --gold-glow-lg: 0 0 40px rgba(228,201,143,0.4), 0 12px 32px rgba(0,0,0,0.6);

  /* Atmosphere tokens */
  --bg-base:    #0d0b08;
  --bg-surface: #111009;
  --border-gold: rgba(228,201,143,0.1);
}


/* ---------------------------------------------------------------------------
   1. ATMOSPHERE — the page has to feel like a gallery, not a void
   --------------------------------------------------------------------------- */
html {
  background-color: var(--bg-base) !important;
}

/* Warm lamp from above — gallery lighting */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 55% at 50% -8%,
      rgba(228, 201, 143, 0.065) 0%,
      transparent 65%),
    radial-gradient(ellipse 50% 35% at 50% 105%,
      rgba(70, 50, 15, 0.08) 0%,
      transparent 70%);
}

/* Film grain — 2.4 % opacity. Remove it and the UI feels cheaper instantly. */
html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.024;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 220px 220px;
}


/* ---------------------------------------------------------------------------
   2. MARKET BAR — sticky header
   --------------------------------------------------------------------------- */
.market-bar {
  background: rgba(10, 9, 6, 0.98) !important;
  /* Gold hairline at the bottom of the header */
  box-shadow: inset 0 -1px 0 rgba(228, 201, 143, 0.1) !important;
}

body.ux-scrolled .market-bar {
  background: rgba(8, 7, 5, 0.99) !important;
  box-shadow:
    inset 0 -1px 0 rgba(228, 201, 143, 0.12),
    0 20px 48px rgba(0, 0, 0, 0.7) !important;
}

/* Category nav separator — gold tint */
.market-nav {
  border-top: 1px solid rgba(228, 201, 143, 0.08) !important;
}

/* Category link baseline — pill-shaped */
.cat-link {
  border-radius: 999px !important;
  padding-inline: 0.8rem !important;
  transition: background-color 150ms ease, color 160ms ease !important;
}
.market-bar .cat-link:hover,
header.market-bar .cat-link:hover {
  background: rgba(228, 201, 143, 0.07) !important;
  color: rgba(246, 241, 234, 0.9) !important;
}

/* Active category — gold pill */
.market-bar .cat-link[aria-current="true"],
.market-bar .cat-link[aria-current="true"]:hover,
header.market-bar .cat-link[aria-current="true"],
header.market-bar .cat-link[aria-current="true"]:hover {
  background: rgba(228, 201, 143, 0.12) !important;
  color: #e4c98f !important;
  font-weight: 600 !important;
}


/* ---------------------------------------------------------------------------
   3. SEARCH BAR — gold-tinted dark fill
   --------------------------------------------------------------------------- */
.market-bar .glass-chip {
  background: rgba(20, 18, 12, 0.92) !important;
  border-color: rgba(228, 201, 143, 0.12) !important;
  transition: border-color 180ms ease, box-shadow 200ms ease !important;
}
.market-bar .glass-chip:focus,
.market-bar .glass-chip:focus-within {
  border-color: rgba(228, 201, 143, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(228, 201, 143, 0.09) !important;
  outline: none !important;
}
.market-bar .glass-chip:hover {
  border-color: rgba(228, 201, 143, 0.2) !important;
}


/* ---------------------------------------------------------------------------
   4. HEADER PILL BUTTONS (Alerts, Cart, Account)
   --------------------------------------------------------------------------- */
.market-bar .head-pill,
.market-bar .profile-trigger {
  background: rgba(228, 201, 143, 0.04) !important;
  border-color: rgba(228, 201, 143, 0.14) !important;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 180ms ease !important;
}
.market-bar .head-pill:hover,
.market-bar .profile-trigger:hover {
  background: rgba(228, 201, 143, 0.09) !important;
  border-color: rgba(228, 201, 143, 0.26) !important;
}


/* ---------------------------------------------------------------------------
   5. SELL BUTTON — the most important CTA. Has to feel worth tapping.
   --------------------------------------------------------------------------- */
.sell-mark {
  background: var(--gold-metal) !important;
  background-size: 220% 100% !important;
  background-position: 55% 0 !important;
  color: #0e0b06 !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  border: none !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 2px 12px rgba(228, 201, 143, 0.22) !important;
  transition:
    background-position 600ms ease,
    box-shadow 220ms ease,
    transform 150ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.sell-mark:hover {
  background-position: 0% 0 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    var(--gold-glow) !important;
}
.sell-mark:active {
  background-position: 100% 0 !important;
  transform: scale(0.95) !important;
}

/* Floor "Browse all" / "Show more" button — same metallic treatment */
.floor-more {
  background: var(--gold-metal) !important;
  background-size: 220% 100% !important;
  background-position: 55% 0 !important;
  color: #0e0b06 !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 2px 10px rgba(228, 201, 143, 0.18) !important;
  transition: background-position 600ms ease, box-shadow 220ms ease !important;
}
.floor-more:hover {
  background-position: 0% 0 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    var(--gold-glow) !important;
}

/* Mobile bottom sell tab */
.app-tab-sell i {
  background: var(--gold-metal) !important;
  background-size: 220% 100% !important;
  background-position: 50% 0 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 4px 20px rgba(228, 201, 143, 0.35) !important;
  transition: background-position 500ms ease, box-shadow 220ms ease !important;
}
.app-tab-sell:active i {
  background-position: 0% 0 !important;
}


/* ---------------------------------------------------------------------------
   6. SECTION HEADINGS — editorial scale. These need to feel massive.
   The existing sizes (1.7rem for floor-head h2) are timid.
   --------------------------------------------------------------------------- */
.floor-head h1,
.floor-head h2 {
  font-family: 'Instrument Serif', 'Georgia', serif !important;
  font-weight: 400 !important;
  font-size: clamp(2rem, 4vw, 3.2rem) !important;
  line-height: 1.0 !important;
  letter-spacing: -0.03em !important;
  color: #f0ece3 !important;
}

/* Sub-rails ("Trending now", "Just listed") — slightly smaller but same weight */
.rail-head h2 {
  font-family: 'Instrument Serif', 'Georgia', serif !important;
  font-weight: 400 !important;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem) !important;
  letter-spacing: -0.025em !important;
  line-height: 1.1 !important;
  color: #f0ece3 !important;
}

/* Floor kicker — italic serif, gold */
.floor-kicker {
  font-family: 'Instrument Serif', 'Georgia', serif !important;
  font-style: italic !important;
  font-size: 0.875rem !important;
  letter-spacing: 0.01em !important;
  color: rgba(228, 201, 143, 0.75) !important;
  font-weight: 400 !important;
}

/* "See all →" link */
.rail-all {
  font-family: 'Instrument Serif', 'Georgia', serif !important;
  font-style: italic !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em !important;
  color: rgba(228, 201, 143, 0.8) !important;
}
.rail-all:hover { color: #e4c98f !important; }
.rail-all:hover i { transform: translateX(5px) !important; }

/* Floor rail kicker sub-heading */
.rail-sub {
  font-size: 0.75rem !important;
  color: rgba(246, 241, 234, 0.4) !important;
  letter-spacing: 0.01em;
}


/* ---------------------------------------------------------------------------
   7. MARKET TILES — the product is the hero. Make it feel physical.
   --------------------------------------------------------------------------- */
.market-tile {
  overflow: hidden !important;
  background: var(--bg-surface) !important;
  border-color: rgba(228, 201, 143, 0.08) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.03) inset,
    0 1px 0 rgba(20,16,10,0.6),
    0 8px 24px rgba(0,0,0,0.3) !important;
  /* JS card-tilt will override transform — don't set transition here */
}

@media (hover: hover) and (min-width: 768px) {
  .market-tile:hover {
    border-color: rgba(228, 201, 143, 0.22) !important;
    box-shadow:
      0 1px 0 rgba(255,255,255,0.04) inset,
      0 0 0 1px rgba(228,201,143,0.08),
      0 28px 56px rgba(0,0,0,0.6) !important;
  }
}

/* Stage: subtle spotlight beneath the product */
.tile-stage {
  background: radial-gradient(ellipse 70% 60% at 50% 115%,
    rgba(228,201,143,0.06) 0%,
    transparent 65%),
  radial-gradient(ellipse 80% 50% at 50% -20%,
    rgba(255,255,255,0.03) 0%,
    transparent 60%) !important;
}

/* The product image FLOATS above the tile surface */
.tile-photo {
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.5))
          drop-shadow(0 2px 4px rgba(0,0,0,0.3)) !important;
  transform: translateY(-3px) scale(1.005) !important;
  transition:
    transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 300ms ease !important;
}

@media (hover: hover) and (min-width: 768px) {
  .market-tile:hover .tile-photo {
    filter: drop-shadow(0 20px 28px rgba(0,0,0,0.65))
            drop-shadow(0 4px 6px rgba(0,0,0,0.3)) !important;
    transform: translateY(-10px) scale(1.04) !important;
  }
}

/* Holographic shimmer sweep across the tile on hover */
@media (hover: hover) and (min-width: 1024px) {
  .market-tile {
    position: relative;
  }
  .market-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(
      108deg,
      transparent       12%,
      rgba(255,255,255, 0.025) 32%,
      rgba(228,201,143, 0.065) 44%,
      rgba(190,235,255, 0.03)  50%,
      rgba(228,201,143, 0.055) 56%,
      rgba(255,255,255, 0.025) 68%,
      transparent       88%
    );
    background-size: 300% 100%;
    background-position: -100% 0;
    opacity: 0;
    transition: opacity 200ms ease, background-position 700ms ease;
  }
  .market-tile:hover::before {
    opacity: 1;
    background-position: 220% 0;
  }
}


/* ---------------------------------------------------------------------------
   8. TILE TYPOGRAPHY — precision information hierarchy
   --------------------------------------------------------------------------- */

/* Category kicker — gold-tinted, uppercase, spaced */
.tile-kicker {
  color: rgba(228, 201, 143, 0.55) !important;
  font-size: 0.625rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  min-height: 0 !important;
}

/* Title — a touch more weight, tighter tracking */
.tile-title {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.3 !important;
  color: #f0ece3 !important;
}

/* Condition — tiny spaced label */
.tile-condition {
  font-size: 0.6rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
  color: rgba(228, 201, 143, 0.4) !important;
}

/* Ask price — the most important number. Make it commanding. */
.tile-ask:not(.text-zinc-500) {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
  color: #f4ede0 !important;
  text-shadow: 0 0 28px rgba(228, 201, 143, 0.18) !important;
}

/* Quote section — trading terminal feel */
.tile-quote {
  border-top: 1px solid rgba(228, 201, 143, 0.06) !important;
  padding-top: 0.5rem !important;
  margin-top: 0.25rem;
}

/* Bid/Ask label caps */
.quote-k {
  text-transform: uppercase !important;
  letter-spacing: 0.09em !important;
  font-weight: 800 !important;
  font-size: 0.5rem !important;
  opacity: 0.5 !important;
  line-height: 1.4 !important;
}

/* Quote values */
.quote-n {
  font-feature-settings: "tnum" !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: -0.01em !important;
  font-weight: 600 !important;
}


/* ---------------------------------------------------------------------------
   9. TRUST STRIP — redesign from generic dark boxes to an elegant strip
   --------------------------------------------------------------------------- */
.trust-strip {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0 !important;
  grid-template-columns: unset !important;
  border: 1px solid rgba(228, 201, 143, 0.1) !important;
  border-radius: 1rem !important;
  overflow: hidden !important;
  background: rgba(10, 8, 4, 0.5) !important;
}

.trust-item {
  flex: 1 1 220px !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  position: relative;
  padding: 0.9rem 1.1rem !important;
  transition: background-color 180ms ease;
}
.trust-item:hover {
  background: rgba(228, 201, 143, 0.04) !important;
}

/* Vertical dividers between items */
.trust-item + .trust-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: rgba(228, 201, 143, 0.1);
}

.trust-item i {
  background: rgba(228, 201, 143, 0.1) !important;
  color: #e4c98f !important;
  transition: background-color 180ms ease !important;
}
.trust-item:hover i {
  background: rgba(228, 201, 143, 0.16) !important;
}

.trust-item strong {
  color: #f0ece3 !important;
  font-size: 0.8125rem !important;
}

.trust-sub {
  font-size: 0.6875rem !important;
  color: rgba(246, 241, 234, 0.45) !important;
}


/* ---------------------------------------------------------------------------
   10. GLASS PANELS — restore selective blur for depth without perf cost
   --------------------------------------------------------------------------- */
.profile-panel,
.cat-drop,
.cat-shelf {
  -webkit-backdrop-filter: saturate(150%) blur(20px) !important;
  backdrop-filter: saturate(150%) blur(20px) !important;
  background: rgba(13, 11, 7, 0.90) !important;
  border-color: rgba(228, 201, 143, 0.1) !important;
}

#searchResults {
  -webkit-backdrop-filter: saturate(140%) blur(16px) !important;
  backdrop-filter: saturate(140%) blur(16px) !important;
  background: rgba(11, 9, 5, 0.95) !important;
  border-color: rgba(228, 201, 143, 0.1) !important;
}

.glass {
  background: rgba(16, 13, 9, 0.88) !important;
  border-color: rgba(228, 201, 143, 0.1) !important;
}

/* Checkout modal */
#checkoutModal > div {
  -webkit-backdrop-filter: saturate(150%) blur(24px) !important;
  backdrop-filter: saturate(150%) blur(24px) !important;
  background: rgba(14, 11, 7, 0.94) !important;
  border-color: rgba(228, 201, 143, 0.1) !important;
}


/* ---------------------------------------------------------------------------
   11. BOTTOM NAV — mobile dock
   --------------------------------------------------------------------------- */
@media (max-width: 767px), (hover: none) and (pointer: coarse) and (max-width: 1400px) {
  .app-tabs {
    background: rgba(7, 6, 4, 0.96) !important;
    -webkit-backdrop-filter: saturate(200%) blur(28px) !important;
    backdrop-filter: saturate(200%) blur(28px) !important;
    box-shadow:
      inset 0 1px 0 rgba(228, 201, 143, 0.08),
      0 -12px 32px rgba(0, 0, 0, 0.6) !important;
  }

  .app-tabs button[aria-current="page"]:not(.app-tab-sell) span::after {
    width: 0.3rem !important;
    height: 0.3rem !important;
    background: var(--gold-metal) !important;
    background-size: 220% 100% !important;
    background-position: 50% 0 !important;
    box-shadow: 0 0 8px rgba(228, 201, 143, 0.6) !important;
  }

  .app-tabs button[aria-current="page"] {
    color: #f0ece3 !important;
  }
}

/* Mobile PDP trade bar */
.market-dock {
  -webkit-backdrop-filter: saturate(180%) blur(24px) !important;
  backdrop-filter: saturate(180%) blur(24px) !important;
  background: rgba(9, 8, 5, 0.94) !important;
  border-top: 1px solid rgba(228, 201, 143, 0.1) !important;
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.55) !important;
}


/* ---------------------------------------------------------------------------
   12. LOT HERO TILES — featured large-format cards
   --------------------------------------------------------------------------- */
.lot-hero {
  background: var(--bg-surface) !important;
  border-color: rgba(228, 201, 143, 0.1) !important;
}
.lot-title {
  font-family: 'Instrument Serif', 'Georgia', serif !important;
  font-weight: 400 !important;
  letter-spacing: -0.02em !important;
}


/* ---------------------------------------------------------------------------
   13. HORIZONTAL RAIL SCROLL FADE
   --------------------------------------------------------------------------- */
.rail-wrap {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    black 1.5rem,
    black calc(100% - 1.5rem),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    black 1.5rem,
    black calc(100% - 1.5rem),
    transparent 100%
  );
}


/* ---------------------------------------------------------------------------
   14. PROFILE BADGE — gold ring
   --------------------------------------------------------------------------- */
.profile-badge {
  box-shadow: 0 0 0 1.5px rgba(228, 201, 143, 0.2) !important;
}
.profile-badge:not(.is-empty) {
  box-shadow: 0 0 0 2px rgba(228, 201, 143, 0.35) !important;
}


/* ---------------------------------------------------------------------------
   15. FOCUS RINGS — consistent, gold, accessible
   --------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid rgba(228, 201, 143, 0.65) !important;
  outline-offset: 2px !important;
  border-radius: 3px;
}


/* ---------------------------------------------------------------------------
   16. TEXT SELECTION
   --------------------------------------------------------------------------- */
::selection {
  background-color: rgba(228, 201, 143, 0.28) !important;
  color: #f8f4ec !important;
}


/* ---------------------------------------------------------------------------
   17. FOOTER
   --------------------------------------------------------------------------- */
.market-foot {
  background: #0a0806 !important;
  border-top-color: rgba(228, 201, 143, 0.08) !important;
}


/* ---------------------------------------------------------------------------
   18. TOAST / ALERTS
   --------------------------------------------------------------------------- */
.toast, [class*="toast"] {
  background: rgba(14, 11, 7, 0.97) !important;
  border: 1px solid rgba(228, 201, 143, 0.14) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  backdrop-filter: blur(20px) !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55) !important;
}


/* ---------------------------------------------------------------------------
   19. VERIFY BANNERS
   --------------------------------------------------------------------------- */
.verify-banner {
  background: rgba(16, 12, 7, 0.98) !important;
  border-bottom-color: rgba(228, 201, 143, 0.08) !important;
}


/* ---------------------------------------------------------------------------
   20. PRICE / MARKET DATA — green up, red down, with warmth
   --------------------------------------------------------------------------- */
.text-emerald-400, .text-emerald-300 {
  text-shadow: 0 0 18px rgba(52, 211, 153, 0.22) !important;
}
.text-danger, .text-red-400, .text-rose-400 {
  text-shadow: 0 0 18px rgba(240, 82, 82, 0.18) !important;
}


/* ---------------------------------------------------------------------------
   21. GLASS CHIPS (form inputs, search bar)
   --------------------------------------------------------------------------- */
.glass-chip {
  background: rgba(18, 15, 10, 0.88) !important;
  border-color: rgba(228, 201, 143, 0.1) !important;
}
.glass-chip:focus {
  border-color: rgba(228, 201, 143, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(228, 201, 143, 0.08) !important;
  outline: none !important;
}


/* ---------------------------------------------------------------------------
   REDUCED MOTION — always respect this
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .sell-mark,
  .floor-more,
  .app-tab-sell i,
  .market-tile,
  .market-tile::before,
  .tile-photo {
    transition: none !important;
    animation: none !important;
  }
}
