/* =========================================================================
   STATISOUNDS — dark Shopify-style clone of dopeboyzmuzic.com
   Near-black bg #0d0d0d, gold accent #fbb41f, blue secondary #334fb4,
   Inter/Sora headings, Satoshi body, product-grid beat cards.
   ========================================================================= */

:root {
  --bg: #0d0d0d;
  --bg-2: #141414;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --border: #262626;
  --text: #ffffff;
  --muted: #a0a0a8;
  --gold: #fbb41f;
  --gold-dark: #e0a014;
  --blue: #334fb4;
  --radius: 14px;
  --maxw: 1120px;
  --font-head: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Satoshi", "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: #fff;
  background-image: none;
  color: #111;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
  min-height: 100%;
}
a { color: inherit; text-decoration: none; }

/* ---- header -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13,13,13,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
}
.header-inner {
  max-width: 1480px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo-img {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; flex: 0 0 auto;
}
.brand-name {
  color: #fff; font-weight: 700; letter-spacing: .5px;
  font-family: var(--font-head); font-size: 24px;
}
.nav { display: flex; gap: 28px; }
.nav a {
  color: #fff; font-size: 17px; font-weight: 600; opacity: .82;
  transition: color .15s, opacity .15s;
}
.nav a:hover { opacity: 1; color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.play-beats {
  background: var(--gold); color: #0d0d0d; border: none; border-radius: 999px;
  padding: 10px 20px; font-weight: 700; font-size: 14px; cursor: pointer;
  font-family: var(--font-body); display: flex; align-items: center; gap: 8px;
  transition: background .15s;
}
.play-beats:hover { background: var(--gold-dark); }
.icon-btn {
  background: transparent; border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; opacity: .85;
  transition: color .15s, opacity .15s;
}
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.icon-btn:hover { opacity: 1; color: var(--gold); }

.brand-center {
  display: flex; align-items: center; justify-content: center;
  margin: 48px 0 24px;
}
.brand-center .brand-logo-img {
  width: 300px; height: 300px; border-radius: 50%;
  object-fit: cover; flex: 0 0 auto;
}
.logo-wrap { position: relative; display: inline-flex; }
.logo-wrap .embers {
  position: absolute; pointer-events: none; border-radius: 50%;
}
.brand-center .brand-name {
  color: #111; font-weight: 800; letter-spacing: 1px;
  font-family: var(--font-head); font-size: 62px;
}

/* ---- beat grid ----------------------------------------------------------- */
main { flex: 0 0 auto; max-width: 1480px; width: 100%; margin: 0 auto; padding: 18px 28px; display: flex !important; flex-direction: column !important; justify-content: flex-start; }
.player-section {
  flex: 0 0 auto;
  height: 800px;
  margin-top: 48px;
  margin-bottom: 72px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.player-scroll {
  flex: 1 1 auto; min-height: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #555 #fff;
  padding: 22px;
  scroll-behavior: smooth;
}
.player-scroll::-webkit-scrollbar { width: 8px; }
.player-scroll::-webkit-scrollbar-track { background: #fff; }
.player-scroll::-webkit-scrollbar-thumb { background: #555; border-radius: 999px; }

/* ---- tabs (browser-style) ---------------------------------------------- */
.tabs { display: flex; justify-content: space-between; align-items: center; border-bottom: none; flex: 0 0 auto; box-shadow: 0 8px 24px rgba(0,0,0,.65); z-index: 2; }
.tab {
  appearance: none; border: none; cursor: pointer;
  background: transparent; color: #000;
  font-family: var(--font-head); font-size: 14px; font-weight: 700;
  padding: 12px 20px;
  position: relative;
  transition: background .15s, color .15s;
}
.tab:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 1px; background: var(--border); opacity: .4;
}
.tab:hover { color: #000; background: rgba(0,0,0,.06); }
.tab.is-active { color: #000; background: rgba(0,0,0,.1); }
.tab-group { display: flex; }
.cart-area { position: relative; display: flex; align-items: center; gap: 12px; padding-right: 6px; }
.cart-total { font-family: var(--font-head); font-weight: 700; font-size: 14px; color: #000; }
.cart-total-label { font-weight: 700; margin-right: 2px; }
.cart-btn {
  appearance: none; border: 1px solid #000; background: #000; color: #fff; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-size: 13px; font-weight: 700;
  padding: 7px 14px; border-radius: 4px; transition: background .15s, transform .15s;
}
.cart-btn:hover { background: #222; }
.cart-btn svg { flex: 0 0 auto; }
.cart-popup {
  position: absolute; top: calc(100% + 10px); right: 24px; z-index: 30;
  width: 280px; max-height: 320px; overflow-y: auto;
  background: #fff; color: #000; border: 1px solid #000; border-radius: 6px;
  box-shadow: 0 14px 36px rgba(0,0,0,.35); padding: 10px;
}
.cart-empty { font-size: 13px; color: #555; padding: 8px 4px; text-align: center; }
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 4px; border-bottom: 1px solid #eee; font-size: 13px;
}
.cart-list li:last-child { border-bottom: none; }
.cart-list .ci-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-list .ci-sub { display: block; font-size: 11px; color: #777; margin-top: 2px; }
.cart-list .ci-price { font-weight: 700; color: #000; }
.cart-list .ci-remove {
  appearance: none; border: none; background: transparent; cursor: pointer;
  color: #c0392b; font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 4px;
}
.cart-list .ci-remove:hover { background: rgba(192,57,43,.12); }
.cart-list li { display: flex; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid #eee; font-size: 13px; }
.cart-list .ci-play {
  appearance: none; border: 1px solid #000; background: #000; color: #fff; cursor: pointer;
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  font-size: 11px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.cart-list .ci-play.is-playing { background: #555; border-color: #555; }
.cart-list .ci-info { flex: 1 1 auto; min-width: 0; }
.cart-footer {
  display: flex; gap: 8px; padding: 12px; border-top: 1px solid #eee;
}
.cart-continue, .cart-checkout {
  flex: 1 1 0; cursor: pointer; font-family: var(--font-head); font-weight: 700; font-size: 13px;
  padding: 9px 12px; border-radius: 4px; transition: background .15s, transform .15s;
}
.cart-continue { background: #fff; color: #000; border: 1px solid #000; }
.cart-continue:hover { background: #f2f2f2; }
.cart-checkout { background: #000; color: #fff; border: 1px solid #000; }
.cart-checkout:hover { background: #222; }
.cart-empty-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: #c0392b; font-family: var(--font-head); font-weight: 700; font-size: 13px;
  padding: 8px 12px; width: 100%; text-align: left;
}
.cart-empty-btn:hover { color: #a93226; }
.cart-empty-btn svg { flex: 0 0 auto; }
.tab-panel { display: none; flex: 1 1 auto; min-height: 0; flex-direction: column; }
.tab-panel.is-active { display: flex; }
.licenses-content { padding: 28px; color: #fff; overflow-y: auto; }
.licenses-content h3 { font-family: var(--font-head); font-size: 22px; margin: 0 0 12px; }
.licenses-content p { line-height: 1.6; color: rgba(255,255,255,.8); max-width: 720px; }
.licenses-content ul { line-height: 1.9; color: rgba(255,255,255,.8); max-width: 720px; padding-left: 20px; }

/* ---- license chooser modal (centered in the player) -------------------- */
.license-modal {
  position: absolute; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55);
  padding: 24px;
}
.license-modal[hidden] { display: none; }
.license-modal-box {
  width: 100%; max-width: 560px;
  background: #fff; color: #000; border-radius: 10px;
  box-shadow: 0 22px 60px rgba(0,0,0,.55); overflow: hidden;
}
.license-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid #eee;
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
}
.license-close {
  appearance: none; border: none; background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; color: #555; padding: 2px 8px; border-radius: 4px;
}
.license-close:hover { background: rgba(0,0,0,.06); }
.license-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 22px; max-width: 1000px; margin: 0 auto; }
.license-card-btn { display: block; padding: 0; border: none; background: none; cursor: pointer; text-align: left; min-width: 0; }
.license-card { width: 100%; box-sizing: border-box; }
.license-card {
  text-align: left; cursor: pointer;
  border: 1px solid #000; border-radius: 10px; background: #fff; color: #000;
  padding: 24px; transition: background .15s, transform .15s;
  display: flex; flex-direction: column; gap: 10px;
}
.license-card:hover { background: #f2f2f2; transform: translateY(-1px); }
.license-card .lc-name { font-family: var(--font-head); font-weight: 700; font-size: 22px; }
.license-card .lc-desc { font-size: 15px; color: #555; line-height: 1.5; }
.license-card .lc-price { font-weight: 800; font-size: 20px; color: #000; margin-top: 2px; }
.license-card .lc-full-btn {
  margin-top: 14px;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #000;
  border-radius: 8px;
  background: #000;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
  letter-spacing: .3px;
}
.license-card .lc-full-btn:hover { background: #222; }
.full-license-body {
  margin: 0;
  padding: 20px 24px;
  white-space: pre-wrap;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: #111;
  max-height: 60vh;
  overflow-y: auto;
}

/* payment method chooser */
.pay-total { text-align: center; font-weight: 800; font-size: 18px; color: #000; padding: 4px 18px 0; }
.pay-options { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 20px; }
.pay-opt {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #000;
  border-radius: 8px;
  background: #000;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
}
.pay-opt:hover { background: #222; }
.pay-wallet { height: 26px; vertical-align: middle; }
.pay-g { height: 20px; margin-right: 3px; }
.pay-word { font-size: 15px; font-weight: 600; color: #fff; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font-head); font-size: 30px; font-weight: 800; margin: 0; }

/* ---- beat grid (vertical column on the left) --------------------------- */
.player-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 100%;
}
.beat {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  background: #ffffff;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.beat:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 48px; right: 48px; bottom: -1px;
  height: 2px; background: #000; opacity: .4;
}
.beat:hover { background: #555; border-color: var(--gold); border-radius: 8px; transform: translateY(-1px); box-shadow: 0 14px 36px rgba(0,0,0,.5); }
.beat:hover .beat-title { color: #fff; }
.beat:hover .play-btn {
  background:
    linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,0) 55%),
    rgba(255,255,255,.35);
  color: #0d0d0d;
}
.beat.active { background: #555; border-color: var(--gold); }
.beat.active .beat-title { color: #fff; }
.beat:focus, .beat *:focus { outline: none; }

.beat-cover {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  aspect-ratio: 4 / 3;
  margin: 6px 12px 6px 12px;
  border-radius: 6px;
  background-size: cover; background-position: center; background-color: #141414;
  box-shadow: inset 0 0 120px rgba(0,0,0,.55);
}
.play-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer; flex: 0 0 auto;
  margin-left: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 55%),
    #555;
  color: #fff; backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 2px rgba(255,255,255,.35), 0 2px 6px rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
}
.play-btn svg { width: 18px; height: 18px; }
.play-btn:hover { background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 55%), var(--gold); color: #0d0d0d; transform: scale(1.06); }
.beat-tag {
  position: absolute; left: 10px; bottom: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff;
}

.beat-body { padding: 8px 12px; flex: 1 1 auto; min-width: 0; }
.beat-title { font-family: var(--font-head); font-size: 15px; font-weight: 700; margin: 0; color: #000; }
.beat-meta { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

.beat-bpm-wrap { flex: 0 0 auto; align-self: center; padding: 0 14px; }
.beat-bpm { font-size: 12px; font-weight: 700; color: #000; letter-spacing: .3px; white-space: nowrap; }
.beat-actions { padding: 8px 12px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.price { font-size: 18px; font-weight: 800; color: #fff; }
.buy-btn {
  text-decoration: none; font-weight: 700; font-size: 13px; padding: 10px 20px; border-radius: 3px;
  background: #000; color: #fff; transition: background .15s, transform .15s;
}
.buy-btn:hover { background: #222; transform: translateY(-1px); }
.buy-btn:disabled { background: #999; color: #eee; cursor: not-allowed; transform: none; opacity: .8; }

/* ---- now playing bar (sticky bottom of the scroll box) ------------------ */
.now-playing {
  position: static;
  width: 100%;
  margin: 0; z-index: 5;
  display: grid; grid-template-columns: 48px 200px auto minmax(120px, 1.4fr) auto auto; align-items: center; gap: 14px;
  padding: 12px 16px; background: #fff; border-top: none; border-left: none; border-right: none; border-bottom: none; border-radius: 0;
  box-shadow: 0 -8px 24px rgba(0,0,0,.65); color: #0d0d0d;
}
.np-cover { width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0; background-size: cover; background-position: center; background-color: #141414; }
.np-info { min-width: 0; margin-right: 0; }
.np-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-meta { font-size: 12px; color: rgba(0,0,0,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-play {
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer; flex: 0 0 auto;
  margin-left: 10px; margin-right: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 55%),
    #555;
  color: #fff; backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 2px rgba(255,255,255,.35), 0 2px 6px rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
  position: relative;
}
/* black triangle always visible (overridden by JS icon when playing) */
.np-play::before {
  content: "";
  width: 0; height: 0;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
  display: block;
  margin-left: 2px;
}
.np-play.showing-icon::before { display: none; }
.np-play:hover { transform: scale(1.06); }
.np-progress { height: 6px; border-radius: 999px; background: #000; cursor: pointer; align-self: center; display: flex; align-items: center; position: relative; }
.np-progress-fill { height: 100%; width: 0%; background: #fff; border-radius: 999px; border: 1px solid #000; box-sizing: border-box; position: relative; }
.np-progress-fill::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #000;
  box-sizing: border-box;
}
.np-time { font-size: 11px; color: #000; font-variant-numeric: tabular-nums; white-space: nowrap; }
.np-buy { padding: 8px 16px; font-size: 12px; }

.np-volume { display: flex; align-items: center; gap: 8px; color: #0d0d0d; }
.np-volume svg { flex: 0 0 auto; }
.np-volume input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 110px; height: 6px;
  border-radius: 999px; background: transparent; border: 1px solid #000; cursor: pointer; outline: none;
}
.np-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px;
  border-radius: 50%; background: #555; border: 1px solid #555; cursor: pointer;
}
.np-volume input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: #555; border: 1px solid #555; cursor: pointer;
}

/* ---- footer (pinned at bottom of viewport, always visible) ------------- */
.site-footer {
  flex: 0 0 auto;
  border-top: none;
  margin-top: 72px;
  margin-bottom: 56px;
  padding: 14px 28px;
  text-align: center;
  background: transparent;
}
.site-footer p { color: #111; font-size: 16px; font-weight: 700; margin: 0; }

/* ---- responsive ---------------------------------------------------------- */
@media (max-width: 720px) {
  /* header: keep About/Contact visible on mobile, smaller and tighter */
  .nav { display: flex; gap: 14px; }
  .header-inner { flex-wrap: wrap; gap: 8px; }
  .nav a { font-size: 13px; }

  /* license boxes: strictly equal columns/rows in the Add to Cart popup */
  .license-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; max-width: 100%; }
  .license-card-btn { min-width: 0; width: 100%; }
  .license-card { padding: 16px 12px; height: 100%; }
  .license-card .lc-name { font-size: 17px; }
  .license-card .lc-price { font-size: 17px; }
  .license-card .lc-full-btn { padding: 11px 10px; font-size: 12px; }

  /* beat rows on mobile: keep title line + Add to Cart line exactly as-is;
     BPM sits to the RIGHT of the song title (inside the body, after the name). */
  .beat { flex-wrap: wrap; padding-bottom: 6px; }
  .beat-body { flex: 1 1 auto; min-width: 0; padding-bottom: 0; display: flex; align-items: center; gap: 8px; }
  .beat-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; }
  .beat-bpm-wrap { order: 0; flex: 0 0 auto; width: auto; padding: 0; margin: 0; display: flex; align-self: center; justify-content: flex-start; }
  .beat-bpm { white-space: nowrap; }
  .beat-cover { width: 48px; margin: 6px 8px; }
  .beat-actions { order: 6; width: 100%; justify-content: flex-end; align-items: center; padding: 4px 12px 8px; gap: 8px; }
  .beat-actions .buy-btn { white-space: nowrap; flex-shrink: 0; font-size: 13px; padding: 9px 14px; margin-left: auto; }

  .player-list { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 14px; }
  .now-playing { grid-template-columns: 44px 1fr auto; gap: 10px; }
  .np-progress, .np-time, .np-volume { display: none; }
}

/* ---- background embers --------------------------------------------------- */
.bg-embers {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.site-header, main, .site-footer { position: relative; z-index: 1; }
