/* =============================================================================
   products.css  —  PatronHubDevs Product Listing
   Design system: extends style.css tokens + projects.html patterns
   Tokens used:   --neon-green, --dark-card, --dark-border, --text-muted,
                  --text-light, --radius-lg, --space-xl, --transition-base
   Fonts:         Rajdhani (headings), Roboto Mono (mono/meta)
   Cards:         project-card-large pattern (horizontal, image-left)
   Buttons:       btn-glow / btn-outline-glow from style.css
   ============================================================================= */


/* ─────────────────────────────────────────────────────────────────────────────
   1. PAGE HEADER  (extends .page-header from style.css)
   ───────────────────────────────────────────────────────────────────────────── */

.products-page-header {
    padding-top: 100px;
    border-bottom: 1px solid var(--dark-border);
}

/* Eyebrow label — matches about.html / detail.html mono eyebrow pattern */
.products-eyebrow {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--neon-green);
    opacity: 0.85;
    margin-bottom: 0.75rem;
}

/* Trust badges — bg-dark / border-success pattern from projects.html */
.products-trust-badge {
    display: inline-flex;
    align-items: center;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.73rem;
    color: var(--text-muted);
    transition: border-color var(--transition-base), color var(--transition-base);
}

.products-trust-badge:hover {
    border-color: rgba(57, 255, 20, 0.3);
    color: var(--text-light);
}


/* ─────────────────────────────────────────────────────────────────────────────
   2. FILTER BAR  (uses .filter-pill from style.css)
   ───────────────────────────────────────────────────────────────────────────── */

.products-filter-bar {
    border-bottom: 1px solid var(--dark-border);
    padding: 0.85rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.products-filter-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.products-filter-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-right: 0.25rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.products-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex: 1;
}

.products-filter-count {
    opacity: 0.5;
    font-size: 0.68rem;
}

.products-filter-status {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-left: auto;
}

/* Available pill — subtle green tint when active */
.products-filter-pill-available.active {
    border-color: var(--neon-green);
    color: var(--neon-green);
    background: rgba(57, 255, 20, 0.06);
}

/* Coming-soon pill — subtle amber tint when active */
.products-filter-pill-soon.active {
    border-color: #ffc107;
    color: #ffc107;
    background: rgba(255, 193, 7, 0.06);
}


/* ─────────────────────────────────────────────────────────────────────────────
   3. SECTION DIVIDERS  (same rhythm as projects.html h5 divider row)
   ───────────────────────────────────────────────────────────────────────────── */

.products-section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.products-section-title {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--neon-green);
    white-space: nowrap;
    font-weight: 600;
}

.products-section-rule {
    flex: 1;
    height: 1px;
    background: var(--dark-border);
}

.products-section-subtitle {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.products-section-subtitle--dev {
    color: rgba(136, 136, 136, 0.7);
}


/* ─────────────────────────────────────────────────────────────────────────────
   4. PRODUCT CARD  (extends .project-card-large + .project-image-large)
      All card chrome comes from style.css — we only add product-specific mods
   ───────────────────────────────────────────────────────────────────────────── */

/* Featured: first card gets a neon-green left accent + subtle background lift */
.products-hcard--featured {
    border-color: rgba(57, 255, 20, 0.25) !important;
    background: linear-gradient(135deg,
        rgba(57, 255, 20, 0.025) 0%,
        var(--dark-card) 40%);
    position: relative;
}

.products-hcard--featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--neon-green);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    opacity: 0.7;
    z-index: 1;
}

/* In-development card — muted, desaturated treatment */
.products-hcard--dev {
    opacity: 0.82;
    border-color: rgba(255, 255, 255, 0.07) !important;
}

.products-hcard--dev:hover {
    opacity: 1;
    border-color: rgba(255, 193, 7, 0.3) !important;
    box-shadow: 0 10px 40px rgba(255, 193, 7, 0.06) !important;
}


/* ─────────────────────────────────────────────────────────────────────────────
   5. IMAGE PANEL  (inside project-image-large)
   ───────────────────────────────────────────────────────────────────────────── */

/* Overlay must sit above the image */
.project-overlay-large { z-index: 10; }

/* Image col — zero padding, flex so child image panel stretches full height */
.products-img-col {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column;
}

/* Fill panel — covers full left column height */
.products-img-fill {
    min-height: 100% !important;
    max-height: 100% !important;
    height: 100% !important;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    background: #0d0d0d;
}

/* Cover image — fills the panel completely, no letterbox */
.products-img-fill img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center;
    filter: none;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.products-hcard:hover .products-img-fill img {
    transform: scale(1.04);
    filter: brightness(1.08);
}

/* Dark gradient vignette — fades bottom + right into card background */
.products-img-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        /* right edge fade into card bg */
        linear-gradient(to right,  transparent 55%, rgba(13,13,13,0.65) 100%),
        /* bottom fade */
        linear-gradient(to bottom, transparent 50%, rgba(13,13,13,0.55) 100%),
        /* subtle overall darkening so image doesn't overpower dark theme */
        rgba(0, 0, 0, 0.12);
    pointer-events: none;
    z-index: 1;
}

/* Badges sit above the vignette */
.products-img-fill .project-overlay-large {
    z-index: 12;
}

.products-img-panel--dev {
    background: #0d0d0d;
}

/* Dev overlay — lock indicator */
.products-dev-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(2px);
    z-index: 3;
    pointer-events: none;
}

.products-dev-overlay span {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--dark-border);
    padding: 0.35rem 0.9rem;
    border-radius: 2rem;
    background: rgba(18, 18, 18, 0.92);
}


/* ─────────────────────────────────────────────────────────────────────────────
   6. BADGES (inside .project-overlay-large)
   ───────────────────────────────────────────────────────────────────────────── */

.products-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

/* Base pill — rounded, mono, small */
.products-badge-pill {
    display: inline-flex;
    align-items: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.22rem 0.65rem;
    border-radius: 2rem;
    line-height: 1;
    backdrop-filter: blur(6px);
}

/* Category — neon green */
.products-badge-pill--category {
    background: rgba(57, 255, 20, 0.12);
    border: 1px solid rgba(57, 255, 20, 0.5);
    color: var(--neon-green);
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.2);
}

/* Active / Available — bright green glow */
.products-badge-pill--active {
    background: rgba(57, 255, 20, 0.08);
    border: 1px solid rgba(57, 255, 20, 0.35);
    color: var(--neon-green);
}

/* Coming soon / In dev — amber */
.products-badge-pill--soon {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #ffc107;
}

/* Dev category — muted */
.products-badge-pill--dev {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
}

/* Special (Flagship / badge_label) — rose/pink accent */
.products-badge-pill--special {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: #f43f5e;
}

/* Featured badge — neon glow pill */
.products-featured-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(57, 255, 20, 0.12);
    border: 1px solid rgba(57, 255, 20, 0.55);
    color: var(--neon-green);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.22rem 0.6rem;
    border-radius: 2rem;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.25);
}

/* Dev card tech badge — reduced opacity */
.products-badge--dev {
    opacity: 0.6;
}


/* ─────────────────────────────────────────────────────────────────────────────
   7. CARD BODY  (inside .project-content-large)
   ───────────────────────────────────────────────────────────────────────────── */

.products-card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Dev body — slight opacity reduction on non-essential elements */
.products-card-body--dev h3 {
    opacity: 0.8;
}

/* Eyebrow — same mono pattern as detail.html / about.html */
.products-card-eyebrow {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--neon-green);
    opacity: 0.75;
    margin-bottom: 0.4rem;
}

.products-card-eyebrow--dev {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Tagline — glowing neon green italic, matches reference exactly */
.products-card-tagline {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    font-style: italic;
    color: var(--neon-green);
    text-shadow:
        0 0 8px rgba(57, 255, 20, 0.9),
        0 0 20px rgba(57, 255, 20, 0.5),
        0 0 40px rgba(57, 255, 20, 0.2);
    letter-spacing: 0.03em;
}

/* Tagline — dev variant is muted amber */
.products-tagline--dev {
    color: #a08040 !important;
    text-shadow: none !important;
}

/* Description — 3-line clamp for visual consistency across cards */
.products-card-desc {
    font-size: 0.88rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Features label */
.products-features-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

/* Glowing checklist — solid filled circle icons with neon glow */
.products-glow-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.products-glow-checklist li {
    padding: 0.42rem 0;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.9rem;
    color: var(--text-light);
    border-bottom: 1px solid rgba(57, 255, 20, 0.06);
}

.products-glow-checklist li:last-child {
    border-bottom: none;
}

/* Solid filled green circle with inner checkmark + multi-layer glow */
.products-glow-checklist li i {
    font-size: 1.15rem;
    flex-shrink: 0;
    /* Force solid variant (fa-check-circle solid = filled circle) */
    font-family: 'Font Awesome 5 Free' !important;
    font-weight: 900 !important;
    color: var(--neon-green);
    filter:
        drop-shadow(0 0 4px rgba(57, 255, 20, 1))
        drop-shadow(0 0 10px rgba(57, 255, 20, 0.7))
        drop-shadow(0 0 20px rgba(57, 255, 20, 0.4));
}

/* Dev variant — muted icons, no glow */
.products-glow-checklist--dev li i {
    color: rgba(136, 136, 136, 0.5);
    filter: none;
}


/* ─────────────────────────────────────────────────────────────────────────────
   8. CARD FOOTER  (price + CTA row)
   ───────────────────────────────────────────────────────────────────────────── */

.products-card-footer {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--dark-border);
    margin-top: auto;
}

.products-card-price-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.products-card-price {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.products-card-price--free {
    color: var(--neon-green);
}

.products-card-license {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Actions row — inherits .project-actions from style.css;
   we only override the Details button to be less prominent */
.products-actions .products-btn-details {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border-width: 1px;
    opacity: 0.75;
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.products-actions .products-btn-details:hover {
    opacity: 1;
}

/* Coming-soon disabled button */
.products-btn-coming-soon {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    border-color: var(--dark-border) !important;
    color: var(--text-muted) !important;
}


/* ─────────────────────────────────────────────────────────────────────────────
   9. EMPTY STATE
   ───────────────────────────────────────────────────────────────────────────── */

.products-empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    max-width: 480px;
    margin: 0 auto;
}

.products-empty-icon {
    font-size: 2.8rem;
    color: var(--dark-border);
    display: block;
    margin-bottom: 1.25rem;
}


/* ─────────────────────────────────────────────────────────────────────────────
   10. DETAIL PAGE HERO  (products/detail.html)
   ───────────────────────────────────────────────────────────────────────────── */

.product-hero {
    background: linear-gradient(135deg, #0d0d0d 0%, #151515 100%);
    border-bottom: 1px solid var(--dark-border);
    padding: 5rem 0 3rem;
}

/* Framed container — keeps image from dominating its col-lg-4 column */
.product-hero-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #111 0%, #1a1a1a 100%);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 100%;
    max-width: 420px;
    height: 320px;
    margin: 0 auto 1rem;
    transition: border-color var(--transition-base);
}

.product-hero-img-wrap:hover {
    border-color: rgba(57, 255, 20, 0.3);
}

.product-hero-img {
    max-width: 78%;
    max-height: 260px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(57, 255, 20, 0.15));
    transition: filter var(--transition-base), transform var(--transition-base);
}

.product-hero-img:hover {
    filter: drop-shadow(0 0 28px rgba(57, 255, 20, 0.28));
    transform: scale(1.04);
}

/* Detail buy box */
.detail-price-box {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: sticky;
    top: 5rem;
}

.detail-price-box .price-amount {
    font-family: 'Roboto Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.detail-price-box .price-amount.free { color: var(--neon-green); }
.detail-price-box .price-amount.paid { color: #fff; }

.detail-price-box .license-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Roboto Mono', monospace;
    margin-top: 0.25rem;
}

/* Detail buy button */
.btn-buy-lg {
    background: linear-gradient(135deg, #39ff14, #00cc0a);
    color: #000 !important;
    border: none;
    font-weight: 700;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    padding: 0.7rem 1.5rem;
    border-radius: 0.5rem;
    width: 100%;
    cursor: pointer;
    transition: opacity var(--transition-base);
    text-align: center;
    display: block;
    text-decoration: none;
}

.btn-buy-lg:hover { opacity: 0.9; color: #000 !important; }
.btn-buy-lg.coming-soon {
    background: #2a2a2a;
    color: var(--text-muted) !important;
    cursor: not-allowed;
}

/* Detail feature checklist */
.feature-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-checklist li {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--dark-border);
    font-size: 0.88rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: var(--text-light);
}

.feature-checklist li:last-child { border-bottom: none; }

.feature-checklist li i {
    color: var(--neon-green);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

/* Tech badge (detail page) */
.tech-badge {
    font-size: 0.72rem;
    font-family: 'Roboto Mono', monospace;
    padding: 0.25rem 0.6rem;
    border-radius: 0.3rem;
    border: 1px solid var(--dark-border);
    background: #0f0f0f;
    color: var(--text-muted);
    display: inline-block;
    margin: 0.15rem;
}

.detail-section-title {
    font-size: 0.75rem;
    font-family: 'Roboto Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--neon-green);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(57, 255, 20, 0.15);
}

.system-req {
    font-size: 0.8rem;
    font-family: 'Roboto Mono', monospace;
    color: var(--text-muted);
    background: #0f0f0f;
    border: 1px solid var(--dark-border);
    border-radius: 0.4rem;
    padding: 0.75rem 1rem;
}

.related-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: border-color var(--transition-base);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.related-card:hover {
    border-color: rgba(57, 255, 20, 0.4);
    text-decoration: none;
}

.related-card img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.related-card-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.1rem;
}

.related-card-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Roboto Mono', monospace;
}


/* ─────────────────────────────────────────────────────────────────────────────
   11. RESPONSIVE
   ───────────────────────────────────────────────────────────────────────────── */

/* Tablet (≤ 992px) */
@media (max-width: 992px) {
    .products-filter-inner {
        gap: 0.4rem;
    }

    .products-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .project-image-large {
        min-height: 260px;
    }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
    .products-page-header { padding-top: 80px; }

    .products-filter-bar { position: static; }
    .products-filter-inner { gap: 0.4rem; }
    .products-filter-status { margin-left: 0; }

    .project-image-large {
        min-height: 220px;
        max-height: 260px;
    }

    /* Cover image stacks above content on mobile — needs explicit height */
    .products-img-fill {
        min-height: 260px !important;
        max-height: 260px !important;
        height: 260px !important;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    }

    /* img is absolute/inset — still works, just constrained by parent height */
    .products-img-fill img {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .products-hcard--featured::before { display: none; }

    .project-content-large { padding: 1.25rem; }

    .products-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .products-actions {
        width: 100%;
    }

    .products-actions .btn {
        width: 100%;
        justify-content: center;
        margin-right: 0 !important;
    }

    .detail-price-box { position: static; margin-top: 2rem; }

    .product-hero-img-wrap {
        max-width: 100%;
        height: 240px;
    }

    .product-hero-img {
        max-height: 180px;
    }
}

/* Very small screens (≤ 480px) */
@media (max-width: 480px) {
    .products-trust-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.65rem;
    }

    .products-card-price {
        font-size: 1.1rem;
    }
}