/* =========================================================
   ECOM CORE — INTELLIGENT CATALOGUE
   ========================================================= */

.ec-catalogue {

    padding:
        34px 0 80px;
}


/* =========================================================
   HERO
   ========================================================= */

.ec-catalogue-hero {

    min-height:
        260px;

    display: grid;

    grid-template-columns:
        minmax(0,1fr)
        minmax(280px,.44fr);

    align-items: stretch;

    overflow: hidden;

    background:
        var(--ec-ink);

    color: #fff;

    margin-bottom: 24px;
}


.ec-catalogue-hero-copy {

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding:
        clamp(
            32px,
            5vw,
            70px
        );
}


.ec-catalogue-kicker {

    margin-bottom: 10px;

    color:
        rgba(
            255,
            255,
            255,
            .58
        );

    font-size: 10px;

    line-height: 1;

    font-weight: 850;

    letter-spacing: .12em;

    text-transform: uppercase;
}


.ec-catalogue-hero h1 {

    margin: 0;

    max-width: 900px;

    color: #fff;

    font-size:
        clamp(
            39px,
            6vw,
            78px
        );

    font-weight: 850;

    line-height: .96;

    letter-spacing: -.052em;
}


.ec-catalogue-description {

    max-width: 670px;

    margin-top: 19px;

    color:
        rgba(
            255,
            255,
            255,
            .66
        );

    font-size: 15px;

    line-height: 1.55;
}


.ec-catalogue-description p {

    margin:
        0 0 10px;
}


.ec-catalogue-description p:last-child {

    margin-bottom: 0;
}


.ec-catalogue-hero-image {

    min-height: 260px;

    background:
        #ebeef1;

    overflow: hidden;
}


.ec-catalogue-hero-image img {

    width: 100%;

    height: 100%;

    object-fit: cover;
}


/**
 * HERO WITHOUT IMAGE
 */
.ec-catalogue-hero-copy:last-child {

    grid-column:
        1 / -1;
}


/* =========================================================
   CATEGORY DISCOVERY
   ========================================================= */

.ec-category-rail {

    position: relative;

    margin:
        0 0 28px;
}


.ec-category-track {

    display: flex;

    gap: 10px;

    overflow-x: auto;

    padding:
        2px 1px 9px;

    scroll-snap-type:
        x proximity;

    scrollbar-width: none;
}


.ec-category-track::-webkit-scrollbar {

    display: none;
}


.ec-category-tile {

    flex:
        0 0 auto;

    min-width: 190px;

    min-height: 74px;

    display: grid;

    grid-template-columns:
        64px
        minmax(0,1fr);

    align-items: center;

    gap: 12px;

    padding: 8px;

    background: #fff;

    border:
        1px solid
        var(--ec-line);

    border-radius:
        var(--ec-radius);

    scroll-snap-align:
        start;

    transition:
        border-color .16s ease,
        transform .16s ease,
        background .16s ease;
}


.ec-category-tile:hover {

    border-color:
        #bfc5cb;

    transform:
        translateY(-2px);
}


.ec-category-tile.is-active {

    border-color:
        var(--ec-ink);
}


.ec-category-tile-media {

    width: 64px;

    height: 56px;

    display: grid;

    place-items: center;

    overflow: hidden;

    background:
        var(--ec-bg);
}


.ec-category-tile-media img {

    width: 100%;

    height: 100%;

    object-fit: contain;

    padding: 6px;
}


.ec-category-placeholder {

    color:
        #b2b7bd;

    font-size: 22px;

    font-weight: 400;
}


.ec-category-tile-copy {

    min-width: 0;

    display: flex;

    flex-direction: column;
}


.ec-category-tile-copy strong {

    overflow: hidden;

    color:
        var(--ec-ink);

    font-size: 12px;

    line-height: 1.2;

    font-weight: 800;

    text-overflow: ellipsis;
}


.ec-category-tile-copy small {

    margin-top: 5px;

    color:
        var(--ec-muted);

    font-size: 10px;
}


/* =========================================================
   TOOLBAR
   ========================================================= */

.ec-catalogue-toolbar {

    min-height: 62px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 18px;

    padding:
        10px 0;

    margin-bottom: 20px;

    border-top:
        1px solid
        var(--ec-line);

    border-bottom:
        1px solid
        var(--ec-line);
}


.ec-catalogue-toolbar-left {

    display: flex;

    align-items: center;

    gap: 16px;
}


.ec-filter-trigger {

    min-height: 40px !important;

    display: inline-flex !important;

    align-items: center;

    gap: 8px;

    padding:
        0 14px !important;

    background:
        #fff !important;

    color:
        var(--ec-ink) !important;

    border:
        1px solid
        var(--ec-line) !important;

    border-radius:
        4px !important;

    font-size: 12px !important;

    font-weight: 800 !important;

    transform:
        none !important;
}


.ec-filter-trigger:hover {

    border-color:
        var(--ec-ink) !important;

    background:
        #fff !important;
}


.ec-filter-trigger > span:first-child {

    font-size: 16px;

    transform:
        rotate(90deg);
}


.ec-filter-count {

    min-width: 19px;

    height: 19px;

    display: inline-grid;

    place-items: center;

    padding:
        0 4px;

    border-radius:
        999px;

    background:
        var(--ec-accent);

    color: #fff;

    font-size: 9px;

    line-height: 1;
}


.ec-result-count {

    color:
        var(--ec-muted);

    font-size: 12px;
}


.ec-sort-form {

    display: flex;

    align-items: center;

    gap: 9px;
}


.ec-sort-form label {

    color:
        var(--ec-muted);

    font-size: 11px;

    font-weight: 700;
}


.ec-sort-form select {

    min-width: 170px;

    min-height: 40px;

    padding:
        0 34px 0 11px;

    background: #fff;

    border:
        1px solid
        var(--ec-line);

    font-size: 12px;

    font-weight: 700;
}


/* =========================================================
   PRODUCT GRID
   ========================================================= */

.ec-catalogue-grid {

    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0,1fr)
        );

    gap: 18px;
}


.ec-catalogue-item {

    min-width: 0;
}


.ec-catalogue-item
.ec-product-card {

    height: 100%;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.ec-pagination {

    margin-top: 42px;
}


.ec-pagination ul {

    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    justify-content: center;

    padding: 0;

    margin: 0;

    list-style: none;
}


.ec-pagination a,
.ec-pagination span {

    min-width: 40px;

    height: 40px;

    display: inline-grid;

    place-items: center;

    padding:
        0 10px;

    background: #fff;

    border:
        1px solid
        var(--ec-line);

    color:
        var(--ec-ink);

    font-size: 12px;

    font-weight: 750;
}


.ec-pagination a:hover {

    border-color:
        var(--ec-ink);
}


.ec-pagination .current {

    background:
        var(--ec-ink);

    border-color:
        var(--ec-ink);

    color: #fff;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.ec-catalogue-empty {

    min-height: 360px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 50px;

    background: #fff;

    border:
        1px solid
        var(--ec-line);
}


.ec-empty-mark {

    width: 52px;

    height: 52px;

    display: grid;

    place-items: center;

    margin-bottom: 18px;

    background:
        var(--ec-bg);

    border:
        1px solid
        var(--ec-line);

    font-size: 22px;
}


.ec-catalogue-empty h2 {

    margin:
        0 0 10px;

    font-size:
        clamp(
            25px,
            3vw,
            36px
        );
}


.ec-catalogue-empty p {

    margin:
        0 0 22px;

    color:
        var(--ec-muted);
}


/* =========================================================
   FILTER DRAWER
   ========================================================= */

.ec-filter-drawer {

    position: fixed;

    inset: 0;

    z-index: 1200;
}


.ec-filter-drawer[hidden] {

    display: none;
}


.ec-filter-backdrop {

    position: absolute;

    inset: 0;

    width: 100%;

    height: 100%;

    padding: 0 !important;

    background:
        rgba(
            17,
            19,
            21,
            .48
        ) !important;

    border: 0 !important;

    border-radius:
        0 !important;

    backdrop-filter:
        blur(3px);

    transform:
        none !important;
}


.ec-filter-panel {

    position: absolute;

    top: 0;

    right: 0;

    width:
        min(
            440px,
            100%
        );

    height: 100%;

    display: flex;

    flex-direction: column;

    background: #fff;

    box-shadow:
        -25px 0 60px
        rgba(
            17,
            19,
            21,
            .12
        );

    overflow-y: auto;
}


.ec-filter-head {

    min-height: 76px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding:
        15px 22px;

    border-bottom:
        1px solid
        var(--ec-line);
}


.ec-filter-head > div {

    display: flex;

    flex-direction: column;
}


.ec-filter-eyebrow {

    color:
        var(--ec-muted);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: .11em;

    text-transform: uppercase;
}


.ec-filter-head strong {

    margin-top: 3px;

    font-size: 20px;

    letter-spacing: -.025em;
}


.ec-filter-close {

    width: 40px !important;

    height: 40px !important;

    min-height: 40px !important;

    display: grid !important;

    place-items: center;

    padding: 0 !important;

    background:
        var(--ec-bg) !important;

    color:
        var(--ec-ink) !important;

    border:
        1px solid
        var(--ec-line) !important;

    font-size: 21px !important;

    transform:
        none !important;
}


.ec-filter-form {

    flex: 1;

    display: flex;

    flex-direction: column;
}


.ec-filter-section {

    padding:
        23px 22px;

    border-bottom:
        1px solid
        var(--ec-line);
}


.ec-filter-title {

    display: block;

    margin-bottom: 13px;

    color:
        var(--ec-ink);

    font-size: 11px;

    font-weight: 850;

    letter-spacing: .04em;

    text-transform: uppercase;
}


.ec-filter-section select {

    width: 100%;
}


.ec-check-row {

    min-height: 40px;

    display: flex;

    align-items: center;

    gap: 10px;

    cursor: pointer;

    color:
        var(--ec-ink);

    font-size: 13px;
}


.ec-check-row input {

    width: 17px;

    height: 17px;

    min-height: 0;

    margin: 0;

    accent-color:
        var(--ec-accent);
}


.ec-price-fields {

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0,1fr)
        );

    gap: 10px;
}


.ec-price-fields label {

    display: flex;

    flex-direction: column;

    gap: 6px;
}


.ec-price-fields span {

    color:
        var(--ec-muted);

    font-size: 10px;

    font-weight: 700;
}


.ec-price-fields input {

    width: 100%;
}


.ec-filter-footer {

    margin-top: auto;

    min-height: 78px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 16px;

    padding:
        15px 22px;

    background: #fff;

    border-top:
        1px solid
        var(--ec-line);

    position: sticky;

    bottom: 0;
}


.ec-filter-clear {

    color:
        var(--ec-muted);

    font-size: 11px;

    font-weight: 750;

    text-decoration:
        underline;
}


.ec-filter-apply {

    min-height: 43px;

    padding:
        0 18px !important;
}


body.ec-filter-open {

    overflow: hidden;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (
    max-width: 1180px
) {

    .ec-catalogue-grid {

        grid-template-columns:
            repeat(
                3,
                minmax(0,1fr)
            );
    }

}


@media (
    max-width: 820px
) {

    .ec-catalogue {

        padding-top: 18px;
    }


    .ec-catalogue-hero {

        grid-template-columns:
            1fr;

        min-height: 0;
    }


    .ec-catalogue-hero-copy {

        padding:
            36px 26px;
    }


    .ec-catalogue-hero-image {

        min-height: 220px;

        max-height: 320px;
    }


    .ec-catalogue-grid {

        grid-template-columns:
            repeat(
                2,
                minmax(0,1fr)
            );

        gap: 12px;
    }


    .ec-category-tile {

        min-width: 168px;

        grid-template-columns:
            54px
            minmax(0,1fr);
    }


    .ec-category-tile-media {

        width: 54px;

        height: 50px;
    }

}


@media (
    max-width: 600px
) {

    .ec-catalogue {

        padding:
            12px 0 60px;
    }


    .ec-catalogue-hero {

        margin-left:
            -14px;

        margin-right:
            -14px;

        margin-bottom:
            18px;
    }


    .ec-catalogue-hero-copy {

        padding:
            32px 20px;
    }


    .ec-catalogue-hero h1 {

        font-size:
            clamp(
                38px,
                13vw,
                58px
            );
    }


    .ec-catalogue-description {

        font-size: 13px;
    }


    .ec-category-rail {

        margin-bottom:
            18px;
    }


    .ec-category-track {

        margin-right:
            -14px;
    }


    .ec-catalogue-toolbar {

        min-height: 58px;

        gap: 8px;

        margin-bottom: 12px;
    }


    .ec-catalogue-toolbar-left {

        gap: 8px;
    }


    .ec-result-count {

        display: none;
    }


    .ec-filter-trigger {

        min-height:
            38px !important;

        padding:
            0 11px !important;

        font-size:
            11px !important;
    }


    .ec-sort-form label {

        display: none;
    }


    .ec-sort-form select {

        min-width: 0;

        width: 140px;

        min-height: 38px;

        font-size: 11px;
    }


    .ec-catalogue-grid {

        gap: 8px;
    }


    .ec-filter-panel {

        width: 100%;
    }


    .ec-catalogue-empty {

        min-height: 300px;

        padding:
            36px 20px;
    }

}


@media (
    max-width: 370px
) {

    .ec-sort-form select {

        width: 124px;
    }


    .ec-filter-trigger {

        padding:
            0 9px !important;
    }

}
