/*
Theme Name: Hello Elementor Child
Theme URI: https://example.com/
Description: Child theme for Hello Elementor
Author: CertJoin
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
*/


/* ============================================================
   CERTJOIN SIDEBAR
   Elementor Product Categories -> lista lateral compacta
============================================================ */


/* ============================================================
   CONTENEDOR GENERAL
============================================================ */

.certjoin-sidebar {
    width: 100%;
    box-sizing: border-box;
}


/* ============================================================
   LISTA PRINCIPAL
============================================================ */

.certjoin-sidebar ul.products,
.elementor .certjoin-sidebar ul.products {

    display: flex !important;
    flex-direction: column !important;

    grid-template-columns: none !important;

    width: 100% !important;

    margin: 0 !important;

    padding: 22px 20px 24px !important;

    gap: 0 !important;
    row-gap: 0 !important;

    background: #ffffff !important;

    border: 1px solid #e7e7e7 !important;
    border-radius: 16px !important;

    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.04) !important;

    box-sizing: border-box !important;

    list-style: none !important;
}


/* ============================================================
   TÍTULO SUPERIOR
============================================================ */

.certjoin-sidebar ul.products::before {

    content: "CERTIFICATION AREAS";

    display: block !important;

    width: 100%;

    margin: 0 0 16px 0 !important;

    padding: 0 !important;

    font-size: 14px !important;

    line-height: 1.2 !important;

    font-weight: 600 !important;

    letter-spacing: 0.04em !important;

    text-transform: uppercase !important;

    color: #8a8a8a !important;
}


/* ============================================================
   CADA CATEGORÍA
============================================================ */

.certjoin-sidebar ul.products li.product-category,
.certjoin-sidebar ul.products li.product,
.elementor .certjoin-sidebar ul.products li.product {

    float: none !important;

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    flex: 0 0 auto !important;

    margin: 0 !important;
    margin-bottom: 0 !important;

    padding: 0 !important;

    min-height: 0 !important;

    clear: both !important;

    position: relative !important;

    box-sizing: border-box !important;

    list-style: none !important;
}


/* Quitar bullets */
.certjoin-sidebar ul.products li::marker {
    content: "" !important;
}

.certjoin-sidebar ul.products li::before,
.certjoin-sidebar ul.products li::after {
    display: none !important;
    content: none !important;
}


/* ============================================================
   ENLACE COMPLETO DE CADA CATEGORÍA
============================================================ */

.certjoin-sidebar ul.products li.product-category > a,
.certjoin-sidebar ul.products li.product > a {

    display: grid !important;

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

    column-gap: 12px;

    align-items: center !important;

    width: 100% !important;

    min-height: 0 !important;

    margin: 0 !important;

    padding: 6px 8px !important;

    box-sizing: border-box !important;

    border-radius: 7px !important;

    background: transparent !important;

    color: inherit !important;

    text-decoration: none !important;

    box-shadow: none !important;

    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}


/* Hover */
.certjoin-sidebar ul.products li.product-category > a:hover,
.certjoin-sidebar ul.products li.product > a:hover {

    background: #f7f7f8 !important;

    text-decoration: none !important;
}


/* ============================================================
   IMÁGENES DE CATEGORÍAS
============================================================ */

.certjoin-sidebar ul.products li.product-category img,
.certjoin-sidebar ul.products li.product img,
.elementor .certjoin-sidebar ul.products li.product img {

    grid-column: 1 !important;
    grid-row: 1 !important;

    display: block !important;

    width: 25px !important;
    height: 25px !important;

    min-width: 25px !important;
    max-width: 25px !important;

    min-height: 25px !important;
    max-height: 25px !important;

    aspect-ratio: 1 / 1 !important;

    object-fit: contain !important;

    margin: 0 !important;

    padding: 0 !important;

    border: 0 !important;

    border-radius: 0 !important;

    box-shadow: none !important;

    background: transparent !important;
}


/* Placeholder de WooCommerce */
.certjoin-sidebar img.woocommerce-placeholder {

    width: 25px !important;
    height: 25px !important;

    min-width: 25px !important;
    max-width: 25px !important;

    min-height: 25px !important;
    max-height: 25px !important;

    object-fit: contain !important;
}


/* ============================================================
   TÍTULO DE CATEGORÍA
============================================================ */

.certjoin-sidebar .woocommerce-loop-category__title {

    grid-column: 2 !important;
    grid-row: 1 !important;

    display: flex !important;

    align-items: center !important;

    justify-content: space-between !important;

    gap: 8px !important;

    width: 100% !important;

    min-width: 0 !important;

    margin: 0 !important;

    padding: 0 !important;

    color: #2e2e2e !important;

    font-size: 15px !important;

    line-height: 1.25 !important;

    font-weight: 400 !important;

    letter-spacing: 0 !important;

    text-transform: none !important;

    text-align: left !important;
}


/* Hover del texto */
.certjoin-sidebar
li.product-category > a:hover
.woocommerce-loop-category__title {

    color: #d5b300 !important;
}


/* ============================================================
   CONTADOR
============================================================ */

.certjoin-sidebar
.woocommerce-loop-category__title
.count {

    display: inline-flex !important;

    align-items: center !important;

    justify-content: center !important;

    flex: 0 0 auto !important;

    min-width: 38px !important;

    margin: 0 0 0 auto !important;

    padding: 3px 8px !important;

    box-sizing: border-box !important;

    background: #f1f1f3 !important;

    color: #666666 !important;

    border-radius: 999px !important;

    font-size: 12px !important;

    line-height: 1.25 !important;

    font-weight: 400 !important;

    text-decoration: none !important;

    white-space: nowrap !important;
}


/* WooCommerce usa mark */
.certjoin-sidebar mark,
.certjoin-sidebar mark.count {

    background: #f1f1f3 !important;

    color: #666666 !important;
}


/* ============================================================
   CORREGIR ESTILOS DE ELEMENTOR / HELLO
============================================================ */

.elementor .certjoin-sidebar ul.products {

    margin-top: 0 !important;
    margin-bottom: 0 !important;
}


.elementor .certjoin-sidebar ul.products li.product {

    width: 100% !important;

    margin: 0 !important;
}


.elementor .certjoin-sidebar a {

    text-decoration: none !important;

    box-shadow: none !important;
}


.certjoin-sidebar .products::after {

    display: none !important;
}


/* ============================================================
   ELIMINAR ESPACIADO EXTRA
============================================================ */

.certjoin-sidebar ul.products li.product-category + li.product-category,
.certjoin-sidebar ul.products li.product + li.product {

    margin-top: 0 !important;
}


.certjoin-sidebar ul.products li.product-category {

    margin-bottom: 0 !important;
}


.certjoin-sidebar ul.products li.product {

    margin-bottom: 0 !important;
}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 1024px) {

    .certjoin-sidebar ul.products,
    .elementor .certjoin-sidebar ul.products {

        padding: 20px 18px 22px !important;

        border-radius: 14px !important;
    }


    .certjoin-sidebar ul.products::before {

        font-size: 13px !important;

        margin-bottom: 14px !important;
    }


    .certjoin-sidebar ul.products li.product-category > a,
    .certjoin-sidebar ul.products li.product > a {

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

        column-gap: 10px;

        padding: 6px 6px !important;
    }


    .certjoin-sidebar ul.products li.product-category img,
    .certjoin-sidebar ul.products li.product img {

        width: 24px !important;
        height: 24px !important;

        min-width: 24px !important;
        max-width: 24px !important;

        min-height: 24px !important;
        max-height: 24px !important;
    }


    .certjoin-sidebar
    .woocommerce-loop-category__title {

        font-size: 14px !important;
    }


    .certjoin-sidebar
    .woocommerce-loop-category__title
    .count {

        font-size: 11px !important;

        min-width: 36px !important;

        padding: 3px 7px !important;
    }
}


/* ============================================================
   MÓVIL
============================================================ */

@media (max-width: 767px) {

    .certjoin-sidebar ul.products,
    .elementor .certjoin-sidebar ul.products {

        padding: 18px 15px 20px !important;

        border-radius: 13px !important;
    }


    .certjoin-sidebar ul.products::before {

        font-size: 12px !important;

        margin-bottom: 13px !important;
    }


    .certjoin-sidebar ul.products li.product-category > a,
    .certjoin-sidebar ul.products li.product > a {

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

        column-gap: 9px;

        padding: 5px 4px !important;
    }


    .certjoin-sidebar ul.products li.product-category img,
    .certjoin-sidebar ul.products li.product img {

        width: 23px !important;
        height: 23px !important;

        min-width: 23px !important;
        max-width: 23px !important;

        min-height: 23px !important;
        max-height: 23px !important;
    }


    .certjoin-sidebar
    .woocommerce-loop-category__title {

        font-size: 14px !important;

        line-height: 1.2 !important;
    }


    .certjoin-sidebar
    .woocommerce-loop-category__title
    .count {

        min-width: 34px !important;

        padding: 2px 7px !important;

        font-size: 11px !important;
    }
}


/* ============================================================
   TARJETA PRODUCTO
============================================================ */

.certjoin-product-card {
    position: relative !important;
}


/* ============================================================
   SALE BADGE
   No ocupa espacio dentro de la tarjeta
============================================================ */

.certjoin-product-card .certjoin-sale {
    position: absolute !important;

    top: 0 !important;
    right: 0 !important;

    width: auto !important;
    max-width: max-content !important;

    margin: 0 !important;

    z-index: 20 !important;
}


/* Eliminar márgenes que pueda poner Elementor */
.certjoin-product-card .certjoin-sale,
.certjoin-product-card .certjoin-sale .elementor-widget-container,
.certjoin-product-card .certjoin-sale .elementor-heading-title {

    margin: 0 !important;
}


/* Estilo visual del Sale */
.certjoin-product-card .certjoin-sale .elementor-heading-title {

    display: inline-flex !important;

    align-items: center;
    justify-content: center;

    padding: 7px 11px !important;

    background: #303536 !important;
	border-radius: 5px !important;

    color: #f5d622 !important;

    font-size: 14px !important;
    line-height: 1 !important;

    font-weight: 600 !important;
}

/* ============================================================
   MISMA ALTURA PARA LOS TÍTULOS
============================================================ */

.certjoin-product-card .woocommerce-loop-product__title,
.certjoin-product-card .elementor-heading-title.product-title {
    min-height: 30px;
}

.certjoin-product-title {
    min-height: 50px;
}

.certjoin-product-title .elementor-widget-container {
    min-height: 50px;

    display: flex;
    align-items: flex-start;
}

.certjoin-product-title .elementor-heading-title {
    margin: 0 !important;
}


/* ============================================================
   CERTJOIN — PRODUCT DESCRIPTION ACCORDION
   Aplicación global a todos los productos
============================================================ */


/* ============================================================
   ACORDEÓN GENERAL
============================================================ */

.cert-acordeon {
    width: 100%;
    margin-top: 28px;

    display: flex;
    flex-direction: column;

    gap: 9px;
}


/* ============================================================
   CADA SECCIÓN
============================================================ */

.cert-acordeon details {
    width: 100%;

    margin: 0 !important;
    padding: 0 !important;

    background: #ffffff;

    border: 1px solid #e5e5e5;
    border-radius: 12px;

    overflow: hidden;

    box-sizing: border-box;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}


/* Hover sutil de la caja */
.cert-acordeon details:hover {
    border-color: #d9d9d9;
}


/* ============================================================
   SUMMARY / TÍTULO
============================================================ */

.cert-acordeon summary {
    position: relative;

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    box-sizing: border-box;

    margin: 0 !important;

    padding: 17px 20px !important;

    list-style: none !important;

    background: #ffffff;

    color: #333333 !important;

    font-family: inherit;

    font-size: 16px !important;
    line-height: 1.3 !important;

    font-weight: 600 !important;

    cursor: pointer;

    user-select: none;

    transition:
        background-color .2s ease,
        color .2s ease;
}


/* Quitar marcador nativo Chrome / Safari */
.cert-acordeon summary::-webkit-details-marker {
    display: none !important;
}


/* Quitar marcador estándar */
.cert-acordeon summary::marker {
    content: "" !important;
}


/* Hover */
.cert-acordeon summary:hover {
    background: #f8f8f8;
}


/* ============================================================
   FLECHA
============================================================ */

.cert-acordeon summary::after {
    content: "";

    width: 9px;
    height: 9px;

    min-width: 9px;

    margin-left: 20px;
    margin-right: 3px;

    border-right: 3px solid #999999;
    border-bottom: 3px solid #999999;

    transform: rotate(45deg);

    transition:
        transform .25s ease,
        border-color .2s ease;
}


/* Abierto */
.cert-acordeon details[open] summary::after {
    transform: rotate(225deg);
}


/* ============================================================
   CONTENIDO DESPLEGABLE
============================================================ */

.cert-acordeon-cuerpo {
    padding:
        0
        20px
        20px
        20px !important;

    margin: 0 !important;

    color: #444444;

    font-family: inherit;

    font-size: 14px !important;
    line-height: 1.7 !important;

    font-weight: 400;
}


/* ============================================================
   PÁRRAFOS
============================================================ */

.cert-acordeon-cuerpo p {
    margin:
        0
        0
        12px
        0 !important;

    padding: 0 !important;
}


.cert-acordeon-cuerpo p:last-child {
    margin-bottom: 0 !important;
}


/* ============================================================
   LISTAS
============================================================ */

.cert-acordeon-cuerpo ul,
.cert-acordeon-cuerpo ol {
    margin:
        0
        0
        0
        0 !important;

    padding-left:
        20px !important;
}


.cert-acordeon-cuerpo li {
    margin:
        0
        0
        7px
        0 !important;

    padding: 0 !important;

    color: #444444;
}


.cert-acordeon-cuerpo li:last-child {
    margin-bottom: 0 !important;
}


/* ============================================================
   LINKS
============================================================ */

.cert-acordeon-cuerpo a {
    color: #c7aa00 !important;

    font-weight: 500;

    text-decoration: none !important;

    transition: color .2s ease;
}


.cert-acordeon-cuerpo a:hover {
    color: #000000 !important;

    text-decoration: underline !important;
}


/* ============================================================
   NEGRITAS
============================================================ */

.cert-acordeon-cuerpo strong,
.cert-acordeon-cuerpo b {
    font-weight: 600;
}


/* ============================================================
   EVITAR ESTILOS DE HELLO ELEMENTOR
============================================================ */

.woocommerce
.cert-acordeon summary,

.elementor
.cert-acordeon summary {

    color: #333333 !important;

    text-decoration: none !important;

    border: 0 !important;

    box-shadow: none !important;
}


/* ============================================================
   MÓVIL
============================================================ */

@media (max-width: 767px) {

    .cert-acordeon {
        margin-top: 22px;

        gap: 7px;
    }


    .cert-acordeon summary {
        padding:
            14px
            16px !important;

        font-size:
            15px !important;
    }


    .cert-acordeon summary::after {
        width: 8px;
        height: 8px;

        min-width: 8px;

        margin-left: 14px;

        border-width: 2px;
    }


    .cert-acordeon-cuerpo {
        padding:
            0
            16px
            16px
            16px !important;

        font-size:
            14px !important;

        line-height:
            1.65 !important;
    }
}