/**
 * SM Essentials — catalog toolbar (core, loaded on catalog / modules / PDP).
 */

/* Touch: theme hides toolbar via .opacity-0 — keep it usable. */
@media (hover: none) {
    .card-hover > [data-sm-essentials="toolbar"].opacity-0 {
        opacity: 1 !important;
    }
}

/* Keep toolbar visible when wishlist/compare already active (not only on hover). */
.card-hover:has(> [data-sm-essentials="toolbar"] .is-active) > [data-sm-essentials="toolbar"].opacity-0 {
    opacity: 1 !important;
}

/*
 * Catalog: wishlist/compare stay visible without hover only when in the list (.is-active).
 * On card hover both inactive buttons appear so they can be toggled.
 */
@media (hover: hover) {
    .card-hover:not(:hover):not(:focus-within) > [data-sm-essentials="toolbar"][data-sm-context="catalog"]
        [data-sm-action="wishlist-toggle"]:not(.is-active),
    .card-hover:not(:hover):not(:focus-within) > [data-sm-essentials="toolbar"][data-sm-context="catalog"]
        [data-sm-action="compare-toggle"]:not(.is-active) {
        display: none;
    }
}
