/* ========================================
   WAVEFORM BAR DEMO
   ======================================== */

body {
    padding-bottom: 100px;
}

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

.bar-hero-badges {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.bar-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
}

.bar-hero-links {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.bar-hero-links a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.bar-hero-links a:hover {
    text-decoration: underline;
}

.bar-hero-links span {
    color: var(--text-muted);
    opacity: 0.3;
}

/* ========================================
   TABS
   ======================================== */

.bar-tabs {
    display: flex;
    gap: 0;
    margin: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.bar-tab {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: -1px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
}

.bar-tab i {
    font-size: 1rem;
}

.bar-tab:hover {
    color: var(--text);
}

.bar-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.bar-panel {
    display: none;
}

.bar-panel.active {
    display: block;
}

/* ========================================
   SECTIONS
   ======================================== */

.bar-section {
    margin-bottom: 2rem;
}

.bar-section h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bar-section > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.bar-section > p code {
    background: rgba(168, 85, 247, 0.1);
    color: var(--accent-light);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.8em;
}

/* ========================================
   STORE CARDS
   ======================================== */

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.store-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s;
    cursor: pointer;
}

.store-card:hover {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.store-card.wb-playing {
    border-color: var(--accent);
    background: rgba(168, 85, 247, 0.03);
}

/* Card artwork */
.store-art {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.store-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.store-card:hover .store-art img {
    transform: scale(1.05);
}

/* Play overlay */
.store-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.store-card:hover .store-play-overlay,
.store-card.wb-playing .store-play-overlay {
    opacity: 1;
}

.store-play-overlay .wb-icon-swap {
    width: 52px;
    height: 52px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    transition: transform 0.2s;
}

.store-play-overlay .wb-icon-swap:hover {
    transform: scale(1.1);
}

/* Play/pause icon toggle */
.store-play-overlay .wb-show-play {
    display: flex;
}

.store-play-overlay .wb-show-pause {
    display: none;
}

.wb-playing .store-play-overlay .wb-show-play {
    display: none;
}

.wb-playing .store-play-overlay .wb-show-pause {
    display: flex;
}

/* Card body */
.store-body {
    padding: 0.75rem 1rem 1rem;
}

.store-title-link {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s;
}

.store-title-link:hover {
    color: var(--accent);
}

.store-artist {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

/* Card meta tags */
.store-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.store-tag {
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.store-tag-bpm {
    color: var(--accent);
    background: rgba(168, 85, 247, 0.1);
}

.store-tag-key {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.store-price {
    font-weight: 700;
    font-size: 0.85rem;
    margin-left: auto;
}

/* Card action buttons */
.store-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.store-btn {
    padding: 0.3rem 0.6rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: inherit;
}

.store-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.store-btn-fav .wb-show-if-fav {
    color: #ef4444;
}

.store-btn-cart .wb-show-if-cart {
    color: #4ade80;
}

/* ========================================
   SAMPLE TABLE
   ======================================== */

.sample-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.sample-table th {
    text-align: left;
    padding: 0.65rem 0.5rem;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sample-table td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.sample-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.sample-table tbody tr:hover {
    background: rgba(168, 85, 247, 0.04);
}

.sample-table tbody tr.wb-playing {
    background: rgba(168, 85, 247, 0.08);
}

.sample-table tbody tr.wb-playing .sample-name {
    color: var(--accent);
    font-weight: 600;
}

.sample-artist {
    color: var(--text-muted);
}

.fav-cell {
    width: 20px;
}

.fav-indicator {
    opacity: 0.1;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: all 0.2s;
}

.wb-favorited .fav-indicator {
    opacity: 1;
    color: #ef4444;
}

/* ========================================
   DJ MIX
   ======================================== */

.mix-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.mix-card:hover {
    border-color: var(--accent);
}

.mix-art {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.mix-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mix-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.mix-subtitle {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.dj-tracklist {
    margin-top: 1.25rem;
}

.dj-tracklist h3 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dj-tracklist h3 i {
    color: var(--accent);
}

.dj-tracks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2rem;
}

.dj-track-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.75rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.dj-track-btn:hover {
    background: rgba(168, 85, 247, 0.06);
    border-color: rgba(168, 85, 247, 0.15);
    color: var(--text);
}

.dj-time {
    font-family: 'SF Mono', Monaco, monospace;
    color: var(--accent);
    font-size: 0.72rem;
    min-width: 2.5rem;
    flex-shrink: 0;
}

/* ========================================
   JS API
   ======================================== */

.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.6rem;
}

.api-btn {
    padding: 0.65rem 0.85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-family: inherit;
}

.api-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.api-btn i {
    font-size: 1rem;
    color: var(--accent);
}

/* ========================================
   INFO CARDS
   ======================================== */

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.info-card {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.info-card h3 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.info-card h3 i {
    color: var(--accent);
}

.info-card p {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.6;
}

.info-card a {
    color: var(--accent);
    text-decoration: none;
}

.info-card a:hover {
    text-decoration: underline;
}

.info-card code {
    background: rgba(168, 85, 247, 0.1);
    color: var(--accent-light);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.75em;
}

/* ========================================
   INSTALL CTA
   ======================================== */

.install-cta {
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.06), rgba(168, 85, 247, 0.02));
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 16px;
}

.install-cta h2 {
    margin-bottom: 1.25rem;
    font-size: 1.6rem;
}

/* ========================================
   PRODUCT PAGE
   ======================================== */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: gap 0.2s;
}

.back-link:hover {
    gap: 0.75rem;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.product-art {
    border-radius: 16px;
    overflow: hidden;
}

.product-art img {
    width: 100%;
    display: block;
}

.product-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.product-artist {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.product-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    margin-left: 0.5rem;
}

.product-desc {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.product-desc a {
    color: var(--accent);
    text-decoration: none;
}

.product-desc a:hover {
    text-decoration: underline;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.product-feature i {
    font-size: 1.5rem;
    color: var(--accent);
    flex-shrink: 0;
}

.product-feature strong {
    display: block;
    font-size: 0.9rem;
}

.product-feature span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

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

@media (max-width: 1024px) {
    .store-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .store-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dj-tracks {
        grid-template-columns: 1fr;
    }

    .api-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bar-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bar-tab {
        white-space: nowrap;
    }

    .mix-card {
        flex-direction: column;
        text-align: center;
    }

    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-actions {
        flex-direction: column;
    }

    .sample-table .sample-artist {
        display: none;
    }
}

@media (max-width: 480px) {
    .store-grid {
        grid-template-columns: 1fr;
    }
}