/*
 * Vloershop Core — productkaart + grid (luxuryfloors-stijl).
 * Bewust assertief (incl. !important) om de thema-/WooCommerce-default-styling
 * te overschrijven. Kleuren via --vs-* met concrete fallbacks.
 */

/* ── Grid: neem de WooCommerce-archiefcontainer over ───────────────── */
.woocommerce ul.products,
.woocommerce-page ul.products,
ul.products.columns-1,
ul.products.columns-2,
ul.products.columns-3,
ul.products.columns-4,
ul.products.columns-5,
ul.products.columns-6,
.vs-product-grid {
    --vs-grid-columns: 4;
    display: grid !important;
    grid-template-columns: repeat(var(--vs-grid-columns), minmax(0, 1fr));
    gap: 1.5rem;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100%;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after,
.vs-product-grid::before,
.vs-product-grid::after {
    content: none !important;
    display: none !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.vs-product-grid > li.product {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
    list-style: none !important;
    display: flex;
}

.vs-product-grid > li.product > .vs-product-card {
    width: 100%;
}

@media (max-width: 1024px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .vs-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products,
    .vs-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
}

/* ── Kaart ─────────────────────────────────────────────────────────── */
.vs-product-card {
    --vs-accent: var(--vs-color-primary, #002e85);
    --vs-price-bg: var(--vs-color-success, #42ac6f);
    --vs-muted: var(--vs-color-muted, #667085);

    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
    overflow: hidden;
    text-align: left !important;
    transition: transform .15s ease;
}

.vs-product-card:hover,
.vs-product-card:focus-within {
    transform: translateY(-2px);
}

/* Media */
.vs-product-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f4f5f7;
    overflow: hidden;
    border-radius: inherit;
}

/* Wishlist rechtsboven */
.vs-product-card__wishlist {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 3;
    width: 40px !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .9) !important;
    background-image: none !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12) !important;
    color: #5b6b7b !important;
    cursor: pointer;
    line-height: 0 !important;
}

.vs-product-card__wishlist:hover,
.vs-product-card__wishlist:focus {
    background: #fff !important;
    color: #1a1a2e !important;
}

/* Opgeslagen: gevuld rood hartje */
.vs-product-card__wishlist.is-active {
    color: #e3342f !important;
    background: #fff !important;
}

.vs-product-card__wishlist.is-active svg path {
    fill: #e3342f !important;
    stroke: #e3342f !important;
}

.vs-product-card__media-link {
    display: block;
    width: 100%;
    height: 100%;
}

.vs-product-card__image {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover;
    transition: opacity .3s ease, transform .4s ease;
}

.vs-product-card__image--hover {
    opacity: 0;
}

@media (hover: hover) {
    .vs-product-card:hover .vs-product-card__image {
        transform: scale(1.05);
    }

    .vs-product-card:hover .vs-product-card__image--hover {
        opacity: 1;
    }
}

/* Promo-labels over de foto (linksonder) */
.vs-product-card__labels {
    position: absolute;
    left: .6rem;
    bottom: .6rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    pointer-events: none;
}

.vs-product-card__label {
    display: inline-block;
    padding: .3rem .6rem;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--vs-accent);
    background-color: #f0fdfe;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

/* Actie-afbeelding als badge: échte afbeelding linksboven op de foto
   (vervangt het tekstpilletje zodra de actie een label-afbeelding heeft). */
.vs-product-card__labels--img {
    top: .6rem;
    bottom: auto;
}

.vs-product-card__label-img {
    display: block;
    width: 109px;
    max-width: 50%;
    height: auto;
}

/* Body */
.vs-product-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    flex: 1 1 auto;
}

.vs-product-card__title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    color: var(--vs-card-title, #1a1a2e) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.vs-product-card__title a {
    color: inherit !important;
    text-decoration: none !important;
}

.vs-product-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Prijs: groene pill + doorgestreepte oude prijs */
.vs-product-card__price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.vs-product-card__price-current {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    padding: 10px 16px 10px 12px;
    font-size: 21px;
    font-weight: 700;
    color: #fff !important;
    background: var(--vs-price-bg, #67a05b);
    background-image: var(--vs-price-bg-image, linear-gradient(#89c270, #67a05b));
    border-radius: 20px 0;
    white-space: nowrap;
    line-height: 1;
}

.vs-product-card__price-current .woocommerce-Price-amount,
.vs-product-card__price-current bdi {
    color: #fff !important;
}

.vs-product-card__price-unit {
    margin-left: 4px;
    font-size: .52em;
    font-weight: 700;
    letter-spacing: 0.01em;
    align-self: center;
    opacity: 0.95;
}

.vs-product-card__price-old {
    font-size: .9rem;
    color: var(--vs-muted);
}

.vs-product-card__price-old del,
.vs-product-card__price-old .woocommerce-Price-amount {
    color: var(--vs-muted) !important;
}

/* USP's als vinkjes */
.vs-product-card__usps {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.vs-product-card__usp {
    --vs-usp-color: var(--vs-color-success, #42ac6f);
    display: flex !important;
    align-items: center;
    gap: .45rem;
    margin: 0 !important;
    font-size: .85rem;
    color: var(--vs-color-text, #344054);
}

.vs-product-card__usp::before {
    content: none !important;
}

.vs-product-card__check {
    color: var(--vs-usp-color);
    flex: 0 0 auto;
}

.vs-product-card__usp-icon {
    width: 16px !important;
    height: 16px !important;
    object-fit: contain;
    flex: 0 0 auto;
}

/* Vloertype */
.vs-product-card__type {
    margin-top: auto;
    padding-top: .25rem;
    font-size: .8rem;
    color: var(--vs-muted);
}

/* Shortcode-single niet uitrekken */
.vs-product-grid--single {
    grid-template-columns: minmax(0, 320px) !important;
}

@media (max-width: 600px) {
    .vs-product-card__media {
        aspect-ratio: 1 / 1;
    }
}

/* "Gratis staal"-knop op de kaart */
.vs-product-card__sample {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 10px !important;
    padding: 7px 12px !important;
    width: auto !important;
    min-width: 0 !important;
    align-self: flex-start !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    color: var(--vs-color-primary, #2a3065) !important;
    background: #fff !important;
    background-image: none !important;
    border: 1.5px solid #d8dce8 !important;
    border-radius: 999px !important;
    cursor: pointer !important;
    transition: border-color 0.14s, background 0.14s, color 0.14s !important;
}
.vs-product-card__sample:hover,
.vs-product-card__sample:focus-visible {
    border-color: var(--vs-color-primary, #2a3065) !important;
    background: #f4f6fb !important;
}
.vs-product-card__sample-icon { flex: 0 0 auto; }

/* Review-sterren op de kaart */
.vs-product-card__rating {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: -2px 0 2px !important;
}
.vs-stars {
    position: relative;
    display: inline-block;
    font-size: 15px;
    line-height: 1;
    letter-spacing: 1px;
    color: #d8dce3;
    white-space: nowrap;
}
.vs-stars::before {
    content: "★★★★★";
    position: absolute;
    left: 0;
    top: 0;
    width: var(--vs-stars, 0%);
    overflow: hidden;
    color: #f5a623;
    white-space: nowrap;
}
.vs-product-card__rating-count {
    font-size: 12px;
    color: var(--vs-muted, #667085);
}

/* Kleur-swatches op de kaart (linken naar dezelfde vloer in een andere kleur) */
.vs-product-card__swatches {
    position: relative; /* boven de title-link-overlay */
    z-index: 2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 2px 0 0;
}
.vs-product-card__swatch {
    display: block !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    overflow: hidden;
    background: #f4f5f7;
    border: 2px solid #fff !important;
    box-shadow: 0 0 0 1px var(--vs-border, #e2e5ee);
    transition: box-shadow .14s ease, transform .14s ease;
}
.vs-product-card__swatch img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    margin: 0 !important;
    border-radius: 0 !important;
}
.vs-product-card__swatch:hover,
.vs-product-card__swatch:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px var(--vs-accent, #2a3065);
}
.vs-product-card__swatch.is-current {
    box-shadow: 0 0 0 2px var(--vs-accent, #2a3065);
}
.vs-product-card__swatch-more {
    margin-left: 2px;
    font-size: 12px;
    font-weight: 600;
    color: var(--vs-muted, #667085);
}

/* Hartje-link in de header (naar de verlanglijst) met teller-badge */
.vs-wishlist-headerlink {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0 8px;
    color: #1a1a2e;
    text-decoration: none !important;
    vertical-align: middle;
    transition: color .14s ease, transform .14s ease;
}
.vs-wishlist-headerlink svg {
    width: 24px;
    height: 24px;
    display: block;
}
.vs-wishlist-headerlink:hover { color: #e3342f; transform: translateY(-1px); }
.vs-wishlist-headerlink__count {
    position: absolute;
    top: -3px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e3342f;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    border-radius: 999px;
    box-sizing: border-box;
}
.vs-wishlist-headerlink__count[hidden] { display: none; }

/* Levertijd-indicator op de kaart (stipje + label) */
.vs-product-card__delivery {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: var(--vs-color-text, #344054) !important;
}
.vs-product-card__delivery-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #98a2b3;
}
.vs-product-card__delivery--green .vs-product-card__delivery-dot { background: var(--vs-color-success, #42ac6f); }
.vs-product-card__delivery--amber .vs-product-card__delivery-dot { background: #e8943a; }
.vs-product-card__delivery--grey .vs-product-card__delivery-dot { background: #98a2b3; }
.vs-product-card__delivery--green { color: #2f7d51 !important; }
