/* ==========================================================================
   CODEX AUDIOWORKS — Audio Storefront & Player Styles
   ========================================================================== */

/* Sub-Navigation for /audio */
.audio-subnav {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 0;
}

.audio-subnav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    overflow-x: auto;
}

.audio-subnav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    white-space: nowrap;
}

.audio-subnav-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.audio-subnav-link:hover, .audio-subnav-link.active {
    color: var(--accent-cyan);
}

/* Audio Product Card Grid */
.plugin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2.5rem 0;
    align-items: stretch;
}

.plugin-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.plugin-card:hover {
    border-color: var(--border-active);
    transform: translateY(-4px);
    box-shadow: var(--shadow-cyan);
}

.plugin-card-artwork {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    background: linear-gradient(135deg, #0e121d 0%, #1a2236 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1.75rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    overflow: hidden;
    box-sizing: border-box;
}

.plugin-card-artwork::before {
    content: "";
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at center, rgba(0, 229, 255, 0.12) 0%, transparent 65%);
    pointer-events: none;
}

.plugin-art-title {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.85);
    text-align: center;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plugin-card-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.plugin-card-status-badge .badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.plugin-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    box-sizing: border-box;
}

.plugin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.plugin-card-header .badge-outline {
    font-size: 0.65rem;
    color: var(--accent-cyan);
    border-color: rgba(0, 229, 255, 0.3);
}

.plugin-version-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.plugin-tagline {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-secondary);
    min-height: 4.65em; /* 3 lines baseline consistency */
    margin: 0 0 1.25rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.plugin-formats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 1.85rem;
    margin-bottom: 1.5rem;
}

.format-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    background: var(--bg-highlight);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    white-space: nowrap;
}

.plugin-card-footer {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.stage-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.2rem;
}

.stage-value {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

.plugin-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 2.6rem;
}

.price-regular {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.price-strikethrough {
    font-size: 0.85rem;
    text-decoration: line-through;
    color: var(--text-muted);
}

.price-sale {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

/* ==========================================================================
   Interactive Waveform Audio Player
   ========================================================================== */
.audio-player-widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-subtle);
}

.audio-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.audio-track-info {
    display: flex;
    flex-direction: column;
}

.audio-track-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.audio-track-spec {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.player-controls-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.btn-play {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--accent-cyan);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.btn-play:hover {
    transform: scale(1.05);
    background: #4ef0ff;
}

.waveform-canvas-container {
    flex: 1;
    height: 48px;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.waveform-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.waveform-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(0, 229, 255, 0.2);
    border-right: 2px solid var(--accent-cyan);
    pointer-events: none;
}

.ab-switch-group {
    display: flex;
    background: var(--bg-base);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 2px;
}

.ab-btn {
    padding: 0.35rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.ab-btn.active {
    background: var(--accent-cyan);
    color: var(--text-inverse);
}

/* ==========================================================================
   Product Detail Show Layout
   ========================================================================== */
.product-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    margin: 1rem 0 0;
    align-items: start;
}

.product-media-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.product-main-view {
    height: 380px;
    background: linear-gradient(135deg, #0d111a 0%, #171f30 100%);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-elevated);
}

.product-specs-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.spec-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
}

.spec-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.spec-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==========================================================================
   Cart & Checkout Layouts
   ========================================================================== */
.cart-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    margin: 2.5rem 0;
    align-items: start;
}

.cart-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-subtle);
    gap: 1.5rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.cart-summary-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    position: sticky;
    top: 90px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.summary-row-total {
    border-top: 1px solid var(--border-medium);
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

@media (max-width: 992px) {
    .product-hero-grid, .cart-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin: 0.5rem 0 0;
    }
}

@media (max-width: 768px) {
    .plugin-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
        gap: 1.5rem;
    }

    .plugin-card-artwork {
        height: 190px;
        min-height: 190px;
        max-height: 190px;
        padding: 2.5rem 1.25rem 1.25rem;
    }

    .plugin-art-title {
        font-size: clamp(1.15rem, 3.2vw, 1.45rem);
    }

    .product-main-view {
        height: 240px;
        border-radius: var(--radius-lg);
    }

    .product-specs-list {
        grid-template-columns: 1fr;
    }

    .cart-item-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .cart-summary-box {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .plugin-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .plugin-card-artwork {
        height: 180px;
        min-height: 180px;
        max-height: 180px;
        padding: 2.25rem 1rem 1rem;
    }

    .plugin-art-title {
        font-size: clamp(1.1rem, 4.5vw, 1.35rem);
    }

    .product-main-view {
        height: 200px;
    }

    .plugin-card-body {
        padding: 1.25rem;
    }

    .plugin-tagline {
        min-height: auto;
    }

    .plugin-card-footer {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

/* ==========================================================================
   Anti-Spam Decoy Traps
   ========================================================================== */
.cdx-hp-container,
.cdx-hp-group {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    padding: 0 !important;
    margin: -1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
