/* Final visual cohesion and product-image layer for Big Dealz. */

:root {
  --bd-electric: #1677ff;
  --bd-gold: #f5c451;
  --bd-ink: #050914;
  --bd-panel: rgba(7, 18, 40, 0.92);
}

html {
  background: #02050d;
}

body {
  min-width: 0;
  overflow-x: hidden;
  color-scheme: dark;
  background:
    radial-gradient(circle at 8% 0%, rgba(0, 82, 190, 0.22), transparent 34rem),
    radial-gradient(circle at 92% 18%, rgba(237, 51, 79, 0.12), transparent 30rem),
    linear-gradient(180deg, #02050d 0%, #050b1b 48%, #020409 100%);
}

main.wrap,
.page {
  min-width: 0;
}

.page {
  overflow-x: hidden;
}

.hero-panel,
.swipe-hero,
.arena-command-bar,
.marketplace-command-bar,
.music-command-bar {
  max-width: 100%;
  min-width: 0;
}

.hero-panel {
  overflow: hidden;
  background-color: #061126;
  background-position: center;
  background-size: cover;
}

.hero-panel h2,
.section-header h2,
.swipe-hero h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.section-header h2 {
  font-size: clamp(2rem, 7vw, 4.8rem);
  line-height: 0.98;
}

#page-marketplace .hero-panel h2,
#page-auctions .hero-panel h2,
#page-tournaments .hero-panel h2 {
  font-size: clamp(2.35rem, 8vw, 5rem) !important;
  line-height: 0.96 !important;
}

#marketItemsGrid,
#auctionItemsGrid {
  display: grid !important;
  align-items: stretch;
  gap: 20px !important;
  width: 100%;
  min-width: 0;
}

#marketItemsGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

#auctionItemsGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#marketItemsGrid > .col-4,
#auctionItemsGrid > .col-4 {
  display: flex;
  grid-column: auto !important;
  width: auto !important;
  min-width: 0;
  padding: 0 !important;
}

#marketItemsGrid .product-card,
#auctionItemsGrid > .col-4 > .card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

#marketItemsGrid .product-img-box {
  position: relative;
  display: grid;
  min-height: 260px;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(22, 119, 255, 0.16), transparent 58%), #f7f8fa;
}

#marketItemsGrid .product-img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 14px;
  object-fit: contain;
  object-position: center;
  background: #f7f8fa;
}

#marketItemsGrid .product-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: 18px;
  background: linear-gradient(180deg, rgba(10, 22, 48, 0.94), rgba(2, 7, 17, 0.98));
}

#marketItemsGrid .product-title,
#marketItemsGrid .product-category {
  min-width: 0;
  overflow-wrap: anywhere;
}

#marketItemsGrid .product-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-height: 1.2;
}

#marketItemsGrid .product-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

#marketItemsGrid .stock-badge {
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 0;
}

#marketItemsGrid .featured-product-art {
  min-height: 260px;
}

#auctionItemsGrid > .col-4 > .card {
  border-color: rgba(22, 119, 255, 0.34);
  background: linear-gradient(180deg, rgba(10, 22, 48, 0.95), rgba(2, 7, 17, 0.99));
}

.auction-image-wrap,
.auction-swipe-image {
  position: relative;
  display: grid;
  min-height: 280px;
  aspect-ratio: 1 / 1;
  place-items: center;
  overflow: hidden;
  background: #02050d;
}

.auction-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.auction-swipe-image {
  min-height: 400px;
}

.music-command-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin: 0 0 34px;
  padding: 22px 24px;
  border: 1px solid rgba(22, 119, 255, 0.35);
  border-radius: 18px;
  background:
    linear-gradient(110deg, rgba(22, 119, 255, 0.16), transparent 55%),
    rgba(4, 11, 28, 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
}

.music-kicker {
  color: var(--bd-gold);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.music-command-bar h3 {
  margin: 6px 0;
  color: #fff;
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  line-height: 1.1;
}

.music-command-bar p {
  max-width: 58ch;
  margin: 0;
  color: #9bb0ca;
  font-size: 0.76rem;
  line-height: 1.5;
}

.music-command-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 8px;
}

.music-command-stats div {
  display: grid;
  min-width: 72px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 196, 81, 0.34);
  border-radius: 12px;
  background: rgba(245, 196, 81, 0.07);
  text-align: center;
}

.music-command-stats b {
  color: #fff;
  font-size: 1rem;
}

.music-command-stats span {
  color: #8fa5c2;
  font-size: 0.5rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

#page-music #music-player,
#page-music #playlist {
  min-width: 0;
}

#page-music #playlist {
  scrollbar-color: var(--bd-gold) rgba(255, 255, 255, 0.05);
}

@media (max-width: 1100px) {
  #marketItemsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #auctionItemsGrid {
    grid-template-columns: 1fr !important;
  }

  .music-command-bar {
    grid-template-columns: 1fr;
  }

  .music-command-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .section-header h2,
  #page-marketplace .hero-panel h2,
  #page-auctions .hero-panel h2,
  #page-tournaments .hero-panel h2 {
    font-size: clamp(2.05rem, 12vw, 3.5rem) !important;
    letter-spacing: -1px !important;
  }

  #marketItemsGrid,
  #auctionItemsGrid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  #marketItemsGrid .product-img-box {
    min-height: 250px;
  }

  #marketItemsGrid .product-info {
    padding: 16px;
  }

  .music-command-bar {
    padding: 18px 16px;
  }

  .music-command-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .music-command-stats div {
    min-width: 0;
    padding: 9px 5px;
  }

  .music-command-stats b {
    font-size: 0.88rem;
  }

  .music-command-stats span {
    font-size: 0.43rem;
  }

  .auction-image-wrap {
    min-height: 300px;
  }
}
