/* =========================================
   GRID DE PRODUCTOS
   ========================================= */

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none;
    content: none;
}

.woocommerce ul.products li.product {
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
}


/* =========================================
   RESULTADOS DE WOOCOMMERCE
   ========================================= */

.woocommerce .woocommerce-result-count {
    display: none;
}


/* =========================================
   BARRA DE FILTROS
   ========================================= */

.gp-shop-toolbar {
    position: relative;

    display: grid;
    grid-template-columns: minmax(280px, 420px) auto;
    align-items: end;
    justify-content: space-between;
    gap: 60px;

    width: 100%;
    margin: 0 0 35px;
    padding: 28px 0 10px;

    border-top: 1px solid #e5e5e5;
}

.gp-shop-toolbar__price {
    width: 100%;
    min-width: 0;
}

.gp-shop-toolbar__ordering {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}


/* =========================================
   ORDENACIÓN DEL CATÁLOGO
   ========================================= */

.woocommerce .woocommerce-ordering.gp-ordering {
    position: relative;

    float: none;
    clear: none;

    width: 190px;
    margin: 0;
}

.gp-ordering > select.orderby {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    margin: -1px !important;
    padding: 0 !important;

    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;

    border: 0 !important;
}

.gp-ordering__custom {
    position: relative;
    width: 100%;

    font-family: var(--font-body-family, sans-serif);
}

.woocommerce .gp-ordering__trigger,
.woocommerce .gp-ordering__trigger:hover,
.woocommerce .gp-ordering__trigger:focus,
.woocommerce .gp-ordering__trigger:active {
    position: relative;

    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;

    width: 100%;
    min-height: 38px;
    padding: 6px 30px 6px 0;

    border: 0;
    border-bottom: 1px solid #222;
    border-radius: 0;

    background: #fff;
    color: #222;

    box-shadow: none;
    outline: none;

    text-align: left;
    cursor: pointer;
}

.gp-ordering__label {
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.gp-ordering__value {
    display: none;
}

.gp-ordering__arrow {
    position: absolute;
    top: 11px;
    right: 3px;

    width: 10px;
    height: 10px;

    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;

    transform: rotate(45deg);

    transition:
        top .2s ease,
        transform .2s ease;
}

.gp-ordering__custom.is-open .gp-ordering__arrow {
    top: 16px;
    transform: rotate(225deg);
}

.gp-ordering__options {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 100;

    width: 100%;
    max-height: 320px;
    margin: 0;
    padding: 0;

    overflow-y: auto;

    list-style: none;

    border: 1px solid #ddd;
    border-top: 0;

    background: #fff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .08);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    pointer-events: none;

    transition:
        opacity .2s ease,
        visibility .2s ease,
        transform .2s ease;
}

.gp-ordering__custom.is-open .gp-ordering__options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.woocommerce .gp-ordering__options .gp-ordering__option {
    display: block;

    width: 100%;
    margin: 0;
    padding: 9px 10px;

    list-style: none;

    background: #fff;
    color: #222;

    font-size: 11px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: .02em;

    cursor: pointer;

    transition:
        background-color .15s ease,
        color .15s ease;
}

.woocommerce .gp-ordering__options .gp-ordering__option:hover,
.woocommerce .gp-ordering__options .gp-ordering__option.is-selected {
    background: #222;
    color: #fff;
}


/* =========================================
   FILTRO DE PRECIO
   ========================================= */

.gp-price-filter {
    width: 100%;
}

.gp-price-filter .widget,
.gp-price-filter form {
    margin: 0;
}

.gp-price-filter .price_slider_wrapper {
    position: relative;
    padding-top: 27px;
}


/* Texto del rango */

.gp-price-filter .price_label {
    position: absolute;
    top: 0;
    left: 0;

    display: block !important;

    color: #222;

    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.gp-price-filter .price_label .from,
.gp-price-filter .price_label .to {
    color: #222;
    font-weight: 600;
}


/* Línea completa del slider */

.woocommerce .gp-price-filter .price_slider {
    position: relative;

    height: 6px;
    margin: 12px 8px 0;

    border: 0;
    border-radius: 999px;

    background: #ededed;
}


/* Tramo entre mínimo y máximo */

.woocommerce .gp-price-filter .price_slider .ui-slider-range {
    position: absolute;
    z-index: 1;

    height: 100%;

    border: 0;
    border-radius: 999px;

    background: #222;
}


/* Tiradores mínimo y máximo */

.woocommerce .gp-price-filter .price_slider .ui-slider-handle {
    position: absolute;
    top: 50%;
    z-index: 2;

    width: 16px;
    height: 16px;

    margin-top: -8px;
    margin-left: -8px;

    border: 0;
    border-radius: 50%;

    background: #222;
    box-shadow: none;

    cursor: grab;
    touch-action: none;

    transition:
        transform .15s ease,
        box-shadow .15s ease;
}

.woocommerce .gp-price-filter .price_slider .ui-slider-handle:hover,
.woocommerce .gp-price-filter .price_slider .ui-slider-handle:focus {
    transform: scale(1.12);
    box-shadow: 0 0 0 4px rgba(34, 34, 34, .15);
    outline: none;
}

.woocommerce .gp-price-filter .price_slider .ui-slider-handle:active {
    cursor: grabbing;
    transform: scale(1.16);
}


/* Campos necesarios para enviar min_price y max_price */

.gp-price-filter .price_slider_amount input {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    margin: -1px !important;
    padding: 0 !important;

    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;

    border: 0 !important;
}


/* El envío es automático mediante JavaScript */

.gp-price-filter .price_slider_amount .button {
    display: none !important;
}


/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .gp-shop-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 28px;
    }

    .gp-shop-toolbar__price {
        width: 100%;
    }

    .gp-shop-toolbar__ordering {
        justify-content: flex-start;
    }

    .woocommerce .gp-shop-toolbar .woocommerce-ordering.gp-ordering {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   SIN RESULTADOS
   ========================================= */

.woocommerce-no-products-found {
    width: 100%;
}

.gp-no-products {
    width: 100%;
    margin: 20px 0 50px;
    padding: 38px;

    border: 1px solid #e5e5e5;
    background: #fff;
    color: #222;

    text-align: center;
}

.gp-no-products__title {
    margin: 0 0 8px;

    color: #222;

    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.gp-no-products__text {
    margin: 0 0 22px;

    color: #666;

    font-size: 14px;
    line-height: 1.5;
}

.gp-no-products__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 0 22px;

    border: 1px solid #222;
    border-radius: 999px;

    background: #222;
    color: #fff !important;

    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;

    transition:
        background-color .2s ease,
        color .2s ease;
}

.gp-no-products__clear:hover,
.gp-no-products__clear:focus {
    background: #fff;
    color: #222 !important;
}

/* Elimina el aspecto azul del aviso nativo si apareciera. */
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-error {
    border-top-color: #222;
    background: #f7f7f7;
    color: #222;
}

.woocommerce .woocommerce-info::before,
.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-error::before {
    color: #222;
}