.tbfp-wrapper {
    margin-bottom: 30px;
}

.tbfp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.tbfp-field label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.tbfp-field select {
    width: 100%;
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size:14px;
    font-weight:600;
}

.tbfp-field select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.tbfp-clear {
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 6px;
}

.tbfp-loading {
    margin: 16px 0;
    font-weight: 700;
}

.tbfp-empty {
    padding: 18px;
    background: #fafafa;
    border: 1px dashed #ccc;
    border-radius: 8px;
}

.tbfp-count {
    font-weight: 700;
    margin: 18px 0;
}
.tbfp-results ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 20px 0;
    padding: 0;
}

.tbfp-results ul.products li.product {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
}

@media (max-width: 1024px) {
    .tbfp-results ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .tbfp-results ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tbfp-grid {
        grid-template-columns: 1fr;
    }

    .tbfp-field {
        width: 100%;
    }

    .tbfp-field select {
        width: 100%;
    }

    .tbfp-actions {
        width: 100%;
    }

    .tbfp-clear {
        width: 100%;
    }
}
.tbfp-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 25px 0;
    justify-content: center;
}

.tbfp-pagination a,
.tbfp-pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    border-radius: 4px;
}

.tbfp-pagination .current {
    font-weight: 700;
    background: #111;
    color: #fff;
}
.tbfp-sortbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin: 12px 0 6px;
}

.tbfp-sortbar label {
    font-size: 14px;
    font-weight: 600;
}

.tbfp-sort {
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
}

@media (max-width: 768px) {
    .tbfp-sortbar {
        display: grid;
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .tbfp-sort {
        width: 100%;
        min-width: 0;
    }
}


/* Homepage submit finder */

.tbfp-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.tbfp-home-field select {
    width: 100%;
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size:14px;
    font-weight:600;
}

.tbfp-home-submit {
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .tbfp-home-grid {
        grid-template-columns: 1fr;
    }

    .tbfp-home-field,
    .tbfp-home-field select,
    .tbfp-home-submit {
        width: 100%;
    }
}
