/* music-portfolio/css/style.css (FULL DROP-IN REPLACEMENT) */
:root{
  --bg:#f2f4f7;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;

  --btnGreen:#4caf50;
  --btnGreenHover:#3f9e44;

  --shadow:0 10px 30px rgba(0,0,0,.08);
  --radius:14px;

  --accent:#3f51b5;
  --accent2:#2f3f9a;
  --tabText:#fff;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container{ max-width:1120px; margin:0 auto; padding:26px 16px 40px; }
.header{ margin-bottom:12px; }
.title{ margin:0 0 14px 0; font-size:clamp(22px,2.4vw,34px); font-weight:800; }

.tabs{ display:flex; gap:10px; align-items:center; margin-bottom:14px; flex-wrap:wrap; }
.tab{
  appearance:none; border:0; cursor:pointer;
  padding:10px 14px; border-radius:999px;
  font-weight:800; background:rgba(17,24,39,.08);
  color:rgba(17,24,39,.85);
}
.tab[aria-selected="true"]{
  background:linear-gradient(90deg,var(--accent),var(--accent2));
  color:var(--tabText);
  box-shadow:0 10px 22px rgba(0,0,0,.12);
}

.tab-panels{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}

.panel{ display:none; }
.panel.active{ display:block; }

.panel-header{
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(90deg,var(--accent),var(--accent2));
  color:var(--tabText);
  font-weight:900;
  text-align:center;
}

/* ===== Hero video ===== */
.hero-media{
  width:100%;
  max-width:900px;
  margin:14px auto 10px; /* small bottom margin; tools row comes next */
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 10px 26px rgba(0,0,0,.08);
}
.hero-media video{ width:100%; height:auto; display:block; background:#000; }
.hero-media .hero-caption{
  padding:10px 12px;
  font-size:14px;
  color:#333;
  border-top:1px solid rgba(0,0,0,.08);
}
.hero-caption-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.mute-btn{
  appearance:none;
  border:1px solid rgba(0,0,0,.12);
  background:rgba(17,24,39,.06);
  color:rgba(17,24,39,.92);
  font-weight:900;
  border-radius:999px;
  padding:8px 12px;
  cursor:pointer;
}

/* ===== Tools row BELOW hero (as requested) ===== */
.panel-tools{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  padding:10px 16px 12px;
  background:#fff;
  border-top:1px solid rgba(0,0,0,.06);
  border-bottom:1px solid rgba(0,0,0,.06);
  flex-wrap:wrap;
}

/* ------------------------------------------------------------
   ✅ Make the TWO CD payment buttons look EXACTLY like track buy buttons
   Works with either markup style:

   A) If your CD buttons use "buy-btn" + "stripe-btn" already:
      <button class="buy-btn">...</button>
      <button class="buy-btn stripe-btn">...</button>

   B) If your CD buttons are still "tool-btn primary" (PayPal) and
      "tool-btn stripe-btn" (Stripe), this CSS makes them match too.

   Barcode stays a smaller "secondary" pill.
   ------------------------------------------------------------ */

/* Base tool button (kept for Barcode + general tools) */
.tool-btn{
  appearance:none;
  border:1px solid rgba(0,0,0,.10);
  cursor:pointer;
  border-radius:12px;
  padding:10px 14px;
  font-weight:900;
  box-shadow:0 10px 18px rgba(0,0,0,.06);
  white-space:nowrap;
}

/* Barcode look (kept) */
.tool-btn.secondary{
  background:rgba(17,24,39,.06);
  color:rgba(17,24,39,.90);
}

/* ✅ CD PayPal button (when it is still tool-btn primary) -> match .buy-btn */
.panel-tools .tool-btn.primary{
  appearance:none;
  border:0;
  cursor:pointer;
  background:var(--btnGreen);
  color:#fff;
  font-weight:900;
  padding:14px 18px;
  border-radius:8px;
  min-width:160px;
  white-space:nowrap;
  box-shadow:0 12px 22px rgba(76,175,80,.25);
}
.panel-tools .tool-btn.primary:hover{ background:var(--btnGreenHover); }

/* ✅ CD Stripe button if you set class="tool-btn stripe-btn" */
.panel-tools .tool-btn.stripe-btn{
  appearance:none;
  border:0;
  cursor:pointer;
  background:#635bff;
  color:#fff;
  font-weight:900;
  padding:14px 18px;
  border-radius:8px;
  min-width:160px;
  white-space:nowrap;
  box-shadow:0 12px 22px rgba(99,91,255,.25);
}
.panel-tools .tool-btn.stripe-btn:hover{ filter:brightness(.95); }

/* ✅ If your CD buttons use .buy-btn classes, they already match.
   These ensure they also center nicely inside the tools row. */
.panel-tools .buy-btn{ margin:0; }
.panel-tools .buy-btn.stripe-btn{ margin:0; }

/* ✅ This is the “Bring the rows down” space */
.tracks-wrap{
  padding-top:22px;
}

/* ===== Track row ===== */
.track{
  display:grid;
  grid-template-columns:86px 1fr minmax(240px,360px) minmax(200px,210px);
  gap:14px;
  padding:16px;
  align-items:center;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.track:last-child{ border-bottom:0; }

.thumb{
  width:72px; height:72px;
  border-radius:12px;
  overflow:hidden;
  background:#ddd;
  box-shadow:0 8px 18px rgba(0,0,0,.10);
  cursor:pointer;
}
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

/* 1GNM thumb special */
.theme-artist2 .thumb{ background:#000; }
.theme-artist2 .thumb img{ object-fit:contain; object-position:center top; transform:translateY(8%); }

.meta{ min-width:0; }
.meta .name{ font-weight:900; margin:0; line-height:1.2; }
.meta .artist{ margin:2px 0 0 0; font-weight:800; color:rgba(17,24,39,.90); }
.meta .price{ margin:2px 0 0 0; color:var(--muted); font-size:13px; font-weight:700; }

/* Preview cluster (prevents bleeding) */
.preview{
  display:flex;
  align-items:center;
  gap:12px;
  justify-content:flex-start;
  min-width:0;
  overflow:hidden;
}
.preview-boxwrap{ min-width:0; max-width:100%; }

.preview-btn{
  appearance:none;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  border-radius:10px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:900;
  min-width:108px;
  box-shadow:0 8px 16px rgba(0,0,0,.06);
  flex:0 0 auto;
}

.wavebox{
  height:42px;
  width:190px;
  max-width:100%;
  border-radius:10px;
  background:rgba(17,24,39,.04);
  border:1px solid rgba(0,0,0,.06);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  gap:3px;
  padding:8px 10px;
  overflow:hidden;
}
.wavebox .bar{
  width:4px;
  height:10px;
  border-radius:4px;
  background:rgba(63,81,181,.35);
  transform-origin:bottom;
}
.wavebox.idle .bar{ animation: idlePulse 1.2s ease-in-out infinite; animation-delay: calc(var(--i) * 25ms); }
.wavebox.playing .bar{ animation: playingPulse .22s ease-in-out infinite; animation-delay: calc(var(--i) * 14ms); background:rgba(63,81,181,.55); }

@keyframes idlePulse{ 0%,100%{ transform:scaleY(.55); opacity:.55; } 50%{ transform:scaleY(1.2); opacity:.85; } }
@keyframes playingPulse{ 0%,100%{ transform:scaleY(.45); opacity:.65; } 50%{ transform:scaleY(1.7); opacity:1; } }

.time{ margin-top:6px; font-size:13px; color:rgba(17,24,39,.70); font-weight:800; }

/* Buy buttons */
.buy{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}
.buy-btn{
  appearance:none;
  border:0;
  cursor:pointer;
  background:var(--btnGreen);
  color:#fff;
  font-weight:900;
  padding:14px 18px;
  border-radius:8px;
  min-width:160px;
  white-space:nowrap;
  box-shadow:0 12px 22px rgba(76,175,80,.25);
}
.buy-btn:hover{ background:var(--btnGreenHover); }

.buy-btn.stripe-btn{
  background:#635bff;
  box-shadow:0 12px 22px rgba(99,91,255,.25);
}
.buy-btn.stripe-btn:hover{ filter:brightness(.95); }

.footer{ margin-top:14px; color:rgba(17,24,39,.55); font-size:12px; text-align:center; }

/* Themes */
.theme-blakats{ --accent:#3f51b5; --accent2:#2f3f9a; --tabText:#fff; }
.theme-artist2{ --accent:#b45309; --accent2:#92400e; --tabText:#fff; }
.theme-artist3{ --accent:#0f766e; --accent2:#115e59; --tabText:#fff; }

/* Responsive */
@media (max-width:980px){
  .track{
    grid-template-columns:86px 1fr;
    grid-template-areas:
      "thumb meta"
      "preview preview"
      "buy buy";
  }
  .thumb{ grid-area:thumb; }
  .meta{ grid-area:meta; }
  .preview{ grid-area:preview; }
  .buy{ grid-area:buy; justify-content:flex-start; }
}
@media (max-width:520px){
  .panel-tools{ flex-direction:column; align-items:stretch; }
  .tool-btn{ width:100%; }

  /* Make CD payment buttons full width on mobile too */
  .panel-tools .tool-btn.primary,
  .panel-tools .tool-btn.stripe-btn,
  .panel-tools .buy-btn{
    width:100%;
    min-width:0;
  }

  .buy{ flex-direction:column; align-items:stretch; gap:8px; }
  .buy .buy-btn{ width:100%; min-width:0; }

  .wavebox{ width:160px; }
  .preview-btn{ min-width:102px; }
  .hero-caption-row{ flex-direction:column; align-items:flex-start; }
}

/* QR modal */
.qr-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:9999;
}
.qr-modal.open{ display:flex; }
.qr-card{
  width:min(520px,100%);
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 18px 46px rgba(0,0,0,.22);
}
.qr-card-header{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  font-weight:900;
  background:rgba(17,24,39,.05);
  border-bottom:1px solid rgba(0,0,0,.08);
}
.qr-close{
  appearance:none;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  border-radius:10px;
  padding:8px 10px;
  font-weight:900;
  cursor:pointer;
}

/* Center the BlaKats tools row BELOW the hero video */
.below-hero-tools{
  padding: 6px 16px 14px;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.panel-tools.below-hero{
  border: 0;
  background: transparent;
  justify-content: center;
}

.qr-body{ padding:14px; display:flex; justify-content:center; }
.qr-body img{ width:min(420px,100%); height:auto; display:block; }