/* ========================================
   WAGWANSPARK — PREMIUM SOUND LAB
   Complete Responsive Stylesheet
======================================== */

:root {
    /* ELECTRIC CITADEL — deep charcoal, graphite, chrome, electric lime */
    --primary-color: #ccff00;      /* electric lime: actions, prices, selected states */
    --primary-ink: #0a0a0a;        /* ink to use on top of lime */
    --secondary-color: #0a0a0a;    /* the void */
    --accent-color: #4deeea;       /* iridescent cyan */
    --light-bg: #161616;           /* graphite surface */
    --lighter-bg: #1e1e1e;
    --text-primary: #f4f4f4;
    --text-secondary: #9a9a9a;
    --chrome: #e5e5e5;             /* chrome silver: rules & secondary text */
    --border-color: #262626;
    --border-strong: #343434;
    --iridescent: linear-gradient(90deg, #4deeea 0%, #764ba2 100%);
    --gradient: linear-gradient(135deg, #e2ff66 0%, #ccff00 55%, #a5e000 100%);
    --card-radius: 12px;
    --content-width: 1280px;

    /* Typography */
    --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-display: "Inter Tight", "Inter", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    
    /* Spacing System */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --spacing-4xl: 5rem;
    --spacing-5xl: 6rem;
}

/* RESET & GLOBAL */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    background: var(--secondary-color);
}

body {
    min-width: 320px;
    overflow-x: hidden;
    background: var(--secondary-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
}

body.cart-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color .25s ease;
}

button {
    border: 0;
    font: inherit;
    cursor: pointer;
    transition: background .25s ease, color .25s ease,
        border-color .25s ease, transform .25s ease,
        box-shadow .25s ease;
}

button:disabled {
    cursor: not-allowed;
    opacity: .6;
}

input,
select,
textarea {
    font: inherit;
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

.container {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   NAVIGATION
======================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(16, 16, 16, .96);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-shrink: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.5px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-logo i {
    color: var(--primary-color);
    -webkit-text-fill-color: var(--primary-color);
    font-size: 1.7rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-size: .96rem;
    font-weight: 600;
}

.nav-link:hover {
    color: var(--primary-color);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 7px;
    background: transparent;
}

.navbar-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    border-radius: 3px;
    background: var(--primary-color);
    transition: transform .25s ease, opacity .25s ease;
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.cart-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 44px;
    padding: .65rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--light-bg);
    color: var(--text-primary);
    font-size: .92rem;
    font-weight: 700;
    white-space: nowrap;
}

.cart-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 50px;
    background: var(--primary-color);
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
    line-height: 1;
}

/* ========================================
   HERO
======================================== */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: var(--spacing-4xl) var(--spacing-md);
    overflow: hidden;
    background:
        radial-gradient(ellipse at 75% 25%, rgba(29,185,84,.09), transparent 38%),
        radial-gradient(ellipse at 15% 80%, rgba(255,107,157,.045), transparent 35%),
        var(--secondary-color);
}

.hero::before {
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: .025;
    content: "";
    pointer-events: none;
}

.hero-background {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-color), transparent 70%);
    opacity: .09;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    padding: 0 var(--spacing-md);
    text-align: center;
}

.hero-subtitle {
    max-width: 700px;
    margin: 0 auto var(--spacing-2xl);
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    line-height: 1.75;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.hero-content h1 {
    max-width: 950px;
    margin: 0 auto var(--spacing-2xl);
    font-size: clamp(2.5rem, 6vw, 4.8rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.5px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
    color: var(--text-secondary);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.75;
}

.cta-button,
.btn.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    min-height: 54px;
    padding: .9rem 2.1rem;
    border-radius: 50px;
    background: var(--gradient);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 750;
    text-align: center;
    box-shadow: 0 7px 24px rgba(29,185,84,.16);
}

.cta-button:hover,
.btn.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(29,185,84,.28);
}

/* ========================================
   BEATS SECTION
======================================== */

.beats-section {
    padding: var(--spacing-5xl) var(--spacing-md);
    background: var(--secondary-color);
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-3xl);
}

.section-subtitle {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
}

.section-header h2 {
    margin-bottom: var(--spacing-lg);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.section-header > p:last-child {
    max-width: 700px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.75;
    text-align: center;
}

.beats-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    max-width: 600px;
    margin: 0 auto var(--spacing-3xl);
}

.search-container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 560px;
    min-height: 54px;
    padding: var(--spacing-md) var(--spacing-lg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--light-bg);
    transition: border-color .25s ease, box-shadow .25s ease;
}

.search-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(29,185,84,.12);
}

.search-container i {
    margin-right: var(--spacing-md);
    color: var(--text-secondary);
    flex-shrink: 0;
}

#searchInput {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
}

#searchInput::placeholder {
    color: #858585;
}

.filter-container {
    width: 100%;
    max-width: 560px;
}

#genreFilter {
    display: block;
    width: 100%;
    min-height: 54px;
    padding: var(--spacing-md) var(--spacing-xl) var(--spacing-md) var(--spacing-lg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--light-bg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color .25s ease, box-shadow .25s ease;
}

#genreFilter:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(29,185,84,.12);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 2.5rem;
}

.filter-btn {
    min-height: 42px;
    padding: .65rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--light-bg);
    color: var(--text-secondary);
    font-size: .9rem;
    font-weight: 650;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.beats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    align-items: stretch;
    gap: var(--spacing-2xl);
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

.beat-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    background: var(--light-bg);
    cursor: pointer;
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.beat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(29,185,84,.65);
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
}

.beat-artwork {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--lighter-bg);
}

.beat-artwork img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.5);
    opacity: 0;
    transition: opacity .25s ease;
}

.beat-card:hover .play-overlay {
    opacity: 1;
}

.play-btn-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.45rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.35);
}

.beat-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: var(--spacing-lg) var(--spacing-lg);
}

.beat-title {
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
    font-weight: 750;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.beat-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    font-size: .8rem;
}

.beat-meta-item {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.beat-meta-item i {
    color: var(--primary-color);
    font-size: .85rem;
}

.beat-price {
    margin: var(--spacing-lg) 0 var(--spacing-md);
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.3;
}

.buy-btn,
.add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    width: 100%;
    min-height: 48px;
    margin-top: auto;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--gradient);
    color: #fff;
    font-size: .9rem;
    font-weight: 750;
    text-align: center;
}

.buy-btn:hover,
.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(29,185,84,.2);
}

.pagination-controls {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: var(--spacing-3xl) 0;
    color: var(--text-secondary);
}

.pagination-controls button,
#pagination button {
    min-height: 40px;
    padding: .55rem .9rem;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: var(--light-bg);
    color: var(--text-primary);
}

/* ========================================
   SHOPPING CART
======================================== */

.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0,0,0,.76);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3001;
    display: flex;
    flex-direction: column;
    width: min(460px, 100%);
    height: 100vh;
    height: 100dvh;
    padding: 0;
    overflow: hidden;
    border-left: 1px solid var(--border-color);
    background: #151515;
    box-shadow: -15px 0 50px rgba(0,0,0,.5);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .35s cubic-bezier(.22,1,.36,1), visibility .35s ease;
}

.cart-drawer.active {
    transform: translateX(0);
    visibility: visible;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
    padding: 1.25rem 1.4rem;
    border-bottom: 1px solid var(--border-color);
    background: #1a1a1a;
}

.cart-header h2,
.cart-header h3 {
    font-size: 1.25rem;
    font-weight: 750;
    line-height: 1.35;
}

.cart-header p {
    margin-top: .2rem;
    color: var(--text-secondary);
    font-size: .85rem;
}

.close-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--light-bg);
    color: var(--text-primary);
    font-size: 1.2rem;
}

.close-cart:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.cart-body {
    flex: 1;
    min-height: 0;
    padding: 1rem 1.25rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    text-align: center;
}

.cart-empty[hidden],
.cart-summary[hidden],
[hidden] {
    display: none !important;
}

.cart-empty i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin-bottom: 1.2rem;
    border-radius: 50%;
    background: var(--light-bg);
    color: var(--primary-color);
    font-size: 2rem;
}

.cart-empty h3 {
    margin-bottom: .45rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
}

.cart-item {
    display: grid;
    grid-template-columns: 76px minmax(0,1fr) auto;
    align-items: center;
    gap: .9rem;
    padding: 1rem 0;
    border-bottom: 1px solid #303030;
    animation: cartItemIn .25s ease both;
}

@keyframes cartItemIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-item-image,
.cart-item-artwork {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border: 1px solid #353535;
    border-radius: 9px;
    background: var(--lighter-bg);
}

.cart-item-info,
.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
}

.cart-item-title {
    color: var(--text-primary);
    font-size: .95rem;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.cart-item-meta {
    color: var(--text-secondary);
    font-size: .78rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-size: .95rem;
    font-weight: 750;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .55rem;
}

.cart-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: .4rem .6rem;
    border: 1px solid #4a3034;
    border-radius: 7px;
    background: rgba(255,107,157,.07);
    color: #ff8b9f;
    font-size: .78rem;
}

.cart-remove-btn:hover {
    background: #a83250;
    color: #fff;
}

.cart-continue-shopping,
.cart-continue-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 1rem;
    padding: .8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #222;
    color: var(--text-primary);
    font-weight: 700;
    text-align: center;
}

.cart-continue-shopping:hover,
.cart-continue-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cart-footer {
    flex-shrink: 0;
    padding: 1.15rem 1.4rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border-color);
    background: #1a1a1a;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: .92rem;
}

.cart-summary-row strong {
    color: var(--text-primary);
}

.cart-total-row {
    padding-top: .8rem;
    margin-top: .15rem;
    border-top: 1px solid var(--border-color);
}

.cart-total-row span {
    color: var(--text-primary);
    font-weight: 750;
}

.cart-total-row strong,
.cart-total {
    color: var(--primary-color) !important;
    font-size: 1.4rem;
    font-weight: 850;
}

.checkout-btn,
.cart-checkout-btn,
#checkoutBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    width: 100%;
    min-height: 54px;
    margin-top: 1.15rem;
    padding: .9rem 1.25rem;
    border: 0;
    border-radius: 50px;
    background: var(--gradient);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 5px 18px rgba(29,185,84,.18);
}

.checkout-btn:hover:not(:disabled),
.cart-checkout-btn:hover:not(:disabled),
#checkoutBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(29,185,84,.3);
}

.cart-secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin-top: .75rem;
    color: #929292;
    font-size: .76rem;
    text-align: center;
}

/* ========================================
   FLOATING AUDIO PLAYER
   One consolidated layout for desktop/mobile
======================================== */

.player-modal {
    position: fixed;
    right: 0;
    bottom: 14px;
    left: 0;
    z-index: 2500;
    display: none;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    padding: 0 14px;
    background: transparent;
    pointer-events: none;
}

.player-modal.active {
    display: flex;
    pointer-events: none;
}

.player-content {
    position: relative;
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 42px;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 10px 14px;
    width: 100%;
    max-width: 680px;
    min-width: 0;
    margin: 0 auto;
    padding: 14px 48px 14px 14px;
    overflow: visible;
    border: 1px solid #353535;
    border-radius: 16px;
    background: rgba(25,25,25,.98);
    box-shadow: 0 10px 35px rgba(0,0,0,.45);
    pointer-events: auto;
    isolation: isolate;
}

/* Player close button — matches the HTML */

.player-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    padding: 0;
    border: 1px solid #454545;
    border-radius: 50%;
    background: #292929;
    color: #fff;
    font-size: 13px;
    line-height: 1;
}

.player-close:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

/* Artwork */

.player-artwork {
    grid-column: 1;
    grid-row: 1;
    display: block;
    width: 60px;
    height: 60px;
    min-width: 60px;
    overflow: hidden;
    border: 1px solid #383838;
    border-radius: 9px;
    background: #242424;
}

.player-artwork img,
#playerImage {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    object-fit: cover;
}

.player-info {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

#playerTitle {
    margin: 0;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

#playerGenre {
    margin: 0.2rem 0 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-controls {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#playPauseBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.1rem;
    padding: 0;
    transition: transform .2s ease, box-shadow .2s ease;
}

#playPauseBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(29,185,84,.35);
}

#playPauseBtn:active {
    transform: scale(0.98);
}

.player-progress-container {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
}

#currentTime,
#duration {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

#progressBar {
    flex: 1;
    min-width: 0;
    height: 3px;
    border-radius: 2px;
    background: #404040;
    border: none;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

#progressBar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(29,185,84,.4);
}

#progressBar::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(29,185,84,.4);
}

#progressBar::-webkit-slider-runnable-track {
    background: transparent;
    border: none;
}

#progressBar::-moz-range-track {
    background: transparent;
    border: none;
}

#audioPlayer {
    display: none;
}

/* ========================================
   ABOUT SECTION
======================================== */

.about-section {
    padding: var(--spacing-5xl) var(--spacing-md);
    background: var(--secondary-color);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--spacing-4xl);
}

.about-text h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin: var(--spacing-lg) 0 var(--spacing-xl);
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: var(--spacing-lg);
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2xl);
}

.feature-item {
    display: flex;
    gap: var(--spacing-lg);
}

.feature-item i {
    color: var(--primary-color);
    font-size: 1.8rem;
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: 1.2rem;
    font-weight: 750;
    margin-bottom: var(--spacing-sm);
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   CONTACT SECTION
======================================== */

.contact-section {
    padding: var(--spacing-5xl) var(--spacing-md);
    background: var(--secondary-color);
}

.contact-content {
    max-width: 1000px;
    margin: var(--spacing-4xl) auto 0;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-3xl);
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

.contact-item h4 {
    font-size: 1.2rem;
    font-weight: 750;
    margin-bottom: var(--spacing-md);
}

.contact-item p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.contact-item a {
    color: var(--primary-color);
    font-weight: 600;
    transition: opacity .2s ease;
}

.contact-item a:hover {
    opacity: 0.8;
}

/* ========================================
   FOOTER
======================================== */

.footer {
    padding: var(--spacing-4xl) var(--spacing-md) var(--spacing-2xl);
    border-top: 1px solid var(--border-color);
    background: #0d0d0d;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    width: min(100%, 760px);
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    justify-content: center;
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    margin-bottom: var(--spacing-sm);
}

.footer-tagline {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    letter-spacing: .02em;
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: rgba(255,255,255,.02);
    color: var(--text-primary);
    transition: transform .2s ease, border-color .2s ease, color .2s ease, background .2s ease;
}

.footer-social-links a:hover {
    border-color: var(--primary-color);
    background: rgba(29,185,84,.12);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-social-links i {
    font-size: 1.05rem;
}

.copyright {
    margin: 0;
    color: var(--text-secondary);
    font-size: .9rem;
    text-align: center;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 768px) {
    .hero {
        min-height: 75vh;
        padding: var(--spacing-3xl) var(--spacing-md);
    }

    .hero-content {
        padding: 0 var(--spacing-sm);
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-xl);
    }

    .section-header {
        margin-bottom: var(--spacing-2xl);
    }

    .beats-controls {
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-2xl);
    }

    .beats-grid {
        gap: var(--spacing-xl);
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .beat-info {
        padding: var(--spacing-md) var(--spacing-md);
    }

    .beat-title {
        font-size: 1rem;
        margin-bottom: var(--spacing-sm);
    }

    .beat-meta {
        gap: var(--spacing-xs) var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
        font-size: .75rem;
    }

    .beat-price {
        font-size: 1.2rem;
        margin: var(--spacing-md) 0 var(--spacing-sm);
    }

    .buy-btn,
    .add-to-cart-btn {
        font-size: .85rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-3xl);
    }

    .footer {
        padding: var(--spacing-3xl) var(--spacing-md) var(--spacing-xl);
    }

    .footer-content {
        gap: var(--spacing-md);
    }

    .footer-social-links a {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 70vh;
        padding: var(--spacing-2xl) var(--spacing-md);
    }

    .hero-subtitle {
        margin-bottom: var(--spacing-lg);
        font-size: 0.85rem;
    }

    .hero-content h1 {
        margin-bottom: var(--spacing-lg);
        font-size: clamp(2rem, 5vw, 3rem);
    }

    .hero-description {
        margin-bottom: var(--spacing-xl);
        font-size: 0.95rem;
    }

    .section-header {
        margin-bottom: var(--spacing-2xl);
    }

    .section-header h2 {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .section-header > p:last-child {
        font-size: 0.9rem;
    }

    .beats-controls {
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-2xl);
    }

    .search-container,
    #genreFilter {
        min-height: 48px;
        font-size: 0.9rem;
    }

    .beats-grid {
        gap: var(--spacing-lg);
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        padding: 0 var(--spacing-xs);
    }

    .beat-card {
        border-radius: 10px;
    }

    .beat-info {
        padding: var(--spacing-sm) var(--spacing-sm);
    }

    .beat-title {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-xs);
    }

    .beat-meta {
        font-size: .65rem;
        gap: var(--spacing-xs) var(--spacing-xs);
        margin-bottom: var(--spacing-xs);
    }

    .beat-price {
        font-size: 1.1rem;
        margin: var(--spacing-sm) 0 var(--spacing-xs);
    }

    .buy-btn,
    .add-to-cart-btn {
        font-size: 0.8rem;
        min-height: 42px;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .contact-item h4 {
        font-size: 1rem;
    }

    .footer {
        padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-lg);
    }

    .footer-content {
        gap: var(--spacing-sm);
    }

    .footer-social-links {
        gap: var(--spacing-sm);
    }

    .footer-social-links a {
        width: 36px;
        height: 36px;
    }
}

/* ==========================================
   BEAT FORMAT BADGE — MP3 + WAV
   ========================================== */
.beat-format-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 12px;
}
.beat-format-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(91, 220, 125, 0.28);
  border-radius: 7px;
  background: rgba(48, 135, 70, 0.15);
  color: #91e7a6;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.45px;
  line-height: 1.2;
  white-space: nowrap;
}
.beat-format-badge i {
  font-size: 12px;
  color: #72db91;
}
.beat-download-note {
  color: #929a94;
  font-size: 11px;
  line-height: 1.4;
}
.cart-item-format {
  display: block;
  margin: 5px 0;
  color: #91e7a6;
  font-size: 11px;
  font-weight: 600;
}
@media (max-width: 480px) {
  .beat-format-row {
    justify-content: flex-start;
    gap: 7px;
  }
  .beat-format-badge {
    padding: 7px 9px;
  }
}

/* ==========================================
   MOBILE MENU — hamburger drawer
   Hamburger on the left, logo centred, cart on the right.
   The links slide in from the left on phones and tablets.
   Added on top of the original stylesheet; nothing above changed.
   ========================================== */

.nav-link.active {
    color: var(--primary-color);
}

/* Extra drawer pieces are created by app.js and only appear on phones. */
.nav-drawer-head,
.nav-drawer-sub,
.nav-drawer-foot,
.nav-overlay {
    display: none;
}

body.nav-open {
    overflow: hidden;
}

@media (max-width: 860px) {
    /* backdrop-filter would trap the fixed drawer inside the bar,
       so the bar uses a solid background on phones. */
    .navbar {
        padding: .55rem 0;
        background: #101010;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .navbar-container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: .5rem;
        padding: 0 14px;
    }

    .navbar-toggle {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        padding: 0;
        border-radius: 12px;
        background: transparent;
        color: var(--text-primary);
        font-size: 1.35rem;
    }

    .navbar-toggle:hover {
        color: var(--primary-color);
    }

    .navbar-logo {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        font-size: 1.3rem;
    }

    .cart-toggle {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        width: 46px;
        height: 46px;
        min-height: 46px;
        padding: 0;
        border-radius: 50%;
        font-size: 1.05rem;
    }

    .cart-toggle > span:not(.cart-count) {
        display: none;
    }

    .cart-toggle .cart-count {
        position: absolute;
        top: -4px;
        right: -4px;
        min-width: 20px;
        height: 20px;
        border: 2px solid #101010;
        font-size: .68rem;
    }

    /* The slide-in drawer */
    .nav-menu {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 3;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: min(86vw, 380px);
        height: 100vh;
        height: 100dvh;
        padding: 0 0 env(safe-area-inset-bottom, 0px);
        overflow-y: auto;
        overscroll-behavior: contain;
        background: linear-gradient(180deg, #151a17 0%, #0d0e0d 100%);
        border-right: 1px solid var(--border-color);
        box-shadow: 20px 0 60px rgba(0, 0, 0, .55);
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform .35s cubic-bezier(.22, 1, .36, 1), visibility .35s ease;
    }

    .nav-menu.active {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        padding: 1rem 1.25rem 1rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-drawer-brand {
        font-size: 1.15rem;
        font-weight: 800;
        letter-spacing: .14em;
        text-transform: uppercase;
        background: var(--gradient);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .nav-drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border: 1px solid var(--border-color);
        border-radius: 50%;
        background: var(--light-bg);
        color: var(--text-primary);
        font-size: 1.1rem;
    }

    .nav-drawer-close:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }

    .nav-menu .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1.2rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, .07);
        color: var(--text-primary);
        font-size: .95rem;
        font-weight: 700;
        letter-spacing: .16em;
        text-transform: uppercase;
    }

    .nav-menu .nav-link::after {
        content: "\f054";
        font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
        font-weight: 900;
        font-size: .7rem;
        color: var(--text-secondary);
    }

    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        background: rgba(29, 185, 84, .06);
        color: var(--primary-color);
    }

    .nav-menu .nav-link.active {
        box-shadow: inset 3px 0 0 var(--primary-color);
    }

    .nav-menu .nav-link:hover::after,
    .nav-menu .nav-link.active::after {
        color: var(--primary-color);
    }

    .nav-drawer-sub {
        display: flex;
        flex-direction: column;
        padding: 1.1rem 1.5rem .4rem;
    }

    .nav-drawer-sub a {
        padding: .6rem 0;
        color: var(--text-secondary);
        font-size: .95rem;
        font-weight: 600;
    }

    .nav-drawer-sub a:hover {
        color: var(--primary-color);
    }

    .nav-drawer-foot {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: auto;
        padding: 1.4rem 1.5rem 1.6rem;
    }

    .nav-drawer-cart {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .6rem;
        width: 100%;
        min-height: 50px;
        padding: .8rem 1rem;
        border-radius: 50px;
        background: var(--gradient);
        color: #fff;
        font-size: .95rem;
        font-weight: 800;
        box-shadow: 0 6px 20px rgba(29, 185, 84, .2);
    }

    .nav-drawer-foot p {
        color: #8a8f8b;
        font-size: .8rem;
        letter-spacing: .02em;
        text-align: center;
    }

    /* Dimmed backdrop behind the drawer (lives inside the navbar) */
    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 2;
        background: rgba(0, 0, 0, .72);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s ease, visibility .3s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}
