/* =========================================================
   OTECHRIDE – PODKATEGORIE NÁHRADNÍCH DÍLŮ
   KARTY PRO SHOPTET THUMB 140 × 100 PX
   ========================================================= */


/* =========================================================
   GRID
   ========================================================= */

body ul.subcategories.with-image {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-rows: 250px !important;
    gap: 18px !important;

    width: 100% !important;
    max-width: 100% !important;

    position: relative !important;

    margin: 38px 0 118px !important;
    padding: 0 !important;

    border-bottom: 0 !important;

    list-style: none !important;
}


/* =========================================================
   NADPIS PRODUKTŮ
   Název aktuální kategorie doplní JS.
   ========================================================= */

body ul.subcategories.with-image::after {
    content: attr(data-category-label);

    position: absolute;
    left: 0;
    bottom: -88px;

    display: block;
    width: 100%;

    margin: 0;
    padding: 18px 22px 18px 26px;

    background: #f4f4f4;

    border-left: 5px solid #d40000;

    color: #111111;

    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;

    text-align: left;

    box-sizing: border-box;
}


/* =========================================================
   RESET PŮVODNÍHO SHOPTET ROZLOŽENÍ
   ========================================================= */

body ul.subcategories.with-image > li,
body ul.subcategories.with-image > li.col-xs-6,
body ul.subcategories.with-image > li.col-sm-4,
body ul.subcategories.with-image > li.col-lg-3,
body ul.subcategories.with-image > li.col-xl-2 {
    float: none !important;

    display: block !important;

    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    height: 250px !important;

    margin: 0 !important;
    padding: 0 !important;

    flex: none !important;
}


/* =========================================================
   KARTA
   ========================================================= */

body ul.subcategories.with-image > li > a {
    position: relative;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;

    width: 100% !important;
    height: 250px !important;

    margin: 0 !important;
    padding: 24px 18px 0 !important;

    background: #ffffff !important;

    border: 1px solid #dedede !important;

    color: #111111 !important;
    text-decoration: none !important;

    overflow: hidden !important;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease !important;
}

body ul.subcategories.with-image > li > a:hover {
    transform: translateY(-4px);

    border-color: #d40000 !important;

    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.09) !important;
}


/* =========================================================
   ČERNÝ PANEL PRO OBRÁZEK
   ========================================================= */

body ul.subcategories.with-image > li > a > span.image {
    position: relative;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    flex: 0 0 auto !important;

    width: 174px !important;
    height: 120px !important;

    margin: 0 auto 20px !important;
    padding: 0 !important;

    background: #050505 !important;

    overflow: hidden !important;
}


/* =========================================================
   OBRÁZEK
   Původních 140 × 100 px.
   NEZVĚTŠUJEME.
   Ořízneme pouze okraje s bílými pruhy.
   ========================================================= */

body ul.subcategories.with-image > li > a > span.image > img {
    position: relative !important;

    display: block !important;

    width: 140px !important;
    height: 100px !important;

    min-width: 140px !important;
    max-width: 140px !important;

    min-height: 100px !important;
    max-height: 100px !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: none !important;
    object-position: center center !important;

    clip-path: inset(8px 8px 8px 8px) !important;

    transform: none !important;

    image-rendering: auto !important;
}


/* =========================================================
   TEXT – NÁZEV NÁHRADNÍHO DÍLU
   ========================================================= */

body ul.subcategories.with-image > li > a > span.text {
    position: relative;

    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;

    width: 100% !important;

    height: 58px !important;
    min-height: 58px !important;
    max-height: 58px !important;

    margin: 0 !important;
    padding: 0 18px !important;

    background: transparent !important;

    color: #111111 !important;

    font-family: Inter, Arial, Helvetica, sans-serif !important;
    font-size: 20.5px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;

    text-align: center !important;

    overflow: hidden !important;
}


/* Červený čtvereček */
body ul.subcategories.with-image > li > a > span.text::before {
    content: "";

    position: absolute;

    left: 4px;
    top: 8px;

    width: 8px;
    height: 8px;

    background: #d40000;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    body ul.subcategories.with-image {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-auto-rows: 245px !important;
    }

    body ul.subcategories.with-image > li,
    body ul.subcategories.with-image > li > a {
        height: 245px !important;
    }
}


/* =========================================================
   MOBIL
   ========================================================= */

@media (max-width: 575px) {

    body ul.subcategories.with-image {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-auto-rows: 225px !important;

        gap: 10px !important;

        margin-top: 28px !important;
        margin-bottom: 102px !important;

        padding-bottom: 0 !important;
    }

    body ul.subcategories.with-image::after {
        bottom: -76px;

        padding: 16px 16px 16px 20px;

        border-left-width: 4px;

        font-size: 18px !important;
        line-height: 1.3 !important;
    }

    body ul.subcategories.with-image > li,
    body ul.subcategories.with-image > li > a {
        height: 225px !important;
    }

    body ul.subcategories.with-image > li > a {
        padding: 18px 8px 0 !important;
    }

    body ul.subcategories.with-image > li > a > span.image {
        width: 154px !important;
        height: 110px !important;

        margin-bottom: 16px !important;
    }

    body ul.subcategories.with-image > li > a > span.text {
        height: 56px !important;
        min-height: 56px !important;
        max-height: 56px !important;

        padding: 0 14px !important;

        font-size: 18px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;

        text-align: center !important;
        justify-content: center !important;
    }

    body ul.subcategories.with-image > li > a > span.text::before {
        left: 2px;
        top: 7px;

        width: 7px;
        height: 7px;
    }
}


/* =========================================================
   VELMI MALÉ TELEFONY
   ========================================================= */

@media (max-width: 380px) {

    body ul.subcategories.with-image {
        grid-template-columns: 1fr !important;
    }
}