/* =========================================================
ICT / FPT Spare Parts

Purpose:
- Style the spare-parts catalogue.
- Style filters and category groups.
- Provide interactive spare-part cards.

Dependencies:
- spareparts.blade.php
========================================================= */


/* =========================================================
Spare Parts Section
========================================================= */

#ict-fpt-spare-parts {

    scroll-margin-top:
        100px;

}

.ict-fpt-spareparts {

    width: 100%;

    padding: 110px 0 120px;

    border-top: 1px solid
        rgba(255, 255, 255, 0.08);

}


.ict-fpt-spareparts-inner {

    width: min(
        1200px,
        calc(100% - 80px)
    );

    margin: 0 auto;

}


/* =========================================================
Heading
========================================================= */

.ict-fpt-spareparts-heading {

    max-width: 680px;

    margin-bottom: 55px;

}


.ict-fpt-spareparts-eyebrow {

    display: block;

    margin-bottom: 12px;

    font-size: 0.85rem;

    font-weight: 700;

    letter-spacing: 0.18em;

    text-transform: uppercase;

    opacity: 0.6;

}


.ict-fpt-spareparts-heading h2 {

    margin: 0 0 18px;

    font-size: clamp(
        2.2rem,
        4vw,
        3.6rem
    );

    line-height: 1.05;

    letter-spacing: -0.035em;

}


.ict-fpt-spareparts-heading p {

    margin: 0;

    max-width: 620px;

    font-size: 1.05rem;

    line-height: 1.7;

    opacity: 0.65;

}


/* =========================================================
Filters
========================================================= */

.ict-fpt-spareparts-controls {

    display: flex;

    align-items: flex-end;

    gap: 18px;

    margin-bottom: 70px;

}


.ict-fpt-spareparts-filter {

    display: flex;

    flex-direction: column;

    gap: 8px;

}


.ict-fpt-spareparts-filter label {

    font-size: 0.75rem;

    font-weight: 700;

    letter-spacing: 0.08em;

    text-transform: uppercase;

    opacity: 0.55;

}


.ict-fpt-spareparts-filter select {

    min-width: 220px;

    height: 46px;

    padding: 0 42px 0 15px;

    border: 1px solid
        var(--form-border);

    border-radius: 10px;

    background:
        var(--glass-background);

    color:
        var(--text);

    font: inherit;

    cursor: pointer;

    outline: none;

    transition:
        border-color var(--transition-fast),
        background var(--transition-fast);

}


.ict-fpt-spareparts-filter select option {

    background:
        var(--bg-color);

    color:
        var(--text);

}


/* =========================================================
Category
========================================================= */

.ict-fpt-spareparts-category {

    margin-bottom: 80px;

}


.ict-fpt-spareparts-category-name {

    margin: 0 0 28px;

    font-size: 1rem;

    font-weight: 700;

    letter-spacing: 0.18em;

    text-transform: uppercase;

    opacity: 0.65;

}


/* =========================================================
Part Grid
========================================================= */

.ict-fpt-spareparts-grid {

    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 24px;

}


/* =========================================================
Part Card
========================================================= */

.ict-fpt-sparepart-card {

    position: relative;

    display: block;

    min-height: 360px;

    overflow: hidden;

    border: 1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.025);

    color: inherit;

    text-decoration: none;

    cursor: pointer;

    transition:
        transform 260ms ease,
        border-color 260ms ease;

}


.ict-fpt-sparepart-card:hover {

    transform:
        translateY(-5px);

    border-color:
        rgba(255, 255, 255, 0.18);

}


/* =========================================================
Card Content
========================================================= */

.ict-fpt-sparepart-card-content {

    position: relative;

    z-index: 1;

    height: 100%;

    transition:
        filter 260ms ease,
        opacity 260ms ease;

}


.ict-fpt-sparepart-card:hover
.ict-fpt-sparepart-card-content {

    filter:
        blur(2px);

    opacity: 0.55;

}


/* =========================================================
Part Image
========================================================= */

.ict-fpt-sparepart-image {

    display: block;

    width: 100%;

    height: 190px;

    padding: 28px;

    object-fit: contain;

}

/* =========================================================
Card Information
========================================================= */

.ict-fpt-sparepart-card-info {

    padding: 8px 28px 24px;

}


.ict-fpt-sparepart-card-number {

    margin: 0 0 8px;

    font-size: 1.35rem;

    line-height: 1.2;

}


.ict-fpt-sparepart-card-name {

    margin: 0 0 12px;

    font-size: 0.95rem;

    font-weight: 600;

    opacity: 0.75;

}


.ict-fpt-sparepart-card-description {

    margin: 0;

    font-size: 0.9rem;

    line-height: 1.6;

    opacity: 0.6;

}


/* =========================================================
Hover Overlay
========================================================= */

.ict-fpt-sparepart-card-overlay {

    position: absolute;

    inset: 0;

    z-index: 2;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        rgba(5, 8, 18, 0.22);

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 260ms ease;

}


.ict-fpt-sparepart-card:hover
.ict-fpt-sparepart-card-overlay {

    opacity: 1;

}


/* =========================================================
Magnifying Glass
========================================================= */

.ict-fpt-sparepart-hover-icon {

    display: block;

    width: 82px;

    height: 82px;

    object-fit: contain;

    border-radius: 50%;

    filter: invert(1);

    opacity: 0;

    transform:
        scale(0.7);

    transition:
        opacity 260ms ease,
        transform 260ms ease;

}


.ict-fpt-sparepart-card:hover
.ict-fpt-sparepart-hover-icon {

    opacity: 1;

    transform:
        scale(1);

}


/* =========================================================
Empty State
========================================================= */

.ict-fpt-spareparts-empty {

    padding: 60px 20px;

    text-align: center;

    font-size: 0.95rem;

    opacity: 0.55;

}


/* =========================================================
Responsive
========================================================= */

@media (max-width: 950px) {

    .ict-fpt-spareparts-grid {

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

    }

}


@media (max-width: 700px) {

    .ict-fpt-spareparts {

        padding: 80px 0 90px;

    }


    .ict-fpt-spareparts-inner {

        width: min(
            100% - 40px,
            1200px
        );

    }


    .ict-fpt-spareparts-controls {

        flex-direction: column;

        align-items: stretch;

    }


    .ict-fpt-spareparts-filter select {

        width: 100%;

    }


    .ict-fpt-spareparts-grid {

        grid-template-columns:
            1fr;

    }

}