/* ============================================================
   TABLA DE PRODUCTOS WOOCOMMERCE
   ============================================================ */


/* ============================================================
   COLORES CORPORATIVOS
   ============================================================ */
@media (min-width: 769px) {
    .tabla-categoria {
        scroll-margin-top: 120px;
    }
}
:root {

    --verde-corporativo: #6a9f3a;
    --verde-hover: #58852f;
    --verde-claro: #eef5e8;

}


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

.tabla-productos-wrapper {

    width: 100%;

    margin: 20px 0;

}


/* ============================================================
   CATEGORÍAS
   ============================================================ */

.tabla-categoria {

    width: 100%;

    margin-bottom: 30px;

}


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

.tabla-categoria-titulo {

    width: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    box-sizing: border-box;

    padding: 12px 15px;

    margin: 0;

    border: none;

    border-bottom: 2px solid var(--verde-corporativo);

    background: transparent;

    color: var(--verde-corporativo);

    font-size: 20px;

    font-weight: 600;

    text-align: left;

    cursor: pointer;

}


/* ============================================================
   NOMBRE CATEGORÍA
   ============================================================ */

.tabla-categoria-nombre {

    display: block;

    color: inherit;

}


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

.tabla-categoria-flecha {

    display: none;

}


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

.tabla-categoria-contenido {

    width: 100%;

}


/* ============================================================
   TABLA
   ============================================================ */

.tabla-productos {

    width: 100%;

    border-collapse: collapse;

    background: #ffffff;

    font-size: 15px;

}


/* ============================================================
   CELDAS
   ============================================================ */

.tabla-productos tbody td {

    padding: 12px;

    border-bottom: 1px solid #e5e5e5;

    vertical-align: middle;

}


/* ============================================================
   IMAGEN
   ============================================================ */

.tabla-productos .col-imagen {

    width: 100px;

    text-align: center;

}


.tabla-productos .col-imagen img {

    width: 75px;

    height: 75px;

    object-fit: contain;

    display: block;

    margin: auto;

}


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

.tabla-productos .col-producto {

    min-width: 250px;

}


.nombre-producto {

    display: block;

    font-weight: 600;

    text-decoration: none;

    color: inherit;

    font-size: 16px;

}


.nombre-producto:hover {

    color: var(--verde-corporativo);

    text-decoration: underline;

}


/* ============================================================
   SKU
   ============================================================ */

.sku-producto {

    display: block;

    margin-top: 5px;

    font-size: 12px;

    color: #777777;

}


/* ============================================================
   PRECIO
   ============================================================ */

.tabla-productos .col-precio {

    width: 130px;

    white-space: nowrap;

    font-weight: 600;

}


.tabla-productos .col-precio .price {

    color: var(--verde-corporativo);

}


/* ============================================================
   CANTIDAD
   ============================================================ */

.tabla-productos .col-cantidad {

    width: 150px;

    text-align: center;

}


.selector-cantidad {

    display: inline-flex;

    align-items: center;

    border: 1px solid #cccccc;

    border-radius: 4px;

    overflow: hidden;

    height: 40px;

    background: #ffffff;

}


.selector-cantidad button {

    width: 38px;

    height: 40px;

    border: none;

    background: #f5f5f5;

    color: #333333;

    cursor: pointer;

    font-size: 20px;

    line-height: 1;

    padding: 0;

}


.selector-cantidad button:hover {

    background: var(--verde-corporativo);

    color: #ffffff;

}


.cantidad-input {

    width: 50px !important;

    height: 40px !important;

    border: none !important;

    border-left: 1px solid #dddddd !important;

    border-right: 1px solid #dddddd !important;

    text-align: center;

    padding: 0 !important;

    margin: 0 !important;

    box-shadow: none !important;

}


/* ============================================================
   QUITAR FLECHAS INPUT
   ============================================================ */

.cantidad-input::-webkit-inner-spin-button,
.cantidad-input::-webkit-outer-spin-button {

    -webkit-appearance: none;

    margin: 0;

}


.cantidad-input {

    -moz-appearance: textfield;

}


/* ============================================================
   CARRITO
   ============================================================ */

.tabla-productos .col-carrito {

    width: 190px;

    text-align: right;

}


.formulario-carrito {

    width: 100%;

    display: flex;

    justify-content: flex-end;

}


/* ============================================================
   BOTÓN AÑADIR
   ============================================================ */

.boton-anadir-carrito {

    display: block;

    width: 180px;

    padding: 11px 15px;

    border: none;

    border-radius: 4px;

    cursor: pointer;

    font-size: 14px;

    font-weight: 600;

    line-height: 1.2;

    text-align: center;

    background: var(--verde-corporativo);

    color: #ffffff;

    transition:
        background .2s ease,
        opacity .2s ease;

}


.boton-anadir-carrito:hover {

    background: var(--verde-hover);

    color: #ffffff;

}


.boton-anadir-carrito:disabled {

    cursor: default;

}


/* ============================================================
   PRODUCTO EN CARRITO
   ============================================================ */

.boton-anadir-carrito.producto-en-carrito {

    background: var(--verde-corporativo);

    opacity: .65;

    cursor: not-allowed;

}


/* ============================================================
   BOTÓN CARGANDO
   ============================================================ */

.boton-anadir-carrito.boton-cargando {

    opacity: .6;

    cursor: wait;

}


/* ============================================================
   SIN STOCK
   ============================================================ */

.sin-stock-texto {

    color: #999999;

}


/* ============================================================
   AVISO
   ============================================================ */

.tabla-aviso-carrito {

    position: fixed;

    top: 20px;

    right: 20px;

    z-index: 999999;

    background: var(--verde-corporativo);

    color: #ffffff;

    padding: 12px 18px;

    border-radius: 4px;

    font-size: 14px;

    opacity: 0;

    transform: translateY(-10px);

    transition:
        opacity .3s ease,
        transform .3s ease;

}


.tabla-aviso-carrito.visible {

    opacity: 1;

    transform: translateY(0);

}


.tabla-aviso-carrito.error {

    background: #c00000;

}


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

@media (max-width: 768px) {


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

    .tabla-productos-wrapper {

        width: 100%;

        margin: 10px 0;

    }


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

    .tabla-categoria {

        margin-bottom: 10px;

        border-bottom: 1px solid #dddddd;

    }


    /* ========================================================
       BOTÓN CATEGORÍA
       ======================================================== */

    .tabla-categoria-titulo {

        width: 100%;

        padding: 14px 12px;

        font-size: 17px;

        border: none;

        border-radius: 4px;

        background: var(--verde-corporativo);

        color: #ffffff;

    }


    .tabla-categoria-titulo:hover {

        background: var(--verde-hover);

    }


    .tabla-categoria-nombre {

        color: #ffffff;

    }


    /* ========================================================
       SIGNO +
       ======================================================== */

    .tabla-categoria-flecha {

        display: block;

        width: 24px;

        height: 24px;

        font-size: 24px;

        font-weight: 300;

        line-height: 20px;

        text-align: center;

        transition:
            transform .2s ease;

    }


    /* CERRADA */

    .tabla-categoria:not(.categoria-abierta)
    .tabla-categoria-flecha {

        transform: rotate(0deg);

    }


    /* ABIERTA */

    .tabla-categoria.categoria-abierta
    .tabla-categoria-flecha {

        transform: rotate(45deg);

    }


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

    .tabla-categoria:not(.categoria-abierta)
    .tabla-categoria-contenido {

        display: none;

    }


    .tabla-categoria.categoria-abierta
    .tabla-categoria-contenido {

        display: block;

    }


    /* ========================================================
       TABLA
       ======================================================== */

    .tabla-productos {

        display: block;

        width: 100%;

        font-size: 14px;

    }


    .tabla-productos tbody {

        display: block;

        width: 100%;

    }


    /* ========================================================
       FILA PRODUCTO
       ======================================================== */

    .tabla-productos tbody tr {

        display: grid;

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

        grid-template-rows:
            auto
            auto
            auto
            auto;

        column-gap: 12px;

        width: 100%;

        padding: 12px 5px;

        border-bottom: 1px solid #e5e5e5;

        box-sizing: border-box;

    }


    /* ========================================================
       IMAGEN
       ======================================================== */

    .tabla-productos .col-imagen {

        grid-column: 1;

        grid-row: 1 / 5;

        width: 105px;

        min-width: 105px;

        padding: 0;

        border: none;

        display: flex;

        align-items: flex-start;

        justify-content: center;

    }


    .tabla-productos .col-imagen img {

        width: 90px;

        height: 90px;

        object-fit: contain;

        margin: 10;

    }


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

    .tabla-productos .col-producto {

        grid-column: 2;

        grid-row: 1;

        width: 100%;

        min-width: 0;

        padding: 0 0 5px 0;

        border: none;

        text-align: left;

    }


    .nombre-producto {

        font-size: 25px!important;

        line-height: 1.25;
        text-decoration:none!important;
       color: #96B524!important;

    }


    .sku-producto {

        margin-top: 3px;

        font-size: 11px;

    }


    /* ========================================================
       PRECIO
       ======================================================== */

    .tabla-productos .col-precio {

        grid-column: 2;

        grid-row: 2;

        width: 100%;

        padding: 2px 0 6px 0;

        border: none;

        font-size: 15px;

        text-align: left;

    }


    /* ========================================================
       CANTIDAD
       ======================================================== */

    .tabla-productos .col-cantidad {

        grid-column: 2;

        grid-row: 3;

        width: 100%;

        padding: 3px 0 7px 0;

        border: none;

        text-align: left;

    }


    .selector-cantidad {

        height: 36px;

    }


    .selector-cantidad button {

        width: 34px;

        height: 36px;

        font-size: 19px;

    }


    .cantidad-input {

        width: 55px !important;

        height: 36px !important;

        font-size: 15px !important;

    }


    /* ========================================================
       CARRITO
       ======================================================== */

    /* ------------------------------------------------------
   Carrito
   ------------------------------------------------------ */

.col-carrito {
    grid-column: 2;
    grid-row: 4;

    width: 100%;

    text-align: left;

    padding-top: 8px !important;
}


.formulario-carrito {
    width: 100%;

    display: flex;

    justify-content: flex-start;

    margin: 0;
}


.boton-anadir-carrito {
    min-height: 38px;

    padding:-20px 13px;

    font-size: 8px;
}

    /* ========================================================
       AVISO
       ======================================================== */

    .tabla-aviso-carrito {

        top: 15px;

        left: 15px;

        right: 15px;

        text-align: center;

        font-size: 13px;

    }

}


/* ============================================================
   MÓVILES MUY PEQUEÑOS
   ============================================================ */

@media (max-width: 400px) {


    .tabla-productos tbody tr {

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

        column-gap: 10px;

    }


    .tabla-productos .col-imagen {

        width: 85px;

        min-width: 85px;

    }


    .tabla-productos .col-imagen img {

        width: 80px;

        height: 80px;

    }


    .nombre-producto {

        font-size: 14px;

    }


    .boton-anadir-carrito {

        min-width: 140px;

        font-size: 12px;

    }

}