/* ════════════════════════════════════════════════════════════
   product.css — Flash Frog Music
   Styles specific to product pages (sheet music detail view).
   Depends on: global.css, header.css, footer.css
   ════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════
   PRODUCT LAYOUT
   Left col: sheet music player (600px fixed)
   Right col: product info (flex: 1)
══════════════════════════════════════ */
.product-wrap {
  max-width: var(--page-max);
  width: 100%;
  margin: 0 auto;
  padding: 36px var(--page-gutter) 60px;
  box-sizing: border-box;
}

.product-layout {
  display: flex;
  gap: 64px;
  align-items: flex-start;
}


/* ── Left: player frame ─────────────────────────────────── */
.product-left {
  flex: 0 0 600px;
  width: 600px;
  max-width: 100%;
}

/* Play button sits above the frame, centered */
.player-above-frame {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.player-play-circle {
  width: 64px;
  height: 64px;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity var(--transition-normal);
}
.player-play-circle:hover { opacity: 1; }
.player-play-circle img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Wrapper holds the clipped frame AND the logo overlay.
   Logo sits on the wrapper so it's never clipped by overflow:hidden. */
.sheet-player-wrap {
  position: relative;
  width: 600px;
  max-width: 100%;
}

.sheet-player-frame {
  width: 600px;
  max-width: 100%;
  height: 777px;
  border: 1px solid var(--dark);
  background: #fff;
  position: relative;
  overflow: hidden;
}

/* Gradient fade over the bottom of the score preview */
.sheet-player-frame::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 30%, #ffffff 60%);
  pointer-events: none;
  z-index: 9999;
}

.player-placeholder-label {
  font-family: var(--font);
  font-size: var(--fs-body);
  color: #bbb;
  text-align: center;
  margin-top: 80px;
}

/* Score preview watermark logo */
.score-preview-logo {
  position: absolute;
  bottom: 1px;
  right: 0;
  z-index: 10000;
  pointer-events: none;
  display: block;
  width: 336px;
  height: 342px;
  max-width: none;
}


/* ── Right: product info ────────────────────────────────── */
.product-right {
  flex: 1;
  padding-top: 0;
}

/* Breadcrumb */
.product-breadcrumb {
  font-family: var(--font);
  font-size: var(--fs-body-sm);
  font-weight: 400;
  color: var(--dark);
  letter-spacing: -0.01em;
  padding-top: 23px;
  margin-bottom: 39px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.product-breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}
.product-breadcrumb a:hover { text-decoration: underline; }
.product-breadcrumb .sep     { color: var(--dark); }
.product-breadcrumb .current { color: var(--text); }

/* Title */
.product-title {
  font-family: var(--font);
  font-size: 40px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}

/* Level row */
.product-level-price {
  font-family: var(--font);
  font-size: var(--fs-heading-sm);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

/* Bundle badge */
.bundle-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.01em;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.bundle-badge svg      { flex-shrink: 0; }
.bundle-badge-text     { line-height: 1; }

/* Price */
.product-price-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 24px;
}
.product-price {
  font-family: var(--font);
  font-size: 44px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
  flex-shrink: 0;
}
.product-includes {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  color: var(--dark);
  letter-spacing: -0.01em;
}

/* ── CTA buttons ─────────────────────────────────────────── */
/* Primary — Add to Cart */
.btn-add-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 272px;
  max-width: 100%;
  box-sizing: border-box;
  height: 66px;
  background: var(--green);
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 30px;
  font-weight: 400;
  color: white;
  letter-spacing: -0.03em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition-normal);
  margin-bottom: 16px;
}
.btn-add-cart:hover { background: #5a8f2e; color: white; }

/* Secondary — Get It Free (ghost) */
.btn-get-free {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 272px;
  max-width: 100%;
  box-sizing: border-box;
  height: 66px;
  background: var(--white);
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 30px;
  font-weight: 400;
  color: var(--blue);
  letter-spacing: -0.03em;
  text-decoration: none;
  border: 1px solid var(--blue);
  cursor: pointer;
  transition: background var(--transition-normal), color var(--transition-normal);
  margin-bottom: 18px;
}
.btn-get-free:hover { background: var(--blue); color: white; }

/* Trust microcopy under CTAs */
.product-trust-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  font-family: var(--font);
  font-size: var(--fs-body-sm);
  font-weight: 400;
  color: var(--dark);
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}
.product-trust-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.product-trust-sep {
  color: var(--dark);
  font-size: var(--fs-body-sm);
  line-height: 1;
}

/* Horizontal divider */
.product-divider {
  height: 1px;
  background: #e5e5e5;
  margin: 4px 0 24px;
}


/* ── Spec grid ───────────────────────────────────────────── */
.product-spec-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
  margin-bottom: 24px;
}
.spec-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.spec-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #dcdbdb;
  color: var(--dark);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.spec-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.spec-text {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
  padding-top: 4px;
}
.spec-text strong {
  display: block;
  font-weight: 700;
  font-size: var(--fs-body-sm);
  color: var(--dark);
  margin-bottom: 1px;
}

.spec-caption {
  font-family: var(--font);
  font-size: var(--fs-body-sm);
  font-weight: 400;
  color: var(--dark);
  letter-spacing: -0.01em;
  margin-top: 14px;
  margin-bottom: 24px;
}


/* ── About This Piece ────────────────────────────────────── */
.about-block {
  margin-bottom: 24px;
}
.about-block-heading {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
p {
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  line-height: 24px;
  margin-bottom: 10px;
}
p em { font-style: italic; }


/* ── License accordion ───────────────────────────────────── */
.license-accordion {
  border-top: 1px solid #e5e5e5;
  margin-top: 8px;
}
.license-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 14px 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.license-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.25s;
}
.license-accordion.open .license-chevron { transform: rotate(180deg); }
.license-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow) ease, padding var(--transition-slow) ease;
  font-size: 14px;
  color: #000;
  line-height: 20px;
}
.license-body p {
  font-size: 14px;
  line-height: 20px;
}
.license-accordion.open .license-body {
  max-height: 400px;
  padding: 0 0 16px;
}

/* Product detail rows (below spec grid) */
.product-details-heading {
  font-family: var(--font);
  font-size: var(--fs-heading-sm);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.product-detail-row {
  font-family: var(--font);
  font-size: var(--fs-body-md);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.5;
  margin-bottom: 8px;
}
.product-detail-row span { font-weight: 700; }

.product-license {
  font-family: var(--font);
  font-size: var(--fs-body-md);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.6;
  margin-top: 16px;
}


/* ══════════════════════════════════════
   BELOW FOLD: Card Shelves
══════════════════════════════════════ */
.below-fold {
  max-width: var(--page-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--page-gutter) 64px;
  box-sizing: border-box;
}

/* Section heading / subhead used above each shelf */
.below-fold .section-heading {
  font-family: var(--font);
  font-size: 2rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.section-subhead {
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  line-height: 24px;
  margin-bottom: 20px;
}

/* Card shelf — arrow buttons flank the card grid */
.shelf-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 64px;
}

/* Clip boundary — hides cards beyond the visible columns.
   Padding buffer prevents hover-scale from being clipped. */
.shelf-clip {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 6px 4px;
  margin: -6px -4px;
  box-sizing: content-box;
}


.shelf-arrow {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast);
}
.shelf-arrow:hover { opacity: 0.8; }
.shelf-arrow img {
  width: 100%;
  height: 100%;
  display: block;
}

/* 5-column card grid — 10 cards total, 5 visible, JS pages via translateX */
.shelf-cards {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(10, calc(20% - 13px));
  gap: 16px;
  transition: transform 0.35s ease;
}

/* Music card */
.music-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.music-card:hover .card-inner { transform: scale(1.03); }
.music-card.active .card-inner { }

.card-inner {
  width: 100%;
  aspect-ratio: 194.7 / 252.13;
  border: 1px solid var(--dark);
  background: #fff;
  overflow: hidden;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}
.card-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  pointer-events: none;
}

.card-caption {
  width: 100%;
  text-align: center;
  padding-top: 8px;
}
.card-caption-title {
  font-family: var(--font);
  font-size: var(--fs-body-sm);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
  display: block;
}
.card-caption-sub {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 400;
  color: var(--dark);
  letter-spacing: -0.01em;
  line-height: 1.3;
  display: block;
  margin-top: 2px;
}


/* ── Responsive ───────────────────────────────────────────── */

/* Tablet / iPad Pro (≤1080px) — 5 card columns, tighter layout */
@media (max-width: 1080px) {
  #top-nav-band .nav-buttons .nav-btn-outline { display: inline-flex; }
  .product-wrap       { padding: 28px var(--page-gutter) 48px; }
  .below-fold         { padding: 0 var(--page-gutter) 48px; }
  .product-layout     { gap: 40px; }
  .product-left       { flex: 0 0 480px; width: 480px; }
  .sheet-player-wrap  { width: 480px; }
  .sheet-player-frame { width: 480px; height: auto; aspect-ratio: 600 / 777; }
  .score-preview-logo { width: 268px; height: auto; }
  .shelf-cards        { grid-template-columns: repeat(10, calc(20% - 13px)); }
}

/* iPad Pro portrait — 3 card columns */
@media (max-width: 1024px) and (orientation: portrait) {
  .shelf-cards        { grid-template-columns: repeat(10, calc(33.333% - 11px)); }
}

/* Stack layout / iPad mini (≤960px) — 3 card columns */
@media (max-width: 960px) {
  .product-wrap       { padding: 24px var(--page-gutter) 48px; }
  .below-fold         { padding: 0 var(--page-gutter) 48px; }
  .product-layout     { flex-direction: column; gap: 32px; }
  .product-left       { flex: none; width: 100%; }
  .product-right      { width: 100%; box-sizing: border-box; }
  .sheet-player-wrap  { width: 100%; }
  .sheet-player-frame { width: 100%; height: auto; aspect-ratio: 600 / 777; }
  .score-preview-logo { width: 56%; height: auto; }
  .shelf-cards        { grid-template-columns: repeat(10, calc(33.333% - 11px)); }
  .shelf-arrow        { width: 44px; height: 44px; }
  .btn-add-cart,
  .btn-get-free       { width: 100%; font-size: 24px; height: 56px; }
  .flashfrog-bubble   { width: 180px; }
}

/* iPad mini nav (≤900px) */
@media (max-width: 900px) {
  #top-nav-band .nav-links a:nth-child(2)     { display: none; }
  #top-nav-band .nav-buttons .nav-btn-outline { display: inline-flex; padding: 7px 10px; font-size: 12px; }
}

/* Large phone / Surface Duo (≤600px) — 2 card columns */
@media (max-width: 600px) {
  .product-wrap       { padding: 20px var(--page-gutter) 40px; }
  .below-fold         { padding: 0 var(--page-gutter) 40px; }
  .shelf-cards        { grid-template-columns: repeat(10, calc(50% - 10px)); gap: 16px; }
  .shelf-arrow        { width: 36px; height: 36px; }
  .shelf-wrap         { gap: 10px; }
  .btn-add-cart,
  .btn-get-free       { width: 100%; font-size: 22px; height: 52px; }
  .product-title      { font-size: 28px; }
  .product-price      { font-size: 36px; }
  .product-spec-row   { grid-template-columns: 1fr; }
  .score-preview-logo { width: 52%; height: auto; }
  .flashfrog-bubble   { width: 160px; }
}

/* Phone (≤480px) */
@media (max-width: 480px) {
  .product-wrap       { padding: 16px var(--page-gutter) 32px; }
  .below-fold         { padding: 0 var(--page-gutter) 32px; }
  .product-title      { font-size: 24px; }
  .product-price      { font-size: 32px; }
  .player-play-circle { width: 52px; height: 52px; }
  .score-preview-logo { width: 48%; height: auto; }
  .product-trust-row  { flex-wrap: wrap; gap: 6px; }
  .shelf-arrow        { width: 28px; height: 28px; }
  .flashfrog-bubble   { width: 140px; }
}
