/**
 * =========================================================
 * EMIT SPORTS — PRODUCT CARD
 * =========================================================
 */


/* =========================================================
   1. RESET
   ========================================================= */

.emit-product-card,
.emit-product-card *,
.emit-product-card *::before,
.emit-product-card *::after {
    box-sizing: border-box;
}


/* =========================================================
   2. CARD
   ========================================================= */

.emit-product-card {
    width: 100%;
    margin: 0;
    padding: 0;

    background: #ffffff;

    border: 1px solid #e5e5e5;
    border-radius: 14px;

    overflow: hidden;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.emit-product-card:hover {
    border-color: #FF0052;
}


/* =========================================================
   3. LINK GERAL
   ========================================================= */

.emit-product-card-link,
.emit-product-card-link:visited,
.emit-product-card-link:hover,
.emit-product-card-link:focus,
.emit-product-card-link:active {
    display: block;
    width: 100%;

    text-decoration: none !important;
    background: transparent !important;
}


/* =========================================================
   4. ÁREA DA IMAGEM
   ========================================================= */

.emit-product-card-media {
    position: relative;

    width: 100%;

    background: #f7f7f7;
}

.emit-product-card-image-wrap {
    position: relative;

    width: 100%;
    aspect-ratio: 1 / 1.08;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.emit-product-card-image-wrap img {
    display: block;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;

    object-fit: contain;
}


/* =========================================================
   5. IMAGEM SECUNDÁRIA NO HOVER
   ========================================================= */

.emit-product-card-image-primary,
.emit-product-card-image-secondary {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: opacity 0.3s ease;
}

.emit-product-card-image-primary {
    opacity: 1;
}

.emit-product-card-image-secondary {
    opacity: 0;
}

.emit-product-card-image-primary img,
.emit-product-card-image-secondary img {
    width: 100% !important;
    height: 100% !important;

    object-fit: contain;

    transform: none !important;
    transition: none !important;
}

.emit-product-card:hover .emit-product-card-image-primary {
    opacity: 0;
}

.emit-product-card:hover .emit-product-card-image-secondary {
    opacity: 1;
}


/* =========================================================
   6. CHIPS
   ========================================================= */

.emit-product-card-chips {
    position: absolute;

    left: 12px;
    right: 12px;
    bottom: 12px;

    display: flex;
    flex-wrap: nowrap;
    align-items: center;

    gap: 5px;

    z-index: 2;
}

.emit-product-card-chip {
    display: inline-flex;
    align-items: center;

    gap: 4px;

    min-height: 24px;

    padding: 4px 7px;

    background: rgba(255, 255, 255, 0.94);

    border: none;
    border-radius: 6px;

    font-size: 10px;
    font-weight: 500;
    line-height: 1.1;

    white-space: nowrap;
}


/* =========================================================
   7. ÍCONES DOS CHIPS
   ========================================================= */

.emit-product-card-chip-icon {
    display: inline-flex;

    width: 13px;
    height: 13px;

    flex: 0 0 13px;
}

.emit-product-card-chip-icon svg {
    display: block;

    width: 13px !important;
    height: 13px !important;

    fill: none !important;
    stroke: currentColor !important;

    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   8. CONTEÚDO DO CARD
   ========================================================= */

.emit-product-card-content {
    padding: 17px 18px 19px;

    text-align: left;
}


/* TÍTULO */

.emit-product-card-title {
    min-height: 0;

    margin: 0 0 4px !important;
    padding: 0 !important;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    text-align: left;

    white-space: nowrap;
}


/* NÍVEL */

.emit-product-card-level {
    margin: 0 0 4px;

    color: #929292;

    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;

    text-align: left;
}


/* VISUAIS — caso utilizado */

.emit-product-card-visuals:empty {
    display: none;
}


/* PREÇO */

.emit-product-card-price {
    text-align: left;
}

.emit-product-card-main-price {
    margin: 0;

    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
}

/* "no pix" ao lado do preço */
.emit-product-card-pix-label {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 400;
    color: #929292;
    line-height: 1;
    white-space: nowrap;
}


/* PARCELAMENTO */

.emit-product-card-installment {
    margin-top: 4px;

    color: #929292;

    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

.emit-product-card-installment *,
.emit-product-card-installment .woocommerce-Price-amount,
.emit-product-card-installment .woocommerce-Price-currencySymbol {
    font-weight: inherit;
}


/* =========================================================
   9. ESTRUTURA DO CATÁLOGO
   Shop + categorias
   ========================================================= */

.woocommerce.archive .site-content > .ast-container {
    width: 100% !important;
    max-width: 1420px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding-left: 32px !important;
    padding-right: 32px !important;
}

.woocommerce.archive #primary,
.woocommerce.archive main.site-main {
    width: 100% !important;
    max-width: none !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
}

.woocommerce.archive .woocommerce-result-count {
    display: none !important;
}


/* =========================================================
   10. GRADE DO CATÁLOGO — DESKTOP
   ========================================================= */

@media (min-width: 768px) {

    .woocommerce.archive ul.products {
        display: grid !important;

        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;

        column-gap: 28px !important;
        row-gap: 30px !important;

        width: 100% !important;

        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .woocommerce.archive ul.products li.product {
        width: 100% !important;
        max-width: none !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    .woocommerce.archive .emit-product-card {
        width: 100% !important;
        max-width: none !important;
    }


    /* Espaçamento interno aprovado */

    body.woocommerce.archive .emit-product-card-title {
        margin: 0 0 4px !important;
    }

    body.woocommerce.archive .emit-product-card-level {
        margin: 0 0 4px !important;
    }

    body.woocommerce.archive .emit-product-card-main-price {
        margin: 0 !important;
    }

    body.woocommerce.archive .emit-product-card-installment {
        margin-top: 4px !important;
    }
}


/* =========================================================
   11. ORDENAÇÃO — DESKTOP
   ========================================================= */

.woocommerce.archive .woocommerce-ordering {
    float: none !important;

    display: flex !important;
    align-items: center;
    justify-content: flex-end;

    width: 100%;

    margin: 14px 0 24px !important;
}

.woocommerce.archive .woocommerce-ordering::before {
    content: "Ordenar por:";

    flex: 0 0 auto;

    margin-right: 8px;

    color: #929292;

    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;

    white-space: nowrap;
}

.woocommerce.archive .woocommerce-ordering select {
    width: 145px !important;
    min-width: 0 !important;
    max-width: 145px !important;

    margin: 0 !important;
    padding: 3px 20px 3px 0 !important;

    color: #1C1C1A !important;
    background-color: transparent !important;

    border: 0 !important;
    border-radius: 0 !important;

    box-shadow: none !important;
    outline: none !important;

    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;

    cursor: pointer;
}


/* =========================================================
   12. VITRINE EMIT — HOME / SHORTCODE
   ========================================================= */

.emit-product-grid {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 24px;

    width: 100%;

    margin: 0;
    padding: 0;
}

.emit-product-grid-item {
    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


/* =========================================================
   13. MOBILE
   ========================================================= */

@media (max-width: 767px) {

    /* -----------------------------------------------------
       CONTAINER PRINCIPAL
       ----------------------------------------------------- */

    .woocommerce.archive .site-content > .ast-container {
        padding-left: 32px !important;
        padding-right: 32px !important;
    }

    body.woocommerce.archive #primary {
        width: 100% !important;
        max-width: none !important;

        padding-top: 20px !important;
        padding-bottom: 30px !important;
    }

    body.woocommerce.archive main.site-main,
    body.woocommerce.archive .ast-woocommerce-container {
        width: 100% !important;
        max-width: none !important;
    }


    /* -----------------------------------------------------
       IMAGEM
       ----------------------------------------------------- */

    .emit-product-card-image-wrap {
        aspect-ratio: 1 / 1.18;
    }

    .emit-product-card-image-wrap img {
        width: 100% !important;
        height: 100% !important;

        object-fit: contain;
    }


    /* No celular não troca a imagem no hover */

    .emit-product-card:hover .emit-product-card-image-primary {
        opacity: 1;
    }

    .emit-product-card:hover .emit-product-card-image-secondary {
        opacity: 0;
    }


    /* -----------------------------------------------------
       CHIPS
       ----------------------------------------------------- */

    .emit-product-card-chips {
        left: 7px;
        right: 7px;
        bottom: 8px;

        display: flex;
        flex-wrap: nowrap;

        gap: 4px;

        width: auto;
    }

    .emit-product-card-chip {
        min-width: 0;
        min-height: 23px;

        padding: 3px 5px;

        gap: 3px;

        border-radius: 6px;

        font-size: 9px;
        font-weight: 500;
        line-height: 1;

        white-space: nowrap;
    }

    .emit-product-card-chip-icon {
        width: 12px;
        height: 12px;

        flex: 0 0 12px;
    }

    .emit-product-card-chip-icon svg {
        width: 12px !important;
        height: 12px !important;
    }


    /* -----------------------------------------------------
       CONTEÚDO
       ----------------------------------------------------- */

    .emit-product-card-content {
        padding: 15px 11px 17px;

        text-align: left;
    }


    /* TÍTULO */

    body.woocommerce.archive .emit-product-card-title {
        min-height: 0 !important;
        height: auto !important;

        margin: 0 0 8px !important;
        padding: 0 !important;

        font-size: 13px !important;
        font-weight: 600 !important;
        line-height: 1.25 !important;

        text-align: left;

        white-space: normal !important;

        display: -webkit-box !important;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;

        overflow: hidden !important;
    }


    /* NÍVEL */

    body.woocommerce.archive .emit-product-card-level {
        margin: 0 0 8px !important;

        color: #929292;

        font-size: 10px !important;
        line-height: 1.3 !important;

        white-space: nowrap;
    }


    /* VISUAIS */

    body.woocommerce.archive .emit-product-card-visuals {
        min-height: 0 !important;
        height: auto !important;

        margin: 0 0 7px !important;

        font-size: 11px !important;
        line-height: 1.3 !important;
    }

    body.woocommerce.archive .emit-product-card-visuals:empty {
        display: none !important;
    }


    /* PREÇO */

    body.woocommerce.archive .emit-product-card-main-price {
        margin: 0 !important;

        font-size: 15px !important;
        font-weight: 600;
        line-height: 1.25 !important;

        white-space: nowrap;
    }
    
     .emit-product-card-pix-label {
        margin-left: 3px;
        font-size: 9.5px;
    }


    /* PARCELAMENTO */

    body.woocommerce.archive .emit-product-card-installment {
        width: 100% !important;

        margin-top: 4px !important;

        font-size: 9.5px !important;
        font-weight: 400 !important;
        line-height: 1.3 !important;

        white-space: nowrap !important;
        overflow: visible !important;
    }


    /* -----------------------------------------------------
       GRADE — SHOP E CATEGORIAS
       ----------------------------------------------------- */

    body.woocommerce.archive ul.products {
        display: grid !important;

        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

        column-gap: 10px !important;
        row-gap: 18px !important;

        width: 100% !important;
        max-width: none !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    body.woocommerce.archive ul.products li.product {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    body.woocommerce.archive .emit-product-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }


    /* -----------------------------------------------------
       SHOP — APROVEITA MAIS A LARGURA
       ----------------------------------------------------- */

    body.post-type-archive-product ul.products {
        width: calc(100% + 20px) !important;
        max-width: none !important;

        margin-left: -10px !important;
        margin-right: -10px !important;

        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

        column-gap: 10px !important;
    }


    /* -----------------------------------------------------
       TOOLBAR / ORDENAÇÃO
       ----------------------------------------------------- */

    body.woocommerce.archive .ast-shop-toolbar-container {
        display: block !important;

        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;

        margin: 18px 0 20px !important;
        padding: 0 !important;

        gap: 0 !important;
    }

    body.woocommerce.archive .ast-shop-toolbar-aside-wrap {
        display: flex !important;

        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;

        margin: 0 !important;
        padding: 0 !important;

        align-items: center !important;
        justify-content: flex-end !important;

        gap: 0 !important;
    }

    body.woocommerce.archive form.woocommerce-ordering {
        float: none !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-end !important;

        width: auto !important;
        height: auto !important;
        min-height: 0 !important;

        margin: 0 !important;
        padding: 0 !important;

        gap: 0 !important;
    }

    body.woocommerce.archive form.woocommerce-ordering::before {
        content: "Ordenar por:";

        flex: 0 0 auto;

        margin: 0 7px 0 0 !important;
        padding: 0 !important;

        color: #929292;

        font-size: 11px;
        font-weight: 400;
        line-height: 1.2;

        white-space: nowrap;
    }

    body.woocommerce.archive .woocommerce-ordering select.orderby {
        flex: 0 0 135px;

        width: 135px !important;
        min-width: 135px !important;
        max-width: 135px !important;

        height: auto !important;
        min-height: 0 !important;

        margin: 0 !important;
        padding: 2px 18px 2px 0 !important;

        color: #1C1C1A !important;
        background-color: transparent !important;

        border: 0 !important;
        box-shadow: none !important;

        font-size: 12px;
        font-weight: 500;
        line-height: 1.2;
    }


    /* Remove espaço de notices vazios */

    body.woocommerce.archive .woocommerce-notices-wrapper {
        margin: 0 !important;
        padding: 0 !important;

        min-height: 0 !important;
    }

    body.woocommerce.archive .woocommerce-notices-wrapper:empty {
        display: none !important;
    }


    /* -----------------------------------------------------
       VITRINE HOME
       ----------------------------------------------------- */

    .emit-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 14px 7px;

        width: calc(100% + 34px);

        margin-left: -17px;
        margin-right: -17px;
    }
}