/* CuddNivar product cards v1.0.7 — clean single source of truth.
   The previous plugin contained six contradictory groups of rules. */
:root {--cn-card-orange:#f28c19;--cn-card-orange-hover:#dd7713;--cn-card-green:#174c3c;--cn-card-text:#243a32;--cn-card-muted:#718076;--cn-card-line:#e3ebe6}

/* Scope exclusively to listing cards; do not affect single-product purchase controls. */
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product {
    min-width:0!important;height:100%!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-product-wrapper {
    position:relative!important;display:flex!important;flex-direction:column!important;
    min-height:0!important;height:100%!important;overflow:hidden!important;
    border:1px solid var(--cn-card-line)!important;border-radius:16px!important;
    background:#fff!important;box-shadow:0 3px 14px rgba(17,49,35,.045)!important;
    transition:box-shadow .2s ease,border-color .2s ease!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product:hover .wd-product-wrapper {
    border-color:#cfdfd6!important;box-shadow:0 9px 24px rgba(17,49,35,.09)!important;
}

/* Compact image stage without any zoomed / overlapping product photos. */
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-product-thumb {
    flex:0 0 210px!important;position:relative!important;display:flex!important;
    width:100%!important;height:210px!important;min-height:210px!important;max-height:210px!important;
    margin:0!important;padding:15px!important;background:#fff!important;
    overflow:hidden!important;align-items:center!important;justify-content:center!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-product-img-link {
    display:flex!important;align-items:center!important;justify-content:center!important;
    width:100%!important;height:100%!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-product-thumb img {
    display:block!important;width:100%!important;height:100%!important;max-width:100%!important;
    max-height:100%!important;object-fit:contain!important;object-position:center!important;
    padding:0!important;margin:auto!important;transform:none!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-product-img-hover,
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .hover-img {display:none!important}

/* One layout for all listings: category -> title -> price -> compact CTA.
   Each row gets full available width, preventing variable-price overlap. */
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .product-information {
    display:grid!important;flex:1 1 auto!important;width:100%!important;min-width:0!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:"category" "title" "price" "action"!important;
    grid-template-rows:15px 44px minmax(29px,auto) 42px!important;
    align-content:end!important;align-items:center!important;
    row-gap:8px!important;column-gap:0!important;
    margin:0!important;padding:6px 17px 18px!important;text-align:left!important;
    box-sizing:border-box!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-product-cats {
    grid-area:category!important;display:block!important;min-width:0!important;width:100%!important;
    min-height:0!important;max-height:15px!important;margin:0!important;padding:0!important;
    overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
    font-size:10px!important;line-height:15px!important;font-weight:700!important;
    letter-spacing:.07em!important;text-transform:uppercase!important;color:var(--cn-card-muted)!important;text-align:left!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-product-cats a {color:inherit!important;text-decoration:none!important}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-entities-title {
    grid-area:title!important;display:-webkit-box!important;min-width:0!important;width:100%!important;
    -webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;
    min-height:44px!important;max-height:44px!important;overflow:hidden!important;
    margin:0!important;padding:0!important;
    font-size:15px!important;line-height:1.45!important;font-weight:700!important;
    letter-spacing:-.015em!important;color:var(--cn-card-text)!important;text-align:left!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-entities-title a {
    color:inherit!important;text-decoration:none!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .product-rating-price {
    grid-area:price!important;display:flex!important;align-items:center!important;min-width:0!important;
    width:100%!important;overflow:visible!important;margin:0!important;padding:0!important;text-align:left!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wrapp-product-price {min-width:0!important;width:100%!important;margin:0!important}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .price {
    display:flex!important;align-items:baseline!important;flex-wrap:wrap!important;
    width:100%!important;max-width:100%!important;gap:0 5px!important;
    margin:0!important;padding:0!important;color:var(--cn-card-green)!important;
    font-size:20px!important;line-height:1.28!important;font-weight:750!important;
    letter-spacing:-.025em!important;text-align:left!important;white-space:normal!important;
    overflow:visible!important;overflow-wrap:normal!important;word-break:normal!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .price .woocommerce-Price-amount {
    display:inline-block!important;white-space:nowrap!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product.product-type-variable .price {
    font-size:17px!important;gap:0 5px!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .price del {color:#89978d!important;font-size:13px!important;font-weight:500!important}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .price ins {color:var(--cn-card-green)!important;text-decoration:none!important}

/* Show one stable, accessible action — never WoodMart's hover-overlay. */
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-product-card-hover {
    grid-area:action!important;display:block!important;position:static!important;
    width:max-content!important;min-width:0!important;max-width:100%!important;
    height:42px!important;min-height:42px!important;max-height:42px!important;
    margin:0!important;padding:0!important;overflow:visible!important;
    opacity:1!important;visibility:visible!important;transform:none!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .hover-content,
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-quick-view,
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-compare-btn,
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wrap-wishlist-button,
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-swatches-product {display:none!important}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-bottom-actions,
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-add-btn {
    display:flex!important;position:static!important;align-items:center!important;justify-content:flex-start!important;
    width:max-content!important;min-width:0!important;max-width:100%!important;
    height:42px!important;min-height:42px!important;max-height:42px!important;
    margin:0!important;padding:0!important;
    opacity:1!important;visibility:visible!important;transform:none!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-add-btn .add-to-cart-loop {
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    box-sizing:border-box!important;position:relative!important;
    width:130px!important;min-width:130px!important;max-width:130px!important;
    height:42px!important;min-height:42px!important;max-height:42px!important;
    margin:0!important;padding:0 12px!important;
    border:1px solid var(--cn-card-orange)!important;border-radius:9px!important;
    background:var(--cn-card-orange)!important;color:#fff!important;
    font-family:inherit!important;font-size:12px!important;line-height:1!important;
    font-weight:700!important;letter-spacing:.025em!important;text-transform:uppercase!important;
    text-align:center!important;white-space:nowrap!important;overflow-wrap:normal!important;word-break:keep-all!important;
    box-shadow:none!important;text-shadow:none!important;
    transition:background-color .15s ease,border-color .15s ease!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-add-btn .wd-action-icon,
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-add-btn .add-to-cart-loop:before,
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-add-btn .add-to-cart-loop:after {display:none!important}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-add-btn .wd-action-text {
    display:inline!important;margin:0!important;padding:0!important;
    font-family:inherit!important;font-size:12px!important;line-height:1!important;
    font-weight:700!important;letter-spacing:.025em!important;text-transform:uppercase!important;
    color:inherit!important;white-space:nowrap!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-add-btn .add-to-cart-loop:hover {
    background:var(--cn-card-orange-hover)!important;border-color:var(--cn-card-orange-hover)!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-add-btn .add-to-cart-loop:focus-visible {
    outline:3px solid var(--cn-card-green)!important;outline-offset:3px!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product.product-type-variable .wd-add-btn .add-to-cart-loop {
    background:#fff!important;border-color:var(--cn-card-green)!important;color:var(--cn-card-green)!important;
}
body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product.product-type-variable .wd-add-btn .add-to-cart-loop:hover {
    background:#edf5ef!important;
}

/* Mobile: easy tapping, compact two-column cards, with no price/button collision. */
@media(max-width:1100px) {
    body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-product-thumb {
        flex-basis:185px!important;height:185px!important;min-height:185px!important;max-height:185px!important;
    }
    body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .product-information {
        padding:5px 13px 15px!important;
    }
}
@media(max-width:767px) {
    body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-product-thumb {
        flex-basis:145px!important;height:145px!important;min-height:145px!important;max-height:145px!important;padding:10px!important;
    }
    body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .product-information {
        grid-template-rows:13px 42px minmax(36px,auto) 42px!important;
        row-gap:6px!important;padding:4px 10px 13px!important;
    }
    body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-product-cats {
        font-size:8px!important;line-height:13px!important;max-height:13px!important;
    }
    body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-entities-title {
        min-height:42px!important;max-height:42px!important;font-size:12px!important;line-height:1.7!important;
    }
    body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .price {
        font-size:16px!important;
    }
    body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product.product-type-variable .price {
        font-size:13px!important;gap:0 4px!important;
    }
    body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-add-btn .add-to-cart-loop {
        width:124px!important;min-width:124px!important;max-width:124px!important;
        height:42px!important;min-height:42px!important;max-height:42px!important;
        font-size:10px!important;padding:0 7px!important;
    }
    body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-add-btn .wd-action-text {
        font-size:10px!important;letter-spacing:0!important;
    }
}
@media(prefers-reduced-motion:reduce) {
    body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-product-wrapper,
    body :is(.wd-products,.cn-featured-section,.related.products,.upsells.products) .wd-product .wd-add-btn .add-to-cart-loop {transition:none!important}
}
