/**
 * DLM Showcase product cards — isolated Local visual rework.
 *
 * Botiga/WooCommerce keep the loop, native columns, responsive grid and
 * commerce links. DLM styles only the card interior and its governed metadata.
 */

body.dlm-product-cards-v2-1-v3-reactive {
    --dlm-card-accent: #e8173d;
    --dlm-card-accent-soft: #fcebf0;
    --dlm-card-ink: #191a21;
    --dlm-card-muted: #626571;
    --dlm-card-line: #e4e5ea;
    --dlm-card-green: #237b51;
    --dlm-card-green-soft: #e8f3ed;
    background: #fff;
}

html[data-dlm-language="en"] body.dlm-product-cards-v2-1-v3-reactive {
    --dlm-card-accent: #2854db;
    --dlm-card-accent-soft: #edf1ff;
}

body.dlm-product-cards-v2-1-v3-reactive::before {
    content: none;
}

body.dlm-product-cards-v2-1-v3-reactive #page.site,
body.dlm-product-cards-v2-1-v3-reactive .content-wrapper,
body.dlm-product-cards-v2-1-v3-reactive .content-wrapper > .main-row,
body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive,
body.dlm-product-cards-v2-1-v3-reactive .dlm-marketplace-archive-layout,
body.dlm-product-cards-v2-1-v3-reactive .dlm-marketplace-archive-layout__filters,
body.dlm-product-cards-v2-1-v3-reactive .dlm-marketplace-archive-layout__results {
    background: transparent;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product {
    align-self: stretch;
    background: #fff;
    border: 1px solid var(--dlm-card-line);
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(23, 33, 59, .05);
    color: var(--dlm-card-ink);
    display: flex;
    flex-direction: column;
    height: 100%;
    isolation: isolate;
    min-width: 0;
    overflow: hidden;
    padding: 18px !important;
    transform: translateY(0);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product::before,
body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product::after {
    content: none;
}

@media (hover: hover) and (pointer: fine) {
    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product:hover,
    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product:focus-within {
        border-color: #d7d8df;
        box-shadow: 0 18px 38px rgba(23, 33, 59, .1);
        transform: translateY(-3px);
    }
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product > .loop-image-wrap,
body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product .loop-image-wrap.dlm-product-card__media {
    align-items: center;
    aspect-ratio: 1.25 / 1;
    background: #e8f1ea;
    display: flex;
    justify-content: center;
    margin: 0;
    min-height: 170px;
    overflow: hidden;
    padding: 20px;
    position: relative;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product:nth-child(4n + 2) .dlm-product-card__media {
    background: #f7e4e9;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product:nth-child(4n + 3) .dlm-product-card__media {
    background: #e7ebfb;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product:nth-child(4n + 4) .dlm-product-card__media {
    background: #fff0bf;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product .dlm-product-card__media::after {
    background: radial-gradient(circle at 50% 32%, rgba(255,255,255,.78), transparent 62%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product .dlm-product-card__media > .woocommerce-LoopProduct-link {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    position: relative;
    width: 100%;
    z-index: 1;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product .dlm-product-card__media img {
    background: #fff;
    border-radius: 3px;
    box-shadow: 6px 10px 18px rgba(23, 56, 46, .22);
    height: auto;
    margin: 0 !important;
    max-height: 100%;
    max-width: 88%;
    object-fit: contain;
    transform: rotate(-3deg);
    transition: transform .2s ease;
    width: auto;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product:nth-child(even) .dlm-product-card__media img {
    transform: rotate(2.5deg);
}

@media (hover: hover) and (pointer: fine) {
    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product:hover .dlm-product-card__media img {
        transform: rotate(0deg) scale(1.025);
    }
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .dlm-product-card__media .botiga-wishlist-button,
body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .dlm-product-card__media .merchant-wishlist-button {
    align-items: center;
    background: #fff !important;
    border: 1px solid #e6e6eb !important;
    border-radius: 50% !important;
    box-shadow: 0 3px 10px rgba(17, 17, 17, .08);
    color: #272933 !important;
    display: flex !important;
    height: 40px !important;
    justify-content: center;
    padding: 0 !important;
    position: absolute !important;
    right: 16px !important;
    top: 16px !important;
    width: 40px !important;
    z-index: 4;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .dlm-product-card__media .botiga-wishlist-button:hover,
body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .dlm-product-card__media .botiga-wishlist-button:focus-visible {
    background: var(--dlm-card-accent-soft) !important;
    border-color: var(--dlm-card-accent) !important;
    color: var(--dlm-card-accent) !important;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .dlm-product-card__media .botiga-wishlist-button:focus-visible,
body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .botiga-wc-loop-product__title:focus-visible {
    outline: 3px solid var(--dlm-card-accent);
    outline-offset: 3px;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__badge {
    background: #243d35;
    border-radius: 999px;
    color: #fff;
    font: 700 11px/1 "greycliff-cf", Arial, sans-serif;
    left: 16px;
    letter-spacing: .03em;
    padding: 8px 10px;
    position: absolute;
    top: 16px;
    z-index: 3;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .dlm-product-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px 0 16px;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 13px;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__resource-type,
body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__grade {
    border-radius: 999px;
    font: 700 13px/1.15 "greycliff-cf", Arial, sans-serif;
    padding: 7px 9px;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__resource-type {
    background: var(--dlm-card-accent-soft);
    color: var(--dlm-card-accent);
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__grade {
    background: var(--dlm-card-green-soft);
    color: var(--dlm-card-green);
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__meta-separator {
    display: none;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .woocommerce-loop-product__title,
body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .woocommerce-loop-product__title a,
body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .botiga-wc-loop-product__title {
    color: var(--dlm-card-ink) !important;
    font: 700 clamp(20px, 1.35vw, 22px)/1.08 "greycliff-cf", Arial, sans-serif !important;
    letter-spacing: -.035em !important;
    margin: 0 !important;
    min-height: 0 !important;
    text-decoration: none !important;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .woocommerce-loop-product__title {
    margin-bottom: 13px !important;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .botiga-wc-loop-product__title:hover {
    color: var(--dlm-card-accent) !important;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__utility {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 17px;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__pill {
    border-radius: 999px;
    font: 700 13px/1 "greycliff-cf", Arial, sans-serif;
    padding: 7px 9px;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__pill--spanish {
    background: #fcebf0;
    color: #b42318;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__pill--english {
    background: #edf1ff;
    color: #175cd3;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__pill--format,
body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__pill--language-neutral {
    background: #f1f2f4;
    color: #475467;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__vendor {
    align-items: center;
    color: var(--dlm-card-muted);
    display: flex;
    font: 400 14px/1.4 "greycliff-cf", Arial, sans-serif;
    gap: 9px;
    margin-top: auto;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__vendor-avatar {
    align-items: center;
    background: #f1f2f4;
    border-radius: 50%;
    color: #343641;
    display: inline-flex;
    flex: 0 0 30px;
    font: 700 10px/1 "greycliff-cf", Arial, sans-serif;
    height: 30px;
    justify-content: center;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__vendor a {
    color: #343641;
    font-weight: 700;
    text-decoration-color: #c5c7ce;
    text-underline-offset: 3px;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__footer {
    align-items: end;
    border-top: 1px solid #e6e7eb;
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 17px;
}

body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__price,
body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__price .price,
body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__price .woocommerce-Price-amount,
body.dlm-product-cards-v2-1-v3-reactive .dlm-product-card__free {
    color: var(--dlm-card-ink) !important;
    font: 700 26px/1 "greycliff-cf", Arial, sans-serif !important;
    letter-spacing: -.035em;
}

body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product > .loop-button-wrap {
    display: none !important;
}

@media (max-width: 1279px) {
    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product .dlm-product-card__media {
        aspect-ratio: 1.5 / 1;
        min-height: 240px;
    }
}

@media (max-width: 760px) {
    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product {
        border-radius: 20px;
    }

    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product .dlm-product-card__media {
        aspect-ratio: 1.35 / 1;
        min-height: 250px;
        padding: 28px;
    }

    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .dlm-product-card__content {
        padding: 22px 0;
    }

    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .woocommerce-loop-product__title,
    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .woocommerce-loop-product__title a,
    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive .botiga-wc-loop-product__title {
        font-size: 25px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product,
    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product .dlm-product-card__media img {
        transition: none !important;
    }

    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product:hover,
    body.dlm-product-cards-v2-1-v3-reactive .site-main.dlm-marketplace-archive ul.products li.product:focus-within {
        transform: none;
    }
}
