/*
Theme Name: Custom WP theme
Theme URI: https://anwarsons.com/
Description: Child theme for Hello Elementor By Arsalan khan
Author:  ArsalanKhan 
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
*/


/* =========================================
   ANWAR & SONS
   MAIN PRODUCT CATEGORIES
========================================= */


/* =========================================
   ELEMENTOR SHORTCODE WIDTH FIX
========================================= */

.anwar-products-shortcode {
    width: 100% !important;
    max-width: 100% !important;
    flex-basis: 100% !important;
}

.anwar-products-shortcode > .elementor-widget-container {
    width: 100% !important;
    max-width: 100% !important;
}


/* =========================================
   MAIN GRID
   BREAK OUT OF ELEMENTOR BOXED CONTAINER
========================================= */

.anwar-main-categories-grid {

    /*
     * IMPORTANT:
     * This allows the grid to become wider than
     * the Elementor parent container.
     */
    width: min(1600px, calc(100vw - 40px));

    max-width: none;

    position: relative;

    left: 50%;

    transform: translateX(-50%);

    margin-top: 0;
    margin-bottom: 0;

    display: grid;

    /* Exactly 3 cards per row */
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 28px;

    align-items: stretch;

    box-sizing: border-box;
}


/* =========================================
   CATEGORY CARD
========================================= */

.anwar-main-category-card {
    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;
    min-height: 390px;

    padding: 32px;

    background-color: #f5f8ff;

    border: 1px solid #dce4ef;
    border-radius: 10px;

    text-decoration: none !important;
    color: inherit;

    overflow: hidden;

    box-sizing: border-box;

    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


/* =========================================
   CARD HOVER
========================================= */

.anwar-main-category-card:hover {
    background-color: #cbd3dc;

    border-color: #2654b1;

    transform: translateY(-4px);

    box-shadow:
        0 12px 30px rgba(38, 84, 177, 0.08);

    text-decoration: none !important;
}


/* =========================================
   IMAGE AREA
========================================= */

.anwar-main-category-image {
    width: 100%;
    height: 200px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 26px;

    overflow: hidden;

    background: transparent;
}


/* =========================================
   IMAGE
========================================= */

.anwar-main-category-image img {
    display: block;

    width: 100%;
    height: 100%;

    max-width: 100%;

    object-fit: contain;
    object-position: center;

    transition:
        transform 0.35s ease;
}


.anwar-main-category-card:hover
.anwar-main-category-image img {
    transform: scale(1.04);
}


/* =========================================
   FALLBACK IMAGE
========================================= */

.anwar-category-image-placeholder {
    width: 110px;
    height: 110px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 14px;

    background: #eef4fd;

    border: 1px solid #dbe4f1;
    border-radius: 50%;

    color: #2654b1;

    font-size: 13px;
    line-height: 1.4;

    text-align: center;

    box-sizing: border-box;
}


/* =========================================
   CARD CONTENT
========================================= */

.anwar-main-category-content {
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;

    flex: 1;

    text-align: center;
}


/* =========================================
   CATEGORY TITLE
========================================= */

.anwar-main-category-content h3 {
    width: 100%;

    margin: 0 0 22px;

    font-family:
        var(--e-global-typography-primary-font-family, inherit);

    font-size: 23px;
    font-weight: 600;
    line-height: 1.3;

    color: #000000;

    text-align: center;

    transition:
        color 0.3s ease;
}


/* =========================================
   VIEW MORE BUTTON
========================================= */

.anwar-main-category-button {
    margin-top: auto;

    min-width: 190px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 18px;

    padding: 13px 24px;

    background-color: transparent;

    border: 1px solid #2654b1;
    border-radius: 8px;

    color: #2654b1;

    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;

    box-sizing: border-box;

    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}


/* =========================================
   BUTTON HOVER
========================================= */

.anwar-main-category-card:hover
.anwar-main-category-button {
    background-color: #2654b1;

    border-color: #2654b1;

    color: #ffffff;
}


/* =========================================
   ARROW
========================================= */

.anwar-main-category-arrow {
    display: inline-block;

    font-size: 18px;
    line-height: 1;

    color: currentColor;

    transition:
        transform 0.3s ease;
}


.anwar-main-category-card:hover
.anwar-main-category-arrow {
    transform: translateX(6px);
}


/* =========================================
   LINK STATES
========================================= */

.anwar-main-category-card,
.anwar-main-category-card:hover,
.anwar-main-category-card:focus,
.anwar-main-category-card:visited {
    text-decoration: none !important;
}


/* =========================================
   EMPTY STATE
========================================= */

.anwar-main-categories-empty {
    width: min(1600px, calc(100vw - 40px));

    max-width: none;

    position: relative;

    left: 50%;

    transform: translateX(-50%);

    padding: 40px 25px;

    background: #f5f8ff;

    border: 1px solid #dce4ef;
    border-radius: 10px;

    color: #667085;

    text-align: center;

    box-sizing: border-box;
}


/* =========================================
   LARGE DESKTOP
   3 CARDS
========================================= */

@media (min-width: 1025px) {

    .anwar-main-categories-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* =========================================
   TABLET
   2 CARDS
========================================= */

@media (max-width: 1024px) {

    .anwar-main-categories-grid {
        width: calc(100vw - 40px);

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 22px;
    }


    .anwar-main-category-card {
        min-height: 370px;

        padding: 28px 24px;
    }


    .anwar-main-category-image {
        height: 175px;

        margin-bottom: 22px;
    }


    .anwar-main-category-content h3 {
        font-size: 22px;
    }

}


/* =========================================
   MOBILE
   1 CARD
========================================= */

@media (max-width: 767px) {

    .anwar-main-categories-grid {
        width: calc(100vw - 30px);

        grid-template-columns: 1fr;

        gap: 18px;
    }


    .anwar-main-category-card {
        width: 100%;

        min-height: 340px;

        padding: 25px 20px;
    }


    .anwar-main-category-image {
        height: 150px;

        margin-bottom: 20px;
    }


    .anwar-main-category-content h3 {
        margin-bottom: 18px;

        font-size: 20px;
    }


    .anwar-main-category-button {
        min-width: 175px;

        padding: 12px 20px;

        font-size: 13px;
    }

}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .anwar-main-categories-grid {
        width: calc(100vw - 24px);
    }


    .anwar-main-category-card {
        min-height: 320px;

        padding: 22px 16px;
    }


    .anwar-main-category-image {
        height: 135px;
    }


    .anwar-main-category-content h3 {
        font-size: 19px;
    }


    .anwar-main-category-button {
        min-width: 165px;

        gap: 14px;

        padding: 11px 18px;
    }

}