/* ============================================================
   Chris Price Music 2026 - Complete Stylesheet
   Purple palette extracted from favicon
   Fonts: Playfair Display (headings) + Inter (body)
   ============================================================ */

/* ---- Reset & Root ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Purple Palette */
  --primary:       #7C3AED;
  --primary-dark:  #6D28D9;
  --primary-darker:#5B21B6;
  --primary-light: #A78BFA;
  --primary-bg:    #F5F3FF;
  --primary-ring:  rgba(124,58,237,.25);

  /* Neutral Palette */
  --bg:            #FAFAF9;
  --surface:       #FFFFFF;
  --text:          #1E1B2E;
  --text-secondary:#64748B;
  --text-muted:    #94A3B8;
  --border:        #E2E0EA;
  --border-light:  #F0EDF5;
  --hover-bg:      #F5F3FF;

  /* Accent */
  --gold:          #D4A520;
  --gold-dark:     #B8901A;

  /* Status */
  --success:       #16A34A;
  --success-bg:    #F0FDF4;
  --error:         #DC2626;
  --error-bg:      #FEF2F2;
  --warning:       #D97706;
  --warning-bg:    #FFFBEB;
  --info:          #2563EB;
  --info-bg:       #EFF6FF;

  /* Layout */
  --shadow-sm:     0 1px 3px rgba(30,27,46,.06), 0 1px 2px rgba(30,27,46,.04);
  --shadow:        0 4px 16px rgba(30,27,46,.08);
  --shadow-lg:     0 12px 40px rgba(30,27,46,.12);
  --shadow-xl:     0 20px 60px rgba(30,27,46,.16);
  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     16px;
  --radius-full:   9999px;
  --transition:    .2s ease;
  --font-head:     'Playfair Display', Georgia, serif;
  --font-body:     'Inter', system-ui, -apple-system, sans-serif;
  --max-width:     1200px;
  --nav-h:         72px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.25;
  color: var(--text);
  margin-bottom: .5rem;
}
h1 { font-size: clamp(1.85rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: .25rem; }
strong { font-weight: 600; }
em { font-style: italic; }
code { font-size: .875em; background: var(--primary-bg); color: var(--primary-dark); padding: .15em .4em; border-radius: 4px; }

/* ---- Utility Classes ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: 860px; }
.text-muted { color: var(--text-secondary) !important; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  font-family: var(--font-body);
  font-size: .9375rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.2;
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(124,58,237,.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124,58,237,.4);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary-light);
}
.btn-secondary:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--hover-bg); color: var(--primary); border-color: var(--primary-light); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #15803d; border-color: #15803d; color: #fff; }
.btn-danger { background: var(--error); color: #fff; border-color: var(--error); }
.btn-danger:hover { background: #B91C1C; border-color: #B91C1C; color: #fff; }
.btn-amber { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-amber:hover { background: #B45309; border-color: #B45309; color: #fff; }
.btn-gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.btn-sm { padding: .4rem .9rem; font-size: .8125rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1.0625rem; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---- Forms ---- */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: .4rem;
  color: var(--text);
}
.form-group label a { font-weight: 400; }
.label-link { float: right; font-size: .8125rem; color: var(--primary); }
.label-hint, .form-optional { color: var(--text-secondary); font-weight: 400; font-size: .8125rem; }
.required { color: var(--error); }
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
  display: block;
  width: 100%;
  padding: .65rem .9rem;
  font-family: var(--font-body);
  font-size: .9375rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
input::placeholder,
textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; min-height: 100px; }
select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%2364748B'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  padding-right: 2.5rem;
}
.form-hint { font-size: .8125rem; color: var(--text-secondary); margin-top: .3rem; }
.form-error { font-size: .8125rem; color: var(--error); margin-top: .3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* Password wrapper */
.input-password-wrap { position: relative; }
.input-password-wrap input { padding-right: 3rem; }
.toggle-password {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: .25rem;
  line-height: 1;
  transition: color var(--transition);
}
.toggle-password:hover { color: var(--text); }

/* ---- Alerts / Flash ---- */
.alert {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: .9375rem;
  border-left: 4px solid transparent;
  animation: alertSlideIn .3s ease;
}
@keyframes alertSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.alert svg { flex-shrink: 0; }
.alert-success { background: var(--success-bg); color: #15803d; border-color: var(--success); }
.alert-error   { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.alert-info    { background: var(--info-bg); color: var(--info); border-color: var(--info); }
.alert-warning { background: var(--warning-bg); color: #92400e; border-color: var(--warning); }
/* Legacy flash classes */
.flash { padding: .9rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-size: .9375rem; border-left: 4px solid transparent; }
.flash-success { background: var(--success-bg); color: #15803d; border-color: var(--success); }
.flash-error   { background: var(--error-bg); color: var(--error); border-color: var(--error); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: var(--nav-h);
}
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Brand */
.nav-brand {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  letter-spacing: -.01em;
  transition: color var(--transition);
}
.nav-brand:hover { color: var(--primary-dark); }
.brand-abbr {
  display: none;
  font-size: 1.1rem;
  background: var(--primary);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-head);
}
.brand-full { display: inline; }

/* Hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.nav-toggle:hover { background: var(--hover-bg); }
.hamburger {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Nav menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav-link {
  display: block;
  padding: .5rem .9rem;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
}
.nav-link:hover { color: var(--primary); background: var(--hover-bg); }
.nav-link.active {
  color: var(--primary);
  background: var(--primary-bg);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: .9rem;
  right: .9rem;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* Nav actions (right side) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: .75rem;
  padding-left: .75rem;
  border-left: 1px solid var(--border-light);
}

/* Cart */
.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  padding: .5rem;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-cart:hover { background: var(--hover-bg); color: var(--primary); }
.cart-badge {
  position: absolute;
  top: 0;
  right: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  line-height: 1;
  border: 2px solid var(--surface);
}

/* User dropdown */
.nav-dropdown { position: relative; }
.nav-avatar-btn {
  background: none;
  border: 2px solid var(--border);
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition);
  padding: 0;
}
.nav-avatar-btn:hover { border-color: var(--primary); }
.nav-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.nav-avatar-initials {
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: .5rem 0;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
  transition-delay: .35s;
}
/* Invisible bridge so mouse can travel from avatar to menu */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  right: 0;
  width: 100%;
  height: 12px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}
.dropdown-name {
  display: block;
  padding: .6rem 1rem;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: .25rem;
}
.nav-dropdown-menu a {
  display: block;
  padding: .5rem 1rem;
  font-size: .875rem;
  color: var(--text);
  transition: all var(--transition);
}
.nav-dropdown-menu a:hover { background: var(--hover-bg); color: var(--primary); }
.dropdown-signout { color: var(--error) !important; border-top: 1px solid var(--border-light); margin-top: .25rem; padding-top: .6rem !important; }

/* Mobile Nav */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .brand-abbr { display: flex; }
  .brand-full { display: none; }
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    box-shadow: var(--shadow-lg);
    z-index: 99;
  }
  .nav-menu.open { display: flex; }
  .nav-link { width: 100%; }
  .nav-link.active::after { display: none; }
  .nav-actions { border-left: none; margin-left: 0; padding-left: 0; padding-top: .75rem; border-top: 1px solid var(--border-light); margin-top: .5rem; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--text);
  color: rgba(255,255,255,.7);
  padding: 3.5rem 0 2rem;
  margin-top: 5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-logo {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
}
.footer-logo:hover { color: #fff; }
.footer-logo .brand-abbr {
  display: flex;
  font-size: 1rem;
  background: var(--primary);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.footer-logo .brand-full { display: inline; color: #fff; }
.footer-tagline { font-size: .9rem; line-height: 1.6; color: rgba(255,255,255,.55); }
.footer-nav h4 {
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .75rem;
  font-family: var(--font-body);
}
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: .4rem; }
.footer-nav a { color: rgba(255,255,255,.6); font-size: .875rem; transition: color var(--transition); }
.footer-nav a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .8125rem;
  color: rgba(255,255,255,.4);
}
.footer-powered { color: rgba(255,255,255,.3); }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
  margin-bottom: 1.5rem;
  padding: .5rem 0;
  font-size: .8125rem;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumbs li { display: flex; align-items: center; gap: .25rem; color: var(--text-muted); }
.breadcrumbs li:not(:last-child)::after {
  content: '/';
  color: var(--border);
  margin-left: .25rem;
}
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .active { color: var(--text); font-weight: 500; }

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page-main { padding: 2.5rem 0 4rem; min-height: calc(100vh - var(--nav-h) - 200px); }
.page-hero { margin-bottom: 2rem; }
.page-hero h1 { margin-bottom: .5rem; }
.page-hero p { color: var(--text-secondary); font-size: 1.1rem; }

/* ============================================================
   HOME HERO
   ============================================================ */
.home-hero {
  background: linear-gradient(135deg, #1E1B2E 0%, #2D1B69 30%, #4C1D95 60%, var(--primary) 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath d='M30 55V20l40-8v35' fill='none' stroke='rgba(255,255,255,.04)' stroke-width='2'/%3E%3Ccircle cx='25' cy='55' r='5' fill='none' stroke='rgba(255,255,255,.04)' stroke-width='2'/%3E%3Ccircle cx='65' cy='47' r='5' fill='none' stroke='rgba(255,255,255,.04)' stroke-width='2'/%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.home-hero .hero-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.15;
}
.hero-title .accent {
  background: linear-gradient(135deg, var(--primary-light) 0%, #DDD6FE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,.8);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-actions .btn-primary {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.hero-actions .btn-primary:hover {
  background: var(--primary-bg);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.hero-actions .btn-ghost {
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.hero-actions .btn-ghost:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.6);
  color: #fff;
}
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: auto; }
.hero-wave path { fill: var(--bg); }

/* ============================================================
   HOME SECTIONS
   ============================================================ */
.home-section { padding: 4rem 0; }
.home-section--accent { background: var(--primary-bg); }
.home-section--blog { background: var(--surface); }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.section-header h2 { margin-bottom: 0; }
.section-link {
  font-size: .9rem;
  font-weight: 500;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.section-link:hover { color: var(--primary-dark); }
.section-link::after { content: '\2192'; }

/* ============================================================
   CATEGORY GRID
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.category-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  color: var(--primary);
}
.category-thumb {
  width: 100%;
  display: block;
  overflow: hidden;
}
.category-thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform var(--transition);
}
.category-card:hover .category-thumb img { transform: scale(1.05); }
.category-icon {
  color: var(--primary);
  opacity: .7;
  transition: opacity var(--transition);
  padding-top: 1.5rem;
}
.category-card:hover .category-icon { opacity: 1; }
.category-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  padding: .6rem 1rem 0;
}
.category-count {
  font-size: .8rem;
  color: var(--text-secondary);
  padding: 0 1rem .75rem;
}

/* Category hero (browse page) */
.category-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: flex-end;
}
.category-hero img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.category-hero-overlay {
  position: relative;
  z-index: 1;
  padding: 2rem;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 100%);
  color: #fff;
}

/* ============================================================
   CATEGORY LANDING PAGE
   ============================================================ */
.cat-hero {
  position: relative;
  width: 100%;
  max-height: 340px;
  overflow: hidden;
}
.cat-hero-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}
.cat-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 100%);
  color: #fff;
  text-align: center;
  padding: 1rem;
}
.cat-hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0,0,0,.45);
  margin: 0 0 .25rem;
}
.cat-hero-count {
  font-size: 1.1rem;
  opacity: .85;
  margin: 0;
}

.cat-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.cat-back-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
}
.cat-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}
.cat-page-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 1rem;
}

.cat-filters {
  margin-bottom: 2rem;
}
.cat-search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cat-search-wrap {
  position: relative;
  max-width: 500px;
}
.cat-search-wrap .search-icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.cat-search-input {
  width: 100%;
  padding: .65rem .75rem .65rem 2.5rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: .95rem;
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.cat-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .15);
}
.cat-search-clear {
  position: absolute;
  right: .65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1;
}
.cat-search-clear:hover { color: var(--text-primary); }

.cat-filter-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.cat-filter-group {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.cat-filter-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.cat-filter-select {
  padding: .45rem .75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: .85rem;
  background: var(--surface);
  cursor: pointer;
}
.cat-filter-select:focus {
  outline: none;
  border-color: var(--primary);
}

@media (max-width: 600px) {
  .cat-hero { max-height: 220px; }
  .cat-hero-img { height: 220px; }
  .cat-hero-title { font-size: 1.75rem; }
  .cat-hero-count { font-size: .95rem; }
  .cat-page-title { font-size: 1.35rem; }
  .cat-search-wrap { max-width: 100%; }
}

/* ============================================================
   MUSIC CARDS
   ============================================================ */
.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.music-grid--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.music-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}
.music-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.music-card-img-wrap {
  position: relative;
  display: block;
  overflow: hidden;
}
.music-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform .4s ease, opacity .45s ease;
}
.music-card-img-main {
  position: relative;
  z-index: 1;
}
.music-card-img-preview {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  opacity: 0;
  object-fit: contain;
  background: #fff;
}
.music-card:hover .music-card-img-main { opacity: 0; transform: scale(1.04); }
.music-card:hover .music-card-img-preview { opacity: 1; }
.music-card-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--primary-bg) 0%, #EDE9FE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
}
.ec-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 3;
  background: var(--gold);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .55rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(212,165,32,.4);
}
.music-card-body {
  padding: 1rem 1.15rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.music-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .4rem;
}
.music-tag {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.music-tag:hover { color: var(--primary-dark); }

/* Difficulty dots */
.difficulty-dots {
  display: flex;
  gap: 3px;
  align-items: center;
}
.difficulty-dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: background var(--transition);
}
.difficulty-dots .dot.active { background: var(--gold); }
.difficulty-dots.large .dot { width: 10px; height: 10px; }
.difficulty-dots.inline { display: inline-flex; }

.music-card-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .15rem;
  line-height: 1.3;
}
.music-card-title a { color: var(--text); text-decoration: none; }
.music-card-title a:hover { color: var(--primary); }

/* Stretched link: entire card is clickable */
.music-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
/* Elevate interactive elements above the stretched link */
.music-card-footer { position: relative; z-index: 2; }
.music-card-meta { position: relative; z-index: 2; }
.music-card-subtitle {
  font-size: .8125rem;
  color: var(--text-secondary);
  margin-bottom: .3rem;
}
.music-card-composer {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.music-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid var(--border-light);
}
.music-price {
  font-weight: 700;
  font-size: .95rem;
  color: var(--primary);
}

/* ============================================================
   MUSIC BROWSE / FILTER SIDEBAR
   ============================================================ */
.browse-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Filter sidebar */
.browse-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.sidebar-header h3 { margin-bottom: 0; font-size: 1.1rem; }
.sidebar-close {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: .25rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.sidebar-close:hover { background: var(--error-bg); color: var(--error); }

.filter-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.filter-section:last-of-type { border-bottom: none; margin-bottom: 1rem; padding-bottom: 0; }
.filter-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
  margin-bottom: .6rem;
  display: block;
}
.search-input-wrap {
  position: relative;
}
.search-input-wrap input {
  padding-left: 2.2rem;
  font-size: .875rem;
}
.search-icon {
  position: absolute;
  left: .7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.filter-list { display: flex; flex-direction: column; gap: .2rem; }
.filter-option {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .4rem;
  font-size: .875rem;
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.filter-option:hover { background: var(--hover-bg); }
.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
  width: auto;
  accent-color: var(--primary);
}
.filter-option--checkbox { padding: .4rem; }
.filter-count { font-size: .75rem; color: var(--text-muted); margin-left: auto; }
.price-range-inputs {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.price-range-inputs input { width: 100px; font-size: .875rem; padding: .5rem .6rem; }
.price-range-inputs span { color: var(--text-muted); font-size: .875rem; }
.filter-submit { margin-bottom: .5rem; }
.filter-reset { font-size: .8125rem; }

/* Browse main content */
.browse-main { min-width: 0; }
.browse-toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.browse-count { font-size: .9rem; color: var(--text-secondary); }
.browse-count strong { color: var(--text); }
.browse-controls { display: flex; gap: .5rem; align-items: center; }
.show-filters-btn { display: none; }
.sort-select {
  width: auto;
  padding: .4rem 2.2rem .4rem .7rem;
  font-size: .8125rem;
  border-radius: var(--radius-sm);
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 199;
}

@media (max-width: 900px) {
  .browse-layout { grid-template-columns: 1fr; }
  .show-filters-btn { display: inline-flex; }
  .browse-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    z-index: 200;
    border-radius: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .3s ease;
  }
  .browse-sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .sidebar-close { display: block; }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  gap: .35rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .7rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: all var(--transition);
  text-decoration: none;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(124,58,237,.3);
}
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ============================================================
   MUSIC DETAIL PAGE
   ============================================================ */
.piece-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

/* Media column */
.piece-hero-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.25rem;
}
.piece-hero-img {
  width: 100%;
  display: block;
  object-fit: cover;
}
.piece-score-preview {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.5rem;
  background: var(--border-light);
}
.score-img { width: 100%; display: block; }
.score-preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: .75rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,.5) 0%, transparent 100%);
  color: rgba(255,255,255,.9);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .04em;
}
.score-placeholder {
  aspect-ratio: 3/4;
  max-height: 500px;
  background: linear-gradient(135deg, var(--primary-bg) 0%, #EDE9FE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  border-radius: var(--radius-lg);
}
.piece-audio {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.audio-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
  margin-bottom: .5rem;
}
.audio-player { width: 100%; }

/* Info column */
.piece-meta-top {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-bottom: .75rem;
}
.piece-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: .25rem;
  line-height: 1.2;
}
.piece-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.piece-credits {
  margin-bottom: 1.25rem;
  font-size: .9375rem;
  line-height: 1.8;
}
.piece-credits p { margin-bottom: .15rem; }
.piece-credits strong { color: var(--text-secondary); font-weight: 500; }

.piece-attributes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: var(--bg);
  border-radius: var(--radius);
}
.attr { display: flex; align-items: center; gap: .75rem; }
.attr-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
  min-width: 100px;
}
.instrument-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.instrument-tag {
  display: inline-block;
  font-size: .8rem;
  font-weight: 500;
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid var(--primary-light);
  padding: .15rem .6rem;
  border-radius: var(--radius-full);
}

/* Purchase box */
.piece-purchase-box {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}
.piece-price {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* Description section */
.piece-description {
  margin-bottom: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}
.piece-description h2 { margin-bottom: 1rem; }

/* Related music */
.piece-related {
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}
.piece-related h2 { margin-bottom: 1.5rem; }

@media (max-width: 900px) {
  .piece-layout { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============================================================
   BLOG
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}
.blog-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.blog-card-img-wrap { display: block; overflow: hidden; }
.blog-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform .4s ease;
}
.blog-card:hover .blog-card-img { transform: scale(1.04); }
.blog-card-body { padding: 1.25rem 1.35rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.blog-date {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: .5rem;
  display: block;
}
.blog-card-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
  line-height: 1.3;
}
.blog-card-title a { color: var(--text); text-decoration: none; }
.blog-card-title a:hover { color: var(--primary); }
.blog-card-excerpt { font-size: .875rem; color: var(--text-secondary); line-height: 1.65; flex: 1; }
.blog-read-more {
  font-size: .875rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: .75rem;
  display: inline-block;
}
.blog-read-more:hover { color: var(--primary-dark); }

/* Blog Feature Card (homepage) */
.blog-feature-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
}
.blog-feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.blog-feature-img { overflow: hidden; }
.blog-feature-img img { width: 100%; height: 100%; object-fit: cover; min-height: 200px; transition: transform .4s ease; }
.blog-feature-card:hover .blog-feature-img img { transform: scale(1.04); }
.blog-feature-body { padding: 2rem; display: flex; flex-direction: column; justify-content: center; }
.blog-feature-title { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; margin-bottom: .75rem; line-height: 1.3; }
.blog-feature-excerpt { font-size: .9375rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: .75rem; }
.blog-feature-date { font-size: .8rem; color: var(--text-muted); }
@media (max-width: 600px) {
  .blog-feature-card { grid-template-columns: 1fr; }
  .blog-feature-body { padding: 1.25rem; }
}

/* ============================================================
   BLOG POST DETAIL
   ============================================================ */
.post-header { margin-bottom: 2rem; }
.post-title { font-size: clamp(1.6rem, 4vw, 2.5rem); margin-bottom: .75rem; }
.post-excerpt { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.6; }
.post-hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
}
.post-hero-img { width: 100%; display: block; }

/* Post navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}
.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
}
.post-nav-link:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.post-nav-next { text-align: right; }
.nav-dir { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 500; }
.nav-title { font-size: .9rem; font-weight: 600; color: var(--text); }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } }

/* ============================================================
   PROSE (Markdown content rendering)
   ============================================================ */
.prose {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}
.prose h1, .prose h2, .prose h3 { margin: 2rem 0 .75rem; }
.prose p { margin-bottom: 1rem; }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; }
.prose ul, .prose ol { margin-bottom: 1rem; }
.prose pre {
  background: #F4F1EC;
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  font-size: .875rem;
}
.prose code { background: var(--primary-bg); color: var(--primary-dark); }
.prose pre code { background: none; color: inherit; padding: 0; }
.prose blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 1.25rem 0;
}
.prose a { color: var(--primary); text-decoration: underline; }
.prose a:hover { color: var(--primary-dark); }

/* post-content inherits prose */
.post-content { max-width: 720px; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page { background: var(--bg); }
.auth-main {
  min-height: calc(100vh - var(--nav-h) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}
.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--border-light);
}
.auth-card--wide { max-width: 560px; }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-logo {
  display: inline-block;
  margin-bottom: 1rem;
  text-decoration: none;
}
.auth-header h1 { font-size: 1.5rem; margin-bottom: .35rem; }
.auth-header p { color: var(--text-secondary); font-size: .9375rem; margin: 0; }
.auth-form .form-group:last-of-type { margin-bottom: 1.5rem; }
.auth-switch {
  text-align: center;
  font-size: .875rem;
  margin-top: 1.5rem;
  color: var(--text-secondary);
}
.auth-switch a { color: var(--primary); font-weight: 500; }

/* ============================================================
   PORTAL
   ============================================================ */
.portal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Portal sidebar */
.portal-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.portal-profile { text-align: center; margin-bottom: 1.5rem; }
.avatar-upload-zone { position: relative; display: inline-block; cursor: pointer; }
.avatar-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  display: block;
  margin: 0 auto .75rem;
}
.avatar-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto .75rem;
}
.avatar-edit-btn {
  position: absolute;
  bottom: .75rem;
  right: -4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.avatar-edit-btn:hover { border-color: var(--primary); color: var(--primary); }
.portal-name { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; margin-bottom: .15rem; }
.portal-ensemble { font-size: .8125rem; color: var(--text-secondary); }

.portal-nav {
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.portal-nav-link {
  display: block;
  padding: .55rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .9375rem;
  color: var(--text);
  transition: all var(--transition);
  text-decoration: none;
  font-weight: 500;
}
.portal-nav-link:hover { background: var(--hover-bg); color: var(--primary); }
.portal-nav-link.active { background: var(--primary-bg); color: var(--primary); }

/* Portal content */
.portal-content { min-width: 0; }
.portal-tab { display: none; }
.portal-tab.active { display: block; }
.portal-tab h2 { margin-bottom: 1.5rem; }

/* Settings form */
.settings-form { max-width: 480px; }

@media (max-width: 768px) {
  .portal-layout { grid-template-columns: 1fr; }
  .portal-sidebar { position: static; }
}

/* Purchases list */
.purchases-list { display: flex; flex-direction: column; gap: 1rem; }
.purchase-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: box-shadow var(--transition);
}
.purchase-item:hover { box-shadow: var(--shadow-sm); }
.purchase-img-wrap { flex-shrink: 0; }
.purchase-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.purchase-thumb-placeholder {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-bg) 0%, #EDE9FE 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
}
.purchase-info { flex: 1; min-width: 0; }
.purchase-title { font-weight: 600; margin-bottom: .15rem; font-size: .95rem; }
.purchase-title a { color: var(--text); text-decoration: none; }
.purchase-title a:hover { color: var(--primary); }
.purchase-meta { font-size: .8125rem; color: var(--text-secondary); margin-bottom: .15rem; }
.purchase-date { font-size: .75rem; color: var(--text-muted); }
.purchase-actions { flex-shrink: 0; }

/* ============================================================
   CART
   ============================================================ */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
}
.cart-items { display: flex; flex-direction: column; gap: 1rem; }
.cart-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: box-shadow var(--transition);
}
.cart-item:hover { box-shadow: var(--shadow-sm); }
.cart-item-img { flex-shrink: 0; width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb-placeholder {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary-bg) 0%, #EDE9FE 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info h3 { font-size: .95rem; margin-bottom: .15rem; }
.cart-item-info h3 a { color: var(--text); text-decoration: none; }
.cart-item-info h3 a:hover { color: var(--primary); }
.cart-item-meta { font-size: .8125rem; color: var(--text-secondary); }
.cart-item-price { font-weight: 700; color: var(--primary); font-size: .95rem; white-space: nowrap; }
.cart-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: .4rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.cart-remove-btn:hover { background: var(--error-bg); color: var(--error); }

.cart-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.cart-summary h3 { margin-bottom: 1.25rem; }
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: .9375rem;
  margin-bottom: .6rem;
  color: var(--text-secondary);
}
.cart-summary-divider { border: none; border-top: 1px solid var(--border-light); margin: 1rem 0; height: 0; }
.cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 1.25rem;
}
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-top: 1.5rem;
}
.checkout-items { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.checkout-items h3 { margin-bottom: 1rem; }
.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .9375rem;
}
.checkout-item:last-child { border-bottom: none; }
.checkout-item-title { flex: 1; color: var(--text); }
.checkout-item-price { font-weight: 600; color: var(--primary); margin-left: 1rem; }
.promo-section { margin-bottom: 1.5rem; }
.promo-section label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .4rem; }
.promo-input-row { display: flex; gap: .5rem; }
.promo-input-row input { flex: 1; text-transform: uppercase; }
.promo-msg { font-size: .8125rem; margin-top: .4rem; }
.promo-msg.success { color: var(--success); }
.promo-msg.error { color: var(--error); }

.checkout-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: .9375rem;
  margin-bottom: .5rem;
  color: var(--text-secondary);
}
.discount-row { color: var(--success); }
.discount-amt { font-weight: 600; }
.checkout-summary-divider { border: none; border-top: 1px solid var(--border-light); margin: .75rem 0; height: 0; }
.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.checkout-stripe-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  font-size: .8125rem;
  color: var(--text-muted);
  margin-top: 1rem;
}
@media (max-width: 768px) { .checkout-layout { grid-template-columns: 1fr; } }

/* ============================================================
   SUCCESS PAGE
   ============================================================ */
.success-page { text-align: center; padding: 4rem 1.5rem; }
.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  margin-bottom: 1.5rem;
}
.success-page h1 { margin-bottom: .75rem; }
.success-sub { color: var(--text-secondary); max-width: 480px; margin: 0 auto 2rem; font-size: 1.05rem; }
.success-items {
  max-width: 400px;
  margin: 0 auto 2rem;
  text-align: left;
}
.success-item {
  display: flex;
  justify-content: space-between;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .9375rem;
}
.success-item:last-child { border-bottom: none; }
.success-item strong { color: var(--text); }
.success-item span { color: var(--text-secondary); }
.success-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 768px) { .about-layout { grid-template-columns: 1fr; } }

/* ============================================================
   ERROR PAGES
   ============================================================ */
.error-page { text-align: center; padding: 6rem 1.5rem; }
.error-code {
  font-family: var(--font-head);
  font-size: 8rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  font-weight: 700;
}
.error-page h2 { margin-bottom: .75rem; }
.error-page p { color: var(--text-secondary); max-width: 400px; margin: 0 auto 2rem; }
.error-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.error-detail {
  text-align: left;
  background: var(--error-bg);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: .8125rem;
  color: var(--error);
  margin: 1rem auto 2rem;
  max-width: 600px;
  overflow-x: auto;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}
.modal-dialog {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { margin-bottom: 0; font-size: 1.1rem; }
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--error-bg); color: var(--error); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
}
.upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
}

/* Crop modal (used in blog editor etc) */
.crop-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.crop-modal-inner {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 640px;
  width: 100%;
  box-shadow: var(--shadow-xl);
}
.crop-container { max-height: 400px; overflow: hidden; margin-bottom: 1rem; }
.crop-container img { max-width: 100%; display: block; }
.crop-actions { display: flex; gap: .75rem; justify-content: flex-end; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
}
.empty-state svg { margin: 0 auto 1rem; color: var(--primary-light); opacity: .6; }
.empty-state h3 { color: var(--text); margin-bottom: .5rem; }
.empty-state p { margin-bottom: 1.25rem; max-width: 360px; margin-left: auto; margin-right: auto; }

/* ============================================================
   HIGHLIGHT.JS
   ============================================================ */
.hljs {
  background: #F4F1EC;
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: .875rem;
}

/* ============================================================
   BRAND LOGOS
   ============================================================ */
.brand-logo {
  height: 36px;
  width: auto;
  display: none;
  object-fit: contain;
}
.brand-logo--dark { display: block; }
.brand-logo--light { display: none; }
.footer-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  margin-bottom: .75rem;
}
.auth-logo-img {
  height: 56px;
  width: auto;
  object-fit: contain;
}
@media (max-width: 768px) {
  .brand-logo { height: 30px; }
}

/* ============================================================
   FILTER DROPDOWN
   ============================================================ */
.filter-select {
  width: 100%;
  padding: .55rem .75rem;
  font-size: .875rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  padding-right: 2rem;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
/* Fade up entrance */
.anim-fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp .7s ease forwards;
}
.anim-delay-1 { animation-delay: .15s; }
.anim-delay-2 { animation-delay: .3s; }
.anim-delay-3 { animation-delay: .45s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero floating notes background */
.hero-notes-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero-float-note {
  position: absolute;
  font-size: 1.6rem;
  color: rgba(255,255,255,.08);
  animation: floatNote 12s ease-in-out infinite;
  user-select: none;
  pointer-events: none;
}
@keyframes floatNote {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .6; }
  50% { transform: translateY(-30px) rotate(15deg); opacity: 1; }
}

/* Register page floating notes */
.floating-note {
  position: fixed;
  font-size: 1.4rem;
  color: var(--primary-light);
  opacity: .12;
  pointer-events: none;
  user-select: none;
  animation: authFloat 10s ease-in-out infinite;
  z-index: 0;
}
@keyframes authFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(12deg); }
}

/* Password strength bar */
.pw-strength-bar {
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  margin-top: .35rem;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width .3s ease, background .3s ease;
}

/* Password match hint */
.password-match-hint {
  font-size: .75rem;
  margin-top: .25rem;
  min-height: 1.1em;
}

/* Card hover lift (reusable) */
.card-lift {
  transition: transform .25s ease, box-shadow .25s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   SOCIAL SECTION (Likes, Share, Comments)
   ============================================================ */
.social-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}
.social-actions-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* Like button */
.social-like-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--font-body);
  transition: all var(--transition);
}
.social-like-btn:hover {
  border-color: #E11D48;
  color: #E11D48;
  background: #FFF1F2;
}
.social-like-btn.liked {
  border-color: #E11D48;
  color: #E11D48;
  background: #FFF1F2;
}
.social-like-btn.like-pop {
  animation: likePop .35s ease;
}
@keyframes likePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.heart-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: fill .2s ease;
}
.social-like-btn.liked .heart-icon { fill: #E11D48; }

/* Share buttons */
.social-share {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.share-label {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: .8rem;
  font-family: var(--font-body);
  transition: all var(--transition);
  text-decoration: none;
}
.share-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}
.share-btn--copy.copied {
  border-color: var(--success);
  color: var(--success);
  background: var(--success-bg);
}

/* Comments section */
.comments-section {
  margin-top: 2rem;
}
.comments-title {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.comments-count {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  padding: .1rem .5rem;
  border-radius: var(--radius-full);
}

/* Comment form */
.comment-form {
  display: flex;
  gap: .75rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}
.comment-form-avatar {
  flex-shrink: 0;
}
.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.comment-avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.comment-form-body {
  flex: 1;
  min-width: 0;
}
.comment-form-body textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  font-family: var(--font-body);
  font-size: .9rem;
  padding: .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--surface);
  color: var(--text);
}
.comment-form-body textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
.comment-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: .5rem;
}
.comment-char-count {
  font-size: .75rem;
  color: var(--text-muted);
}

/* Comment items */
.comment-item {
  display: flex;
  gap: .75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}
.comment-item:last-child { border-bottom: none; }
.comment-content { flex: 1; min-width: 0; }
.comment-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .3rem;
}
.comment-header strong {
  font-size: .875rem;
  color: var(--text);
}
.comment-time {
  font-size: .75rem;
  color: var(--text-muted);
}
.comment-body {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.comment-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .75rem;
  color: var(--text-muted);
  padding: .15rem .4rem;
  margin-top: .35rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.comment-delete:hover {
  color: var(--error);
  background: var(--error-bg);
}
.comment-login-prompt {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: .9rem;
}
.comment-login-prompt a {
  color: var(--primary);
  font-weight: 600;
}

/* ============================================================
   REVIEWS SECTION (Music pieces)
   ============================================================ */
.reviews-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}
.reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.reviews-header h2 { margin-bottom: 0; }

/* Reviews summary (average stars + count) */
.reviews-summary {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.reviews-avg {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.reviews-avg-num {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.reviews-stars {
  display: flex;
  gap: 2px;
  color: var(--gold);
  font-size: 1.1rem;
}
.reviews-total {
  font-size: .8125rem;
  color: var(--text-muted);
}

/* Review form card */
.review-form-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.review-form-card h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
}
.review-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Star picker */
.star-picker {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.star-picker-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
}
.star-picker-stars {
  display: flex;
  gap: 4px;
}
.star-pick {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: transform .15s ease;
  line-height: 1;
  color: var(--bg);
}
.star-pick svg {
  stroke: var(--border);
  transition: color .15s ease, stroke .15s ease;
}
.star-pick:hover {
  transform: scale(1.2);
}
.star-pick:hover svg,
.star-pick.active svg {
  color: var(--gold);
  stroke: var(--gold);
}
.star-icon {
  width: 28px;
  height: 28px;
  color: var(--border);
  transition: color .15s ease;
}
.star-icon.filled {
  color: var(--gold);
}

/* Review editor */
.review-editor {
  display: flex;
  flex-direction: column;
}
.review-toolbar {
  display: flex;
  gap: .25rem;
  padding: .4rem .5rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.review-tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-family: var(--font-body);
  transition: all var(--transition);
}
.review-tb-btn:hover {
  background: var(--primary-bg);
  color: var(--primary);
}
.review-editor textarea {
  width: 100%;
  min-height: 100px;
  resize: vertical;
  font-family: var(--font-body);
  font-size: .9rem;
  padding: .75rem;
  border: 1.5px solid var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--surface);
  color: var(--text);
}
.review-editor textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
.review-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: .4rem;
}
.review-char-hint {
  font-size: .75rem;
  color: var(--text-muted);
}
.review-format-hint {
  font-size: .75rem;
  color: var(--text-muted);
  font-style: italic;
}
.review-form-actions {
  display: flex;
  gap: .75rem;
  align-items: center;
}

/* Review items */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.review-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-light);
}
.review-item:last-child { border-bottom: none; }
.review-item-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
}
.review-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
}
.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.review-avatar-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.review-item-stars {
  display: flex;
  gap: 2px;
  color: var(--gold);
  font-size: .85rem;
}
.review-body {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.65;
}
.review-body strong { font-weight: 600; }
.review-body em { font-style: italic; }
.review-body ul {
  padding-left: 1.25rem;
  margin: .35rem 0;
}
.reviews-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: .9rem;
}
.review-login-prompt {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: .9rem;
  margin-bottom: 2rem;
}
.review-login-prompt a {
  color: var(--primary);
  font-weight: 600;
}
.review-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .75rem;
  color: var(--text-muted);
  padding: .15rem .4rem;
  margin-top: .35rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.review-delete:hover {
  color: var(--error);
  background: var(--error-bg);
}

/* ============================================================
   CUSTOM AUDIO PLAYER
   ============================================================ */
.cpm-player {
  background: linear-gradient(135deg, #1e1b2e, #2d2640);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  color: #fff;
  box-shadow: 0 8px 32px rgba(124, 58, 237, .18);
}
.cpm-player .audio-label {
  color: rgba(255,255,255,.6);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .75rem;
}
.player-main {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.player-play-btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .15s;
  box-shadow: 0 4px 14px rgba(124, 58, 237, .35);
}
.player-play-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.06);
}
.player-track-area {
  flex: 1;
  min-width: 0;
}
.player-info {
  display: flex;
  gap: .5rem;
  align-items: baseline;
  margin-bottom: .4rem;
}
.player-title {
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-composer {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-progress-wrap {
  padding: 6px 0;
  cursor: pointer;
}
.player-progress-bar {
  position: relative;
  height: 5px;
  background: rgba(255,255,255,.15);
  border-radius: 3px;
  overflow: visible;
}
.player-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #a78bfa);
  border-radius: 3px;
  width: 0%;
  transition: width .05s linear;
}
.player-progress-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 6px rgba(0,0,0,.3);
  opacity: 0;
  transition: opacity .2s;
}
.cpm-player:hover .player-progress-handle,
.player-progress-wrap:active .player-progress-handle {
  opacity: 1;
}
.player-times {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: rgba(255,255,255,.45);
  margin-top: .15rem;
  font-variant-numeric: tabular-nums;
}
.player-controls-right {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.player-skip-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}
.player-skip-btn:hover {
  color: #fff;
  background: rgba(255,255,255,.1);
}
.player-volume-wrap {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.player-vol-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color .2s;
}
.player-vol-btn:hover { color: #fff; }
.player-vol-slider {
  width: 70px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.player-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.player-vol-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

@media (max-width: 640px) {
  .player-main { flex-wrap: wrap; gap: .75rem; }
  .player-controls-right { width: 100%; justify-content: center; }
  .player-volume-wrap { display: none; }
}

/* ============================================================
   YOUTUBE EMBED
   ============================================================ */
.piece-youtube {
  margin-top: 1.5rem;
}
.piece-youtube .audio-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: .75rem;
  color: var(--text);
}
.youtube-embed-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.youtube-embed-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-lg);
}

/* ============================================================
   SHARE BUTTON COLORS
   ============================================================ */
.share-btn--reddit {
  color: #ff4500;
}
.share-btn--reddit:hover {
  background: rgba(255, 69, 0, .1);
}
.share-btn--linkedin {
  color: #0a66c2;
}
.share-btn--linkedin:hover {
  background: rgba(10, 102, 194, .1);
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 600px) {
  .page-main { padding: 1.5rem 0 3rem; }
  .music-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .music-grid--4 { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .cart-item, .purchase-item { flex-wrap: wrap; }
  .hero-title { font-size: clamp(1.8rem, 7vw, 2.4rem); }
}
@media (max-width: 400px) {
  .music-grid, .music-grid--4 { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
}

/* ---- Status Badges (shared) ---- */
.status-badge {
  display: inline-block;
  padding: .2em .6em;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.status-published { background: #dcfce7; color: #16a34a; }
.status-draft     { background: #f3f4f6; color: #6b7280; }
.status-pending   { background: #fef3c7; color: #b45309; }

/* ---- Contributor Tables ---- */
.table-responsive { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { font-weight: 600; font-size: .85rem; color: var(--text-muted); }
.admin-table tbody tr:hover { background: var(--hover-bg); }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state svg { margin-bottom: 1rem; opacity: .5; }
.empty-state p { margin-bottom: 1rem; }
