/* Plugin Pusher — product catalog (mockup-aligned) */

@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0');

:root {
    --catalog-bg: #0a0a0c;
    --catalog-surface: #141418;
    --catalog-border: rgba(255, 255, 255, 0.08);
    --catalog-purple: #8b5cf6;
    --catalog-purple-dim: rgba(139, 92, 246, 0.15);
    --catalog-text: #f4f4f5;
    --catalog-muted: rgba(244, 244, 245, 0.55);
    --catalog-radius: 16px;
    --catalog-radius-pill: 999px;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 1.25rem;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

body.page-catalog {
    background: var(--catalog-bg) !important;
    -webkit-text-size-adjust: 100%;
}

.catalog-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px calc(80px + env(safe-area-inset-bottom, 0px));
}

/* ── Hero ── */
.catalog-hero {
    text-align: center;
    padding: 48px 0 8px;
    position: relative;
}

.catalog-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: min(900px, 100%);
    height: 320px;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.catalog-platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin-bottom: 28px;
    border-radius: var(--catalog-radius-pill);
    border: 1px solid var(--catalog-border);
    background: rgba(20, 20, 24, 0.8);
    color: var(--catalog-muted);
    font-size: 13px;
    font-weight: 500;
}

.catalog-platform-badge .material-symbols-outlined {
    font-size: 1.1rem;
    color: var(--catalog-purple);
}

.catalog-hero__title {
    font-family: 'Outfit', 'Poppins', sans-serif;
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--catalog-text);
    margin: 0 0 16px;
}

.catalog-hero__title .gradient {
    background: linear-gradient(90deg, #a78bfa 0%, #c084fc 40%, #f472b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.catalog-hero__lead {
    max-width: 560px;
    margin: 0 auto 32px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--catalog-muted);
}

/* Stats row */
.catalog-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.catalog-stat {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: var(--catalog-radius-pill);
    border: 1px solid var(--catalog-border);
    background: rgba(20, 20, 24, 0.65);
    backdrop-filter: blur(8px);
    font-size: 14px;
    font-weight: 600;
    color: var(--catalog-text);
}

.catalog-stat .material-symbols-outlined {
    font-size: 1.15rem;
    color: var(--catalog-purple);
}

.catalog-stat__value {
    color: var(--catalog-purple);
}

/* Search */
.catalog-search {
    max-width: 640px;
    margin: 0 auto 20px;
    position: relative;
}

.catalog-search__input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    border-radius: var(--catalog-radius-pill);
    border: 1px solid var(--catalog-border);
    background: rgba(20, 20, 24, 0.85);
    color: var(--catalog-text);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.catalog-search__input::placeholder {
    color: rgba(244, 244, 245, 0.35);
}

.catalog-search__input:focus {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.catalog-search__icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(244, 244, 245, 0.4);
    pointer-events: none;
}

.catalog-search:focus-within .catalog-search__icon {
    color: var(--catalog-purple);
}

/* Filters */
.catalog-toolbar {
    margin-bottom: 8px;
}

.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 12px;
}

.catalog-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    min-height: 44px;
    border-radius: var(--catalog-radius-pill);
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: rgba(20, 20, 24, 0.7);
    color: var(--catalog-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.catalog-filter .material-symbols-outlined {
    font-size: 1.05rem;
    color: var(--catalog-purple);
}

.catalog-filter:hover {
    border-color: rgba(139, 92, 246, 0.55);
    color: var(--catalog-text);
}

.catalog-filter.is-active {
    background: var(--catalog-purple);
    border-color: var(--catalog-purple);
    color: #fff;
    box-shadow: 0 8px 28px rgba(139, 92, 246, 0.35);
}

.catalog-filter.is-active .material-symbols-outlined {
    color: #fff;
}

.catalog-result-count {
    text-align: center;
    font-size: 13px;
    color: rgba(244, 244, 245, 0.4);
    margin: 0 0 28px;
}

/* Section head */
.catalog-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-top: 8px;
}

.catalog-section-head h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--catalog-text);
    margin: 0;
    letter-spacing: -0.02em;
}

.catalog-section-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--catalog-purple);
    text-decoration: none;
    transition: opacity 0.2s;
}

.catalog-section-link:hover {
    opacity: 0.8;
}

/* Product grid */
.product-container.pp-catalog {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 0 24px;
}

.pp-product-card {
    background: var(--catalog-surface);
    border: 1px solid var(--catalog-border);
    border-radius: var(--catalog-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    opacity: 0;
    transform: translateY(10px);
}

.pp-product-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pp-product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.28);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(139, 92, 246, 0.08);
}

.pp-product-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #0d0d10;
    overflow: hidden;
}

.pp-product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.pp-product-card:hover .pp-product-card__media img {
    transform: scale(1.03);
}

.pp-product-card__ribbon {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
}

.pp-product-card__ribbon--vst {
    background: rgba(139, 92, 246, 0.92);
}

.pp-product-card__ribbon--effect {
    background: rgba(251, 146, 60, 0.95);
    color: #1a1a1a;
}

.pp-product-card__ribbon--software {
    background: rgba(56, 189, 248, 0.9);
    color: #0a0a0c;
}

.pp-product-card__ribbon--other {
    background: rgba(255, 255, 255, 0.25);
}

.pp-product-card__fav {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(10, 10, 12, 0.55);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.pp-product-card__fav .material-symbols-outlined {
    font-size: 1.15rem;
}

.pp-product-card__fav.is-active {
    background: rgba(139, 92, 246, 0.45);
    color: #f472b6;
}

.pp-product-card__fav.is-active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Reset legacy styles if windows.css is loaded elsewhere */
body.page-catalog .product-container.pp-catalog {
    display: grid !important;
    gap: 20px !important;
    padding: 0 0 24px !important;
    min-height: unset !important;
}

.pp-product-card__fav:hover {
    background: rgba(139, 92, 246, 0.35);
    color: #fff;
}

.pp-product-card__body {
    padding: 16px 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pp-product-card__brand {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(244, 244, 245, 0.4);
    margin: 0;
}

.pp-product-card__title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--catalog-text);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pp-product-card__desc {
    font-size: 12px;
    line-height: 1.5;
    color: var(--catalog-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pp-product-card__meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: rgba(244, 244, 245, 0.38);
    margin-top: 4px;
}

.pp-product-card__meta .material-symbols-outlined {
    font-size: 0.9rem;
}

.pp-product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 16px;
    gap: 10px;
}

.pp-product-card__prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.pp-product-card__price {
    font-size: 18px;
    font-weight: 800;
    color: var(--catalog-purple);
}

.pp-product-card__was {
    font-size: 13px;
    text-decoration: line-through;
    color: rgba(248, 113, 113, 0.85);
}

.pp-product-card__cart {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--catalog-purple);
    color: #fff;
    transition: transform 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.pp-product-card__cart:hover {
    transform: scale(1.05);
    background: #7c3aed;
}

.pp-product-card__cart .material-symbols-outlined {
    font-size: 1.2rem;
}

.catalog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 56px 24px;
    color: var(--catalog-muted);
}

.catalog-empty .material-symbols-outlined {
    font-size: 2.5rem;
    color: rgba(139, 92, 246, 0.35);
    display: block;
    margin-bottom: 12px;
}

.catalog-empty strong {
    display: block;
    color: var(--catalog-text);
    font-size: 17px;
    margin-bottom: 6px;
}

/* Floating cart */
.floating-cart-btn .material-symbols-outlined {
    font-size: 26px;
    line-height: 1;
}

.floating-cart-badge,
#floating-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    background: #f87171;
    color: #fff;
    border: 2px solid var(--catalog-bg);
}

.cart-notification .material-symbols-outlined {
    font-size: 1.25rem;
}

/* ── Mobile & tablet ── */
@media (max-width: 1100px) {
    .product-container.pp-catalog,
    body.page-catalog .product-container.pp-catalog {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 860px) {
    .product-container.pp-catalog,
    body.page-catalog .product-container.pp-catalog {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .catalog-hero {
        padding: 36px 0 8px;
    }

    .catalog-hero__lead {
        font-size: 14px;
        margin-bottom: 24px;
    }
}

@media (max-width: 640px) {
    .catalog-page {
        padding: 0 16px calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .catalog-hero {
        padding: 24px 0 4px;
        text-align: left;
    }

    .catalog-hero::before {
        top: -40px;
        height: 240px;
    }

    .catalog-platform-badge {
        font-size: 12px;
        padding: 7px 12px;
        margin-bottom: 20px;
        max-width: 100%;
        text-align: left;
        line-height: 1.4;
    }

    .catalog-hero__title {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
        text-align: left;
    }

    .catalog-hero__lead {
        margin-left: 0;
        margin-right: 0;
        text-align: left;
    }

    .catalog-stats {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 10px;
        margin-bottom: 24px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .catalog-stats::-webkit-scrollbar {
        display: none;
    }

    .catalog-stat {
        scroll-snap-align: start;
        padding: 10px 14px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .catalog-search {
        margin-bottom: 16px;
    }

    .catalog-search__input {
        padding: 14px 16px 14px 48px;
    }

    .catalog-search__icon {
        left: 16px;
    }

    .catalog-toolbar {
        margin-left: -16px;
        margin-right: -16px;
        padding: 0 16px;
    }

    .catalog-filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 8px;
        margin-bottom: 10px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .catalog-filters::-webkit-scrollbar {
        display: none;
    }

    .catalog-filter {
        scroll-snap-align: start;
        padding: 10px 16px;
        font-size: 13px;
    }

    .catalog-result-count {
        text-align: left;
        margin-bottom: 20px;
    }

    .catalog-section-head {
        margin-bottom: 16px;
    }

    .catalog-section-head h2 {
        font-size: 1.15rem;
    }

    .product-container.pp-catalog,
    body.page-catalog .product-container.pp-catalog {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .pp-product-card__body {
        padding: 14px 14px 10px;
    }

    .pp-product-card__footer {
        padding: 0 14px 14px;
    }

    .pp-product-card__title {
        font-size: 16px;
    }

    .pp-product-card__desc {
        font-size: 13px;
    }

    .pp-product-card__price {
        font-size: 20px;
    }

    body.page-catalog .floating-cart-btn {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        right: calc(16px + env(safe-area-inset-right, 0px));
        width: 56px;
        height: 56px;
    }

    body.page-catalog .cart-notification {
        top: calc(12px + env(safe-area-inset-top, 0px));
        left: 16px;
        right: 16px;
        max-width: none;
        transform: translateY(calc(-120% - env(safe-area-inset-top, 0px)));
    }

    body.page-catalog .cart-notification.show {
        transform: translateY(0);
    }

    body.page-catalog footer {
        margin-top: 40px;
        padding: 28px 16px calc(28px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 380px) {
    .catalog-filter {
        padding: 10px 12px;
        gap: 6px;
    }

    .catalog-filter span:not(.material-symbols-outlined) {
        max-width: 72px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (hover: none) {
    .pp-product-card:hover {
        transform: none;
        box-shadow: none;
    }

    .pp-product-card:hover .pp-product-card__media img {
        transform: none;
    }

    .pp-product-card:active {
        opacity: 0.92;
    }
}
