/* ============================================================
   A1 CASH & CARRY
   CATEGORY GRID
============================================================ */


/* ============================================================
   CATEGORY GRID
============================================================ */

.category-grid {

    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 18px;

}


/* ============================================================
   CATEGORY CARD
============================================================ */

.category-card {

    position: relative;

    display: block;

    background: #ffffff;

    border-radius: 14px;

    overflow: hidden;

    text-decoration: none;

    box-shadow:
        var(--shadow);

    border:
        1px solid var(--border);

    transition:
        transform .3s ease,
        box-shadow .3s ease;

}


.category-card:hover {

    transform:
        translateY(-7px);

    box-shadow:
        0 15px 35px rgba(0, 0, 0, .16);

}


/* ============================================================
   CATEGORY IMAGE AREA
============================================================ */

.category-image {

    position: relative;

    width: 100%;

    height: 150px;

    overflow: hidden;

    background-size: cover;

    background-position: center;

    background-repeat: no-repeat;

    display: flex;

    align-items: center;

    justify-content: center;

    transition:
        background-position .5s ease,
        transform .4s ease;

}


/* ============================================================
   IMAGE ZOOM ON HOVER
============================================================ */

.category-card:hover .category-image {

    background-size: 110%;

}


/* ============================================================
   DARK OVERLAY
============================================================ */

.category-image-overlay {

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, .08) 0%,
            rgba(0, 0, 0, .18) 45%,
            rgba(0, 0, 0, .62) 100%
        );

    z-index: 1;

    transition:
        background .3s ease;

}


.category-card:hover
.category-image-overlay {

    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, .05) 0%,
            rgba(0, 0, 0, .20) 45%,
            rgba(0, 0, 0, .68) 100%
        );

}


/* ============================================================
   CATEGORY NAME ON IMAGE
============================================================ */

.category-image-name {

    position: absolute;

    z-index: 2;

    left: 15px;

    right: 15px;

    bottom: 20px;

    color: #ffffff;

    font-size: 16px;

    font-weight: 700;

    text-align: center;

    text-shadow:
        0 2px 8px rgba(0, 0, 0, .65);

}


/* ============================================================
   CATEGORY ICON
============================================================ */

.category-icon {

    position: absolute;

    z-index: 3;

    left: 15px;

    bottom: 12px;

    width: 45px;

    height: 45px;

    display: flex;

    justify-content: center;

    align-items: center;

    border-radius: 50%;

    background:
        var(--primary);

    color: #ffffff;

    border:
        3px solid #ffffff;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, .25);

    transition:
        transform .3s ease,
        background .3s ease;

}


.category-card:hover
.category-icon {

    transform:
        scale(1.1);

    background:
        var(--primary-dark);

}


/* ============================================================
   CATEGORY INFORMATION
============================================================ */

.category-info {

    padding: 14px;

    background:
        #ffffff;

}


.category-info h3 {

    margin: 0 0 5px;

    color:
        var(--text);

    font-size: 16px;

    font-weight: 700;

    line-height: 1.3;

    overflow: hidden;

}


.category-info span {

    color:
        var(--text-light);

    font-size: 12px;

}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 1200px) {

    .category-grid {

        grid-template-columns:
            repeat(4, minmax(0, 1fr));

        gap: 15px;

    }

}


/* ============================================================
   SMALL TABLET
============================================================ */

@media (max-width: 768px) {

    .category-grid {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 12px;

    }


    .category-image {

        height: 130px;

    }


    .category-image-name {

        font-size: 14px;

        bottom: 18px;

    }


    .category-icon {

        width: 38px;

        height: 38px;

        left: 10px;

        bottom: 9px;

        font-size: 13px;

        border-width: 2px;

    }


    .category-info {

        padding: 10px;

    }


    .category-info h3 {

        font-size: 13px;

    }


    .category-info span {

        font-size: 10px;

    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 500px) {

    .category-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 9px;

    }


    .category-image {

        height: 125px;

    }


    .category-image-name {

        font-size: 12px;

        bottom: 16px;

    }


    .category-info {

        padding: 9px;

    }


    .category-info h3 {

        font-size: 12px;

    }


    .category-info span {

        font-size: 9px;

    }


    .category-icon {

        width: 34px;

        height: 34px;

        left: 8px;

        bottom: 8px;

        font-size: 12px;

    }

}


/* ============================================================
   EXTRA SMALL
============================================================ */

@media (max-width: 360px) {

    .category-grid {

        gap: 7px;

    }


    .category-image {

        height: 105px;

    }


    .category-image-name {

        font-size: 10px;

        bottom: 13px;

    }


    .category-info {

        padding: 7px;

    }


    .category-info h3 {

        font-size: 10px;

    }


    .category-info span {

        font-size: 8px;

    }


    .category-icon {

        width: 30px;

        height: 30px;

        font-size: 10px;

        left: 6px;

        bottom: 6px;

    }

}