/* ============================================================
   assets-page.css — All Assets Listing Page
   Devs On Budget
   ============================================================ */

/* ── Page Hero ───────────────────────────────────────────────── */
.ap-hero {
    background: var(--dark);
    padding: 56px 0 48px;
    position: relative;
    overflow: hidden;
}

.ap-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(255, 107, 0, .18), transparent 60%);
    pointer-events: none;
}

.aph-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.aph-title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 900;
    color: var(--white);
    letter-spacing: -.04em;
    line-height: 1.1;
    margin: 10px 0 10px;
}

.aph-sub {
    font-size: 1rem;
    color: rgba(255, 255, 255, .6);
    line-height: 1.65;
    max-width: 460px;
}

.aph-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius-lg);
    padding: 14px 24px;
    flex-shrink: 0;
}

.aphs-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.aphs-num {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--white);
    letter-spacing: -.04em;
}

.aphs-lbl {
    font-size: .72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .45);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.aphs-sep {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, .15);
}

/* ── Body layout ─────────────────────────────────────────────── */
.ap-body {
    padding: 40px 0 100px;
}

.ap-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

/* ── Filter Sidebar ──────────────────────────────────────────── */
.filter-sidebar {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--border);
    overflow: hidden;
    position: sticky;
    top: 90px;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--border);
}

.filter-close {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--light);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    place-items: center;
}

.filter-header h3 {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: -.02em;
}

.filter-clear-all {
    font-size: .78rem;
    font-weight: 700;
    color: var(--gray);
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition);
}

.filter-clear-all:hover {
    color: var(--orange);
}

/* Active filter chips */
.active-filters {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
}

.af-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.af-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--orange-xl);
    color: var(--orange);
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--transition);
}

.af-chip:hover {
    background: #fde0cc;
}

.af-chip-x {
    font-size: .7rem;
}

/* Filter groups */
.filter-group {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.filter-group:last-child {
    border-bottom: none;
}

.fg-label {
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fg-val {
    font-size: .8rem;
    font-weight: 700;
    color: var(--orange);
    text-transform: none;
    letter-spacing: 0;
}

/* Search */
.fg-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    height: 40px;
    transition: border-color var(--transition);
}

.fg-search:focus-within {
    border-color: var(--orange);
}

.fg-search svg {
    color: var(--gray);
    flex-shrink: 0;
}

.fg-search input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: .88rem;
    color: var(--dark);
    background: transparent;
}

.fg-search input::placeholder {
    color: #b0b7c3;
}

/* Radio/checkbox options */
.fg-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fg-check {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    color: var(--gray);
    transition: background var(--transition), color var(--transition);
    user-select: none;
}

.fg-check:hover {
    background: var(--cream);
    color: var(--dark);
}

.fg-check input[type=radio],
.fg-check input[type=checkbox] {
    accent-color: var(--orange);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}

/* Active radio highlight */
.active-check {
    color: var(--orange);
    font-weight: 700;
}

/* Toggle badges */
.tgl-badge {
    font-size: .65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
}

.tgl-green {
    background: #dcfce7;
    color: #16a34a;
}

.tgl-orange {
    background: var(--orange-xl);
    color: var(--orange);
}

.tgl-star {
    background: #fef9c3;
    color: #b45309;
}

.tgl-blue {
    background: #dbeafe;
    color: #2563eb;
}

/* Price slider */
.fg-slider-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fg-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--orange) 0%, var(--orange) 100%);
    border-radius: 999px;
    cursor: pointer;
    outline: none;
}

.fg-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--orange);
    border: 2px solid var(--white);
    box-shadow: 0 2px 8px rgba(255, 107, 0, .4);
    cursor: pointer;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: .72rem;
    color: var(--gray);
    font-weight: 600;
}

/* Today's deal sidebar banner */
.sidebar-deal-card {
    margin: 0 18px 18px;
    background: linear-gradient(135deg, var(--orange), var(--orange-d));
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--white);
}

.sdc-icon {
    font-size: 1.5rem;
}

.sdc-title {
    font-size: .9rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.sdc-sub {
    font-size: .78rem;
    opacity: .9;
    line-height: 1.5;
}

/* ── Results Toolbar ─────────────────────────────────────────── */
.results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 12px;
}

.rt-count {
    font-size: .92rem;
    font-weight: 700;
    color: var(--gray);
}

.rt-count strong {
    color: var(--dark);
}

.rt-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rt-grid-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--cream);
    border: 1.5px solid var(--border);
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--gray);
    transition: all var(--transition);
}

.rt-grid-btn:hover,
.rt-grid-btn.active {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}

.rt-filter-mobile {
    display: none;
    align-items: center;
    gap: 7px;
    background: var(--dark);
    color: var(--white);
    font-size: .82rem;
    font-weight: 700;
    padding: 0 14px;
    height: 36px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

/* ── Assets Grid ─────────────────────────────────────────────── */
.assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.assets-grid.list-view {
    grid-template-columns: 1fr;
}

/* ── Asset Card ──────────────────────────────────────────────── */
.ap-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform .25s, box-shadow .25s, border-color .25s;
    display: flex;
    flex-direction: column;
}

.ap-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
    border-color: var(--orange);
}

/* Card image */
.apc-img {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--dark);
    flex-shrink: 0;
}

.apc-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.ap-card:hover .apc-img img {
    transform: scale(1.06);
}

.apc-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: .7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.apc-badge-orange {
    background: rgba(255, 107, 0, .9);
    color: var(--white);
}

.apc-badge-green {
    background: rgba(22, 163, 74, .9);
    color: var(--white);
}

.apc-badge-dark {
    background: rgba(15, 15, 15, .75);
    color: var(--white);
}

.apc-ver {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: .68rem;
    font-weight: 700;
    background: rgba(0, 0, 0, .65);
    color: var(--white);
    padding: 3px 9px;
    border-radius: 999px;
    backdrop-filter: blur(6px);
}

.apc-discount-ribbon {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to right, var(--orange), var(--orange-l));
    color: var(--white);
    font-size: .72rem;
    font-weight: 800;
    padding: 5px 12px;
    letter-spacing: .04em;
}

/* Card body */
.apc-body {
    padding: 18px 18px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.apc-cat {
    font-size: .72rem;
    font-weight: 700;
    color: var(--orange);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.apc-name {
    font-size: 1rem;
    font-weight: 900;
    color: var(--dark);
    letter-spacing: -.025em;
    line-height: 1.25;
}

.apc-desc {
    font-size: .8rem;
    color: var(--gray);
    line-height: 1.55;
    flex: 1;
}

.apc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.apc-tag {
    font-size: .68rem;
    font-weight: 600;
    background: var(--light);
    color: var(--gray);
    padding: 3px 9px;
    border-radius: 999px;
}

/* Card footer */
.apc-foot {
    padding: 12px 18px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.apc-prices {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-right: auto;
}

.apc-old {
    font-size: .78rem;
    color: var(--gray);
    text-decoration: line-through;
}

.apc-new {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--orange);
    letter-spacing: -.02em;
}

.apc-new.free {
    color: #16a34a;
}

.apc-btns {
    display: flex;
    gap: 7px;
}

.apc-btn-view {
    background: var(--dark);
    color: var(--white);
    font-size: .78rem;
    font-weight: 700;
    padding: 8px 13px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}

.apc-btn-view:hover {
    background: #333;
}

.apc-btn-cart {
    background: var(--orange);
    color: var(--white);
    font-size: .78rem;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background var(--transition);
}

.apc-btn-cart:hover {
    background: var(--orange-d);
}

/* ── LIST VIEW overrides ─────────────────────────────────────── */
.assets-grid.list-view .ap-card {
    flex-direction: row;
    border-radius: var(--radius-lg);
}

.assets-grid.list-view .apc-img {
    width: 220px;
    aspect-ratio: auto;
    flex-shrink: 0;
}

.assets-grid.list-view .apc-body {
    padding: 20px 18px;
}

.assets-grid.list-view .apc-foot {
    border-top: none;
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    flex-shrink: 0;
    width: 180px;
}

.assets-grid.list-view .apc-btns {
    flex-direction: column;
    width: 100%;
}

.assets-grid.list-view .apc-btn-view,
.assets-grid.list-view .apc-btn-cart {
    text-align: center;
    width: 100%;
}

/* ── No results ──────────────────────────────────────────────── */
.no-results {
    text-align: center;
    padding: 80px 24px;
    color: var(--gray);
}

.nr-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.no-results p {
    font-size: .9rem;
}

/* Active nav link */
.active-link {
    color: var(--orange) !important;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ap-layout {
        grid-template-columns: 240px 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .ap-body {
        padding: 24px 0 60px;
    }

    .ap-layout {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;
        overflow-y: auto;
        background: var(--white);
        border-radius: 0;
        border: none;
    }

    .filter-sidebar.mobile-open {
        display: block;
    }

    .filter-close {
        display: grid;
    }

    .rt-filter-mobile {
        display: flex;
    }

    .assets-grid {
        grid-template-columns: 1fr;
    }

    .assets-grid.list-view .ap-card {
        flex-direction: column;
    }

    .assets-grid.list-view .apc-img {
        width: 100%;
        aspect-ratio: 16/10;
    }

    .assets-grid.list-view .apc-foot {
        border-left: none;
        border-top: 1px solid var(--border);
        flex-direction: row;
        width: auto;
        align-items: center;
        padding: 18px;
    }

    .aph-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .aph-stats {
        width: 100%;
        justify-content: space-around;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .apc-btns {
        flex-direction: column;
        width: 100%;
    }

    .apc-btns>* {
        width: 100%;
        text-align: center;
    }

    .apc-foot {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .apc-prices {
        width: 100%;
        justify-content: space-between;
    }
}