/**
 * WooCommerce Product Card Styles
 * Bestand: inc/woocommerce-product-card.css
 */


/* ── Aantal producten ─────────────────────────────── */

.wooh-product-count {
    font-size: 0.9rem;
    color: #aaa;
    display: inline-block;
}


/* ── Afbeelding wrapper ───────────────────────────── */

.wooh-product-thumb-wrap {
    position: relative;
    overflow: hidden;
    display: block;
    background: #f5f5f5;
    border-radius: 8px;
    aspect-ratio: 1 / 1; /* Aanpassen naar jouw productafbeelding ratio */
}

.wooh-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.35s ease, transform 0.45s ease;
    will-change: opacity, transform;
}

.wooh-thumb--main {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.wooh-thumb--hover {
    opacity: 0;
    transform: scale(1.04);
    z-index: 2;
}

.has-hover-image:hover .wooh-thumb--hover,
.has-hover-image:focus-within .wooh-thumb--hover {
    opacity: 1;
    transform: scale(1);
}

.has-hover-image:hover .wooh-thumb--main {
    opacity: 0;
}

.wooh-product-thumb-wrap:not(.has-hover-image):hover .wooh-thumb--main {
    transform: scale(1.03);
}


/* ── WooCommerce clearfix pseudo-elements verwijderen ── */
/* ::before en ::after worden alleen gebruikt voor de oude float-layout */

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}


/* ── Product card layout — flex column ───────────── */

.woocommerce ul.products li.product {
    display: flex;
    flex-direction: column;
}

/*
 * De product-link bevat nu alleen afbeelding + titel.
 * flex: 0 auto — groeit niet mee, zodat de link niet de
 * volledige kaarthoogte inneemt.
 */
.woocommerce ul.products li.product .woocommerce-LoopProduct-link {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
}


/* ── Productnaam ──────────────────────────────────── */

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 10px 0 1px;
    padding: 0;
    line-height: 1.35;
    color: #111;
    /* Vaste hoogte voor 2 regels — kaarten in een rij blijven uitlijnen */
    min-height: calc(2 * 1.2rem * 1.35);
}


/* ── Categorie ────────────────────────────────────── */

/* Hoge specificiteit zodat WooCommerce display:block niet wint */
.woocommerce ul.products li.product .wooh-product-category {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.875rem;
    line-height: 1;
    color: #aaa;
    /* Vaste hoogte — leeg en gevuld zijn altijd identiek */
    height: 1.5rem;
    overflow: hidden;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

/* Tag-icoon via SVG */
.woocommerce ul.products li.product .wooh-product-category:not(.wooh-product-category--empty)::before {
    content: '';
    display: block;
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'/%3E%3Ccircle cx='7' cy='7' r='1.5' fill='%23aaa' stroke='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.75;
}

.woocommerce ul.products li.product .wooh-product-category a {
    color: inherit;
    text-decoration: none;
}

.woocommerce ul.products li.product .wooh-product-category a:hover {
    color: #777;
}


/* ── Prijs ────────────────────────────────────────── */

.woocommerce ul.products li.product .price {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
}

.woocommerce ul.products li.product .price del {
    color: #aaa;
    font-weight: 400;
    font-size: 1rem;
    margin-right: 4px;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none;
    color: #001F17;
}


/* ── Bestelknop ───────────────────────────────────── */

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
    display: block;
    width: 100%;
    margin-top: auto; /* Knop altijd onderaan de kaart */
    padding: 9px 14px;
    background-color: transparent;
    color: #111;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    letter-spacing: 0.01em;
    border: 1px solid #ccc;
    border-radius: 0;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover {
    border-color: #111;
    color: #111;
    background-color: transparent;
}

.woocommerce ul.products li.product .added_to_cart {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 5px;
    text-decoration: none;
}


/* ── Mobiel (≤ 768px) ────────────────────────────── */

@media (max-width: 768px) {

    /* 2 kolommen grid — reset WooCommerce float layout */
    .woocommerce ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }

    .woocommerce ul.products li.product {
        float: none !important;
        width: auto !important;
        margin: 0 !important;
        clear: none !important;
    }

    /* Titel compacter */
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 0.85rem;
        min-height: calc(2 * 0.85rem * 1.35);
        margin-top: 8px;
    }

    /* Categorie tag */
    .woocommerce ul.products li.product .wooh-product-category {
        font-size: 0.7rem;
        height: 1.25rem;
    }

    /* Prijs */
    .woocommerce ul.products li.product .price {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    /* Knop — grotere touch target */
    .woocommerce ul.products li.product .button,
    .woocommerce ul.products li.product .add_to_cart_button {
        padding: 12px 8px;
        font-size: 0.75rem;
        min-height: 44px;
    }
}
