/* =========================================================
   Hero, Detail Pages, Cart, Checkout, Account
   ========================================================= */

.hero {
  padding: 4rem 0 3.5rem;
  text-align: center;
}
@media (min-width: 640px) {
  .hero { padding: 6rem 0 5rem; }
}
.hero-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: 2.5rem;
  max-width: 720px;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .hero h1 { font-size: 3.75rem; }
}
.hero p {
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 1.25rem auto 0;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.25rem;
  flex-wrap: wrap;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.section-header h2 { font-size: 1.75rem; }
@media (min-width: 640px) {
  .section-header h2 { font-size: 2rem; }
}
.section-header p {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}
.view-all-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.view-all-link:hover { color: var(--color-accent); }
.view-all-link svg { width: 15px; height: 15px; }

.page-section { padding: 3rem 0; }
.page-header { margin-bottom: 2.25rem; }
.page-header h1 { font-size: 2.25rem; margin-bottom: 0.5rem; }
@media (min-width: 640px) {
  .page-header h1 { font-size: 2.5rem; }
}
.page-header p { color: var(--color-muted); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
}
@media (min-width: 768px) {
  .detail-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; padding: 3.5rem 0; }
}

.detail-image {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
}
.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info { display: flex; flex-direction: column; justify-content: center; }

.detail-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  background-color: var(--color-accent-dim);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}
.detail-category-badge svg { width: 12px; height: 12px; }

.detail-info h1 { font-size: 2rem; margin-bottom: 0.75rem; }
@media (min-width: 640px) {
  .detail-info h1 { font-size: 2.5rem; }
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}
.detail-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--color-muted-dark);
}

/* Simple single-price display, still used on the Sound Kit detail page
   (packs have no license tiers, so they keep one price line). */
.detail-price {
  font-size: 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* License tier selector on the beat detail page — three selectable
   cards (Normal / Exclusive / Premium), radio-based for accessibility. */
.tier-selector {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tier-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.tier-card:hover {
  border-color: var(--color-muted-dark);
}
.tier-card.selected {
  border-color: var(--color-accent);
  background-color: var(--color-accent-dim);
}
.tier-card.owned {
  cursor: default;
  opacity: 0.75;
}

.tier-card input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
  flex-shrink: 0;
}
.tier-card.owned input[type="radio"] {
  visibility: hidden;
  width: 0;
}

.tier-card-info {
  flex: 1;
  min-width: 0;
}
.tier-card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.tier-card-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-fg);
}
.tier-card-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-accent);
  flex-shrink: 0;
}
.tier-card-desc {
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.45;
}

.tier-card-owned-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  background-color: var(--color-accent-dim);
  color: var(--color-accent);
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
}
.tier-card-owned-badge svg {
  width: 12px;
  height: 12px;
}

.detail-player-box {
  padding: 1rem;
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}
.detail-player-box .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.detail-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.detail-actions .btn {
  min-width: 0;
  white-space: normal;
  text-align: center;
}
.detail-download-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  background-color: var(--color-surface-hover);
  color: var(--color-fg);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color 0.15s ease;
}
.detail-download-btn svg { width: 17px; height: 17px; }
.detail-download-btn:hover {
  background-color: #262626;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}
.detail-tag {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 0.75rem;
  color: var(--color-muted);
}

.track-list {
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.track-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.track-list-item:last-child { border-bottom: none; }
.track-list-item:hover { background-color: var(--color-surface-hover); }
.track-list-item .num {
  font-size: 0.85rem;
  color: var(--color-muted-dark);
  width: 24px;
  font-variant-numeric: tabular-nums;
}
.track-list-item .name {
  flex: 1;
  font-size: 0.9rem;
  color: var(--color-fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-list {
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-bottom: 2rem;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background-color: var(--color-bg);
  flex-shrink: 0;
}
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .info p:first-child {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item .info p:last-child {
  font-size: 0.75rem;
  color: var(--color-muted-dark);
  margin-top: 0.15rem;
  text-transform: capitalize;
}
.cart-item .price {
  font-weight: 600;
  flex-shrink: 0;
}
.cart-item .remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-muted-dark);
  flex-shrink: 0;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.cart-item .remove-btn svg { width: 17px; height: 17px; }
.cart-item .remove-btn:hover {
  color: var(--color-accent);
  background-color: var(--color-surface-hover);
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.25rem;
  margin-bottom: 2rem;
}
.cart-total-row .label { color: var(--color-muted); font-weight: 500; }
.cart-total-row .amount { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }

.checkout-summary {
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  overflow: hidden;
  margin-bottom: 2rem;
}
.checkout-summary-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.checkout-summary-item img {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
}
.checkout-summary-item .title {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.checkout-summary-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.checkout-summary-tier {
  font-size: 0.72rem;
  color: var(--color-muted-dark);
}
.checkout-summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}
.checkout-summary-total .label { color: var(--color-muted); font-weight: 500; }
.checkout-summary-total .amount { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }

.checkout-note {
  font-size: 0.75rem;
  color: var(--color-muted-dark);
  text-align: center;
  margin-top: 1rem;
}

.auth-page {
  max-width: 420px;
  margin: 0 auto;
  padding: 4rem 1.25rem 5rem;
}
.auth-page h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.auth-page > p.subtitle { color: var(--color-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.auth-switch {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-top: 1.5rem;
}
.auth-switch a { color: var(--color-accent); }
.auth-switch a:hover { text-decoration: underline; }

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.account-header h1 { font-size: 2rem; margin-bottom: 0.25rem; }
.account-header .email { color: var(--color-muted); font-size: 0.9rem; }

.signout-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.signout-btn svg { width: 15px; height: 15px; }
.signout-btn:hover { color: var(--color-accent); border-color: var(--color-accent); }

.orders-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}
.orders-heading svg { width: 19px; height: 19px; }

.order-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  overflow: hidden;
  margin-bottom: 1rem;
}
.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.order-ref {
  font-size: 0.75rem;
  color: var(--color-muted-dark);
  font-family: monospace;
}
.order-status {
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}
.order-status.pending { background-color: rgba(140,140,140,0.15); color: var(--color-muted); }
.order-status.paid, .order-status.delivered { background-color: var(--color-accent-dim); color: var(--color-accent); }
.order-status.failed { background-color: var(--color-accent-dim); color: var(--color-accent); }

.order-item-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.order-item-row:last-of-type { border-bottom: none; }
.order-item-row img {
  width: 44px;
  height: 44px;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
}
.order-item-row .title {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-item-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.order-item-tier {
  font-size: 0.75rem;
  color: var(--color-muted-dark);
}
.order-item-row .price { font-size: 0.9rem; color: var(--color-muted); }

.order-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--color-border);
}
.order-total-row .label { color: var(--color-muted); font-size: 0.9rem; }
.order-total-row .amount { font-weight: 600; }

.prose-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 6rem;
}
.prose-page h1 { font-size: 2.25rem; margin-bottom: 1.5rem; }
@media (min-width: 640px) {
  .prose-page h1 { font-size: 2.5rem; }
}
.prose-page p {
  color: var(--color-muted);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.contact-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 6rem;
  text-align: center;
}
.contact-page h1 { font-size: 2.25rem; margin-bottom: 1rem; }
.contact-page > p { color: var(--color-muted); margin-bottom: 2.5rem; max-width: 420px; margin-left: auto; margin-right: auto; }
.contact-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; }

.not-found-page {
  max-width: 420px;
  margin: 0 auto;
  padding: 8rem 1.25rem;
  text-align: center;
}
.not-found-page h1 { font-size: 3.5rem; margin-bottom: 1rem; }
.not-found-page p { color: var(--color-muted); margin-bottom: 2rem; }
