/* =========================================================
   N-FLUX PRODUCTS
========================================================= */

.products-section {

    position: relative;

    padding:
        var(--section-space-lg)
        0;

    overflow: hidden;

    background: var(--surface-soft);

}


/* =========================================================
   DARK MODE
========================================================= */

[data-theme="dark"] .products-section {

    background:
        linear-gradient(
            180deg,
            var(--bg),
            var(--surface)
        );

}


/* =========================================================
   SECTION HEADER
========================================================= */

.products-header {

    max-width: 720px;

    margin:
        0 auto 35px;

    text-align: center;

}


.products-header .section-eyebrow {

    justify-content: center;

}


.products-header .section-heading {

    margin-bottom: 12px;

}


.products-description {

    max-width: 620px;

    margin:
        0 auto;

    color: var(--text-muted);

    font-size: .92rem;

    line-height: 1.75;

}


/* =========================================================
   FILTER
========================================================= */

.products-filter {

    display: flex;

    justify-content: center;

    align-items: center;

    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 30px;

}


.products-filter-btn {

    min-height: 40px;

    padding:
        8px 16px;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-pill);

    background: var(--surface);

    color: var(--text-muted);

    font-family: inherit;

    font-size: .72rem;

    font-weight: 800;

    cursor: pointer;

    transition:
        color var(--transition-fast),
        background var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast);

}


.products-filter-btn:hover {

    color: var(--primary);

    border-color:
        rgba(11,59,130,.18);

    transform:
        translateY(-1px);

}


.products-filter-btn.active {

    background: var(--primary);

    border-color: var(--primary);

    color: #fff;

    box-shadow:
        0 6px 18px
        rgba(11,59,130,.16);

}


/* =========================================================
   PRODUCT GRID
========================================================= */

.products-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 15px;

}


/* =========================================================
   PRODUCT CARD
========================================================= */

.product-card {

    position: relative;

    display: flex;

    flex-direction: column;

    min-width: 0;

    overflow: hidden;

    background: var(--surface);

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-lg);

    box-shadow:
        var(--shadow-sm);

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);

}


.product-card:hover {

    transform:
        translateY(-6px);

    box-shadow:
        var(--shadow-md);

    border-color:
        rgba(22,141,226,.18);

}


/* =========================================================
   PRODUCT IMAGE AREA
========================================================= */

.product-image-wrap {

    position: relative;

    min-height: 245px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 25px;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            var(--primary-light),
            transparent
        );

}


.product-image-wrap::before {

    content: "";

    position: absolute;

    width: 190px;

    height: 190px;

    border-radius: 50%;

    background:
        rgba(22,141,226,.07);

    filter: blur(5px);

    transition:
        transform var(--transition),
        opacity var(--transition);

}


.product-card:hover
.product-image-wrap::before {

    transform: scale(1.18);

}


.product-image {

    position: relative;

    z-index: 2;

    width: 100%;

    height: 210px;

    object-fit: contain;

    filter:
        drop-shadow(
            0 15px 20px
            rgba(11,59,130,.13)
        );

    transition:
        transform var(--transition);

}


.product-card:hover
.product-image {

    transform:
        scale(1.055)
        translateY(-3px);

}


/* =========================================================
   BADGE
========================================================= */

.product-badge {

    position: absolute;

    top: 13px;

    left: 13px;

    z-index: 4;

    display: inline-flex;

    align-items: center;

    gap: 5px;

    padding:
        6px 9px;

    border-radius:
        var(--radius-pill);

    background:
        rgba(255,255,255,.86);

    border:
        1px solid
        rgba(255,255,255,.75);

    color: var(--primary);

    font-size: .7rem;

    font-weight: 800;

    backdrop-filter:
        blur(10px);

    -webkit-backdrop-filter:
        blur(10px);

}


[data-theme="dark"]
.product-badge {

    background:
        rgba(13,27,45,.86);

    border-color:
        var(--border);

}


/* =========================================================
   PRODUCT BODY
========================================================= */

.product-body {

    display: flex;

    flex-direction: column;

    flex: 1;

    padding:
        19px;

}


.product-category {

    display: block;

    margin-bottom: 6px;

    color: var(--accent);

    font-size: .8rem;

    font-weight: 800;

    letter-spacing: .08em;

    text-transform: uppercase;

}


.product-title {

    margin:
        0 0 8px;

    color: var(--text);

    font-size: 1.05rem;

    font-weight: 800;

    line-height: 1.25;

    letter-spacing: -.025em;

}


.product-description {

    margin:
        0 0 17px;

    color: var(--text-muted);

    font-size: .72rem;

    line-height: 1.65;

}


/* =========================================================
   PRODUCT FEATURES
========================================================= */

.product-features {

    display: flex;

    flex-direction: column;

    gap: 7px;

    margin-bottom: 18px;

}


.product-feature {

    display: flex;

    align-items: center;

    gap: 7px;

    color: var(--text-soft);

    font-size: .8rem;

    font-weight: 700;

}


.product-feature i {

    color: var(--accent);

    font-size: .72rem;

}


/* =========================================================
   PRODUCT FOOTER
========================================================= */

.product-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-top: auto;

    padding-top: 14px;

    border-top:
        1px solid var(--border);

}


.product-link {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    color: var(--primary);

    font-size: .8rem;

    font-weight: 800;

    transition:
        gap var(--transition-fast),
        color var(--transition-fast);

}


.product-link:hover {

    gap: 9px;

    color: var(--secondary);

}


.product-enquire {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 34px;

    height: 34px;

    border-radius: 11px;

    background: var(--primary-light);

    color: var(--primary);

    transition:
        transform var(--transition-fast),
        background var(--transition-fast),
        color var(--transition-fast);

}


.product-enquire:hover {

    transform:
        translateY(-2px);

    background: var(--primary);

    color: #fff;

}


/* =========================================================
   HIDDEN FILTER STATE
========================================================= */

.product-card.is-hidden {

    display: none;

}


/* =========================================================
   VIEW ALL
========================================================= */

.products-view-all {

    display: flex;

    justify-content: center;

    margin-top: 28px;

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {

    .products-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .products-section {

        padding:
            var(--section-space)
            0;

    }


    .products-header {

        margin-bottom: 24px;

    }


    .products-header .section-heading {

        font-size:
            clamp(
                2rem,
                9vw,
                2.7rem
            );

    }


    .products-description {

        font-size: .84rem;

        line-height: 1.7;

    }


    /* Filter becomes horizontal scroll */

    .products-filter {

        justify-content: flex-start;

        flex-wrap: nowrap;

        overflow-x: auto;

        margin:
            0 -15px 20px;

        padding:
            3px 15px 8px;

        scrollbar-width: none;

    }


    .products-filter::-webkit-scrollbar {

        display: none;

    }


    .products-filter-btn {

        flex: 0 0 auto;

        min-height: 37px;

        padding-inline: 14px;

        font-size: .8rem;

    }


    /* Horizontal product slider */

    .products-grid {

        display: flex;

        overflow-x: auto;

        scroll-snap-type: x mandatory;

        gap: 12px;

        margin:
            0 -15px;

        padding:
            3px 15px 15px;

        scrollbar-width: none;

    }


    .products-grid::-webkit-scrollbar {

        display: none;

    }


    .product-card {

        flex:
            0 0 82%;

        scroll-snap-align: start;

    }


    .product-card:hover {

        transform: none;

    }


    .product-image-wrap {

        min-height: 220px;

    }


    .product-image {

        height: 185px;

    }


    .product-body {

        padding: 16px;

    }


    .product-title {

        font-size: .96rem;

    }


    .product-description {

        font-size: .69rem;

    }


    .products-view-all {

        margin-top: 15px;

    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .product-card {

        flex-basis: 88%;

    }


    .product-image-wrap {

        min-height: 205px;

    }


    .product-image {

        height: 170px;

    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .product-card,
    .product-image,
    .product-image-wrap::before,
    .product-link,
    .product-enquire {

        transition: none;

    }

}