/*
Theme Name: FHSERVER Astra Child
Description: Tema hijo de Astra para FHSERVER.
Author: FHSERVER SpA
Template: astra
Version: 1.1.0
Text Domain: fhserver-astra-child
*/

/* =========================================================
   CUADRÍCULA DE PRODUCTOS
   ========================================================= */

.woocommerce ul.products {
    align-items: stretch;
}

.woocommerce ul.products li.product {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0;
    border: 1px solid #0b655c;
    border-radius: 5px;
    background: #ffffff;
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 50, 45, 0.12);
}

/* =========================================================
   ORDEN DE LOS ELEMENTOS
   ========================================================= */

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
    order: 1;
}

.woocommerce ul.products li.product .astra-shop-summary-wrap {
    order: 2;
}

.woocommerce ul.products li.product .fh-card-footer {
    order: 3;
}

/* =========================================================
   ÁREA DE LA IMAGEN
   ========================================================= */

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
    position: relative;
    box-sizing: border-box;
    padding: 58px 22px 18px;
    border-bottom: 1px solid #d7e0de;
    background: #ffffff;
}

.woocommerce ul.products li.product
.astra-shop-thumbnail-wrap
.woocommerce-loop-product__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.woocommerce ul.products li.product img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin: 0;
    object-fit: contain;
}

/* =========================================================
   ETIQUETA DE MARCA
   ========================================================= */

.woocommerce ul.products li.product .fh-product-brand {
    position: absolute;
    top: 13px;
    left: 13px;
    z-index: 3;
    display: block;
    overflow: hidden;
    max-width: 46%;
    box-sizing: border-box;
    padding: 5px 9px;
    border: 1px solid #0b655c;
    border-radius: 4px;
    background: #ffffff;
    color: #17201f;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   ESTADO DEL PRODUCTO
   ========================================================= */

.woocommerce ul.products li.product .fh-product-status {
    position: absolute;
    top: 13px;
    right: 13px;
    z-index: 3;
    display: block;
    max-width: 48%;
    box-sizing: border-box;
    padding: 6px 10px;
    border-radius: 4px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
    text-align: center;
    white-space: nowrap;
}

.woocommerce ul.products li.product .fh-status-instock {
    background: #147a52;
}

.woocommerce ul.products li.product .fh-status-onbackorder {
    background: #b66b00;
}

.woocommerce ul.products li.product .fh-status-outofstock {
    background: #626b6a;
}

/* =========================================================
   MARCA Y SKU
   ========================================================= */

.woocommerce ul.products li.product .fh-product-meta {
    display: block;
    overflow: hidden;
    margin: 14px 0 0;
    color: #7a8382;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

/* =========================================================
   RESUMEN Y TÍTULO
   ========================================================= */

.woocommerce ul.products li.product .astra-shop-summary-wrap {
    display: flex;
    flex-direction: column;
    flex-grow: 0;
    box-sizing: border-box;
    padding: 17px 20px 14px;
}

.woocommerce ul.products li.product
.astra-shop-summary-wrap
.ast-loop-product__link {
    color: inherit;
    text-decoration: none;
}

.woocommerce ul.products li.product
.astra-shop-summary-wrap
.woocommerce-loop-product__title {
    min-height: 2.6em;
    margin: 0;
    color: #19221f;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
}

/* =========================================================
   PRECIO Y BOTÓN COTIZAR
   ========================================================= */

.woocommerce ul.products li.product .fh-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 64px;
    box-sizing: border-box;
    gap: 15px;
    margin: auto 0 0;
    padding: 4px 20px 20px;
}

.woocommerce ul.products li.product .fh-card-price {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 40px;
    margin: 0;
    color: #191d1c;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.woocommerce ul.products li.product .fh-card-price .price {
    margin: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.woocommerce ul.products li.product .fh-card-price ins {
    text-decoration: none;
}

.woocommerce ul.products li.product .fh-card-price del {
    margin-right: 5px;
    color: #7b8382;
    font-size: 14px;
}

.woocommerce ul.products li.product
.fh-card-price
.price-on-request {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* Botón Cotizar */

.woocommerce ul.products li.product .fh-quote-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    min-height: 40px;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 17px;
    border: 0;
    border-radius: 4px;
    background: #075f56;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
}

.woocommerce ul.products li.product .fh-quote-button:hover,
.woocommerce ul.products li.product .fh-quote-button:focus {
    background: #034941;
    color: #ffffff !important;
}

/* =========================================================
   OCULTAR ELEMENTOS ORIGINALES DE ASTRA
   ========================================================= */

/* Categoría predeterminada */

.woocommerce ul.products li.product .ast-woo-product-category {
    display: none !important;
}

/* Botón predeterminado "Leer más" */

.woocommerce ul.products li.product
.astra-shop-summary-wrap
.button {
    display: none !important;
}

/* Botón flotante de compra */

.woocommerce ul.products li.product .ast-on-card-button {
    display: none !important;
}

/* Valoraciones predeterminadas */

.woocommerce ul.products li.product .star-rating {
    display: none !important;
}

/* =========================================================
   TABLETAS
   ========================================================= */

@media (max-width: 921px) {
    .woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
        padding: 54px 18px 18px;
    }

    .woocommerce ul.products li.product .astra-shop-summary-wrap {
        padding: 16px 18px 12px;
    }

    .woocommerce ul.products li.product .fh-card-footer {
        padding: 4px 18px 18px;
    }
}

/* =========================================================
   CELULARES
   ========================================================= */

@media (max-width: 544px) {
    .woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
        padding: 52px 16px 16px;
    }

    .woocommerce ul.products li.product .astra-shop-summary-wrap {
        padding: 15px 16px 12px;
    }

    .woocommerce ul.products li.product .fh-card-footer {
        gap: 10px;
        padding: 4px 16px 16px;
    }

    .woocommerce ul.products li.product .fh-product-brand,
    .woocommerce ul.products li.product .fh-product-status {
        font-size: 10px;
    }

    .woocommerce ul.products li.product
    .astra-shop-summary-wrap
    .woocommerce-loop-product__title {
        min-height: auto;
        font-size: 15px;
    }

    .woocommerce ul.products li.product
    .fh-card-price
    .price-on-request {
        font-size: 13px;
    }

    .woocommerce ul.products li.product .fh-quote-button {
        min-width: 78px;
        padding-right: 14px;
        padding-left: 14px;
        font-size: 13px;
    }
}

/* Pantallas muy estrechas */

@media (max-width: 350px) {
    .woocommerce ul.products li.product .fh-card-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .woocommerce ul.products li.product .fh-card-price {
        min-height: auto;
    }

    .woocommerce ul.products li.product .fh-quote-button {
        width: 100%;
    }
}