/* Advanced Product Sorting — Frontend */

#apsw-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    background: #f8f3fd;
    border: 1px solid #d4aee8;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}
.apsw-label { color: #555; font-weight: 600; }
.apsw-term-badge {
    background: #96588a;
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.apsw-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all .15s;
}
.apsw-btn-primary  { background: #96588a; color: #fff; }
.apsw-btn-primary:hover  { background: #7d4770; }
.apsw-btn-secondary { background: #fff; color: #666; border: 1px solid #ccc; }
.apsw-btn-secondary:hover { background: #f5f5f5; }
.apsw-btn:disabled { opacity: .6; cursor: default; }
.apsw-drag-tip { color: #888; font-size: 12px; font-style: italic; }
.apsw-notice { font-size: 13px; padding: 3px 10px; border-radius: 4px; }
.apsw-notice.success { color: #1d6a29; background: #edfaef; border: 1px solid #68de7c; }
.apsw-notice.error   { color: #8a2424; background: #fef1f1; border: 1px solid #f1a1a1; }

/* Drag states */
.apsw-drag-active .products .product {
    cursor: grab;
    transition: box-shadow .15s;
}
.apsw-drag-active .products .product:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.apsw-drag-active .products .product.ui-sortable-helper {
    cursor: grabbing;
    box-shadow: 0 8px 28px rgba(0,0,0,.2);
    transform: rotate(1deg) scale(1.03);
    z-index: 9999;
}
.apsw-drag-active .products .product.ui-sortable-placeholder {
    visibility: visible !important;
    border: 2px dashed #96588a;
    background: #f9f0fd;
    border-radius: 4px;
}
.apsw-drag-active .products .product::after {
    content: '⠿';
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(150,88,138,.85);
    color: #fff;
    width: 22px; height: 22px;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity .2s;
}
.apsw-drag-active .products .product:hover::after { opacity: 1; }
.apsw-drag-active .products .product { position: relative; }
