/* ==================== */
/* WOOCOMMERCE PRODUCTS */
/* ==================== */

.woocommerce ul.products {
    background: #f4f7fb;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
    padding: 20px 0 8px;
    list-style: none;
    margin: 0;
}

.woocommerce ul.products li.product {
    background: var(--card, #fff);
    border: 1px solid var(--border, #e6eaf1);
    border-radius: var(--r-md, 18px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
    box-shadow: var(--shadow-soft, 0 10px 28px rgba(15, 23, 42, 0.06));
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
    transform: translateY(-4px);
    border-color: rgba(47, 111, 237, 0.35);
}

/*
 * WooCommerce DOM structure:
 * <li.product>
 *   <a.woocommerce-loop-product__link>  ← contains: img + h2 + price
 *   <a.button>                          ← sibling of link
 */

/* Link = flex column: image on top, title+price below */
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
    background: transparent;
}

/* Image: fixed height so the card stays proportional */
.woocommerce ul.products li.product img {
    width: 100%;
    height: 170px;
    object-fit: contain;
    background: #fff;
    padding: 18px 9px 0;
    flex-shrink: 0;
    transition: transform 0.35s ease;
}

.woocommerce ul.products li.product:hover img {
    transform: scale(1.06);
}

/* Sale badge */
.woocommerce ul.products li.product .onsale {
    display: none;
}

/* Hide product categories shown by Blocksy on card */
.woocommerce ul.products li.product .entry-meta {
    display: none;
}

/* Title and price are inside the link, need horizontal padding */
.woocommerce ul.products li.product .woocommerce-loop-category__title,
.woocommerce ul.products li.product h2 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text, #0f172a);
    margin: 0;
    line-height: 1.45;
    letter-spacing: 0.1px;
    padding: 0px 16px 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.woocommerce ul.products li.product .price {
    display: none !important;
}

/* "Ver mas" button — subtle by default, filling in dark on hover.
   margin-top:auto pushes it to the card bottom so buttons align across a row
   regardless of 1- or 2-line titles. */
.woocommerce ul.products li.product .button {
    display: block;
    background: #f8fafc;
    color: var(--text, #0f172a);
    border: 1px solid #e2e8f0;
    margin: auto 14px 16px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-align: center;
    width: calc(100% - 28px);
    opacity: 1;
    visibility: visible;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

@media (min-width: 769px) {
    .woocommerce ul.products li.product:hover .button {
        background: #0f172a;
        color: #ffffff;
        border-color: #0f172a;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
        transform: translateY(-2px);
    }
}

.woocommerce ul.products li.product .button:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

/* Mobile */
@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .woocommerce ul.products li.product:hover {
        transform: none;
    }
}
